RC522 RFID Module : PinOut, Features, Specifications, Interfacing, Working Datasheet & Its Applications

RFID, or Radio-frequency identification, is a wireless communication technology that utilizes RF waves to search, store, identify, and track attached tags to objects and transmit data regarding a person or an object. These tags store electronic data that readers can access from more than a few meters away, without requiring a direct line of sight. Many industries commonly use RFID for inventory management, asset tracking, access control, and supply chain logistics because it efficiently and accurately tracks and manages items. RFID modules allow wireless, non-contact data transfer and object identification with RF waves, which include a reader and a tag that communicates through electromagnetic fields. This article elaborates on the RC522 RFID module, its working & its applications.


What is the RC522 RFID Module?

The RC522 RFID is a 13.56MHz wireless communication module from NXP semiconductors. This module utilizes the MFRC522 controller, which supports SPI, UART, and I2C protocols, and typically ships with an RFID card and key fob. Therefore, developers primarily design this RFID module for non-contact communication using RFID tags, commonly applied in attendance tracking, access control systems, and identifying objects or individuals.

RC522 RFID Module Working

The RC522 RFID module works like a reader & writer mainly for RFID tags with a 13.56MHz electromagnetic field to communicate with them. This module supports communication with different microcontrollers through UART, SPI, and I2C protocols. It is well-matched with ISO/IEC 14443 Type A cards like MIFARE1 S70, S50, DESFire cards, Ultralight, Pro, etc.

RFID uses radio waves to transmit data above short distances by allowing identification & object tracking. It performs as an RFID reader by producing a 13.56 MHz electromagnetic field. Whenever a well-matched RFID tag comes in range, then the tag’s antenna attracts the RF energy by powering up the microchip. After that this chip will use RF energy to transmit the stored data on the tag back toward the reader.

RC522 RFID Module Pin Configuration:

The RC522 RFID module pin configuration is shown below. So, this module includes 8 pins, which are explained below.

RC522 RFID Module Pin Configuratiom
RC522 RFID Module Pin Configuratiom
  • Pin-1 (Vcc): It is used to power 3.3V to the RFID module.
  • Pin-2 (RST): It is a reset pin that is used to reset (or) power down the RFID module.
  • Pin-3 (Ground): It is a ground pin of the system.
  • Pin-4 (IRQ): It is an interrupt pin that is used to wake up the RFID module whenever a device approaches into range
  • Pin-5 (MISO/SCL/Tx): It is a MISO pin whenever used for SPI communication which works as SCL for I2c & Tx for UART.
  • Pin-6 (MOSI): It is a Master out slave in pin used for SPI communication.
  • Pin-7 (SCK): It is a serial CLK pin that is used to provide a CLK source.
  • Pin-8 (SS/SDA/Rx): It works as Serial input for SPI communication purposes, SDA is used for IIC & Rx throughout UART.

Features & Specifications:

The features and specifications of the RC522 RFID module include the following.

  • RC522 is an RFID module.
  • This module includes 8 pins.
  • Its operating voltage ranges from 2.5V to 3.3V.
  • It supports different communication protocols like I2C, SPI protocol & UART.
  • The maximum data rate is 10Mbps.
  • Current consumption ranges from 13-26mA
  • The minimum power-down mode consumption is 10uA.
  • The frequency range is 13.56 MHz ISM band.
  • Logic inputs are 5V tolerant.
  • Operating temperature ranges from -20°C to +80°C.
  • It supports different card types like MIFARE 1 S70, MIFARE 1 S50, MIFARE Ultralight, MIFARE DESFire, MIFARE Pro, etc.
  • Its storage temperature ranges from -40°C to +85°C.
  • Relative humidity ranges from 5% to 95%
  • The data transfer rate is up to 10 Mbit/s.
  • Advanced modulation & demodulation concept was integrated completely into all kinds of 13.56MHz passive contactless communication techniques & protocols.

Equivalents & Alternatives

Equivalents to RC522 RFID modules are; RC522 SPI S50, PN532 RFID, etc. Alternative RFID modules are; EM-18 RFID Reader, RFID Tag, etc.

RC522 RFID Module Components

