Wednesday, August 18, 2010

Doorbell to Text Project

    Obj: Create a doorbell that will send a text message to my cell phone. When we moved into our house a few years ago, one of the first things we did was unhook our doorbell because it seemed that someone would always ring it during naptime. This would inevitably wake children up with no hope of getting them back to sleep... so the only solution was to unhook it. Of course the downside was we sometimes missed people we didn't want to miss, but we didn't want to have the doorbell just for that. This project was born from the fact that most of our friends knew that our doorbell didn't work and would usually just text us that they were here. I decided to then create a doorbell that would automate this task for us. In the future I figure I could add components like a camera to take the doorbell ringers picture and send it to the phone and a feature where I could send an SMS message to the Arduino and have it unlock the door, making it the ultimate in door laziness!For this project I used an Arduino Duemilanove and a Wireless Doorbell

    The initial hack was pretty straightforward. I purchased a wireless doorbell and took the receiver end apart, just needing the circuit board from the inside... I supply power and ground to the doorbell component via the Ardunio red and black wire, respectively. Pressing the doorbell button sends a signal to the wireless receiver (hooked to the Arduino) and through the yellow wire, that used to be hooked to a speaker. Now it's just sends a voltage change, which I've instructed the Arduino to look for and when it detects the voltage change, send a text message to my phone. To get the text message out to the phone, you have to have an internet connection... for initial testing the arduino was connected to a computer and would send the message via a piggy back off of the computers internet connection. I didn't want to have a standalone computer at our front door to send the text so I had to search for a different solution. Via some research on the Oracle of Google, i found this little beauty! This device allows me to have an internet connection without a dedicated computer.

    Once everything was hooked up, load this sketch to your Ardunio and you will get a text when someone rings the doorbell.

    Arduino Source Code

#define txPin 3 //set input pin where you want to detect voltage
int po
tPin = 0;
int val = 0;
long time = 0;
long debounce = 5000; //sets a 5 second delay between "rings"
//you can set this to any amount of time you wish to inpose

//between button presses.


void setup() {
pinMode(txPin, OUTPUT);
digitalWrite(14 + potPin, HIGH);

void loop(){
val = analogRead(potPin);
   if (val < 25) {
      if (millis()-time > debounce) {
         Serial.print("[[[email|,|Doorbell|Get the door]]]");
time = millis();  
Considering doing something like this next: