There is no USPS pickup on Monday Feb 15th, 2016 because of President's Day. USPS orders placed after 11am EST Fri February 12th will go out Tuesday February 16. UPS orders will ship as normal.

Arduino-powered Audio Doorbell
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Arduino-powered Audio Doorbell

by jarruda on Tue Nov 27, 2012 2:22 pm

So when I bought my house, I noticed it had probably the most boring doorbell on the planet. Then I saw the adafruit's Wave Shield and saw inspiration.

This is my first actually completed hobby electronics project, so I'm pretty proud of it, even if it's really simple.

http://youtu.be/lDCDayKyOQA
(Is it possible to embed a youtube video on these forums?)

Main Parts:
Pre-R3 Arduino Uno
Wave Shield 1.1
Velleman 3 Watt Mono Amplifier # K 8066

guts.jpg
guts.jpg (161.41 KiB) Viewed 2599 times


Power for the doorbell comes from a 16V transformer off mains power (120V). It's run through a 50V 4A bridge diode rectifier into an electrolytic cap and a ceramic cap to smooth the pulsed DC, then two diodes to drop the voltage by ~3V before powering the mono amplifier and being split off for the UNO's Vin.

The doorbell is connected like any other button, sending 5V out to the doorbell and in to a digital pin configured as an interrupt. Using a pullup resistor and pulling the pin to ground wasn't used to lower the demand on the linear regulator running on voltage that's a bit higher than I'd like. To further reduce power usage, the atmega328 is put into PWR_DOWN sleep in between doorbell rings.

Also, thanks to adafruit_support for providing help!

My next project is a little more ambitious, a thermostat that can use a wireless sensor for temperature readings.
Last edited by jarruda on Tue Nov 27, 2012 5:36 pm, edited 3 times in total.
jarruda
 
Posts: 25
Joined: Sun Jan 29, 2012 12:40 pm

Re: Arduino-powered Audio Doorbell

by adafruit_support_bill on Tue Nov 27, 2012 2:42 pm

Sounds like a great project. But the video link isn't working.

adafruit_support_bill
 
Posts: 45727
Joined: Sat Feb 07, 2009 10:11 am

Re: Arduino-powered Audio Doorbell

by jarruda on Tue Nov 27, 2012 2:51 pm

The video page on youtube has a banner for me that says, "Sit tight! Your video edits are about 90% done. Come back to this page in a little while." Though it's still showing me an older version of the video. Is the link working for you now? Alternative: http://www.youtube.com/watch?v=lDCDayKyOQA
jarruda
 
Posts: 25
Joined: Sun Jan 29, 2012 12:40 pm

Re: Arduino-powered Audio Doorbell

by adafruit_support_bill on Tue Nov 27, 2012 3:20 pm

The link is working now. Nice looking project! :D

adafruit_support_bill
 
Posts: 45727
Joined: Sat Feb 07, 2009 10:11 am

Re: Arduino-powered Audio Doorbell

by MattMiddleton on Thu Nov 29, 2012 12:10 pm

This looks awesome! Our doorbell is not only super generic, but rather quiet (can't hear it if you're in the basement). Is your code available somewhere online?
MattMiddleton
 
Posts: 3
Joined: Wed Aug 29, 2012 8:03 pm

Re: Arduino-powered Audio Doorbell

by jarruda on Fri Nov 30, 2012 10:27 am

MattMiddleton wrote:Is your code available somewhere online?


It's not, but it's nothing special. It's mostly just adafruit's wave shield sample code, but here's the meat of what is specific to the doorbell:

Code: Select all | TOGGLE FULL SIZE
void loop()
{
  dir_t dirBuf;
  FatReader file;
 
  root.rewind();
  while (root.readDir(dirBuf) > 0) {
    if (dirBuf.name[0] == '.')
      continue;

    if(file.open(vol, dirBuf) && !file.isDir()) {
      putstring("Enqueued ");
      printName(dirBuf);
      putstring_nl("");
     
      beginSleep();
     
      if (wave.create(file)) {
        wave.play();
        putstring("Playing...");
        while (wave.isplaying) {
          delay(100);
        }
        putstring_nl("Done.");
      }
     
      sdErrorCheck();
    }
  }
}


