If you’re impatient and just wants to see how the thing works, scroll down to the video!
For some reason, I have recently become an absolute imbecile when it comes to getting my keys home with me after a party or the like. Recognizing that a disciplinary upgrade to self is not a viable solution, technology to the rescue. Being a big fan of nineties euro-dance, it seemed fitting to somehow incorporate this into the solution.
I live in an apartment block, thus the first perimeter of defense, and probably the place you’ll least like to be stuck in on a cold winter night, is outside the front door. Fortunately I am in the lucky position that some kind soul installed a door phone in our apartment block. With this ingenious device, one push a button, and anyone present in my apartment can let me in. This does pose a problem though. If no one is actually present in my apartment (or if everyone else is asleep), nobody can push the magic button in the apartment and let me in. Bummer. Or maybe not. Enter the Gigi Doorgostino-Phone!
The concept is simple. The normal door phone was disassembled, and by the assistance of a multimeter the relevant spots on the internal PCB was identified. Then a connector cable was soldered onto these various spots on the PCB, and ran out of the phone casing. This connector cable plugs into a simple interface board, which is the breadboard you see dangling inside the plastic casing.
One side of the board connects to the door phone PCB. The left side connects to an Arduino board. An AC signal that gets raised when someone rings the bell at the front door. A rectifier diode is put between this and the Arduino to avoid feeding AC into the board. Also, a 5kOhm resistor has been added to limit current into the board. Initially i added a small capacitor (C1) to smooth out the signal, since the single diode only constitutes a half-wave rectifier, and thus makes it “look” like someone is pulsing the ringer button extremely quickly. This didn’t really work that well, even with a bit of experimentation, and since I was impatient, I removed the capacitor and corrected the issue in software instead. The setup was able to power itself off of the doorphone, but current from the doorphone is very limited, so if we want indicator LEDs and such fancy stuff, we need an external power supply, for example USB. When a pin on the Arduino is set high, a transistor closes the connection for the unlock button, and the front-door is unlocked. And it even still works as a normal doorphone 😉
Now, all of this fancy-pantsy hardware allows us to detect when someone is ringing the bell, and also unlock the front door. We can even feed audio back down the line that’ll be played over the speakers at the front door. Yay!
Now to the exciting part. By utilizing the awesome cryptographic, high-security powers hidden in Gigi D’Agostinos song “L’Amour Tojours” (or “I’ll fly with you” to some). We can build a impenetrable key-less security solution for our front-door. Not! Well, at least I’ll have a musical way of unlocking the door if I loose my keys (again again again).
The key is, that if you tap the first five notes of the songs catchy chorus part, the door-phone speaker will play back the next part, and then magically unlock the door. An Arduino board was programmed to carry out the task of recognizing the taps and unlocking the door, should they match the song. Unfortunately, this requires the song to be constantly playing in our apartment. Just kidding, the tap sequence is of course just stored in an array in memory. The taps are also normalized, so it doesn’t matter if you tap it fast or slow, as long as the relative timing matches. The source code is available on the wiki. Here’s a video demonstrating the hack in action:
The Gigi Doorgostino-Phone is also connected to a webserver, which means the door can be unlocked over the internet. This is an extremely convenient feature, should one be so utterly wasted that proper rhythmical operation of a switch is not possible.
Security note before I get told off on putting something like this in the public: I don’t live here anymore, and the system is not in operation, so there’s no risk in showing it off.