Keypad operated door lock

Updated 30/10/2013 - Version 2.32 - Firmware version 1.1

Here's another home automation project. I installed a keypad on my room's door, and built a simple pulley system to operate the locking mechanism.

The final design truly doesn't look too beautiful because of the major limitations I had to deal with (namely no nails nor screws to be used), but it works like a charm.

The big pulley attached to the key-axis is build using DVDs and some scrap wood I had laying around. Such pulley is operated by a DC motor and a belt that I scavenged from my flatmate's old printer.

The case for electronics is an old 3.5 inches hard disk case, which conveniently provides nice housing and both 5V and 12V power supply. I've fit the H-bridge motor driver inside of it, while an homemade I2C keypad driver was fit right behind the keypad, on the outside of the door.

A switch is positioned on the inside for easy operation. A timer function is implemented to lock the door after 5 seconds of pressing a button (this saves you the chore to press the lock button when entering the room!).

A built in speaker serves both as audible output device and (this yet to be implemented) as knocking sensor.

The locked/unlocked status of the door lock is stored in EEPROM at every interaction, to prevent inconsistencies in case of temporary power loss.
Due to the suspicion of possible memory leaks/program halts in the long run, the device resets itself every 5 minutes of idle state.

Special codes were hard-coded into the firmware to forcefully unlock the door in case of malfunctioning mechanism, and to modify the pin code.

The schematic for the whole circuitry looks like this:

You will forgive plenty of small mistakes as I don't find Fritzing's interface to be too friendly (read: I am lazy). Don't miss to drop me a mail if you want some clarification!

The firmware to operate the device can be downloaded from here as an Arduino IDE project:

Download Firmware 1.1

Here is a video of the door lock in action!

This design could surely be improved by installing a sensor to detect the status of the door, as well as some type of backup power.

Future improvements: I am planning to use the existing speaker as a knocking-pattern sensor, as well as adding a door-status led and infrared remote control (at the moment I have no feedback from my desk regarding the status of the door)