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

19 comments:

  1. Hi,

    I want to build something similar with this and I found the module below as the best, since it's not very expensive and it can be delivered in time:

    http://www.ebay.com/itm/NFC-RFID-module-kit-Swipe-Card-Keycard-PN532-module-Arduino-Compatible-/171755144473?pt=LH_DefaultDomain_3&hash=item27fd678519

    Do you think it would work with that one as well? it doesn't seem to match exactly, but it is based on the same PN532. Please have a brief look and let me know what you think. It would be highly appreciated. Thank you in advance!

    ReplyDelete
  2. I'm having a bit of trouble converting the code over to using the Wiegand 26/34 RFID Reader. I was wondering if you ever finished converting yours over?

    ReplyDelete
    Replies
    1. Try the code from here:
      https://github.com/ctung/arduino-rfid-door-lock

      Delete
  3. I'm having trouble with the wiegand and the uno. I keep getting a bunch of random tag numbers printed on the serial monitor. Can you post the pinout?

    ReplyDelete
    Replies
    1. I was able to get it to work. Thanks for the awesome guide and code.

      Delete
  4. http://www.ebay.com/itm/AC-110-240V-to-DC-12V-3A-Power-Supply-For-Door-Access-Control-Worldwide-Voltage-/171385199964?hash=item27e75a9d5c:g:zHwAAOSwGzlTwg4r

    If I use the above, is 3amps enough?

    ReplyDelete
    Replies
    1. I suppose that depends on the model of door strike you use. Check the specs for the current draw while the the solenoid is activated. I would suggest using some margin to account for poor tolerances in either the access controller or the door strike

      Delete
    2. It's a Leviton strike - I believe the model is 79A00-1. I'll probably be using the same external waterproof Wiegand reader you linked to as well, and using an arduino/ethernet shield to form some sort of MySQL/PHP authentication madness although now that i'm thinking about it a Pi might make more sense.

      Delete
    3. Chuck, may I pay you to make some customizations for my needs? Please contact me via email if you are open to the idea - me@markmuyskens.com

      Thanks!

      Delete
  5. This comment has been removed by the author.

    ReplyDelete
  6. love the project, after a lot of google'n yours ticks all the box's... did you ever come up with a raspberry pi web interface for multiple doors??? love to see your code.
    thanks again for taking the time to make this project public

    ReplyDelete
  7. Hey, this is a great tutorial! Just what I was looking for, I am new to microcontrollers/electronics and this looks fairly easy to get started. I have a particle.io's photon core, any change you got any further with this using the photon? My goal is to be able to also lock/unlock the door remotely using something like the photon internet button as an example; for that to work I would imagine I need the microcontroller in the lock box to be wifi compatible. Any pointers greately appreciated, thanks for this!

    ReplyDelete
  8. Nice blog..! I really loved reading through this article... Thanks for sharing such an amazing post with us and keep blogging...COMPLETE SECURITY SOLUTIONS
    Boom Barriers Gates
    Electro Magnetic Locks

    ReplyDelete
  9. Thanks for posting the useful information to my vision. This is excellent information,.
    tyre killers in chennai

    ReplyDelete
  10. Thanks for posting the useful information to my vision. This is excellent information,.
    electric door strikess
    boom barriers

    ReplyDelete
  11. You have discussed an interesting topic that everybody should know. Very well explained with examples. I have found a similar websiteHome Safe visit the site to know more about Access Controls Melbourne.

    ReplyDelete
  12. Great Post. Electric door is the best option for those, want to install new door. It help to protect your property from theft and weather disturbances. Get more detail about door and window on Shopfronts in London.

    ReplyDelete