Docstoc

K291 RFID TAG READER KIT

Document Sample
K291 RFID TAG READER KIT Powered By Docstoc
					                          K291 RFID TAG READER KIT




NOTE:                                   available from SILICON CHIP.             the last 24. If you think that this
Please read and ensure that you         Basically, RFID operates by              cuts down on the number of
understand these instructions           generating a magnetic field then         different combinations then
and understand this kit before          looking for any modulation on            consider this: 24 bits = 2 to the
starting construction.                  thatfield. RFID “tags”, when bought      power of 24, equals 16,777,216.
                                        within range of the scanning coil        The circumference of Earth is
Description                             will send out a unique series of bits.   40075km... If you think of Earth as
The system detects the tag and          The on-board microprocessor              a giant chocolate wheel you would
compares its “signature” with those     decodes these bits and outputs a         need a pin spacing of 2.4 meters
stored in memory (up to eight).         data frame from pin 1 which is sent      around the full circumference of the
If, and only if, a match is found, an   to RB0 (pin 6) of IC2. The range of      wheel to equal this number of bit
the relay is enabled for one second.    this system is around 4cm which,         combinations. Another way of
This relay could be used to arm or      although not a lot, is ideal for the     looking at it is, if each tag is
disarm a burglar alarm or unlock a      application presented here.              randomly programmed when
door. If the detected tag is not one    Looking at the circuit diagram           manufactured, you could line up 24
of those stored in memory then the      shows that there is not much to the      people and get each one to toss a
system can be used to trigger an        system at all. The RFID part             coin, “1” for heads “0” for tails...
alarm or to sound a warning that an     consists of a pre-built module that      The chance of one of the
unauthorised access has been            generates the necessary RF field         combinations being repeated again
attempted. The advantage of this is     used to scan the tags as they are        is one in 16,777,216... If the coins
that tags can be changed and the        bought within range of the scanning      are tossed once every minute the
system reprogrammed at will, so if      or detection coil. As well as            probability of repeating the same
a tag is stolen or even if someone      “reading” the data from the tag, the     combination again would take 32
attempts entry who is no longer         coil also provides power to the tag      years...
allowed, that tag will have no effect   via inductive coupling. It’s a minute    I think you will agree that 24 bits
except to flag an unauthorised          amount of power but enough to            are more than enough to ensure
entry attempt.                          “wake up” the tag and cause it to        good security for this project!
                                        transmit its unique code back to the
The operating principals of RFID        coil. The data frame consists of 42      General operation
were explained in a previous article    bits which is detected and fed to        When setting up the system the
(July 2003) so if you want to know      the PIC16F628 microprocessor.            user can make the system learn up
how the system works in detail you      The internal software strips off the     to eight separate tags. The unique
should read that article. Copies are    unwanted bits of the frame to leave      code of each of the tags is then
stored in memory. When a tag is          RFID system can trigger it, turn on     by a pre-built module (CR003). The
detected the micro compares its          lights and cameras, sound a             output from this module is a 42-bit
code with those in memory. If a          warning siren and so on. Just keep      data frame but as only 24 bits are
match is found the relay is latched      in mind that the relay only pulls in    used. The micro extracts this 24-bit
for one second and the GO led is lit     for a second, so any other device       data, then compares this with the
also for one second. One of the          will need to take this into account.    eight memory locations and if a
eight user LEDs will also light to       As the system will operate on 12V       match is found the relay and the
indicate which tag was detected.         DC it can be used to operate a car      activated user LED is turned on for
After the relay unlatches, the           central locking system. The             1 second. The ERROR LED will
system goes back to standby,             scanning coil could be placed up        light if a tag was detected but its
waiting for the next tag to come by.     against the inside of the               code was not complete or
That is really all there is to the       windscreen and the relay                corrupted in some way. The
system. The relay can be used to         connected to the car’s locking          DETECT LED lights to show a tag
operate an electric door strike to       system. This would give a high          was detected and decoded.
give controlled access to a room or      level of security to your vehicle.      The power supply is about as
building. Be careful when selecting      Indeed, the 8-user LED outputs can      standard as you can get, with a
the strike you can get “fail safe”       also be used to perform various         bridge rectifier followed by the
where the lock will be open if power     functions. With some interfacing the    standard big filter capacitor, 3-
is not applied, or “fail secure” where   eight user LEDs can be used to          terminal 5V regulator and then a
the mechanism will be locked if          give varying levels of security.        10µF output filter capacitor. The
power is not applied. You have the       As an example, user 1 may be            two 100nF caps help to keep the
choice of wiring the relay output so     given full access to a secure           supply rail quiet and are placed
power is normally applied and the        building. Users 2 and 3 may only        near the microprocessor.
lock opens when the relay pulls in       be allowed access to certain rooms.     Pushbutton switch S1 and
(wasteful of power but important if      Despite its apparent simplicity, this   associated components, along with
emergency egress is required) or         kit could form the basis of a very      the learn LED, are used in the tag
using a fail-secure strike which         secure access control system.           storage function. Pin 7 (RB1) can
“opens” for the second power is                                                  be both an input and an output.
connected (much less wasteful of         How it works                            Normally the pin is an input and the
power but can be a hazard in an          The circuit diagram shows that this     learn LED is off. The micro polls
emergency). The digital output from      system – if you ignore the power        this pin looking to see if the push
pin RB2 can be interfaced to an          supply there is not much left. The      button PB1 is pressed at any time.
existing security system so that the     actual receiving of the data is done    When it is pressed the input pin is
changed to an output which is then       in one way.
pulled low. What this does is to hold
the learn LED on after the button is     Sensing coil
released. This means that the            The sensing coil is supplied
system is in learn mode.                 preassembled, which means you
                                         only need to attach it to the PC
