September 19th, 2009
Since PING expanded to more than a handful active members, we have had several generations of door locking solutions. The first solution involved a long IDE-cable, a CD-ROM and a computer which issued the eject command in order to control the lock. The 2009 revision of the door lock is the most advanced and stable so far, and has the following features:
- A strong mechanical lock
- Username/password authentication in a graphical UI
- RFID authentication
- Bluetooth authentication
The design consists of five modules:
- The locking mechanism (industry standard electric door lock)
- The lock controller board (Atmel ATTiny 461 SMD) with locking, USB and RFID firmware
- RDM630 RFID reader connected to the lock controller by UART
- Computer controlling the graphical user interface (placed outside the room), connected by ethernet
- Main control computer (connected to the GUI through ethernet, and lock controller through USB)
It will probably not score any points for looks, but it provides ease of use and some safety to our premises.
The lock has three magnetic sensors onboard to detect bolt position and if the door is open or closed. The sensors, a button and the RFID chip is monitored by an ATTINY 461 connected by USB to the host computer. We use the V-USB implementation by obdev, which enables us to have a low-speed USB interface to the AVR with very few extra components.
The motor which engages the bolt requires a 12 V power supply, and USB only delivers 5V. This was solved by using a DC BOOST converter (LT1373) providing enough power over the USB line. To control the motor we designed an H-bridge using BJT transistors.
The RFID chip sends tags (14 byte hex) by 9600,8,N,1 UART as soon as a tag is sensed. The ATTINY does not have an UART, so our firmware emulates this by synchronizing to the bitstream.
The host computer runs a simple program that validates RFID tags and provides an interface for openening the door. It also monitors Bluetooth connections. Users entering username or password to unlock the door do so on a dedicated computer located outside our office. This computer and the host computer communicates by a secure TLS connection.
As a result of this project, members of PING are now able to unlock the office door by using their username and password, by presenting their RFID proximity card, or by having Bluetooth enabled on their mobile phone.