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

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

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

Introduction

The RC522 RFID Module, manufactured by NXP Semiconductors (Part ID: MFRC522), is a compact and cost-effective device designed for reading and writing RFID tags. Operating at a frequency of 13.56 MHz, it supports communication with a variety of RFID cards and tags. Its versatility and affordability make it a popular choice for applications such as:

  • Access control systems
  • Inventory and asset management
  • Contactless payment systems
  • Attendance tracking
  • IoT projects requiring RFID integration

The module is widely used in hobbyist and professional projects due to its compatibility with microcontrollers like the Arduino UNO.


Explore Projects Built with RC522 RFID Module

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 and RFID-RC522 Based RFID Reader System
Image of attendance: A project utilizing RC522 RFID Module 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 RFID ATTENDANCE SYSTEM: A project utilizing RC522 RFID Module in a practical application
This circuit integrates an Arduino UNO with an RFID-RC522 module to enable RFID tag reading functionality. The Arduino provides power and SPI communication to the RFID module, allowing it to read and process RFID tags.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO RFID Access Control System with I2C LCD Feedback and Keypad Input
Image of eduVents_NFC: A project utilizing RC522 RFID Module 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 compartment: A project utilizing RC522 RFID Module in a practical application
This circuit consists of an Arduino UNO microcontroller connected to an RFID-RC522 module. The Arduino provides power and handles communication with the RFID module, enabling it to read RFID tags for identification or access control purposes.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with RC522 RFID Module

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 attendance: A project utilizing RC522 RFID Module 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 RFID ATTENDANCE SYSTEM: A project utilizing RC522 RFID Module 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 tag reading functionality. The Arduino provides power and SPI communication to the RFID module, allowing it to read and process RFID tags.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of eduVents_NFC: A project utilizing RC522 RFID Module 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 compartment: A project utilizing RC522 RFID Module in a practical application
Arduino UNO and RFID-RC522 Based RFID Reader System
This circuit consists of an Arduino UNO microcontroller connected to an RFID-RC522 module. The Arduino provides power and handles communication with the RFID module, enabling it to read RFID tags for identification or access control purposes.
Cirkit Designer LogoOpen Project in Cirkit Designer

Technical Specifications

Key Technical Details

Parameter Value
Operating Voltage 2.5V to 3.3V (logic level)
Power Supply Voltage 3.3V
Operating Current 13-26mA
Operating Frequency 13.56 MHz
Communication Interface SPI, I2C, UART
Maximum Data Rate 10 Mbps (SPI)
Supported RFID Protocols ISO/IEC 14443A/MIFARE
Reading Distance Up to 5 cm
Dimensions 40mm x 60mm

Pin Configuration and Descriptions

The RC522 RFID Module has an 8-pin interface for communication and power. Below is the pinout:

Pin Name Pin Number Description
VCC 1 Power supply input (3.3V). Do not connect to 5V to avoid damaging the module.
RST 2 Reset pin. Used to reset the module. Active LOW.
GND 3 Ground connection.
IRQ 4 Interrupt pin. Can be used for event signaling (optional).
MISO 5 SPI Master-In-Slave-Out (data output from the module).
MOSI 6 SPI Master-Out-Slave-In (data input to the module).
SCK 7 SPI Clock. Used for synchronizing data transfer.
SDA/SS 8 SPI Slave Select. Used to enable communication with the module.

Usage Instructions

Connecting the RC522 RFID Module to an Arduino UNO

To use the RC522 RFID Module with an Arduino UNO, follow these steps:

  1. Wiring the Module: Connect the module to the Arduino UNO as shown in the table below:

    RC522 Pin Arduino UNO Pin
    VCC 3.3V
    GND GND
    RST Pin 9
    IRQ Not connected
    MISO Pin 12
    MOSI Pin 11
    SCK Pin 13
    SDA/SS Pin 10
  2. Install Required Libraries:

    • Download and install the MFRC522 library from the Arduino Library Manager.
    • Go to Sketch > Include Library > Manage Libraries, search for "MFRC522," and install it.
  3. Upload Example Code: Use the following example code to read RFID tags:

    #include <SPI.h>
    #include <MFRC522.h>
    
    #define RST_PIN 9  // Reset pin connected to Arduino pin 9
    #define SS_PIN 10  // Slave Select pin connected to Arduino pin 10
    
    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 reading fails
      }
    
      // 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 further communication
      rfid.PICC_HaltA();
    }
    
  4. Test the Setup:

    • Open the Serial Monitor in the Arduino IDE (set the baud rate to 9600).
    • Place an RFID card or tag near the module. The card's UID (Unique Identifier) should appear in the Serial Monitor.

Important Considerations and Best Practices

  • Power Supply: Always use a 3.3V power source for the module. Connecting it to 5V can permanently damage the device.
  • Reading Distance: Ensure the RFID card or tag is within 5 cm of the module for reliable communication.
  • Interference: Avoid placing the module near metal objects or other electronic devices that may cause interference.
  • Library Updates: Keep the MFRC522 library updated to ensure compatibility with the latest Arduino IDE versions.

Troubleshooting and FAQs

Common Issues and Solutions

  1. The module is not detected by the Arduino:

    • Double-check the wiring connections, especially the SPI pins (MISO, MOSI, SCK, and SDA/SS).
    • Ensure the module is powered with 3.3V and not 5V.
  2. No output in the Serial Monitor:

    • Verify that the Serial Monitor baud rate is set to 9600.
    • Ensure the MFRC522 library is correctly installed.
  3. The module cannot read RFID cards:

    • Confirm that the card is compatible with the ISO/IEC 14443A standard.
    • Ensure the card is within the 5 cm reading range.
  4. The module resets unexpectedly:

    • Check the power supply for stability. Use a capacitor (e.g., 10µF) across the VCC and GND pins to filter noise.

FAQs

Q: Can the RC522 module write data to RFID cards?
A: Yes, the RC522 module supports both reading and writing data to compatible RFID cards and tags.

Q: Can I use the RC522 module with a 5V microcontroller?
A: Yes, but you must use a logic level shifter to convert the 5V signals to 3.3V to avoid damaging the module.

Q: What is the maximum number of RFID cards the module can handle simultaneously?
A: The RC522 module can only communicate with one RFID card or tag at a time.

Q: Can the module work with other microcontrollers besides Arduino?
A: Yes, the RC522 module can be used with other microcontrollers like ESP32, Raspberry Pi, and STM32, provided the appropriate libraries and connections are used.


This concludes the documentation for the RC522 RFID Module. For further assistance, refer to the official datasheet or community forums.