Components / Wireless / RC522 RFID reader

RC522 RFID reader

Reads 13.56 MHz MIFARE cards and tags over SPI. 3.3 V module.

RadioNXP MFRC522 13.56 MHz reader
Band13.56 MHz (ISO 14443A, MIFARE)
Typical rangeAbout 3 to 5 cm
InterfaceSPI (also I2C and UART on the chip)
WirelessReviewedMPN MFRC522 moduleUsed in 18 projects
RC522
In short

What is the RC522 RFID reader and what is it used for?

Reads 13.56 MHz MIFARE cards and tags over SPI. 3.3 V module. Makers use it for door logs, attendance.

A card's UID is not a secure key; anyone can clone a basic MIFARE UID.
In the real world

Access cards, metro cards

How it works

The reader powers the card by induction and reads its unique ID.

Key specifications

Wireless module specValue
RadioNXP MFRC522 13.56 MHz reader
Band13.56 MHz (ISO 14443A, MIFARE)
Typical rangeAbout 3 to 5 cm
InterfaceSPI (also I2C and UART on the chip)
Supply voltage3.3 V only
Logic level3.3 V; inputs are not officially 5 V tolerant

Pinout

SDA (SS)SPI chip select
SCK / MOSI / MISOSPI
IRQNot used by most libraries
GND / 3.3VPower: never 5 V
RSTReset

How to use it

Power from 3.3 V. Uno pins are 5 V; it usually works, but a level shifter on SCK, MOSI and SS is the safe choice. Use the MFRC522 library.

#include <SPI.h>
#include <MFRC522.h>
MFRC522 rf(10, 9);
void setup() { Serial.begin(9600); SPI.begin(); rf.PCD_Init(); }
void loop() { if (rf.PICC_IsNewCardPresent() && rf.PICC_ReadCardSerial()) { for (byte i = 0; i < rf.uid.size; i++) Serial.print(rf.uid.uidByte[i], HEX); Serial.println(); } }

Applications

Buy at

Common questions

What is the RC522 RFID reader used for?

In products: access cards, metro cards. In maker projects: door logs, attendance.

How does the RC522 RFID reader work?

The reader powers the card by induction and reads its unique ID.

What voltage does the RC522 RFID reader need?

3.3 V only.

How do I connect the RC522 RFID reader to an Arduino or ESP32?

SPI (also I2C and UART on the chip). Pins: SDA (SS) (SPI chip select), SCK / MOSI / MISO (SPI), IRQ (Not used by most libraries), GND / 3.3V (Power: never 5 V), RST (Reset).