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

How to Use MFRC 522: Examples, Pinouts, and Specs

Image of MFRC 522
Cirkit Designer LogoDesign with MFRC 522 in Cirkit Designer

Introduction

The MFRC522 is a highly integrated RFID reader/writer IC that operates at a frequency of 13.56 MHz. It is designed for contactless communication with RFID tags and cards, making it an essential component in a wide range of applications. The MFRC522 is widely used in access control systems, payment terminals, inventory management, and other systems requiring secure and efficient data exchange.

Its compact design, low power consumption, and compatibility with microcontrollers like the Arduino UNO make it a popular choice for both hobbyists and professionals.

Explore Projects Built with MFRC 522

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 MFRC 522 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-Based RFID and Bluetooth Access Control System
Image of IOT: A project utilizing MFRC 522 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
Arduino UNO RFID Reader with MFRC522 Module
Image of ARSITEKTUR SISTEM : A project utilizing MFRC 522 in a practical application
This circuit consists of an Arduino UNO microcontroller connected to an RFID-RC522 module. The Arduino UNO reads RFID tags using the RFID-RC522 and outputs the tag information via the serial monitor.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO RFID Access Control with I2C LCD Display
Image of LOGIN DRIVER: A project utilizing MFRC 522 in a practical application
This circuit features an Arduino UNO connected to an RFID-RC522 module and a 20x4 LCD display with an I2C interface. The Arduino is programmed to read RFID tags using the RFID-RC522 module and display a welcome message on the LCD when a tag is detected. The LCD is used to prompt the user to scan their RFID tag and provide feedback once the tag is read.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with MFRC 522

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 MFRC 522 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 IOT: A project utilizing MFRC 522 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
Image of ARSITEKTUR SISTEM : A project utilizing MFRC 522 in a practical application
Arduino UNO RFID Reader with MFRC522 Module
This circuit consists of an Arduino UNO microcontroller connected to an RFID-RC522 module. The Arduino UNO reads RFID tags using the RFID-RC522 and outputs the tag information via the serial monitor.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of LOGIN DRIVER: A project utilizing MFRC 522 in a practical application
Arduino UNO RFID Access Control with I2C LCD Display
This circuit features an Arduino UNO connected to an RFID-RC522 module and a 20x4 LCD display with an I2C interface. The Arduino is programmed to read RFID tags using the RFID-RC522 module and display a welcome message on the LCD when a tag is detected. The LCD is used to prompt the user to scan their RFID tag and provide feedback once the tag is read.
Cirkit Designer LogoOpen Project in Cirkit Designer

Technical Specifications

Below are the key technical details of the MFRC522:

  • Operating Voltage: 2.5V to 3.3V (logic level), 3.3V (power supply)
  • Operating Frequency: 13.56 MHz
  • Communication Interface: SPI, I2C, UART (SPI is most commonly used)
  • Maximum Data Rate: 424 kbit/s
  • Current Consumption: 13-26 mA (active mode), 10 µA (standby mode)
  • Supported Protocols: ISO/IEC 14443 A/MIFARE
  • Operating Range: Up to 5 cm (depending on antenna design and tag type)
  • Dimensions: 40mm x 60mm (typical breakout board)

Pin Configuration and Descriptions

The MFRC522 is typically used with a breakout board that includes the IC and an antenna. Below is the pin configuration for the breakout board:

Pin Name Pin Number Description
VCC 1 Power supply input (3.3V).
GND 2 Ground connection.
RST 3 Reset pin. Active LOW. Used to reset the module.
IRQ 4 Interrupt pin. Can be used to signal events (optional).
MISO/SCL/TX 5 SPI MISO (Master In Slave Out) / I2C Clock / UART TX (depending on interface).
MOSI/SDA/RX 6 SPI MOSI (Master Out Slave In) / I2C Data / UART RX (depending on interface).
SCK 7 SPI Clock.
NSS/SDA 8 SPI Chip Select (active LOW) / I2C Address Select.

Usage Instructions

Connecting the MFRC522 to an Arduino UNO

The MFRC522 is most commonly used with the SPI interface. Below is the wiring guide for connecting the MFRC522 to an Arduino UNO:

MFRC522 Pin Arduino UNO Pin
VCC 3.3V
GND GND
RST Pin 9
IRQ Not connected
MISO Pin 12
MOSI Pin 11
SCK Pin 13
NSS Pin 10

Example Code for Arduino UNO

The following example demonstrates how to use the MFRC522 with an Arduino UNO to read RFID card data. This code uses the popular MFRC522 library, which can be installed via the Arduino IDE Library Manager.

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

// Define MFRC522 pins
#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 MFRC522 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 (Unique Identifier) 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

  1. Power Supply: The MFRC522 operates at 3.3V. Ensure that the VCC pin is connected to a 3.3V source. Connecting it to 5V may damage the module.
  2. Antenna Placement: For optimal performance, ensure that the RFID tag or card is placed flat and close to the antenna.
  3. Library Installation: Install the MFRC522 library from the Arduino IDE Library Manager before uploading the code.
  4. SPI Configuration: Ensure that the SPI pins on the Arduino UNO are correctly connected to the MFRC522 module.

Troubleshooting and FAQs

Common Issues

  1. The module is not detected by the Arduino.

    • Solution: Double-check the wiring, especially the SPI connections (MISO, MOSI, SCK, and NSS).
    • Ensure that the SS_PIN and RST_PIN in the code match your wiring.
  2. The RFID card is not being read.

    • Solution: Ensure that the card is compatible with the MFRC522 (e.g., MIFARE cards).
    • Place the card closer to the antenna and ensure there are no obstructions.
  3. The module is overheating.

    • Solution: Verify that the VCC pin is connected to a 3.3V source, not 5V.
  4. The UID is not displayed correctly.

    • Solution: Check the serial monitor baud rate (set to 9600 in the example code).
    • Ensure that the RFID card is properly aligned with the antenna.

FAQs

  1. Can the MFRC522 read NFC tags?

    • Yes, the MFRC522 supports ISO/IEC 14443 A, which is compatible with many NFC tags.
  2. What is the maximum range of the MFRC522?

    • The typical range is up to 5 cm, depending on the antenna design and the type of RFID tag.
  3. Can I use the MFRC522 with a 5V microcontroller?

    • Yes, but you must use level shifters for the SPI pins to avoid damaging the module.
  4. Is it possible to write data to RFID cards using the MFRC522?

    • Yes, the MFRC522 supports both reading and writing operations for compatible RFID cards.

By following this documentation, you can successfully integrate the MFRC522 into your projects and troubleshoot common issues effectively.