Electronic Door Lock: A 2009 Approach

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:

  1. The locking mechanism (industry standard electric door lock)
  2. The lock controller board (Atmel ATTiny 461 SMD) with locking, USB and RFID firmware
  3. RDM630 RFID reader connected to the lock controller by UART
  4. Computer controlling the graphical user interface (placed outside the room), connected by ethernet
  5. 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 circuit was designed in Kicad and routed using FreeRouting. Source code and circuit is of course available in our git repository with GPL license.

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.

4 thoughts on “Electronic Door Lock: A 2009 Approach”

  1. Hi folks,

    Thanks for your detailed description!

    Looking at your source, it doesn’t appear you are validating the checksum from the RFID tag?

    Any reason for this?

    Cheers,
    -Brendan

  2. Purely due to lazyness; by storing the checksum in the admission file we do validate it (kindof), and we do not have to implement the checksum algorithm.

Comments are closed.