Wednesday, July 3, 2013

Arduino Controlled RFID Door Strike

RFID Door Strike


This door controller was built for a vacation property that may someday be rented out.  The goal was to be able to cut our own keys, hand them to the renters, and wipe the keys after their stay.  Much more convenient and secure than trying to work with conventional keys and locks.



Parts:

Code:

Assembly Instructions:

  • Connect an AC power cable to the input of the transformer
  • Connect the transformer output to the AC input terminals on the power supply
  • Connect pin 6 of the Arduino to the "Control +" terminal of the power supply
  • Connect VSS of the Arduino to the "Control -" terminal of the power supply
  • Connect 5V from the Arduino to the VDD terminal of the RFID reader
  • Connect VSS of the Arduino to the VSS terminal of the RFID reader
  • Connect the RFID RX terminal to the Arduino pin 3
  • Connect the RFID TX terminal to the Arduino pin 10
  • Connect the power supply 12V DC output to the Vin pin on the Arduino

Programming Instructions:

  • Use the Arduino serial monitor to read the serial numbers of the keys you wish to use for adding/disabling new keys
  • Change the "MASTER_ADD[4]" and "MASTER_DEL[4]" to match the serial numbers of the keys you wish to use for your master keys

Adding Keys:

  • Swipe your MASTER_ADD key to place the arduino into ADD mode
  • Swipe the new key you wish to add

Deleting All Keys:

  • Swipe the MASTER_DEL key

Notes:

  • Keys are stored in the EEPROM, so they persist after a power outage
  • The power supply has a built-in opto-isolator on the CONTROL +/- terminals, which is why the arduino can safely control the 12v power supply using a 5v output
  • I should have used This power supply ($21) with a built in transformer as a cheaper solution to the power supply + transformer listed above
  • I'm switching over to this Wiegand 26/34 RFID Reader ($16), which is waterproof and suitable for mounting outdoors.  However the Wiegand data format is quite different, so the code will need to be changed to support it.  I'll provide more details once my card reader arrives.
  • You can connect a rechargeable 12V battery to the BATT +/- terminals of the power supply if you want it to work when the power is out
  • The duration the door is unlocked can be adjusted with the small potentiometer on the power supply
  • I'll probably enhance my code to separate "guest" keys, which are erased with the MASTER_DEL key, from "owner" keys which remain permanently in the system.

Future Extensions:

  • Once the Spark Core is released, I'll network these door locks, using MQTT as the communication protocal, and a Raspberry PI running MySQL as the centralized key repository
  • I could also add an internet portal, which would allow me to remotely add/disable keys