Code: Select all | TOGGLE FULL SIZE
void beginSleep() {
  putstring_nl("Going to sleep.");
  delay(100);
 
  set_sleep_mode(SLEEP_MODE_PWR_DOWN);
  sleep_enable();
  digitalWrite(ledPin, LOW);
 
  // Debounce the interrupt;
  // Also allow someone holding the button to continue playing audio (skip sleep)
  while (digitalRead(intPin) == LOW) {
      PCintPort::attachInterrupt(intPin, &interruptHandler, RISING);
      sleep_cpu();
      delay(10);
  }
 
  sleep_disable();
  digitalWrite(ledPin, HIGH);
}


In order to sleep (to lower power consumption; this project was originally going to be battery-powered), I had to use the PinChangeInt library in order to wake the Arduino since the external interrupt pins were in use by the wave shield.

Sidenote to adafruit_support:
It'd be nice if this forum allowed embedding of youtube videos or had a plugin to do syntax coloring on posted code. :)
jarruda
 
Posts: 25
Joined: Sun Jan 29, 2012 12:40 pm

Re: Arduino-powered Audio Doorbell

by sarahline on Sun Mar 03, 2013 7:20 pm

Is there a chance you could post all of your code? I am trying to figure out how to put my Arduino to sleep after it plays a sound that is triggered by a button.

Thanks!
sarahline
 
Posts: 3
Joined: Thu Dec 13, 2012 2:15 am

Re: Arduino-powered Audio Doorbell

by jarruda on Tue Mar 05, 2013 11:49 am

Hi sarahline,

Sure! http://pastebin.com/wbNiaQ1H

I'm not 100% positive this is the last revision of the code, but glancing over it, it appears to be what I have running on the device. Hope this helps.
jarruda
 
Posts: 25
Joined: Sun Jan 29, 2012 12:40 pm

Re: Arduino-powered Audio Doorbell

by scottinnh on Sun Jan 12, 2014 2:14 pm

This is great! Is it possible to buy the circuit board which provides DC power from the 16VAC supply? (I realize this is supposed to be a simple circuit which does not need explanation, however I've never built one, and the rectifier is not really central to my mission so much as connecting up a DIY doorbell).

scottinnh
 
Posts: 55
Joined: Wed Dec 15, 2010 5:31 pm

Re: Arduino-powered Audio Doorbell

by jarruda on Mon Jan 13, 2014 9:10 am

scottinnh wrote:This is great! Is it possible to buy the circuit board which provides DC power from the 16VAC supply? (I realize this is supposed to be a simple circuit which does not need explanation, however I've never built one, and the rectifier is not really central to my mission so much as connecting up a DIY doorbell).


If you take a look at a the orange perf board in the picture you can see the whole circuit - a bridge rectifier and a two capacitors make the 16 VAC -> VDC. After that I placed two diodes just to drop the voltage a couple of volts to make it more tolerable for the Arduino's regulator. Everything there is available at a local RadioShack.

If you're willing to change the transformer that feeds the doorbell to something like 12V, you can even remove the diodes.
jarruda
 
Posts: 25
Joined: Sun Jan 29, 2012 12:40 pm

Re: Arduino-powered Audio Doorbell

by atteroAnimus on Thu Dec 11, 2014 3:44 pm

This is genius.

I am very impressed. I am a n00b when it comes to electronic components. I wonder if you wouldn't mind posting that picture again with some callouts to which component is what on on your circuit board? I absolutely love this project.

atteroAnimus
 
Posts: 1
Joined: Thu Dec 11, 2014 3:42 pm

Re: Arduino-powered Audio Doorbell

by noobee on Thu Jun 04, 2015 10:05 am

Can you provide a link to the part numbers you used for the bridge rectifier and capacitors. As well as the diodes.

Thanks

noobee
 
Posts: 2
Joined: Thu Jun 04, 2015 10:04 am

Please be positive and constructive with your questions and comments.