The RC522 is a low-cost 13.56 MHz RFID reader/writer module based on NXP's MFRC522 IC. It communicates with compatible RFID cards using radio frequency signals and exchanges data with a microcontroller through SPI, I2C, or UART interfaces.

For this implementation, I have selected the SPI interface because it provides a straightforward way to connect the module to the Arduino UNO.

When an RFID card is brought close to the reader antenna, the module activates the passive tag using its electromagnetic field. The tag responds with its stored identification information, which the MFRC522 processes and transfers to the Arduino.

The Arduino then extracts the card's unique identifier (UID) and displays it on the LCD.

Hardware Used

The following components are used in this setup:

  • Arduino UNO R3
  • RC522 RFID reader/writer module
  • MIFARE Classic 1K RFID card
  • 16×2 LCD with I2C interface
  • Jumper wires
  • USB Type-A to Type-B cable for programming
  • 12V DC adapter for the Arduino, if external power is required

RC522 Module Specifications

The RC522 module operates at 13.56 MHz and is designed for High Frequency RFID applications.

Some important hardware characteristics include:

  • RFID operating frequency: 13.56 MHz
  • Operating voltage: 2.5V–3.3V
  • Typical operating current: approximately 13–26 mA
  • Communication interfaces: SPI, I2C, and UART
  • Typical reading distance: up to approximately 5 cm, depending on the antenna, tag, and operating conditions
  • Supported standard: ISO/IEC 14443 Type A

The module includes an MFRC522 RFID controller IC, a 27.12 MHz crystal oscillator, an onboard PCB antenna, and matching and filtering components.

The integrated antenna handles wireless communication with the RFID tag, while the MFRC522 IC manages the RF communication and data exchange.

Understanding the MIFARE Classic 1K Card

The project uses a MIFARE Classic 1K card. Before attempting to read or write data, it is useful to understand how its memory is organized.

The card provides 1 KB of EEPROM memory, divided into 16 sectors. Each sector contains four blocks, and each block stores 16 bytes.

This gives a total of 64 blocks:

  • 16 sectors numbered 0–15
  • 4 blocks in each sector
  • 16 bytes per block
  • 1024 bytes of total memory

Each sector has a sector trailer in its last block. This block stores Key A, Key B, and access condition bits, which control authentication and permissions for the other blocks.

Block 0 of Sector 0 is the manufacturer block. It contains manufacturer information and the card UID and is generally read-only.

Therefore, these 17 blocks are not available for normal user data storage. The remaining 47 blocks provide 752 bytes of usable memory.

Understanding this structure is important when implementing custom data storage because overwriting manufacturer information or sector access settings can affect card operation.

Hardware Connections

The RC522 communicates with the Arduino UNO through the SPI bus. The module's SS, SCK, MOSI, and MISO pins are connected to the corresponding Arduino digital pins.

The connections are:

RC522 to Arduino UNO

  • SS/SDA → Digital Pin 10
  • SCK → Digital Pin 13
  • MOSI → Digital Pin 11
  • MISO → Digital Pin 12
  • RST → Digital Pin 9
  • GND → GND
  • VCC → 3.3V
  • IRQ → Not connected

The RC522 must be powered from the Arduino's 3.3V supply. Do not connect its VCC pin to 5V. Its logic interface is also designed for 3.3V operation, so level compatibility should be considered when using it with 5V microcontrollers.

16×2 I2C LCD to Arduino UNO

The LCD uses the Arduino's I2C interface:

  • VCC → 5V
  • GND → GND
  • SDA → A4
  • SCL → A5

The LCD I2C address used in the example is 0x27. The actual address depends on the LCD backpack configuration and can be checked using an I2C scanner if necessary.

The complete wiring arrangement is shown in the project diagram:

Wiring RC522 RFID module with Arduino UNOSoftware Requirements

The project is developed using Arduino IDE 2.3.4 or later.

Two libraries are required:

1. MFRC522 Library

The MFRC522 library by GithubCommunity (version 1.4.12) provides functions...

Read more »