Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use RFID RC522: Examples, Pinouts, and Specs

Image of RFID RC522
Cirkit Designer LogoDesign with RFID RC522 in Cirkit Designer

Introduction

The RFID RC522 is a low-cost RFID reader/writer module that operates at a frequency of 13.56 MHz. It is widely used for reading RFID tags and cards, enabling wireless communication in a variety of applications. This module is based on the MFRC522 IC and supports ISO/IEC 14443 Type A cards. Its compact size, low power consumption, and ease of integration make it a popular choice for projects involving access control, inventory management, attendance systems, and identification systems.

Explore Projects Built with RFID RC522

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Arduino UNO RFID Access Control System with I2C LCD Feedback and Keypad Input
Image of eduVents_NFC: A project utilizing RFID RC522 in a practical application
This circuit is designed to read RFID tags using the RFID-RC522 module, display information on an I2C LCD screen, and accept user input via a 4x4 membrane matrix keypad. It is controlled by an Arduino UNO, which is powered by a 3xAA battery pack, and communicates with the RFID module and LCD screen using SPI and I2C protocols, respectively.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO and RFID-RC522 Based RFID Reader System
Image of attendance: A project utilizing RFID RC522 in a practical application
This circuit integrates an Arduino UNO with an RFID-RC522 module to enable RFID-based identification. The Arduino provides power and SPI communication to the RFID module, allowing it to read RFID tags and potentially perform actions based on the tag data.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO and RFID-RC522 Based RFID Reader System
Image of Voltage&Current: A project utilizing RFID RC522 in a practical application
This circuit interfaces an RFID-RC522 module with an Arduino UNO. The Arduino UNO provides power and handles communication with the RFID module via SPI protocol, enabling the system to read RFID tags.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO-Based RFID and Bluetooth Access Control System
Image of IOT: A project utilizing RFID RC522 in a practical application
This circuit integrates an Arduino UNO with an RFID-RC522 module and an HC-05 Bluetooth module. The Arduino UNO reads RFID tags via the RFID-RC522 and communicates the data wirelessly through the HC-05 Bluetooth module.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with RFID RC522

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of eduVents_NFC: A project utilizing RFID RC522 in a practical application
Arduino UNO RFID Access Control System with I2C LCD Feedback and Keypad Input
This circuit is designed to read RFID tags using the RFID-RC522 module, display information on an I2C LCD screen, and accept user input via a 4x4 membrane matrix keypad. It is controlled by an Arduino UNO, which is powered by a 3xAA battery pack, and communicates with the RFID module and LCD screen using SPI and I2C protocols, respectively.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of attendance: A project utilizing RFID RC522 in a practical application
Arduino UNO and RFID-RC522 Based RFID Reader System
This circuit integrates an Arduino UNO with an RFID-RC522 module to enable RFID-based identification. The Arduino provides power and SPI communication to the RFID module, allowing it to read RFID tags and potentially perform actions based on the tag data.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Voltage&Current: A project utilizing RFID RC522 in a practical application
Arduino UNO and RFID-RC522 Based RFID Reader System
This circuit interfaces an RFID-RC522 module with an Arduino UNO. The Arduino UNO provides power and handles communication with the RFID module via SPI protocol, enabling the system to read RFID tags.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of IOT: A project utilizing RFID RC522 in a practical application
Arduino UNO-Based RFID and Bluetooth Access Control System
This circuit integrates an Arduino UNO with an RFID-RC522 module and an HC-05 Bluetooth module. The Arduino UNO reads RFID tags via the RFID-RC522 and communicates the data wirelessly through the HC-05 Bluetooth module.
Cirkit Designer LogoOpen Project in Cirkit Designer

Technical Specifications

Below are the key technical details and pin configuration of the RFID RC522 module:

Key Technical Details

  • Operating Voltage: 2.5V to 3.3V (logic level), 5V compatible with level shifters
  • Operating Frequency: 13.56 MHz
  • Communication Interface: SPI, I2C, UART (default: SPI)
  • Maximum Data Rate: 10 Mbps (SPI)
  • Reading Distance: Up to 5 cm (depending on the tag and environment)
  • Current Consumption: 13-26 mA (active mode), 10 µA (standby mode)
  • Supported Protocols: ISO/IEC 14443 Type A
  • Dimensions: 40mm x 60mm

