RFID technology is everywhere: access cards, metro tickets, contactless payments, and smart locks. For makers, one of the easiest ways to experiment with RFID is the RC522 module. It’s a low-cost 13.56 MHz RFID reader/writer that works with tags, key fobs, and cards.
In this guide we’ll explore what the RC522 is, its specifications, wiring, how to use it with Arduino/ESP32, and project ideas.

What is the RC522?
The RC522 is an RFID (Radio Frequency Identification) reader/writer chip from NXP. It operates at 13.56 MHz and supports popular standards like ISO/IEC 14443 A/MIFARE.
It communicates with microcontrollers via SPI, I²C, or UART, but most breakout boards are used via SPI because it’s fast and well-supported by libraries.
Why use it?
- Inexpensive and widely available
- Supports multiple RFID tag types (cards, fobs)
- Can read and write MIFARE 1K/4K cards
- Compact size, easy to mount
- Good library support for Arduino and ESP32
Key Specifications
Parameter | Value |
---|---|
Frequency | 13.56 MHz |
Communication | SPI (default), I²C, UART |
Operating Voltage | 2.5V – 3.3V (logic level) |
Current Consumption | ~13–26 mA |
Range | ~2–5 cm (depends on antenna & tag) |
Supported Tags | MIFARE 1K, 4K, Ultralight, and ISO/IEC 14443A |
Data Rate | up to 424 kbit/s |
Pinout and Wiring
Most RC522 modules have an 8-pin header. Here’s the pinout:
Pin | Name | Function |
---|---|---|
1 | SDA (SS) | Chip Select (SPI) / I²C Address Select |
2 | SCK | SPI Clock |
3 | MOSI | SPI Data Input (Master Out → Slave In) |
4 | MISO | SPI Data Output (Master In ← Slave Out) |
5 | IRQ | Interrupt (optional) |
6 | GND | Ground |
7 | RST | Reset |
8 | 3.3V | Power (module is not 5V tolerant!) |
⚠️ Important: Logic is 3.3V. Many breakout boards don’t have level shifting. If you’re using Arduino UNO (5V logic), use a voltage divider or logic-level shifter on SPI pins.
Example Wiring (ESP32 via SPI)
- 3.3V → 3.3V
- GND → GND
- RST → GPIO22
- SDA (SS) → GPIO21
- SCK → GPIO18
- MOSI → GPIO23
- MISO → GPIO19
(Pins can be changed depending on your setup; update in code accordingly.)
Using the RC522 with Arduino / ESP32
The easiest way is with the MFRC522 library by Miguel Balboa, available in the Arduino IDE Library Manager.
Example Code (Arduino / ESP32)
#include <SPI.h>
#include <MFRC522.h>
#define RST_PIN 22 // Configurable
#define SS_PIN 21 // Configurable
MFRC522 mfrc522(SS_PIN, RST_PIN);
void setup() {
Serial.begin(115200);
SPI.begin();
mfrc522.PCD_Init(); // Init RC522
Serial.println("Scan an RFID card or tag...");
}
void loop() {
// Look for new card
if (!mfrc522.PICC_IsNewCardPresent()) return;
if (!mfrc522.PICC_ReadCardSerial()) return;
Serial.print("UID tag: ");
for (byte i = 0; i < mfrc522.uid.size; i++) {
Serial.print(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " ");
Serial.print(mfrc522.uid.uidByte[i], HEX);
}
Serial.println();
mfrc522.PICC_HaltA();
}
This sketch initializes the reader and prints the UID (unique ID) of any tag/card you place near the module.
Practical Tips
- Range is short: 2–5 cm typical. To increase range, use larger antennas or stronger modules (PN532, RDM6300, etc.).
- Card compatibility: Works best with MIFARE Classic cards; newer cards (DESFire, NFC-enabled credit cards) may not be fully supported.
- Power supply: Always power from 3.3V. Supplying 5V may damage the chip.
- Noise sensitivity: Keep wires short; long SPI wires can cause unreliable reads.
- Security: UID-based systems are easy to clone. For real security, use advanced tag features (encryption, keys).
Project Ideas
The RC522 makes RFID simple, opening up many possibilities:
- Smart door lock: Unlock using an RFID card or key fob.
- Attendance system: Track employees or students with card scanning.
- Payment/token system: For vending machines, arcade games, or DIY projects.
- Access control: Restrict entry to authorized RFID tags.
- Inventory tracking: Use tags on objects to quickly identify them.
Conclusion
The RC522 RFID module is a cheap and powerful way to get started with RFID technology. With SPI communication and excellent library support, you can quickly add card scanning to your Arduino, ESP32, or Raspberry Pi projects.
For hobby projects and learning, it’s perfect. If you need longer range or higher security, you may want to upgrade to PN532 (NFC) or UHF RFID readers — but the RC522 remains a great starting point.