Tuesday, July 17, 2007

Cell Phone Controlled Door Latch


Download Video (1.78 MB)

I’ve been reading a lot on how DTMF (Dual Tone Multi Frequency) tones work over the last couple of weeks. I’m sure you’ve noticed that when you press the keys on a standard telephone keypad, an audible ‘beep’ is generated. These beeps are actually the combination of two distinct frequencies. For example, the tone you hear when you press the number ‘9’ on a telephone, is actually a combination of a 1447 Hz and 852 Hz signal. In a telephone exchange, these signals are decoded by a computer which finally connects the dialer to the designated phone line. For example, the tone of 1447 Hz and 852 Hz will be decoded as binary ‘1001’. In this project, I have designed a simple DTMF decoder circuit which allows me to control appliances in my house from any place on Earth using a telephone.

I always wanted to be able to control things such as air-conditioners, lights, etc, remotely…but I never thought about putting the front door of my house under remote control until I saw this “knock to open” door hack on Hackaday. It’s a door that will unlock when the correct knock pattern is performed. After being inspired by the mechanical door opening system in that hack, I decided to do something similar to allow me to open my door with a cell phone! I mean c’mon, door locks with keys are obsolete..everyone uses them..they’re so old fashioned! They’ve been around for over 4,000 years. Yikes! It’s time for a little change.

This project would have been much simpler if I had an electronic door lock…but I didn’t! They’re expensive, so I didn’t want to buy a new electronic door lock. I wanted to open the front door of my house without “seriously” modifying/replacing any door components. I thought about using a servo/stepper motor to twist the door knob on the door, but their control circuitry is slightly complicated if you’re not using a microcontroller. So, I decided to use a simple, 24VDC, “pull solenoid”. They don’t have any complicated control circuitry and you just have to supply the required voltage to make them work. I simply fastened the solenoid to the door knob with a metal wire. When the solenoid is switched on, its linear motion twists the door knob and opens the door. Positioning the solenoid properly was probably the only mechanical challenge in building this door opener because the force applied by a solenoid, is theoretically inversely proportional the square of the length of the air gap. Thus, strongest force is generated when the air gap is smallest.



The second part of this project was to build a DTMF decoder circuit. I used a CM8870PI tone decoder IC for doing this. The circuit I have built is fairly simple, and can be used for controlling up to four devices. If you want to control more than four devices, check out this circuit. I had a Nokia 1100 cell phone lying around with a hands-free accessory which was rarely used. So, I hacked its hands-free accessory and connected it to the circuit (I just cut the wires which went into the earpiece). That’s about it! To control things in the house, you just dial into the base station and the Nokia 1100 auto-answers the phone call. Each function is just a matter of pressing the appropriate number on the phone and the DTMF chip decodes it and sends output to a transistor which controls a relay. To open my door, I just dial the phone, enter the magic code and voila - Alohomora! Watch the video above. :)





Now I’m thinking about building a password protected door by placing a keypad outside my house which will generate DTMF tones. A circuit on the other side of the door will check the numbers entered, and if the password is correct, it will open the door. However, there’s one little snag. Any nasty programmer would just love to use a computer to generate DTMF tones and crack the password using brute force…I would. :)