Pin Configuration and Descriptions

The RFID RC522 module has 8 pins, as described in the table below:

Pin Name Description
1 VCC Power supply input (3.3V). Can be connected to 5V with a level shifter.
2 RST Reset pin. Active LOW. Used to reset the module.
3 GND Ground connection.
4 IRQ Interrupt pin. Can be used to signal events (optional).
5 MISO/SCL/TX SPI MISO (Master In Slave Out), I2C clock (SCL), or UART TX (default: SPI MISO).
6 MOSI/SDA/RX SPI MOSI (Master Out Slave In), I2C data (SDA), or UART RX (default: SPI MOSI).
7 SCK SPI clock input.
8 NSS/SDA SPI chip select (NSS) or I2C address select (SDA).

Usage Instructions

How to Use the RFID RC522 in a Circuit

  1. Power the Module: Connect the VCC pin to a 3.3V power source and the GND pin to ground.
  2. Connect to a Microcontroller: Use the SPI interface to connect the module to a microcontroller (e.g., Arduino UNO). The typical connections are:
    • VCC → 3.3V
    • GND → GND
    • RST → Any digital pin (e.g., D9 on Arduino UNO)
    • SCK → D13 (SPI clock)
    • MOSI → D11 (SPI data out)
    • MISO → D12 (SPI data in)
    • NSS → D10 (SPI chip select)
  3. Install Required Libraries: For Arduino, install the "MFRC522" library from the Arduino Library Manager.
  4. Upload Code: Use the example code below to test the module.

Example Code for Arduino UNO

#include <SPI.h>
#include <MFRC522.h>

// Define pins for the RC522 module
#define RST_PIN 9  // Reset pin connected to D9
#define SS_PIN 10  // Slave Select pin connected to D10

MFRC522 rfid(SS_PIN, RST_PIN); // Create an instance of the MFRC522 class

void setup() {
  Serial.begin(9600); // Initialize serial communication
  SPI.begin();        // Initialize SPI bus
  rfid.PCD_Init();    // Initialize the RC522 module
  Serial.println("Place your RFID card near the reader...");
}

void loop() {
  // Check if a new card is present
  if (!rfid.PICC_IsNewCardPresent()) {
    return; // Exit if no card is detected
  }

  // Check if the card can be read
  if (!rfid.PICC_ReadCardSerial()) {
    return; // Exit if the card cannot be read
  }

  // Print the UID of the card
  Serial.print("Card UID: ");
  for (byte i = 0; i < rfid.uid.size; i++) {
    Serial.print(rfid.uid.uidByte[i], HEX); // Print each byte in hexadecimal
    Serial.print(" ");
  }
  Serial.println();

  // Halt the card to stop communication
  rfid.PICC_HaltA();
}

Important Considerations and Best Practices

  • Power Supply: Ensure the module is powered with 3.3V. If using a 5V microcontroller, use level shifters for the SPI pins.
  • Reading Distance: The reading distance depends on the tag size and environmental factors. Avoid placing the module near metal objects.
  • Library Compatibility: Use the latest version of the MFRC522 library for optimal performance.
  • Interrupt Pin: The IRQ pin is optional and can be left unconnected if not used.

Troubleshooting and FAQs

Common Issues and Solutions

  1. Module Not Responding:

    • Check the wiring and ensure all connections are secure.
    • Verify that the module is powered with 3.3V.
    • Ensure the correct SPI pins are used on the microcontroller.
  2. Card Not Detected:

    • Ensure the card is within the reading range (up to 5 cm).
    • Check for interference from nearby metal objects or other RFID devices.
  3. UID Not Displayed:

    • Verify that the MFRC522 library is installed and included in the code.
    • Ensure the card is compatible with the ISO/IEC 14443 Type A standard.

FAQs

  • Can the RC522 module write data to RFID tags? Yes, the RC522 can write data to compatible RFID tags. Refer to the MFRC522 library examples for writing data.

  • Can I use the RC522 with a 5V microcontroller? Yes, but you must use level shifters for the SPI pins to avoid damaging the module.

  • What is the maximum range of the RC522 module? The maximum range is approximately 5 cm, depending on the tag and environmental conditions.