The RC522 RFID reader module is a reader/writer module that reads or writes data to or from an RFID transponder. This module includes three significant components, like MFRC522 chip, a 27.12 MHz crystal oscillator & an antenna, which are explained below.

RC522 RFID Module Components
  RC522 RFID Module Components

MFRC522 Chip

The RC522 RFID reader module uses MFRC522 IC which is the high incorporated RFID card reader IC. This chip is a low-cost, small size, low power consumption, read & write chip that functions mainly on 13.56 MHz non-contact communication. It supports a variety of RFID Tags like MIFARE 4K, MIFARE 1K, MIFARE Mini, and ISO / IEC 14443-based cards & tags.

In addition, this chip can also support Mifare series-based higher speed contactless communication and duplex communication where its speed is up to 424 kb/s. This IC functions at a 13.46 MHz frequency with up to 50 mm operating range based on the size & tuning of the antenna. This chip can also support UART, I2C, and SPI serial communication, including the Arduino.

27.12 MHz Crystal Oscillator

A 27.12 MHz quartz crystal can be connected to the two OSCIN & OSCOUT pins of the IC for the inside oscillator.

Antenna

An NFC Coil is fixed within the PCB of the RFID module. So this antenna emits a 13.56 MHz high-frequency electromagnetic field, which supports 13.56 MHz passive components.

RC522 RFID Module Interfacing with Arduino

Generally, RFID uses electromagnetic fields to identify the tags automatically which are attached to the things within the malls, stores, and many more. So, the RFID tag stores an extensive range of data within it and powers the RFID reader to read; thus, it doesn’t need any battery. RFID emits the radio signals to produce the signal reverse from the tag.

The RC522 RFID reader is interfaced with Arduino UNO, as shown below. The required components to make this interfacing include Arduino UNO, MFRC522 RFID reader, Type A to B USB cable, and jumper wires. The connections of RC522 RFID reader interfacing with Arduino UNO follow as;

RC522 RFID Module Interfacing with Arduino Board
                                   RC522 RFID Module Interfacing with Arduino Board
  • Connect the D10 pin of Arduino to the SDA pin of the RFID reader.
  • Connect the D13 pin of Arduino to the SCK pin of the RFID reader.
  • Connect the D11 pin of the Arduino to the MOSI pin of the RFID reader.
  • Connect the D12 pin of the Arduino to the MISO pin of the RFID reader.
  • Connect the unconnected pin of Arduino to the IRQ pin of the RFID reader.
  • Connect the GND pin of Arduino to the GND pin of the RFID reader.
  • Connect the D9 pin of the Arduino to the RST pin of the RFID reader.
  • Connect the 3.3V pin of the Arduino to the 3.3V pin of the RFID reader.

Code:

The following code demonstrates how to interface the RC522 RFID module with the Arduino board.

#include <SPI.h>
#include <MFRC522.h>
#define SS_PIN 10
#define RST_PIN 9
MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance.
void setup()
{
Serial.begin(9600); // Initiate a serial communication
SPI.begin(); // Initiate SPI bus
mfrc522.PCD_Init(); // Initiate MFRC522
Serial.println(“Approximate your card to the reader…”);
Serial.println();
}
void loop()
{
// Look for new cards
if ( ! mfrc522.PICC_IsNewCardPresent())
{
return;
}
// Select one of the cards
if ( ! mfrc522.PICC_ReadCardSerial())
{
return;
}
//Show UID on serial monitor
Serial.print(“UID tag :”);
String content= “”;
byte letter;
for (byte i = 0; i < mfrc522.uid.size; i++)
{
Serial.print(mfrc522.uid.uidByte[i] < 0x10 ? ” 0″ : ” “);
Serial.print(mfrc522.uid.uidByte[i], HEX);
content.concat(String(mfrc522.uid.uidByte[i] < 0x10 ? ” 0″ : ” “));
content.concat(String(mfrc522.uid.uidByte[i], HEX));
}
Serial.println();
Serial.print(“Message : “);
content.toUpperCase();
if (content.substring(1) == “BD 31 15 2B”) //change here the UID of the card/cards that you want to give access
{
Serial.println(“Authorized access”);
Serial.println();
delay(3000);
}
else {
Serial.println(” Access denied”);
delay(3000);
}
}

