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);
Serial.begin(9600);
delay(100);
Serial.flush();
delay(100);
}


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

13 comments:

  1. Just found your project, looks cool. How did you use the ioBridge for the Internet connectivity? Via a server action?

    ReplyDelete
  2. This looks really cool. I've been working on some home monitoring stuff and have failed to get my SMS code to work. If you have any views of your code I'd be grateful to take a look to see how you got this working.

    ReplyDelete
  3. ioBridge just receives a serial message that is sent from the arduino, as defined in the code above. The "XXXXXXXXXX" is just my 10 digit phone number and will only work if you have Verizon... I know the other mobile carriers have similar extensions for e-mail-to-SMS and of course you could just add a plain email address or i've also considered giving in the email address to update my Twitter / Facebook status.

    ReplyDelete
  4. @Hans (aka ShadowLord) i actually used your code for the Internet Enabled Message Center (http://goo.gl/jbar) to get the arduino to email. I couldn't find the code to perform this task anywhere and eventually stumbled upon your blog, and several of your projects... Thanks for your 'help' making this project happen!

    ReplyDelete
  5. I want to do this also. Can someone help me get started please.

    ReplyDelete
  6. Well you would need an Arduino, and a basic wireless doorbell from any store or online retailer... you will need an internet connection to get the text message out, so either a dedicated computer that the arduino stays hooked up to or the IO bridge that is linked in the blog. The only code needed is listed above and you're set

    ReplyDelete
  7. I was just pointed to this project and it is exactly what I wanted to do. Why did you use a wireless door bell instead of using your existing doorbell? Ultimately I would like to use my existing button, but just send the signal through the board. Is that even possible?

    ReplyDelete
    Replies
    1. It would be possible to use the exisiting doorbell... you would just need to unhook the doorbell at the end where the "bell" is inside the house, usually those little boxes make a good place for the Arduino to sit... but if you unhook those wires you just need to get an idea of what "ringing the bell" (ie pushing the button) looks like to the arduino, and adjust the code appropriatly. I chose to use a wireless doorbell just to avoid messing with my actual doorbell wiring, but this could be done with the original bell, just be careful with the electricity at the other end where the doorbell is, most doorbells use a live 120V line and feeds through a transformer usually reducing it to 10V... I also don't think i would feed the 10V line into the Arduino... leading to my use of a wireless doorbell (operating at 5V), which isn't to say the homewiring orignal doorbell can't be done, just more caution will be needed. hope this answers your question, let me know if I can help further

      Delete
  8. What if you don't have the ioBridge? You say in your testing you had it piggy backed off the internet connection of a computer to send the text...how exactly did that work?

    ReplyDelete
    Replies
    1. The code was actually the same, as i recall... The Arduino as just connected, via USB, to a computer with an active internet connection.

      Delete
    2. Thanks I have an Arduino on order from Amazon so I'll be trying it out when I get it...thanks for the fast response! Anything new and exciting you're working on now?

      Delete
  9. Great idea. I'll try to use my existing doorbell. I hope it will be O.K.

    ReplyDelete
  10. Its a great pleasure reading your post.Its full of information I am looking for and I love to post a comment that "The content of your post is awesome" Great work. ring doorbell pro review

    ReplyDelete