RFID Reader with Arduino

RFID stands for Radio-frequency identification. It is the wireless use of electromagnetic fields to transfer data, for the purposes of automatically identifying and tracking tags attached to objects. The tags contain electronically stored information.

 

2014-10-11 21.56.58On the basis their power source they are of two types :-

  1. Active RFID:- It uses an internal power source (battery) within the tag to continuously power the tag and its RF communication circuitry.
  2. Passive RFID:- It uses RF energy transferred from the reader to the tag to power the tag. It induces the energy via electromagnetic induction in tag, which in return supplies energy to tag’s electronics circuit. Its range is limited since efficiency of power transferred via electromagnetic induction is very poor with increasing distance between source and sink. This circuit works on principle of two-way radio transmitter-receivers called interrogators. In short, readers send a signal to the tag and read its response at 125Khz (in this case). It will read tag based on uEM 4001  or  compatible  chip  within  its  range. It will output the cards ID in a serial string, which can easily be read by Arduino (any microcontroller).2014-10-11 22.18.42

 Requirements

1. ES-125R :- Its a 125Khz RFID Reader Module.

2. RFID TAGS

3. Arduino

 

Connections

  • Arduino’s VCC         <——> Reader’s VCC (1st pin)
  • Arduino’s Ground   <——> Reader’s ground (3rd pin)
  • Arduino’s D10          <——>Reader’s TX (8th pin)
  • Arduino’s D11           <——> Reader’s o (4th pin)

Arduino Code

#include <SoftwareSerial.h>

SoftwareSerial RFID(10, 11);

void setup()  {
Serial.begin(9600);
Serial.println("Serial Ready");

RFID.begin(9600);
Serial.println("RFID Ready");

}

void loop()  {
int index =0 ;  

char unit;
String msg;

while(RFID.available()>0){

unit = RFID.read();

index++;

msg += unit;

if(index == 12)  {
Serial.print("Tag ID: ");

Serial.println(msg);} 

}

}

Working

  • Open the Serial Monitor of Arduino.
  • Touch the tag with reader you will get 12 character ID on serial monitor. something like shown in succeeding pic.
Serial output for tag ID.
Serial output of two different tag’s ID