Tag archieven: rf

How to hack a doorbell and connect it to Twitter - Part 7: Adding it all together

After combining the sender, receiver and both Twitter sketches (and making some adjustments), I now present to you... the final result.

IMG_20130718_142140

The following sketch

  • checks for tweets with a specific hashtag every 40 seconds. When it finds one, it makes the doorbell ring and posts the screen name of the tweep as a new tweet;
  • posts a tweet when someone pushes the doorbell button.

To avoid posting a duplicate tweet (which isn't allowed by Twitter), the program appends a timestamp to each tweet.

Lees verder How to hack a doorbell and connect it to Twitter - Part 7: Adding it all together

Share Button

How to hack a doorbell and connect it to Twitter - Part 4: Using an Arduino to detect a wireless RF signal

The following sketch prints a message to the serial output when it detects the doorbell signal.

Lees verder How to hack a doorbell and connect it to Twitter - Part 4: Using an Arduino to detect a wireless RF signal

Share Button

How to hack a doorbell and connect it to Twitter - Part 3: Using an Arduino to send a wireless RF signal

I use the following sketch to test if the doorbell speaker reacts on the signal I found. It turned out that it works better when I adjusted the timings a little bit. That's why you won't find 520 microseconds, but 417 microseconds in line 29 of the code.

Lees verder How to hack a doorbell and connect it to Twitter - Part 3: Using an Arduino to send a wireless RF signal

Share Button

How to hack a doorbell and connect it to Twitter - Part 2: Sniffing a wireless RF signal

The first thing to do is detecting which signal is sent when pressing the doorbell button. For this purpose, we connect the RF receiver to the LINE IN connection of a PC and record the received signals with Audacity. This way, the PC acts like a kind of occiloscope, which I think is very cool. I was really suprised when it turned out that this really works!

First, build the following circuit:

You will need two resistors: 39 KOhm and 10 KOhm (which act as voltage dividers) and an audio cable with 3 segments on its plug. I stripped the 3 wires inside the cable and soldered it to 3 pins, so I could easily plug it into a breadboard. The power (5V) is supplied by the Arduino.

IMG_20130627_203811

IMG_20130627_205752

Now download and install Audacity. Audactity is a free to use audio editor. With this program, you can record the signal from the LINE IN input of your PC. While recording, press the doorbell button. The signal I recorded looks like this:

Schermafdruk van 2013-07-16 09:06:07

You can clearly see the moment on which I pressed the doorbell button.

Zooming in reveals that the same signal is repeated over and over again, with a long, low "sync" signal inbetween:

Schermafdruk van 2013-07-16 09:07:44

Zooming even further:

Schermafdruk van 2013-07-16 09:08:27

You can see that that this signal is built from just two different "building blocks":

  • a long high pulse, followed by a short low pulse. We will encode this as a "1" in our Arduino sketch later on;
  • a short high pulse, followed by a long low pulse. We will encode this as a "0" in our Arduino sketch.

This means that the code sent by the doorbell button is 0101 1111 0110 0010 0000 1000. The following question is: what is the duration of each pulse? When you zoom in even further, the sample points become visible as dots:

Schermafdruk van 2013-07-16 09:20:38

By counting the dots and noticing the sample rate at the lower left screen of the window, you can calculate the duration of the high and low pulses.

For example: when the recorded signal has a frequenct of 48000 Hz (samples per second) and you count 25 samples in the short signal, this signal has a duration of 25/48000 = (approximately) 520 microseconds.

Also notice that a long pulse is 3 times as long as a short pulse.

Sources:

Share Button

How to hack a doorbell and connect it to Twitter - Part 1: Introduction

Introduction

When I bought a wireless doorbell recently, the following idea came to mind: there are so many home appliances which make use of wireless radio (RF) signals, why not try to control them with my Arduino Uno? Besides a brand new doorbell, I also have a wireless weather station, wireless speakers, a remote power supply, a toy car and my car keys which send and receive those wireless signals. Wouldn't it be cool to connect them to the internet and control them this way?

RF apparaten

The most practical thing to do would be to use the remote power sockets and use the Arduino to control a lamp in the living room. But this has already been done. I also wanted to to make it a little easier on myself, so I decided to use the doorbell (Grundig model QH-831A), which makes use of just one signal instead of several different on/off codes. It would also be fun to connect it to Twitter. "Why?", several people asked me, raising their eyebrows. "Because!", I replied.

In the next drawing you can see the things we will have to do.

IMG_20130716_113246

  • Detecting when someone pushes the doorbell button and using the Arduino to post a message to Twitter when this happens.
  • Searching Twitter and when a specific hashtag is found, make the doorbell chime.

Requirements

  • RF sender and receiver components. I bought these.
  • Arduino board. I use an Arduino Uno, together with a breadboard and some wires.
  • Arduino WiFi shield. I'm pretty sure that an ethernet shield would also work when you change the Arduino code slightly, but I don't have one, so I couldn't test it.
  • To make the sniffer circuit mentioned in part 2:
    • 3,5 mm audio plug with 3 segments (3 wires in its cable).
    • A 10 KOhm resistor and a 39 KOhm resistor.
    • A twitter account just for this purpose. Mine is @ArduinoDeurbel.

IMG_20130718_142140

Share Button