My Experimental Doorbell
My doorbell is old… it’s ugly… it’s disconnected… it deserves an upgrade.
(It says “live better electrically”. What is this? The ’60’s?)
So I went on amazon.com to browse through doorbells, but I was a little disappointed. Something bothers me about their selection of doorbells. They’re archaic. Yes. I want to build my own “different” kind of doorbell.
Here are the features I want:
– No buttons. I want it to be fully motion sensored.
– Voice greeting. I want Jarvis to greet the visitor.
– Voice alert. I want Jarvis to notify me (inside the house or wherever I am) that somebody is at my door.
– Logging. I want Jarvis to log and timestamp every time I have a visitor. On top of that, I want Jarvis to store snapshots of the person that’s at my door.
THAT is what I want to see in my doorbell.
So… Let’s make this happen.
First, I need a PIR (passive infrared) motion sensor.
Now take my word for it, this is one of the FEW times where something is actually cheaper at Radio Shack than ebay. No joke. At best, you’ll find the same PIR module at a similar price.
PIR sensors are great for projects that require motion detection. They are great for alarm systems, automatic lights, doors, urinals…. NOT bowl toilets. I repeat, they are terrible for sit-down toilets. I don’t understand why toilet manufacturers STILL use them. It flushes while you’re trying to lay sheets of toilet seat cover, and it doesn’t flush when you want it to.
PIR modules are very easy to use. The latest ones from parallax (the ones they sell at radio shack) output 5v upon movement. This means you can use it to power something small without a microcontroller and/or transistor.
In my case, I want it to activate a voice recording.
Second, I need a way to play back recorded voices.
In my previous projects, I used a piezo transducer to produce sounds… but those are limited to beeps. Making your arduino play recorded sounds, voices, and or music is a bit trickier. The easiest way to accomplish this is to use something like an arduino “wave shield”.
These are sold on ebay for about $20. I just need to plug a speaker into the wave shield so visitors can hear Jarvis’ friendly voice.
The other components I will need include an arduino ethernet shield, a surveillance camera, and Jarvis of course.
This is how my “doorbell” will work:
1) PIR sensor detects motion.
2) Did it already detect motion? If so jump back to 1. Otherwise, go to 3.
3) Trigger pre-recorded voice of Jarvis on wave shield that says “Hello. I am notifying my master that you are here”.
4) Make a call to the doorbell server API and let it know that I have a visitor.
5) Server takes a feed off the front door surveillance cam and creates a snapshot image.
6) Server takes that snapshot image and converts it into a base64 encoded dataurl so we don’t have to store the image as a file.
7) Server logs that data and timestamps it.
8) Meanwhile, Jarvis is polling the doorbell server via ajax requests.
9) Does Jarvis see new visitor data? If so, alert me with “You have a visitor” and show me a snapshot from my front doorstep on my screen.
Piecing it together
I stacked the ethernet shield on top of the arduino, and I stacked the wave shield on top of the ethernet shield.
I only needed 3 wires: +5v, gnd, and digital pin 4. All of which goes to the PIR sensor.
You can view the arduino source code here.
I ran a few tests which proved to be successful.
and a closer look at Jarvis when she alerts me of a visitor:
Here is a video of my prototype doorbell in action:
Cool! All I have to do now is install it! On second thought, I’m probably going to wait for the weather to cool down. Running wire through the baking hot attic in the summertime does NOT sound fun.