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

XBMCbuntu installeren

Deze post is meer bedoeld als een naslagwerk voor mijzelf, maar hopelijk kunnen meerdere mensen hun voordeel ermee doen.

Nadat ik mijn htpc opnieuw had geïnstalleerd om Ubuntu met XMBC te vervangen door XBMCbuntu, liep ik tegen een aantal zaken aan die ik opnieuw moest instellen.

Lees verder XBMCbuntu installeren

Share Button

Twitterdeurbel: hoe staat het ervoor

Het derde punt van mijn to do lijstje is gewoon gelukt! Ik kan het signaal dat door de originele deurbelknop wordt verzonden nu ook met de Arduino versturen. Ik had gedacht dat het niet zo moeilijk zou zijn om dit signaal door een ontvanger op de Arduino te detecteren, maar dat valt helaas vies tegen... Mijn to do lijst wordt dus uitgebreid met:

  • Uitzoeken hoe het deurbelsignaal door de ontvanger op de Arduino kan worden gedetecteerd.
Share Button

De "wiskundekerk" van Brunssum

In de loop der tijden heeft religie weinig goeds teweeg gebracht, behalve wanneer het gaat om:

  1. Muziek
  2. Architectuur
  3. Het brouwen van bier door monniken 🙂

In die tweede categorie valt de Gregoriuskerk in Brunssum, door mijzelf ook wel de "wiskundekerk" genoemd. Blijkbaar vond de architect meetkundige figuren en de bouw van een godshuis prima samengaan.

Een leuke opdracht voor de wiskundeles zou kunnen zijn dat je ze met een fotocamera op pad stuurt en ze zoveel mogelijk meetkundige vormen laat fotograferen en benoemen.

Ik heb de kerk nog nooit van binnen gezien, maar eigenlijk ben ik wel benieuwd wat er aan de binnenkant voor figuren te vinden zijn. Wie weet wel een plafondschildering van de Mandelbrotverzameling!

Share Button