RFID reader for 125 KHz tags, RS232 output (also works as electronic lock)

This circuit, based on Atmel micro ATtiny2313, reads RFID tags at 125 KHz. The code of the first tag read after micro burning is stored in the internal earom and then causes a pulse of about one second on relay contacts every time that tag is placed near the reader. This makes it possible to realize a simple and touchless electronic lock. The stored tag, and every other tag that’s placed near to the reader, also cause the serial output of the inside code, in ASCII format, allowing to implement a generic reader for access control. This circuit was published by me on the magazine CQ Elettronica in the May 2009 issue and entitled “RFID reader 125KHz”; consult the magazine for more details on the circuit and implementation.

Want to take a look at C source file ? Click here

To burn the micro, the freeware SP12 has been used, in the versions for WinXP or Win2K. The batch files included in downloadable ZIP require the use of this software for programming the micro (you can easily find it with a Google search). If you have another tool for micro burning, the configuration for fuses in the application described is the following :

// CONFIGURATION Fuses: Ext = 0xFF High = 0xC9 Low = 0xDF
// Note: SP12 High Fuses used in only 6.1 bits, so 0xC9 (11001001) becomes 0x24 (100 100)

The downloadable file EF150.zip contains:
–¬† schematic.pdf – electric schematic in PDF format
– top.pdf – Printed circuit board layout (single sided) in PDF 1:1 scale
– topprint.pdf – layout of components on the circuit
– rfid.hex – compiled HEX file ready to be burned into the micro
– wrFuses.bat – batch file to program the micro fuses
– wrProg.bat – batch file to start the firmware programming
– wrEarom.bat – batch file to overwrite the earom (stored tag)
– ef150pic.jpg – photos of the circuit mounted
– interfaces.gif – a couple of circuits to interface the card to a PC or a micro
– earom.txt – text file containing the 5 bytes to erase key tag in earom

Added Ago 30 2009
Coil has 105 turns of 0.2mm wire wound on 30mm diameter support; in the prototype I used the neck of a plastic bottle, visible in the figure.

Added Feb 28 2010
Note: The driver SN75176 is used ONLY as power driver, but the circuit works even if you remove the chip and simply put a jumper between pins 4 and 6 of the 8 pin socket. Obviously, the driver makes more “relaxed” the microcontroller’s output pin PB2.
Added Mar 1 2010
Note: You can browse the SP12 AVR programmer project at this site/url:
http://www.xs4all.nl/~sbolt/e-spider_prog.html.
Added Mar 2 2010
Oops, someone noticed that the circuit’s picture shows an ATTiny2313V-10PU cpu; well, the right chip is the one that’s in the circuit’s schematic diagram: the ATTiny2313-20PU. The last one, in fact, can run with the 16 MHz crystal needed by the application, while the first one is guaranteed only up to 10 MHz. The reason for the 10 MHz version mounted on board is (simply) that I didn’t own the fast version and tried (successfully) with the slow one. Ok, DON’T LOOK at the picture, look at the schematic diagram !!!

Added Sep 10 2010
The active range is about 3 cm with the coil shown in figure. Better results can be obtained modifying the coil diameter (and the number of turns, obviously).

Recently, I have done a personal version of RS232 (or USB-RS232 converter) programmer for ATtiny2313 micro using only 74HC00 as active part; if you like to use my own Atmel AVR programmer for ATtiny2313 burning, this is the map for fuses :