0% found this document useful (0 votes)
96 views

RFID Access Control System

Radio-Frequency Identification (RFID) is the use of radio waves to read and capture information stored on a tag attached to an object. A tag can be read from up to several feet away and does not need to be within direct line-of-sight of the reader to be tracked.

Uploaded by

Qasim Ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
96 views

RFID Access Control System

Radio-Frequency Identification (RFID) is the use of radio waves to read and capture information stored on a tag attached to an object. A tag can be read from up to several feet away and does not need to be within direct line-of-sight of the reader to be tracked.

Uploaded by

Qasim Ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

RFID Access Control System

Radio-Frequency Identification (RFID) is the use of radio waves to read and capture information stored
on a tag attached to an object. A tag can be read from up to several feet away and does not need to be
within direct line-of-sight of the reader to be tracked.

How does a RFID system work?

A RFID system is made up of two parts: a tag or label and a reader. RFID tags or labels are embedded
with a transmitter and a receiver. The RFID component on the tags have two parts: a microchip that
stores and processes information, and an antenna to receive and transmit a signal. The tag contains the
specific serial number for one specific object.

There are two types of RFID tags: passive and battery powered. A passive RFID tag will use the
interrogator’s radio wave energy to relay its stored information back to the interrogator. A battery
powered RFID tag is embedded with a small battery that powers the relay of information.

In a retail setting, RFID tags may be attached to articles of clothing. When an inventory associate uses a
handheld RFID reader to scan a shelf of jeans, the associate is able to differentiate between two pairs of
identical jeans based upon the information stored on the RFID tag. Each pair will have its own serial
number.

With one pass of the handheld RFID reader, the associate can not only find a specific pair, but they can
tell how many of each pair are on the shelf and which pairs need to be replenished. The associate can
learn all of this information without having to scan each individual item.

To read the information encoded on a tag, a two-way radio transmitter-receiver called an interrogator
or reader emits a signal to the tag using an antenna. The tag responds with the information written in its
memory bank. The interrogator will then transmit the read results to an RFID computer program.
This Instructable is for a Rasberry Pi Access Control System, which uses an RFID tag system for automatic
entry through a door. We use this system for members to access our makerspace and maintain secure
access.

For this project, you will need a raspberry pi and the included parts list. The power supply is a self-
contained unit, and its function is to control the strike by shorting PUSH to GND, and also provide 12V
power. You can be creative when it comes to layout and interface (the spring terminals, etc., are only a
suggestion) but all of the modules - or equivalent functionality - are required. For example, if you leave
out the level shifter, you *will* fry your pi.

The theory of operation is actually very simple. connect four leads from the pi to the level shifter.
Connect B4 to the S pin of the relay, and the green and white wires from the RFID reader go to B2 and
B3, respectively. I used GPIO pins 24 and 26 for the RFID reader, and pin 25 for the relay. The 3.3V
voltage goes to the LV pin of the level shifter. All of the rest is a simple matter of wiring.

The relay shorts out the PUSH and GND terminals from the power supply. The strike goes to COM+ and
COM-. The 12V - 5V Dc-DC converter downsteps the 12V coming out of the supply to 5V that the pi can
use.

Use the spring terminals for connecting up the power, and the wires to the rfid reader.

The relay contains all of the appropriate logic for driving the relay, including transistor, flyback diode,
etc. The level shifter is also self contained. There are no required discrete components as currently
designed, though some are optional.

MATERIALS:

 Power supply
 12V door strike
 Raspberry Pi B+
 Raspberry Pi B+ downgrade cable
 Half sized proto board
 channel level shifter
 Relay
 Spring terminals
 HID RFID reader
 12V to 5V DC-DC converter
 HID 125KHz cards
 an LED to suit, perhaps a diode to prevent reverse biasing the pi (I haven't added that to my
project), etc.
 Large plastic box

Step 1: Assembly

(Images)

The code for the pi is located here:

(Code)
First, you will need to assemble the level shifter and permaboard. When soldering the level shifter, it
might be helpful to use a breadboard to put the headers in, so that you are guaranteed a good fit to the
permaboard.

Now find a good spot on the permaboard for all of the parts. You will need a three pin header for the
relay, and sufficient space for the spring terminals and level shifter. Once you have a good layout, solder
everything on. You may want to use female headers for the level shfiter so that you can replace it if
needed.

