MultiPass Universal RFID Reader

The design below is based on the work described on the Arduino Playground (Arduino Playground)

 

The most basic problem I had with the above mentioned design was that it could only read RFID tags using Frequency Shift Keying modulation (FSK). I also wanted to read other types of tags, for example the very common EM4100 tags.

I had great difficulty with the FSK reader, on a hardware and firmware level. My problem was that the coil information was lacking and without a proper coil, the reader simply did not function correctly.

Secondly, without clear examples of what the signal should look like at the various key places on the circuit it was extremely difficult to fault find the circuit/firmware.

After doing a lot of additional research and fault finding, I manage to get my hardware to work. I have attached example signals at the various key points on the circuit.

Once the hardware was working (according to me), I had to get the sample firmware working. It was of great value, but unfortunately did not work for me. I still could not read HID tags. I used the debug mode option, to output the captured pulse information. I was able to manually decode the debug information into the correct card number.  I could finally conclude that I had working hardware.

 

So the obviously problem was firmware related.  I change the firmware, away from an interrupt based counter to a simple pulse length measure function. With FSK I was only interested in the HIGH’s so I ignored the lows.

After tweaking the pulse lengths/amounts to be consider to be “1” and “0” I finally got valid decoded data for 26-bit and 35-bit HID tags and extract the correct manufacture, facility and card numbers. At present it still has a bug related to the last parity bit, but I have tweaked the code to simply ignore the parity check for now.

At this stage I was able to only read and decode HID tags using FSK modulation, I still needed to do ASK/PSK so that I could decode EM4100 tags.

I had two types of EM4100 tags, the normal credit card size and the small round disk types. With a bit of shock I discovered that even thou these are both EM4100 tags, they used different modulation. The one was a ASK (amplitude) and the other PSK (phase) type. On a hardware level my circuit could easily read the ASK tag, but the PSK proofed more troublesome. I tried various tricks to make it work on a firmware level, but simply could not get it to work.

It turned out the circuit could read ASK modulated signals as is. I manage to write firmware to decode the ASM data, but it still could not handle PSK.

I eventually modified my circuit’s envelope detector based on the Microchip reference designs (microID ® 125 kHz RFID System Design Guide), after which nothing worked, not ASP/PSK or FSK.  I had to add another comparator.

Luckily the chip had 2 spare opamps.  The newly added comparator generated a clean DC logic signal which I could decode with more ease. It turned out that by using the 3rd comparator the circuit and same firmware could now decode ASM and PSK at the same time using the same code base.

The only thing missing was now to fix the circuit/firmware to again be able to read FSK (HID) tags. This I easily achieved by using the original output, before the 3rd opamp and the original code.

Below is the working circuit, along with example scope signals at the different key points on the circuit and for the different tag types.

I have compiled a separate write up (RFID Modulation and Encoding) explaining my interpretation of RFID modulation and encoding/decoding of the data streams

 


Hardware Design

Schematic_Rev3
Schematic_Rev3
VeroBoard Prototype
VeroBoard Prototype

This design or parts of it is not allowed to be used in any form of commercial application without written permission from the author.


Signals

125KHZ Carrier
125KHZ Carrier
PSK - Input to Opamp Pin2 and output on Pin1
PSK – Input to Opamp Pin2 and output on Pin1
PSK - Output opamp Pin1 and Pin14
PSK – Output opamp Pin1 and Pin14
ASK - after envelop detector
ASK – after envelop detector
ASK - Input to Opamp Pin2 and output on Pin1
ASK – Input to Opamp Pin2 and output on Pin1
ASK - Output opamp Pin1 and Pin14
ASK – Output opamp Pin1 and Pin14
FSK - Carrier with tag on coil
FSK – Carrier with tag on coil
FSK - Output opamp Pin1 and input Pin2
FSK – Output opamp Pin1 and input Pin2

  Coil

I used a rectangular coil using 0.2 mm copper wire, with 100 turns and dimensions of 7.5cm x 5 cm

100 turn 7.5cmx5cm coil
100 turn 7.5cmx5cm coil

 

Source Code

The source code which is part of the design/manufacture packages can be purchased from Gizmoshop

This source code or circuit or any parts of it is not allowed to be used in any form of commercial application without written permission from the author.

 


Print Friendly Print Friendly

12 thoughts on “MultiPass Universal RFID Reader

    • Good day

      Thanks for the interest in my design. Can you elaborate a bit on “get nothing on serial”

      What does the LCD display?
      Secondly, did you program the Arduino in debug mode
      Need to change the 0 to a 1 or 2 to enable debug mode

      #define debug 0
      //0=disabled, 1= loq debug printing, 2 = high debug mode

      If after the LCD displays information, debug mode it enabled and the Arduino programmed, you are still not getting anything, then maybe your serial port settings in wrong or you have swapped tx/rx pins around or you have a hardware problem.

      One last potential issue might be that you are using a underrated power source. I recommend using a 9V battery.

      if you do manage to get the debug mode working and still unable to read a tag, then its either a tag that is not supported, or the coils is not matches adequately.

      Please keep me posted on your progress

  1. Firstly, Thank you answering my question. I really didnt expect. Secondly, you mentioned LCD in code but it is not in the schematic. How can I connect LCD to circuit. What are the pin connections? And I use 5V from Arduino pin. Do you think it is not enough to run the circuit?
    Thank you

    • Thanks for showing interest in the reader, I have published as much information as possible for interested parties to build the reader from scratch, if you want a PCB or PCB layout, I suggest you look at http://www.Gizmoshop.co.za to buy one of the PCB kits for a kit containing a PCB along with all required required components

      Regards

  2. Hi.
    First, thanks in share your project.
    I am really finding per a good RFID circuit.
    I have some questions before design your circuit:
    1) Could you please send to me some screen of the program sending the TAG number in the serial port?
    2) Why you need use the port D7 of arduino?
    Again, many thank in share your project.

    • Unfortunately I do not have a test circuit at present so I cannot generate screen shots of the tag number being sent via serial port

      Regarding your question why must D7 be used, please analyze the code, hopefully it will then be clear. Some pins are specific e.g. the pin that used PWM, UART, ect.

  3. Hi.
    Thanks in reply asap.
    But I think the PWM gereneted from D9. The pin D7 is after the first LM324/NS.
    Looking the circuito from Arduino website, they are using only D9 and D6.

  4. Hi Admin.
    The circuit working and the program too.
    But the card result is very different of the informed in the card.
    Could you please help me?

    Thanks,
    Samuel.

Leave a Comment

Time limit is exhausted. Please reload the CAPTCHA.