Learning the tags                        board. However, the wire which
Before this system can work              forms the coil is quite fine and will
effectively it must learn at least one   be easily damaged with any form of
tag so that it will have something to    rough handling. If you mount it any
compare any detected tags with.          further away than the ~200mm
To learn tags the operator presses       allowed by the connecting wires,
and releases the learn button. The       you’ll need to extend them with
learn LED will now come on and           either thin insulated hookup wire or
stay on. The program is now in           better still, two strands of ribbon
learn mode and waiting for the next      cable or some thin Figure-8 cable.
tag to come along. Now place the         Note that we have not tested the
tag to be stored near the receiving      RFID unit with the coil any further
coil. If the program successfully        away than the 200mm. In theory, it
decodes this tag the learn LED will      should be quite OK but . . .
go out and user 1 LED will come
on. The system is now waiting for        One of the first things the program
the user to select a memory              does is to load the eight user IDs
location for the next tag. Pressing      from EEPROM so it is ready to
the USER SELECT button will              decode the stored tags.
cause the user LEDs to cycle             If no user data has been stored in
around. First press will turn user 1     EEPROM the unit will ignore all
LED off and user 2 LED on. Next          tags. Go through the learning tag
press will turn user 2 LED off and       procedure to store at least one tag.
user 3 LED on. Each press of the
select button will shift along the       PARTS LIST
LEDs. When LED 8 comes on the            MISC
next press will cycle back to user 1     1 PC board 96 x 62mm, K291
LED. When you are happy with the         1 CR003 RFID module
memory location press the learn          1 RFID Receiver coil
button again. The last decoded tag       8 RFID Tags
will now be stored in the memory         2 2-way Screw terminal
location indicated by the user           1 3-way Screw terminal
LEDs. The LEARN LED will now             1 SPDT 12V relay
flash once. The program now              2 tactile switches
stores the unique tag ID in              1 18-pin DIL IC socket
EEPROM. That’s it, the tag has
been saved. When the same tag is         Semiconductors
decoded next time the system will        1 PIC IC + 18 pin SKT
respond and allow access to the          1 7805 5V regulator
user holding that tag. To erase any      1 W04 bridge rectifier
memory location the operator             1 BDX37 NPN transistor
simply goes through the same             1 1N4004 silicon diode
procedure and stores the new tag         9 Green 5mm LEDs
over the top of what was stored in       3 Yellow 5mm LEDs
the old memory location.                 2 Red 5mm LEDs

Construction                             Capacitors
The RFID module should be                1 1000µF 25V electrolytic
installed next and again be careful      1 100µF 16V electrolytic
when handling this component.            2 100nF monolithic (104)
The bridge rectifier, 3-terminal
regulator and transistor are next        Resistors (0.25W, 5%)
and all three are polarised (no          4 10K
heatsink is needed on the                6 560R
regulator). The relay is the last on-    1 330R
board component and will only go         1 100R

				
DOCUMENT INFO
Shared By:
Categories:
Stats:
views:113
posted:2/4/2011
language:English
pages:4