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

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

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

Introduction

The RFID RC522 I2C is a compact and cost-effective RFID reader/writer module designed for 13.56 MHz contactless communication. It communicates with microcontrollers via the I2C interface, making it easy to integrate into various embedded systems. This module is widely used for reading RFID tags and cards, enabling applications such as access control, inventory management, attendance systems, and contactless payment systems. Its small size, low power consumption, and reliable performance make it a popular choice for RFID-based projects.

Explore Projects Built with RFID RC522 I2C

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 I2C 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-Based RFID Access Control System with LCD Display
Image of ArduinoRFID_Mega: A project utilizing RFID RC522 I2C in a practical application
This circuit integrates an RFID reader (RFID-RC522) and a 20x4 I2C LCD display with an Arduino 101 microcontroller. The RFID reader is used to scan RFID tags, and the scanned data is processed by the Arduino, which then displays the information on the LCD screen.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32 and RFID-RC522 Based Smart Access Control System with LCD Display
Image of fyp esp32: A project utilizing RFID RC522 I2C in a practical application
This circuit integrates an ESP32 microcontroller with an RFID-RC522 module and a 20x4 I2C LCD display. The ESP32 reads RFID tags via the RFID-RC522 and displays the information on the LCD screen, providing a simple RFID-based identification system.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO RFID Reader with I2C LCD Display
Image of Arduino RFID Attendance system: A project utilizing RFID RC522 I2C in a practical application
This circuit features an Arduino UNO microcontroller connected to an RFID-RC522 module and a 16x2 I2C LCD display. The Arduino facilitates communication between the RFID reader for tag scanning and the LCD for displaying information. The RFID module is powered by the Arduino's 3.3V output, while the LCD is powered by the 5V output, and both share a common ground. The I2C bus is used for the LCD interface, and the SPI bus is used for the RFID reader, with dedicated connections for SCK, MISO, MOSI, and SS (SDA) to the corresponding Arduino pins.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with RFID RC522 I2C

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 I2C 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 ArduinoRFID_Mega: A project utilizing RFID RC522 I2C in a practical application
Arduino-Based RFID Access Control System with LCD Display
This circuit integrates an RFID reader (RFID-RC522) and a 20x4 I2C LCD display with an Arduino 101 microcontroller. The RFID reader is used to scan RFID tags, and the scanned data is processed by the Arduino, which then displays the information on the LCD screen.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of fyp esp32: A project utilizing RFID RC522 I2C in a practical application
ESP32 and RFID-RC522 Based Smart Access Control System with LCD Display
This circuit integrates an ESP32 microcontroller with an RFID-RC522 module and a 20x4 I2C LCD display. The ESP32 reads RFID tags via the RFID-RC522 and displays the information on the LCD screen, providing a simple RFID-based identification system.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Arduino RFID Attendance system: A project utilizing RFID RC522 I2C in a practical application
Arduino UNO RFID Reader with I2C LCD Display
This circuit features an Arduino UNO microcontroller connected to an RFID-RC522 module and a 16x2 I2C LCD display. The Arduino facilitates communication between the RFID reader for tag scanning and the LCD for displaying information. The RFID module is powered by the Arduino's 3.3V output, while the LCD is powered by the 5V output, and both share a common ground. The I2C bus is used for the LCD interface, and the SPI bus is used for the RFID reader, with dedicated connections for SCK, MISO, MOSI, and SS (SDA) to the corresponding Arduino pins.
Cirkit Designer LogoOpen Project in Cirkit Designer

Technical Specifications

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

Key Technical Details

Parameter Specification
Operating Voltage 2.5V to 3.3V (logic level)
Power Supply Voltage 3.3V
Current Consumption 13-26 mA (active mode)
Communication Interface I2C
Operating Frequency 13.56 MHz
Maximum Data Rate 424 kbps
Supported RFID Protocols ISO/IEC 14443A
Reading Distance Up to 5 cm (depending on tag)
Dimensions 40mm x 60mm

