DIY RFID Access System

Solenoid,circuit, raspberry pi, rfid reader
Solenoid,circuit, raspberry pi, rfid reader

This post documents recent work on a membership based physical access system using radio-frequency identification (RFID) tags as a key. Most discussion of this rfid development has been sprinkled throughout discussions in our google groups. As of this post, all of the parts are working but we haven’t implemented this into the building… yet. We are able to present an authorized tag to the reader, and operate the solenoid. We can also scrape our memberships in order to get the current member list.

To work out all of the small problems, we solved three problems:
Reading/authenticating the card
Operating the solenoid
Updating the access list

Reading/authenticating the card

As previously posted in the original google groups thread , we are using the following equipment to do rfid stuff:
Our tags – uem4100
rfid reader – http://www.seeedstudio.com/depot/Electronic-brick-125Khz-RFID-Card-Reader-p-702.html
rfid wiki – http://www.seeedstudio.com/wiki/index.php?title=3DElectronic_brick_-_125Khz_RFID_Card_Reader
raspberry pi model b revision 2.0
https://github.com/area515/rfidreader

When a tag is read by the rfid reader, the rfid reader will give all of it’s contents through serial. This means that we are using the rx/tx pins/UART on the pi to read what the rfid reader throws at us. Previously, when we experimented with the NFC reader at adafruit, we found that we needed to free the UART on the Pi. So go free your UART. We followed the instructions at: https://learn.adafruit.com/adafruit-nfc-rfid-on-raspberry-pi/freeing-uart-on-the-pi

The source for all of our work on the rfid reader is located at: https://github.com/area515/rfidreader . The idea is that we wait for data from the rfid reader. When we have data, we check that it is a tag with the correct format. When we have correctly formatted data, we compare it to all the valid keys to find a match. We keep these keys in a text file. If we have a match, the raspberry pi will set a pin to HIGH to operate the solenoid.

All of the things related to the solenoid were purchased from adafruit.

x1 TIP120 Power Darlington Transistors – 3 pack $2.50 (https://www.adafruit.com/products/976)
x1 12V 5A switching power supply $24.95 (https://www.adafruit.com/products/352)
x1 Female DC Power adapter – 2.1mm jack to screw terminal block $2.00 (https://www.adafruit.com/products/368)
x1 1N4001 Diode – 10 pack $1.50 (https://www.adafruit.com/products/755)
x1 Lock-style Solenoid – 12VDC $14.95 (https://www.adafruit.com/products/1512)
Total: 45.90

x1 The Raspberry Leaf (Three Pack) $2.95 (This is optional and isn’t required. It’s helpful)

We used the following link for the circuit to control the solenoid:
http://www.instructables.com/id/Controlling-solenoids-with-arduino/

Updating the access list:
At the moment this is nothing fancy. Instead of an api call, we use Sele=
nium to automate a web browser. This automated steps to get current memb=
ers are the same ones I would use to look at the list. The automation lo=
gs into the site using a limited account, goes to the membership director=
y, and checks for a current members. When a current member is found, the=
ir name is added to the list of authorized people.

Big thanks for advice, support, materials, resources, research, work from:
Tim
Derek
Don
Ross

Full Bill of Materials (BOM)
uem4100 rfid tag(s) – I don’t know exactly where we got ours or how much =
these cost. Simple amazon search for ‘uem4100 rfid tag’ shows similar ta=
gs, these are the ones that we used in testing: http://www.amazon.com/10P=
CS-125Khz-Proximity-Token-Keyfob/dp/B0090C105S/ref=3Dpd_sim_sbs_p_1?ie=3D=
UTF8&refRID=3D185PZG8EKS4WS5N2ED4N

x1 Raspberry Pi Model B 512MB RAM – $39.95 – https://www.adafruit.com/products/998
x1 rfid reader – http://www.seeedstudio.com/depot/Electronic-brick-125Khz-RFID-Card-Reader-p-702.html
x1 TIP120 Power Darlington Transistors – 3 pack $2.50 (https://www.adafruit.com/products/976)
x1 12V 5A switching power supply $24.95 (https://www.adafruit.com/products/352)
x1 Female DC Power adapter – 2.1mm jack to screw terminal block $2.00 (https://www.adafruit.com/products/368)
x1 1N4001 Diode – 10 pack $1.50 (https://www.adafruit.com/products/755)
x1 Lock-style Solenoid – 12VDC $14.95 (https://www.adafruit.com/products/1512)