• Skip to main content
  • Skip to primary sidebar

Homemade Circuit Projects

Need circuit help? Post them in the comments! I've answered over 50,000!

Blog | Categories | About | Contact | Calculators-online
You are here: Home / Transmitter Circuits / RFID Reader Circuit using Arduino

RFID Reader Circuit using Arduino

Last Updated on December 31, 2019 by Swagatam 7 Comments

In this article we are going to take a tour on RFID circuit technology. We will be exploring how RFID tags and readers work, how to interface RFID module (RC522) with Arduino and extract some useful information from the RFID tags.

Table of Contents
  • Using RFID Tags
  • Illustration of RC522 reader/writer module:
  • How it Works
  • Arduino RFID circuit prototype :
  • Program Code:

Using RFID Tags

I am sure every one of you has used RFID to get security access at least once at office, school, college, library etc.

The tag/card which you carry around has electronic chip embedded in it, the chip stores your identity electronically. Unlike barcodes, where card should be line of sight of the reader, RFIDs can be placed just near to reader to read the information.

Most of our smart cards use passive RFID technology, which means no power is required to read the information from the card. The reader powers the RFID chip and extracts information at the same time.

These kinds of tags can read information from millimetres to few feet, depending on the tag and application.

An active RFID tags are powered externally, these kinds of tags transmit the information up to 100 feet. The battery power consumption is optimized to last few years.

In this project we are going to look at passive RFID technology. We are using RC522 reader module along with arduino for extracting and displaying information. RC522 module is commonly available at e-commerce websites and local electronics kits shop.

Illustration of RC522 reader/writer module:

warning message: electricity is dangerous, proceed with caution
RC522 reader/writer module

Card and keychain type tags:

Card and keychain type tags

As we can see that, a part of the PCB is surrounded by conducting path in square shape on the reader; this will generate electromagnetic field for the tag at 13.56MHz frequency.

The generated EMF is picked by the tag and converts to sufficient voltage for the tag to operate, the tag will sends out the necessary information in pulse form back to the reader. The on-board microcontroller decodes the information.

How it Works

RFID Circuit using Arduino

The schematic is very easy and self-explanatory, few jumper wires is enough to accomplish this project. We are going to power the arduino and RFID via USB port of the computer. The operating voltage of RC522 is 3.3V, do not connect 5V supply to the module and will damage the on-board components.

Arduino RFID circuit prototype :

That’s all the hardware connections, now let’s jump into coding.

Before uploading the program, download the library file from the following link and move to library folder of arduino IDE.

github.com/miguelbalboa/rfid.git

Program Code:

//-------------------------Program developed by R.Girish------------------//
#include <SPI.h>
#include <MFRC522.h>
#define SS_PIN 10
#define RST_PIN 9
MFRC522 rfid(SS_PIN, RST_PIN);
MFRC522::MIFARE_Key key;
void setup()
{
Serial.begin(9600);
SPI.begin();
rfid.PCD_Init();
}
void loop() {
if ( ! rfid.PICC_IsNewCardPresent())
return;
if ( ! rfid.PICC_ReadCardSerial())
return;
MFRC522::PICC_Type piccType = rfid.PICC_GetType(rfid.uid.sak);
if(piccType != MFRC522::PICC_TYPE_MIFARE_MINI &&
piccType != MFRC522::PICC_TYPE_MIFARE_1K &&
piccType != MFRC522::PICC_TYPE_MIFARE_4K)
{
Serial.println(F("Your tag is not of type MIFARE Classic, your card/tag can't be read :("));
return;
}
String StrID = "" ;
for (byte i = 0; i <4; i ++)
{
StrID +=
(rfid.uid.uidByte[i]<0x10? "0" : "")+
String(rfid.uid.uidByte[i],HEX)+
(i!=3?":" : "" );
}
StrID.toUpperCase();
Serial.print("Your card's UID:");
Serial.println(StrID);
rfid.PICC_HaltA ();
rfid.PCD_StopCrypto1 ();
}
//-------------------------Program developed by R.Girish------------------//

Ok! What does the above program designed to function?

The above program will display the UID of the tag in serial monitor of IDE, when you scan on the reader. UID is unique identification number of the tag, it can’t be changed and it is set by the manufacturer.

OUTPUT:

Your card's UID:  FA:4E:B2   // this is an example.

Note 1: The each two values are separated by colon, which is done by the program; real values may not be separated by colon but, rather by space.

Note 2: Only NXP manufactured RFID tags are readable/writeable with the proposed setup, these are commonly and commercially used.

The UID is used to recognize the tag; the tag that comes along with the kit can store up to 1KB of information. There are other cards which can store up to 4KB of information or even more.

The process of storing and extracting the information from the tag is subject of another article.
If you have question, regarding this project, feel free ask in the comment section.

You'll also like:

  • 1.  27 MHz Transmitter Circuit – 10 Km Range
  • 2.  Fiber Optic Circuit – Transmitter and Receiver
  • 3.  2 Meter Ham Radio Transmitter Circuit
  • 4.  Tracking Transmitter Circuit
  • 5.  Simple Walkie Talkie Circuit
  • 6.  Telephone Transmitter Circuit

Filed Under: Transmitter Circuits Tagged With: Arduino, Reader, RFID