Pin Configuration and Descriptions

The RFID RC522 I2C module has 8 pins. Below is the pinout and description:

Pin Name Pin Number Description
SDA 1 Serial Data Line for I2C communication. Connect to the microcontroller's SDA pin.
SCL 2 Serial Clock Line for I2C communication. Connect to the microcontroller's SCL pin.
IRQ 3 Interrupt pin (optional). Can be used to signal events to the microcontroller.
GND 4 Ground. Connect to the ground of the power supply.
RST 5 Reset pin. Used to reset the module. Active LOW.
VCC 6 Power supply pin. Connect to a 3.3V power source.
MISO 7 Not used in I2C mode.
MOSI 8 Not used in I2C mode.

Usage Instructions

How to Use the RFID RC522 I2C in a Circuit

  1. Power the Module: Connect the VCC pin to a 3.3V power source and the GND pin to ground.
  2. I2C Connections: Connect the SDA pin to the SDA pin of your microcontroller and the SCL pin to the SCL pin of your microcontroller.
  3. Reset Pin: Optionally, connect the RST pin to a GPIO pin on your microcontroller for software-controlled resets.
  4. Interrupt Pin: If needed, connect the IRQ pin to a GPIO pin on your microcontroller to handle interrupt-driven events.
  5. Install Libraries: If using an Arduino, install the "MFRC522" library, which supports the RC522 module.
  6. Write Code: Use the provided library functions to initialize the module, read RFID tags, and process data.

Important Considerations and Best Practices

  • Ensure the module is powered with 3.3V. Using 5V may damage the module.
  • Keep the RFID tag or card within 5 cm of the module for reliable reading.
  • Avoid placing the module near metal objects or other sources of electromagnetic interference.
  • Use pull-up resistors (typically 4.7kΩ) on the SDA and SCL lines if your microcontroller does not have internal pull-ups enabled.

Example Code for Arduino UNO

Below is an example code snippet to read RFID tags using the RFID RC522 I2C module with an Arduino UNO:

#include <Wire.h>
#include <MFRC522_I2C.h> // Include the MFRC522 library for I2C communication

#define RST_PIN 9 // Define the reset pin
#define SDA_PIN 0x28 // I2C address of the RC522 module (default is 0x28)

MFRC522_I2C rfid(SDA_PIN, RST_PIN); // Create an instance of the RFID module

void setup() {
  Serial.begin(9600); // Initialize serial communication
  Wire.begin(); // Initialize I2C communication
  rfid.PCD_Init(); // Initialize the RC522 module
  Serial.println("Place an RFID tag 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();

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

Troubleshooting and FAQs

Common Issues and Solutions

  1. Module Not Responding:

    • Ensure the module is powered with 3.3V and not 5V.
    • Verify the I2C connections (SDA and SCL) are correct and secure.
    • Check if pull-up resistors are required on the I2C lines.
  2. Unable to Read RFID Tags:

    • Ensure the tag is within the 5 cm range of the module.
    • Verify the tag is compatible with the ISO/IEC 14443A standard.
    • Avoid interference from metal objects or other RFID readers.
  3. I2C Address Conflict:

    • The default I2C address of the RC522 module is 0x28. Ensure no other devices on the I2C bus use the same address.
    • If needed, consult the module's datasheet to change the I2C address.

FAQs

Q: Can the RFID RC522 I2C module work with 5V microcontrollers?
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 range of the RFID RC522 I2C module?
A: The maximum reading distance is approximately 5 cm, depending on the size and type of the RFID tag.

Q: Can I use multiple RC522 modules on the same I2C bus?
A: Yes, but each module must have a unique I2C address. Refer to the module's datasheet for instructions on changing the address.

Q: Does the module support writing to RFID tags?
A: Yes, the RC522 module can write data to compatible RFID tags in addition to reading them. Use the appropriate library functions for writing operations.