Android Doorbell Notifier

Breadboarded circuit to detect when doorbell rings

It’s always unfortunate to find a FedEx tag on your door saying you missed a delivery; especially when you were home the whole time. After having this problem a few times [Lee] decided to rig up a doorbell notifier for his Android phone.

[Lee]‘s doorbell uses a 10 VAC supply to ring a chime. To reduce modifications to the doorbell, he added an integrated rectifier and a PNP transistor. The rectifier drives the transistor when the bell rings, and pulls a line to ground.

An old Netgear router running OpenWRT senses this on a GPIO pin. Hotplugd is used to run a script when the button push is detected.

The software is discussed in a separate post. The router runs a simple UDP server written in C. The phone polls this server periodically using SL4A: a Python scripting layer for the Android platform. To put it all together, hotplugd sends a UNIX signal to the UDP server when the doorbell is pushed. Once the phone polls the server a notification will appear, and [Lee] can pick up his package without delay.

Comments

  1. gmatstack says:

    What you’d want in Australia, however, is a motion sensor by the door. Australia Post seem to have a habit of pre-filling out all the “we missed you” cards and just dropping them at your door… if you notice and run out, the postie usually acts like you’re inconveniencing them when you actually request that they give you the parcel now…

  2. Zagroseckt says:

    i hate it when they “knock rang bell no one home” but in fact they never showed up.

    Got to the point i started security caming the entry way.

    you say you showed up at xx time.. LETS SEE. :)

  3. Agnes Inertia says:

    I just leave a large piece of paper with clear instructions in red block letters to leave the package if I don’t answer the door. I swear they wait for me to hop in the shower to deliver packages.

    But, I mean, this is an option nonetheless.

    File under “INTP problems”

  4. Mark says:

    “Polling once every few seconds shouldn’t have a measurable impact on battery life”
    Hmm I’d like to know if this turned out to be the case.

  5. fartface says:

    Note a simple relay connected to the doorbell wire screws also will work, I found that many of the smaller PCB relays at 12V will activate reliably at 10V

    you could also simply put a reed switch next to the coil in the doorbell for an even less intrusive detection.

    • tekkieneet says:

      I would have used a NPN transistor instead of a PNP. It looks that way too on the breadboard.

      Some of the more sensitive relays do require a DC source as they have tiny magnet inside to make them more sensitive. 10V AC would give you about 14V DC after rectification + cap (filtering). Some of my 12V relays would even turn on at 5V.

    • Whatnot says:

      Classical physical ‘bell’ doorbells work by the coil pulling a hammer then the hammer making a short-circuit through the contact with the bell, making the magnetic field collapse and the hammer returning to position and the action repeating. That means you would get a lot of pulses with a magnetic switch.

      Not that it matters much, you could easily compensate in software for it.

  6. Edgar Vice says:

    PUSH notification would be more efficient and without 1s delay

  7. wurst says:

    yeah. using pushover on the software side would be much easier…

    • Lee says:

      Thanks – could you provide some details on what the software would look like for using PUSH?
      What would need to be run on the router? What would need to run on the phone?
      Would I need access to someone else’s (Google’s?) services?

      • Sdlion says:

        It seems he’s referring to the technique of “push” notifications to the phone instead of the phone polling a server.
        I read that this is related https://developer.android.com/google/gcm/index.html

        • Lee says:

          Yes – I’ve seen that; my understanding is that it’s actually implemented as a poll – again due to not wanting to keep the networking stack alive, to keep power consumption low.
          Additionally implementing a GCM server in the few hundred KB of RAM I have available seems a lot harder than writing a UDP server. (Unless I use a cloud service, which again comes with some inherent latency – and I’d still need a client library of some sort.)

      • wurst says:

        yeah… pushover relies on googles cloud messaging service, so you need a google account. Otherwise its really simple to push notifications to your devices… im using it to notify me about events from my nas, vdr, callmonitor etc..

        its just an http request… curl will do the job fine on your router…

        https://pushover.net

        • Lee says:

          What’s the latency like? I already missed the door a couple of times using another cloud notification service…

          • wurst says:

            something between on and five seconds… when your “hallway” isnt longer than a soccerfield you should arrive before the postman leaves…

          • Whatnot says:

            MR Wurst doesn’t know delivery people..

          • Laszlo says:

            >postman leaves…

            *leaves…*
            :-D
            He was never really there in the first place…

            Less trouble for them to leave a paper, then wait for you, your signature,
            filling papers, etc. *YOU* just does not worth their time….

            So they put a paper to your door while on the move:)
            Better: They don’t even brother to come up to your floor, just leave the paper on the main entrance (ground floor).

            It’s simple time optimization on their part, who am I to blame anyone?:)

      • I’m not sure. However on first glance, I would call it interesting. However the theme settings for it make seeing the commands for the Open WRT stuff rather difficult to see. Is there a place to set them so that its black on white say?

  8. scott says:

    Wait, is the netgear power also coming from the doorbell AC? The would be awesome…

  9. I like this idea. However, I started brainstorming an alternative idea. http://www.Zello.com is totally free. You can setup a free account on your old Windows XP home PC or laptop that you have just kicking around in your computer workshop. With a quick trip to the electronics store (Radio Shack etc.), a quick ride to thrift store (i.e. Goodwill, etc.) and/or a trip to your junk box in the attic/basement/garage/lab and you have a quick and dirty VOIP Front Door Intercom. Load ZELLO on your smartphone and your in business.

    Leave the home laptop a few feet from front door on a small table. The DIY remote head will mean some drilling into the wall and a few bad looks from the wife! Put the laptop on a small portable stand near door – leave room for mouse (you can close the lid if you disable the sleep switch in control panel). Plug it into the wall outlet for power and the Ethernet cable too (or use Wi-Fi). Have it automatically load ZELLO on startup on both units. You’ll be tapping into your mouse circuit for I/O or the keyboard. Make sure you put a USB cooling pad under laptop too. Also do not turn loudspeaker up too high or the neighbors will complain that it’s too loud for them. A small experimental amount of volume is sufficient to be heard by the driver even with background noise from street.

    The delivery driver won’t get far as IF he/she presses the BELL button (a cheap DPST switch from electronics store), you’ll only be a moment away saying: “Oy mate! Put the packy under the shrub to your left. If I have to sign for it I’ll be there in a jif… I’m only gone walkabout down the road.”. He’ll probably want to know how to make one himself…
    (Note: The DPST switch uses the unused contacts for your existing door bell circuit. It’s a push button too so buy a really cool looking one. The other switch for talking (ptt) is an old rectangular SPST door bell switch turned sideways and labeled with a labeler or Marks-A-Lot – “ptt” – that’s the abbreviation for “push-to-talk”. Or just buy too really cool looking mechanical push-button-switches,)

    Here’s the project diagram and schematic: http://oi61.tinypic.com/x5593d.jpg

    I’d like to know if anybody actually builds one of these. I’ll try it soon enuf’ I guess. I have plenty of old laptops kickin’ around the flat.

    • I just found out you don’t have to HOVER over Zello PTT button in the application like I erroneously suggested. You can set the RIGHT mouse button to transmit no matter where mouse is pointing under TOOLS | OPTIONS | CONTROLS . Also do not hack open your keyboard as I suggested earlier. Just hack open an old USB mouse from thrift store. Will cost about $1 – $5 USD. You can also setup a Zello GROUP so that others can answer your door too – like family members and very close friends. Be sure to password protect your Zello group or Zello hackers will be answering your door too (LOL)

  10. I’m not sure I understand the utility, at least as described. This is for the time that you’re deaf and can’t hear the doorbell, but happen to be on your phone? To me, there are 3 options:

    1. You’re home and will hear the doorbell
    2. You’re not home, and being notified on your phone does zero good.
    3. You’re home and the postman knocks or does not ring the bell…

  11. The article here mentions both Open WRT and a particular brand of router. Does this mean it will work for a particular brand of router who does also run that creation?

  12. ameyring says:

    Deaf folks have been using ways to flash lights when the doorbell or phone rings. Good for noisy situations like vacuuming or when you’re too far away from the front door. The phone app could be useful if you put the phone in a carrier outside the shower door so it’s obvious when it flashes its screen.

  13. I have a similar project but I also wrote a python plugin for XBMC and I have to say it’s very useful, especially if you run XBMC on many screens in your house. Check it out here, let me know if you want to integrate it with your project. http://homeawesomation.wordpress.com/2013/02/18/doorbell-ipcam-xbmc-update/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 96,401 other followers