Working

The above code includes the SPI library to communicate with the RFID tags over a short distance. Additionally, you can add the RFID library. The code defines the module’s RESET pin, which connects to pin 9 on the Arduino. For SPI communication, the serial input pin connects to pin 10 of the Arduino.

The code in the void setup initializes the SPI bus & the RFID module. After that, the code in the void loop function is first scanned to appear on a new card. The code has described the conditions if the RFID card includes a UID tag stored within the IDE or not then, it will function and provide the message consequently.

The text above describes the connection between the MFRC522 RFID reader and the Arduino UNO. Once you install the RFID library then upload the above code that is accessible within the Arduino UNO board. Now, the above-mentioned code is uploaded to the Arduino board. Now, you should upload the code mentioned above to the Arduino board. In this code, change the line if (content.substring(1) == “Write your UID”). So, if this tag includes a similar stored UID, then observe the message as Authorized access; otherwise, you will see the message as Access denied above the serial monitor.

Advantages & Disadvantages

The advantages of RC522 RFID modules include the following.

  • The RC522 module is a cost-effective & compact solution mainly for RFID applications.
  • This module has low power consumption, so, suitable for battery-powered devices.
  • Developers integrate this module with various microcontroller platforms, such as Arduino, using SPI, UART, and I2C communication interfaces.
  • This module operates at 13.56 MHz and is compatible with different cards, including ISO/IEC 14443 Type A, MIFARE1 S70, MIFARE1 S50, MIFARE Ultralight, MIFARE DESFire, and MIFARE Pro.
  • Users can easily load this module directly into a variety of reader molds.
  • Its data transfer rate is high, up to 10 Mbit/s.
  • This module reads and writes data to RFID tags.
  • It utilizes SPI communication for consistent data transfer between the RFID reader & the microcontroller.
  • This module is available at less cost, and is perfect for the development of user equipment.
  • Its design meets superior application development & production requirements.

The disadvantages of RC522 RFID modules include the following.

  • This module has a limited reading range is approximately 1 meter, mainly for passive tags.
  • The RFID tag should be nearby to the RFID reader for data transmission.
  • RFID systems can be prone to interference from different electronic devices (or strong electromagnetic fields.
  • This interference can interrupt the communication between the reader & the tag, which leads to imprecise readings or even system failure.
  • They can be susceptible to illegal access, which may lead to breaches of data and coverage of sensitive data.
  • The RFID system’s initial cost is higher compared to other technologies, particularly for large-scale deployments.
  • RFID systems depend on a power source, so power outages can cause breakdown or system downtime.
  • RFID system Setting up & managing can be more difficult as compared to access control techniques, which need specialized information and skill.

Applications

The applications of RC522 RFID modules include the following.

  • This RFID module tracks student or employee attendance by reading RFID tags or cards.
  • Developers can incorporate it into systems that require authorized workers to access specific areas with RFID cards.
  • Organizations can utilize this technology to recognize and monitor authorized workers or assets within a safety perimeter.
  • This module also tracks goods throughout the supply chain, enhancing visibility and efficiency.
  • Users employ portable handheld devices like RFID readers to read and write information to RFID tags.
  • People use RFID tags to identify and track livestock, pets, and vehicles in real time. Additionally, businesses can leverage this technology to track cargo and improve supply chain logistics.
  • RFID technology improves customer service and decreases losses.
  • It is suitable to utilize smart meters to check energy consumption.
  • This module tracks inventory items through RFID tags reading connected to containers or products.
  • This technology tracks the place and valuable asset movements like tools or equipment.

Please refer to this link for the RC522 RFID Module Datasheet.

Thus, this is an overview of the RC522 RFID module, its working, and its applications. So this is a popular and versatile RFID reader or writer module depending on the MFRC522 IC. This module operates at 13.56 MHz by supporting a variety of RFID protocols by providing a low-power and compact solution for various applications. This is a valuable tool for developers and hobbyists to implement RFID-based solutions within various projects. Here is a question for you: Who invented RFID technology?