Now, do the wiring. Connect 3.3v from the pi to the LV terminal of the level shifter. Wire 5V and GND to
the HV side of the level shifter and relay (it might be helpful to cross-bridge the rails on each side of the
permaboard for easy access). Also be sure that the RPI has at least one 5V and GND wire connected
(pins 4 and 6 are good candidates). DO NOT REVERSE BIAS THE PI. You may want to include a diode to
prevent any possibility of this happening. It is not required, but the peace of mind may justify spending
the extra few cents. If you include the diode, mind the polarity - you only want to block current flowing
the wrong direction.

Connect the S terminal of the relay header to one of the outputs of the level shifter.

Wire up the appropriate GPIO pins from the pi to the LV site of the level shifter. Note that wiringpi uses
a different gpio schema than python. You may want to use the suggested GPIO pins, but if you are
willing to modify the software appropriately, you can use whichever pins strike your fancy. We used 23
and 25 for the RFID, and 24 for the relay.

Wire +5V and GND to two spring terminals. Wire +5V and GND to two more spring terminals (this is for
the RFID reader). Wire two more spring terminals to two high-side pins of the level shifter. Wire
everything up and test it. First, you might want to check that there are no shorts - check that there is an
open circuit between +5V and GND before plugging anything in. Wire the green and white wires from
the RFID reader to the spring terminals you've connected to the two high-side outputs of the level
shifter.

Program the pi and use the access.py script found on github. Make sure that the GPIO in the weigand.c
file is correct, and run "mkwiegand" - this will create a program in the directory called "weigand". You
will need to install python-pip and the daemon module, and also wiringpi. Test the weigand by starting
the weigand program on its own and try to read a card. If you get a 26 bit result, you have wired
everything correctly. Now make sure the config files in the conf directory are correct (you will need to
edit zone.conf and users.conf) for the user and card you're using, and start the script. If you've done
everything right, presenting the card will cause the relay to trigger.

If you have made this work, you have completed the logic, now you just have to wire it up.

It also helps to use masking tape on the wires so they don't fall out when flipping over to solder.

Step 2: Install in to a Door

Find a place to mount your reader. Find a way to run the wires inside to the control mechanism (do NOT
make it accessible to the outside - if you have access to the power supply the system is trivially
subverted). We used hook-up wires, plastic conduit, and shrink tubing. For the control mechanism, we
used two small project boxes, one for the power supply and one for the mechanism itself, mounted to
the door jamb using double sided tape. You can do this any way you want, the way we did it is unique to
our setup and is only a suggestion.

We mounted everything in the boxes using double sided foam stickies, and drilled holes so that the
wires can enter and exit. The power supply needs 120V AC, we used a standard IEC connector. It can be
hardwired using conduit, if you choose this route, be sure you know what you're doing or hire a
competent electrician. Wire the 12V and GND from the power supply to the 5V DC-DC converter, and
use the output from the converter to power your board, from the spring terminal that you wired earlier.
MIND YOUR POLARITY - getting this wrong will likely fry something. Wire the NO terminals of the relay
to PUSH and GND from the power supply. Wire the strike to NC and COM on the power supply.

To install the strike, use a vibrosaw or other similar tool to cut out a notch, and just put it in. Make sure
that you don't screw it in too tight, it will bind the solenoid. Power it up, make sure the pi has started
access.py (it should be configured to start automatically on boot) and make sure everything works. Feel
free to hack on the access.py, but please send us your changes so that others can use them. Notes and
gotchas: You can use other weigand systems too, the one we used is not a requirement, as long as it's a
26 bit system it should work.

The card reader we used apparently does not always like freezing weather - use wisdom in cold climes.
There is one 5V GPIO slot available for an LED or something similar - feel free to make use of it. The
proxpass reader has wires available for controlling the buzzer and LED. We did not make use of these. If
you wish to use an 8 bit level shifter instead of the 4 bit one we used, you can probably do something
with those. Shrink tube or otherwise electrically isolate all unused wires on the reader. If security from
internal threats is important, place in a physically secure location. Subverting the mechanism with access
to the pi or power supply is easier than trivial. Access to the wires and reader, though, is completely
safe, the system is not easily subverted in that way. The strikes that are predominantly available through
amazon and ebay will unlock when there is no power. Take care that you get the strike that is right for
your application. If you get one that will fail closed, make sure you are using the correct lead from the
power supply. The software has code for a locker application.

You might also like