This device is a simple access control system which uses RFID cards. It is designed with PIC12F1822 microcontroller running on internal oscillator at 16MHz. It generates 125 KHz carrier frequency and decodes the respond data stream – format H10301- FSK modulation 26 bits only. These cards (made by HID and other companies) are widely used in US.

The device can work in two modes:

1 - Stand alone RFID access system – J2 (BUT) is open when power is applied.

2 - RFID reader connected to a computer – J2 (BUT) is shorted when power is applied.

To switch between modes you need to remove power, switch BUT and reapply power. The condition of BUT is checked only once in the beginning of the program.

Stand alone RFID access system

Apply a card near antenna L1. The unit reads it and makes a short beep. If the card (facility code and card number) match any card stored in the memory green LED comes on and relay energized for 3 seconds (door is unlocked), otherwise red LED blinks 4 times.

The newly programmed microcontroller does not have any cards stored in its memory. The first card it reads saves in memory and become administrator’s card.

To add more cards (microcontroller can store up to 64 cards including administrator’s card) execute this sequence:

1 – read administrator’s card

2 – when green LED is on press BUT (short J2)

3 – release BUT – green LED should stay on, if not - start again from 1

4 – read card you want to add – it saves and the green LED goes off

To delete card from memory:

1 – press BUT and hold it

2 – read administrator’s card

3 – when green LED comes on, release BUT – green LED should stay on, if not start again from 1

4 - read card you want to delete – it deletes it from the memory and green LED goes off

If you do not have the card (lost, stolen ets.) to delete it connect the unit to the computer.

RFID reader connected to a computer

Read cards and sends information (facility code and card number) to PC in hex format. The connection is RS232 at 57600 baud rate with TTL levels. I use a USB to RS232 TTL converter cable (they are cheap and there is a lots to sell on eBay) and terminal program like http://sites.google.com/site/terminalbpp/

The read card information shows like:

67 89AB where 67 is facility code (hex) and 89AB is card number (hex).

In this mode you can see a list of all cards saved in the memory. To get this list send a command FF, and it will return something like:

00: 12 3456

01: 78 9ABC


Where 00:, 01:,….. are consecutive numbers of cards. If you want to delete a card, send it consecutive number to the device. If you delete card 00: (administrator’s card) all cards will be deleted too.

The antenna coil has about 80 turns with magnet wire diameter 0.2 mm, and size 70 X 50 mm. number of turns, wire diameter and size of antenna are not critical. If you use small diameter of wire and resistance of antenna coil become high (10 ohms and more) R7 should be 0 ohms. More important is L1, C4 and C11 to be in resonance at 125 kHz. This may be achieved by selection of C11 so that on C6 you have 20V or more.

The coil is under black electrical tape.

<p>Awesome project. Thanks for sharing.</p>

About This Instructable




More by pllamen:Digital oscilloscope with LCD screen RFID Reader - Emulator RFID reader – access control system 
Add instructable to: