Wireless doorbell

Inspired by Robert Faludi’s excellent book “Building Wireless Sensor Networks”

… and partly by an old posting by Roo Reynolds, I thought I’d have a go with wireless comms using some XBee modules.

At last, Mrs Techcobweb agrees that if I could get a bell ringing in the study when someone rings the front door bell, that would be useful, as we have left callers on the doorstep for ages on occasion, not knowing there was anyone there.

I have had lots of comments like “you could have just bought a new wireless doorbell”…etc. which would have cost a quarter of the cost, but would not any fun at all, or provide the slightest learning experience.

So… I found a doorbell I had spare, it was a cheap battery-driven by-wire bell.

The batteries supplied 6volts, but the unit runs on a 6-12v supply. I removed the batteries and fitted a power-plug, to which I could attach an old wall-wort I had in the cupboard (an old mobile phone charger I think).

I wanted to experiment with different components so I could try lots of firsts, as I’ve not used a transistor or a relay before. This is going to be slightly overkill, as the relay is probably not necessary. Regardless..

In keeping with the O’Reilly book, I wanted to use an XBee module (3.3v), the relay needed 5v to turn it on/off, and the bell could take the 9v raw from the power supply.

I used two voltage regulators in series, the first converts the 9v to a 5v supply, which feeds the second regulator, delivering the 3.3v needed for the XBee.

Adding a few capacitors (again, probably some overkill for what I’m doing, but it seemed to work on the breadboard), I could put a small power-conversion board into the battery compartment on one side of the bell case.

The other side houses the XBee adapter, which converts the XBee to a 0.1″ strip-board guage, soldered in with a few resistors, a transistor, and the relay. Add to that a small tactile press-to-make switch and I could simulate a “ring the bell” command arriving over Wireless. ie: The switch uses the 3.3v power supply to turn on the relay.

The idea is that normally, everything is off, except the 3.3v supply going to the XBee module. When the XBee module is told “turn on digital output pin 0” it turns the “base” of the transistor to High, which allows the 5v circuit to drive the relay which in turn switches the relay, turning the 9v circuit on. The 9v circuit controls the solenoid in the bell unit, moving the bar inside the coil, which strikes the chime-bar. “Ding” can be heard.

When the XBee is told “turn off digital output pin 0” it drops the “base” of the transistor to Low, which turns off the relay, and the strike-bar in the bell springs back to hit the other chime-bar. This causes the “Dong” to be heard.

Now to control it: I use an arduino with another XBee, mounted in a home-made XBee shield, with an Ethernet shield sandwiched between the two.

Again, overkill. I could have just USB-connected the arduino, but I’ve run out of USB ports on my server, and wanted to site the XBee controller further away than a regular USB lead reached, so it’s in a location with better wireless reception, more central to the house.

The code on this XBee/Lan bridging arduino uses the MQTT library, to connect to the message broker running on my revo over the Lan. It subscribes to a topic “home/study/bell”, so when something publishes to that topic, it rings the doorbell via XBee: Ding-dong.

I’m currently driving this from a very simple PHP web page, which uses the PHP MQTT library to publish to that topic.

This has allowed me the chance to get the actuator half of the project working and tested before I start sensing someone pressing the front door bell switch. That’s next… (update to follow shortly)

Advertisements
This entry was posted in Electronics and tagged , , , . Bookmark the permalink.

6 Responses to Wireless doorbell

  1. You mention “The code on the XBee uses the MQTT library”. Do you mean that you’re using the programmable version of the XBees? If so, do you have a link to the MQTT library for it?

    Great writeup by the way! Love what you’re doing!
    Eric

  2. techcobweb says:

    Eric,
    OOps. Looks like my English was sloppy. Clarified in the updated post. The XBees are not programmable beyond simple settings pushed into their eproms. I meant that the arduino ran the XBee library, and also the MQTT arduino library, so MQTT packets travel over the lan back to the broker on my revo. Apologies for confusion.

  3. Super, thanks for the clarification. I didn’t think XBees were programmable either, until I stumbled across Digi’s programmable line on their site. http://www.digi.com/products/model?mid=3582

    Thanks again!
    Eric

  4. Miguel Pires says:

    Hi,
    I have buy an Arduino uno, and my idea is to get notify every time someone as ring my doorbell.

    Now my doorbell is identical to your’s it have a solenoid and is powerd with 4 x 1.5 AAA batteries.
    I’m very noob in electronic, and i’m trying to understand how can i read my 6v solenoid wend some one hit the doorbell button.

    Can you give me an idea on how can i connect my doorbell to arduino?

    Regards,

    • techcobweb says:

      I didn’t connect the doorbell to an arduino, but to an XBee module, but the principle involved is the same either way.
      I connected the doorbell to an opto-isolator, which allowed me to have to separate circuits with separate +ve and grounds.
      I played with a volt meter, and found that the voltage between two terminals inside the bell went from 0v to 6v when the bell was pressed.
      I connected the +ve terminal through a resistor to the opto-isolator, and back to the other terminal, so this circuit is in parallel to the regular solenoid circuit inside the bell, and uses the same battery power supply.
      When the bell line was high, the opto-isolator allowed my detector circuit to go high too, when the bell was idle, no power flows through the opto-isolator.
      I used a 4N35 837Q 6-pin IC chip.
      Then my second circuit connected to the opto-isolator just listened for a high signal which could be acted upon/transmitted.

      Having said all that, if time permits, I’m hoping to re-work this part of the doorbell to use an arduino nano in the coming months, so I get more control over what gets transmitted onto my XBee network. If I do that I’ll share code and circuit diagrams…etc.

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