RFID Reader ID-20LA (125kHz) with Arduino

In this tutorial, I am going to show you how to use the RFID Reader ID-20LA with CT-UNO (or any Arduino Uno equivalent). Before going through this tutorial, please have a look on the getting started with Compact RFID Reader, ID-20LA.

2015-02-16 16.18.52

Hardware Required:

Below are the parts required to build the RFID prototyping shield:

Hardware Introduction:

1. RFID Reader ID-20LA – An RFID reader from ID-Innovations which can be used to detect 125kHz RFID tags. ID-20LA requires minimum amount of circuit connection and be easily used with Arduino or any microcontroller. The data can be obtained through serial communication, with the settings of 9600 Baud, No Parity and 1 stop bit.

2015-02-16 13.44.23

2. 125kHz Passive RFID Card/Key Chain – There are various of RFID cards available at different frequencies. To use it with ID-20LA reader, you need to use cards/key chains with 125kHz. 

2015-02-16 13.46.30

Circuit Assembly:

Before using the RFID reader, I am going to show you how you can make a RFID prototyping shield. This shield will provide the necessary connection to interface with CT-UNO. Besides providing the communication with Arduino, the shield also have a LED and buzzer as an indicator for card/key chain read.

While constructing the RFID prototyping shield, I will be referring to the circuit diagram as stated in ID-20LA datasheet. The pin numbering that I used is same as in datasheet.

RFID Circuit Diagram

RFID Pinout

1. First, let’s start of with the prototyping shield. Here, I will be using Cytron Prototyping Shield.

2015-02-02 15.15.58

2. Solder the RFID Reader breakout board. If you not sure on how to make this breakout board, have a look at Compact RFID Reader, ID-20LA.

2015-02-02 15.18.12-1

3. Now solder pin 1 to the shield’s ground pin. Besides that, solder pin 2 (Reset) and pin 11 (V supply) to 5V of the prototyping shield.

2015-02-02 15.35.14

4. Solder one end of 2.2k ohm resistor to the pin 10 of RFID reader.

2015-02-02 15.37.13-2

 

5. Now solder the other end of 2.2k ohm resistor to the base of BC547 transistor. If you are not sure about BC547 pinout, kindly refer to the datasheet. Next, solder the emitter of BC547 to GND.

2015-02-02 15.42.36-2

 6. Solder a 100 ohm resistor to the collector of BC547 transistor.

2015-02-02 15.47.02-1

 7. Solder the cathode of LED to the other end of 100 ohm resistor. Then, the anode of LED has to be connected to 5V.

2015-02-02 15.49.35-1

 8. Solder a 4.7k ohm resistor to the collector of BC547.

2015-02-02 15.51.45-2

 

9. Solder the piezo transducer to the 4.7k ohm resistor with the other end of piezo transducer to 5V supply.

2015-02-02 15.54.39-2

 

10. Now that the shield is almost done, plug in the ID-20LA RFID Reader onto the breakout board. Finally the RFID prototyping shield is done.

2015-02-02 16.02.21

 

11. Finally, stack the shield on top of CT UNO and plug in the USB cable to your computer. If nothing goes wrong, when you place the RFID card or key chain on top of the reader, the LED would blink once and the piezo tranducer will ‘beeps’.

2015-02-02 16.19.56

Example sketch:

Here I have an example sketch to run the ID-20LA with Arduino. What the sketch does is read the data transmitted from the reader and decodes it into the data and checksum section. Therefore, you can use this code to identify the ID of the card/key chain that you have. You can download the example sketch, rfid_data.

Note: If you have the shield attached on the CT-UNO, you need to remove the reader temporary while the code is uploading. If not, you will receive an avrdude error from the compiler.

Image below shows what you should see on your Arduino serial monitor when a RFID card/key chain is sensed and read.

tagID

tagID1

The sketch basically reads for 13 bytes of serial data from the RFID reader. Whenever 13 bytes of data is received, it will check on the start byte which is 0x02, then the data is valid. Otherwise, the data will simply be discarded. What we are interested is the twelve bytes after the start byte (0x02) which consists of the tagID and also the checksum. An ASCII to HEX number conversion is made before the data is saved into the tagID array.

Data Format
Data Format

coding
Example sketch

Demo application of ID-20LA:

In this demo, I will be using three RFID cards/key chains to change the colour of a common anode RGB LED. The demo sketch is available here

Additional parts required for this demo:

Fritzing breadboard setup:

Connect 5V to the common anode of RGB LED. Then, connect a 330 ohm resistor to each colour (Red, Green, Blue) pins and to CT-UNO pin (8, 9 and 10).

frizting rfid

When RFID card is placed near the ID-20LA reader (From top), the tag’s ID is read and compared with the registered RFID tag in Arduino sketch. Each registered ID will toggle the LED colour on and off. Unregistered card won’t have any effect on the RGB LED. Therefore, you need to change the registered card ID before running the sketch.

change registered

Video:

Finally a demo of using the RFID ID-20LA reader with RFID card/key chain to mix the colour of RGB LED.

If you have any inquiry, feel free to discuss at our technical forum.

 Attachment:

In this github file there are two folder which are:

  1. rfid_data – Sketch to decode the tagID and checksum.
  2. color_mixing_rfid – Sketch to mix RGB LED colour using RFID.

Buy

, , ,

Related Post

How to Make your Line Following Robot Faster?

Control Mobile Robot through WiFi with ESP-WiFi Shield (Arduino + Andriod)

Getting Started? Let’s Try EZMP3 Shield :D

Controlling Servo via Android Smartphone

5 thoughts on “RFID Reader ID-20LA (125kHz) with Arduino

  1. Hello, may I ask.
    Why the number of my card does not display on the serial monitor when I contact the card to the ID-20LA reader?
    What is the problem?
    Is anything get wrong in my code? Because I use the same example as rfid_data.

  2. hey im interested with your project, i wanted to know if i can change the ct uno with arduino leonardo instead?
    thx.

  3. and i wanted to make rfid reader for unlocking my pc can u kindly guide me how to do so with item that u have on your store?
    thx

Leave a Reply

Your email address will not be published. Required fields are marked *