About Swagatam

I am an electronics engineer and doing practical hands-on work from more than 15 years now. Building real circuits, testing them and also making PCB layouts by myself. I really love doing all these things like inventing something new, designing electronics and also helping other people like hobby guys who want to make their own cool circuits at home.

And that is the main reason why I started this website homemade-circuits.com, to share different types of circuit ideas..

If you are having any kind of doubt or question related to circuits then just write down your question in the comment box below, I am like always checking, so I guarantee I will reply you for sure!

Previous Post: « Arduino Barometric Pressure Sensor Circuit – Working and Interfacing Details
Next Post: Triac Phase Control using PWM Time Proportional »

Reader Interactions

Comments

  1. Sufiyan Hamisu says

    January 27, 2019 at 10:58 am

    Hello Mr Swagatam. Please I’m now referring my question to Mr GR. Please base on one of your arduino article https://www.homemade-circuits.com/2017/09/password-based-ac-mains-onoff-switch-circuit.html
    Please Sir I want to use it as a door lock but using savor motor

    Reply
    • Swagatam says

      January 27, 2019 at 11:23 am

      Hello Sufiyan, yes you can make it, no problem, but I am not sure how you would implement the reverse forward for a servo motor..

      Reply
  2. GR says

    April 23, 2018 at 1:35 pm

    HI oz,

    Let me do some research on this, If this is possible for me, I will definitely make an article.

    Regards

    Reply
  3. oz says

    April 22, 2018 at 8:53 am

    hi Swagatam
    my i’m a locksmith and i use to play with electronics long ago, i fund your website looking for a basic 3 phase motor controller inverter.
    your website kept me busy for the past 4 hours so much stuff 🙂 and now i came across this
    and sense as a locksmith i make car key’s, i realty need an RFID chip reader.
    would if it be possible to modify this one to read and identify car transponder chips? (to display if a chip is still working and what kind it is?)
    and maybe even (i know this one has nothing to do with RFID) add an RF signal tester with frequency display (for testing car remotes)
    such a tool would help me a lot.
    and if i could build one even better, the only thing is.
    it has to be a stand alone device (not connected to a computer of any kind (laptop, tablet or cellphone)
    no problem to install a raspberrypai with touch screen, or some kind of dot matrix display

    Reply
    • Swagatam says

      April 23, 2018 at 9:24 am

      Thank you Oz, I appreciate your interest very much, the above article was written by Mr. GR, so I will ask him whether the mentioned idea is possible or not, we’ll get back to you soon.

      Reply
  4. chucks ichoku says

    October 30, 2016 at 1:49 pm

    good evening swaggattam
    there was a digital display circuit I want to design, but there is one particular component. I can't found it here in ma country " 2N3053" transistor. Pls can u suggest me another transistor use to replace it. i'll be great and happy if I get responds. thanks

    Reply
    • Swagatam says

      October 30, 2016 at 3:30 pm

      chucks, you can try BD139

      Reply

Need Help? Please Leave a Comment! We value your input—Kindly keep it relevant to the above topic! Cancel reply

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

Primary Sidebar

circuit simulator image

Subscribe to get New Circuits in your Email



Categories

  • Arduino Projects (89)
  • Audio and Amplifier Projects (132)
  • Automation Projects (17)
  • Automobile Electronics (101)
  • Battery Charger Circuits (83)
  • Datasheets and Components (105)
  • Electronics Theory (143)
  • Free Energy (37)
  • Games and Sports Projects (11)
  • Grid and 3-Phase (19)
  • Health related Projects (25)
  • Home Electrical Circuits (12)
  • Indicator Circuits (14)
  • Inverter Circuits (88)
  • Lamps and Lights (142)
  • Meters and Testers (69)
  • Mini Projects (46)
  • Motor Controller (64)
  • Oscillator Circuits (28)
  • Pets and Pests (15)
  • Power Supply Circuits (108)
  • Remote Control Circuits (50)
  • Security and Alarm (64)
  • Sensors and Detectors (102)
  • Solar Controller Circuits (59)
  • Temperature Controllers (42)
  • Timer and Delay Relay (49)
  • Transmitter Circuits (29)
  • Voltage Control and Protection (40)
  • Water Controller (36)



Other Links

  • Privacy Policy
  • Cookie Policy
  • Disclaimer
  • Copyright
  • Videos
  • Sitemap

People also Search

555 Circuits | 741 Circuits | LM324 Circuits | LM338 Circuits | 4017 Circuits | Ultrasonic Projects | SMPS Projects | Christmas Projects | MOSFETs | Radio Circuits | Laser Circuits | PIR Projects |



Social Profiles

  • Twitter
  • YouTube
  • Instagram
  • Pinterest
  • My Facebook-Page
  • Quora
  • Stack Exchange
  • Linkedin


  • Recent Comments

    • Swagatam on Crystal Radio Sets with Amplifier Circuit
    • Lion on Crystal Radio Sets with Amplifier Circuit
    • Swagatam on How to Make Dog Barking Preventer Circuit using High Frequency Deterrence
    • Swagatam on 5 Simple Fastest Finger First Circuits Explained
    • suat kaleli on How to Make Dog Barking Preventer Circuit using High Frequency Deterrence

    © 2025 · Swagatam Innovations