RFID is a popular system for door access, attendance record, security and even tracking system. There are many type of RFID tag and reader, and there are tons of standard to define RFID, but generally, you will most likely use passive type, 125KHz RFID. The tag or key-chain comes with unique ID embedded and when it near to compatible RFID reader, it will transmit the ID to the reader. The reader will further send the ID to the host (computer or microcontroller) for further process.
I am going to setup this compact RFID reader with built-in antenna, reading the ID from tag and key-chain further send to computer. This tutorial will require following hardware/component:
- UC00A, USB to UART Converter
- 1 x 125KHz Passive RFID card
- 1 x 125KHz passive RFID key chain
- Male to Male Jumper Wire
- Small Breadboard
- 1 x 40 ways straight header pin
- 2 x 10 ways 2mm header socket
- 2.8 – 5V supply
- 125kHz read frequency
- EM4001 64-bit RFID tag compatible
- 9600bps TTL and RS232 output
- Magnetic stripe emulation output
- Read range of 70mm (from our lab test)
- Compatible with 125KHz passive RFID card and tag
- NOT compatible with MiFare 13.56MHz tag.
- Dimensions: 38x40x7mm
Due to 2mm pitch to picth pin spacing at the bottom of the RFID reader, it is difficult for us to use it on standard protoboard or PCB board. Therefore, we have included a small breakout board in the package.
To utilize the breakout board, proper solder is necessary, and do mind the orientation of breakout board. You can solder the breakout board directly to the RFID reader, do solder the header pin first, and bear in mind, after solder it, it is not detachable and become permanent. I will do another method.
To avoid unnecessary mistake, I will be soldering socket and also header pin. With proper header socket and pin, it is detachable. Please get yourself:
Cut both the header pin and socket to proper length. We will need 6-way + 5-way header pin, 7-way + 5-way header socket (2mm).
Solder the header pins to breakout. Mind the orientation of breakout board, make sure the top surface is printed with ” RFID Breakout”, not the other side.
Now, the 2mm header socket. If you notice, the 7-way socket cannot fit into the breakout board for solder as one of the hole is missing on PCB. Fear not, remove the pin by cutting it or pull it out. Solder it from bottom.
After you are done, you should get this breakout. Top:
Insert the ID-20AL RFID reader onto the breakout. Bottom view:
Now, insert the RFID Reader together with breakout board onto breadboard:
OK! We are done with the breakout board, it is flexible and you can always change the reader or breakout board. We should get ready with the wiring for the RFID reader to read the RFID tag. Checking datasheet for the pin function is 1st thing to do if you are not familiar with the device, especially beginner! Understand datasheet will take some time and skill. I would like to highlight the pin description (table 6), in page 6 of pdf file.
Referring the pin description table:
pin 1 = GND which should be connected to 0V or Ground of circuit.
pin 2 = RES, reset of the RFID reader, suggested to connect to positive terminal or power or VCC.
pin 3 = ANT, not use in this model of RFID reader as the antenna is integrated in the module.
pin 4 = ANT, not use.
pin 5 = CP, card present. Only use in Magnatic emulation mode. We are not using this mode.
pin 6 = TIR, Tag in Range. This pin will goes high when the reader detect card is within range, this pin have internal resistor of 3K3 ohm, user can connect a LED as card in range indicator.
pin 7 = FORM, Format Selector. To select the output format, we need the ASCII format, so this pin should connect to GND.
pin 8 = D1, Data 1 will be active if ASCII format is selected and the output protocol is RS232.
pin 9 = D0, Data 0 will be active if ASCII format is selected and the output protocol is UART TTL, connect this pin to UC00A’s RX pin or Microcontroller’s RX pin.
pin 10 = READ, this pin will output/generates a pulse of 3.1KHz when a valid read of RFID tag successful. A LED or Piezo buzzer can be connected to this pin. But it cannot drive normal buzzer.
pin 11 = VCC, the positive terminal of power. This RFID reader will require power of + 2.8V to +5.0V.
Now, you will need a UC00A to link the RFID reader to computer. Make the following connection:
Now, connect the RFID reader onto the breakout board properly, mind the orientation.
Connect the UC00A to computer, install the driver. Check out the User’s Manual of UC00A if you do not know how to use it. Now we are really near to getting the ID from RFID tag or key chain. You will need a terminal program such as HyperTerminal, PuTTy, RealTerm, TeraTerm or Arduino Serial Monitor. I will be using Arduino Serial monitor as have that 🙂
Open Arduino IDE, choose the correct COM port under Tools -> Serial Port. Now, open serial monitor from Tools -> Serial Monitor.
According to datasheet, page 4:
There are 16 bytes of data send from the RFID reader every time it detected RFID card, but the Serial monitor only display 12 characters because it can display ASCII character only, other bytes of data are non-displayable characters.
Done! The same connection can be apply to any microcontroller such as PIC and Arduino. The minimum connection is 5V, GND and RX of Microcontroller. If you have further inquiry, please do discuss in our technical forum as we seldom check the comment section in tutorial site.