Stufin
Home Quick Cart Profile

RC522 RFID 13.56MHZ Reader Writer Module

Buy Now on Stufin

Reading

The module can read data from RFID tags, including UID (Unique Identifier), data blocks, and other information stored on the tag.

Writing

The module can write data to RFID tags, allowing users to store or update information on the tag.

Authentication

The module supports authentication protocols to ensure secure communication between the reader and tag.

Key Features

  • Frequency: The module operates at a frequency of 13.56 MHz, which is a widely used frequency for high-frequency RFID applications.
  • Read Range: The module has a read range of up to 50 mm (depending on the tag type and environment).
  • Communication: The module uses a SPI (Serial Peripheral Interface) communication protocol to interface with microcontrollers or other devices.
  • Power Supply: The module operates on a 3.3V power supply, making it compatible with most microcontrollers and devices.
  • Operating Temperature: The module operates within a temperature range of -20C to 80C.
  • Dimension: The module has a compact size of 40 mm x 35 mm, making it suitable for small form factor designs.
  • Compliance: The module complies with ISO/IEC 14443A, B, and ISO/IEC 18092 standards for RFID communication.

Pinouts

The RC522 RFID Reader Writer Module has the following pinouts

VCC

3.3V power supply

GND

Ground

NSS

Slave Select ( SPI )

SCK

Clock ( SPI )

MOSI

Master Out Slave In ( SPI )

MISO

Master In Slave Out ( SPI )

RST

Reset

IRQ

Interrupt Request

Typical Applications

The RC522 RFID Reader Writer Module is suitable for various applications, including

Access control systems

Inventory management systems

Smart home systems

IoT projects

Robotics and automation systems

Certifications and Compliance

The RC522 RFID Reader Writer Module complies with relevant industry standards and regulations, including

ISO/IEC 14443A, B, and ISO/IEC 18092 standards for RFID communication

CE, FCC, and RoHS certifications

Ordering Information

When ordering the RC522 RFID Reader Writer Module, please ensure to specify the following

Module type

RC522

Frequency

13.56 MHz

Package type

SMD or DIP (depending on the requirement)

Conclusion

The RC522 RFID 13.56MHZ Reader Writer Module is a high-performance, compact, and cost-effective solution for RFID-based applications. Its ability to read and write data to RFID tags, along with its support for authentication protocols, makes it an ideal choice for various applications where secure and reliable RFID communication is required.

Pin Configuration

  • RC522 RFID 13.56MHZ Reader Writer Module Pinout Explanation
  • The RC522 RFID 13.56MHZ Reader Writer Module is a popular and versatile RFID reader/writer module. It features an onboard antenna and supports ISO/IEC 14443 A/MIFARE communication protocols. Here's a detailed explanation of each pin on the module:
  • Pinout Structure:
  • The RC522 module has 8 pins, which are:
  • 1. VCC (Power Supply)
  • Function: Power supply pin for the module
  • Description: Connect to a stable 3.3V power source
  • 2. RST (Reset)
  • Function: Reset pin for the module
  • Description: Connect to a digital output from your microcontroller (e.g., Arduino) to reset the module
  • 3. GND (Ground)
  • Function: Ground pin for the module
  • Description: Connect to the ground of your power supply and microcontroller
  • 4. IRQ (Interrupt Request)
  • Function: Interrupt request pin for the module
  • Description: Connect to a digital input from your microcontroller to detect when a tag is present
  • 5. MISO (Master In Slave Out)
  • Function: SPI Master In Slave Out pin for data reception
  • Description: Connect to the MISO pin of your microcontroller (e.g., Arduino) for data reception
  • 6. MOSI (Master Out Slave In)
  • Function: SPI Master Out Slave In pin for data transmission
  • Description: Connect to the MOSI pin of your microcontroller (e.g., Arduino) for data transmission
  • 7. SCK (Serial Clock)
  • Function: SPI Serial Clock pin for data synchronization
  • Description: Connect to the SCK pin of your microcontroller (e.g., Arduino) for data synchronization
  • 8. NSS (Slave Select)
  • Function: SPI Slave Select pin for chip selection
  • Description: Connect to a digital output from your microcontroller (e.g., Arduino) to select the module
  • Connecting the Pins:
  • When connecting the pins, follow these guidelines:
  • Use a breadboard or PCB to connect the module to your microcontroller (e.g., Arduino) and other components.
  • Ensure correct polarity when connecting the power supply (VCC and GND).
  • Use a 3.3V power supply, as the module is not 5V tolerant.
  • Connect the RST pin to a digital output from your microcontroller to reset the module.
  • Connect the IRQ pin to a digital input from your microcontroller to detect when a tag is present.
  • Connect the MISO, MOSI, and SCK pins to the corresponding SPI pins on your microcontroller.
  • Connect the NSS pin to a digital output from your microcontroller to select the module.
  • Example Connection Diagram:
  • Here's an example connection diagram using an Arduino Uno:
  • ```
  • RC522 RFID Module | Arduino Uno
  • -------------------|-------------------
  • VCC | 3.3V
  • RST | Digital Pin 5
  • GND | GND
  • IRQ | Digital Pin 2
  • MISO | Digital Pin 12 (MISO)
  • MOSI | Digital Pin 11 (MOSI)
  • SCK | Digital Pin 13 (SCK)
  • NSS | Digital Pin 10
  • ```
  • Remember to use the correct library and code for your microcontroller to interact with the RC522 RFID 13.56MHZ Reader Writer Module.

Code Examples

RC522 RFID 13.56MHZ Reader Writer Module Documentation
Overview
The RC522 RFID 13.56MHz Reader Writer Module is a highly integrated transmission module for contactless identification applications. It is widely used in various RFID-based projects, including access control, inventory management, and payment systems. This module operates at a frequency of 13.56MHz and supports ISO/IEC 14443-3A, ISO/IEC 14443-3B, and ISO/IEC 18092 standards.
Pinout
The RC522 module has 8 pins, which are:
VCC: Supply voltage (3.3V or 5V)
 GND: Ground
 RST: Reset pin (active low)
 IRQ: Interrupt request pin (active low)
 MISO: Master In Slave Out (SPI communication)
 MOSI: Master Out Slave In (SPI communication)
 SCK: Clock (SPI communication)
 SDA: Serial Data (I2C communication)
Communication Protocol
The RC522 module supports both SPI and I2C communication protocols. In the examples below, we will use the SPI protocol for communication.
Code Examples
### Example 1: Reading an RFID Tag using Arduino
This example demonstrates how to read an RFID tag using an Arduino board and the RC522 module.
Hardware
Arduino Uno or similar board
 RC522 RFID 13.56MHz Reader Writer Module
 RFID tag
Software
```c++
#include <SPI.h>
#include <MFRC522.h>
#define RST_PIN  9
#define SS_PIN  10
MFRC522 mfrc522(SS_PIN, RST_PIN);
void setup() {
  Serial.begin(9600);
  SPI.begin();
  mfrc522.PCD_Init();
}
void loop() {
  if ( ! mfrc522.PICC_IsNewCardPresent()) {
    return;
  }
if ( ! mfrc522.PICC_ReadCardSerial()) {
    return;
  }
Serial.print("UID tag: ");
  String content= "";
  byte letter;
  for (byte i = 0; i < mfrc522.uid.size; i++) {
     Serial.print(mfrc522.uid.uidByte[i], HEX);
     content.concat(String(mfrc522.uid.uidByte[i], HEX));
  }
  Serial.println();
  Serial.print("Message: ");
  content.toUpperCase();
  Serial.println(content.substring(1));
delay(1000);
}
```
### Example 2: Writing Data to an RFID Tag using Raspberry Pi (Python)
This example demonstrates how to write data to an RFID tag using a Raspberry Pi and the RC522 module.
Hardware
Raspberry Pi
 RC522 RFID 13.56MHz Reader Writer Module
 RFID tag
Software
```python
import RPi.GPIO as GPIO
import mfrc522
GPIO.setmode(GPIO.BOARD)
MFRC522 = mfrc522.MFRC522()
def write_tag(uid, data):
    MFRC522.Wipe_MFRC522()
    MFRC522.Select_Tag(uid)
    block_data = bytearray(16)
    block_data[0:16] = data[0:16]
    MFRC522.Write_MFRC522(0x01, block_data)
uid = [0x12, 0x34, 0x56, 0x78]  # replace with the UID of your RFID tag
data = b"Hello, World!"  # data to write to the tag
write_tag(uid, data)
```
### Example 3: Authentication using RFID Tags and ESP32 (MicroPython)
This example demonstrates how to use the RC522 module for authentication purposes using an ESP32 board and MicroPython.
Hardware
ESP32 board
 RC522 RFID 13.56MHz Reader Writer Module
 RFID tag
Software
```python
import machine
import-mfrc522
spi = machine.SPI(1, baudrate=1000000, polarity=0, phase=0, sck=machine.Pin(18), mosi=machine.Pin(23), miso=machine.Pin(19))
mfrc522 = mfrc522.MFRC522(spi, machine.Pin(4, machine.Pin.OUT), machine.Pin(2))
def authenticate(uid):
    if uid == [0x12, 0x34, 0x56, 0x78]:  # replace with the UID of your RFID tag
        return True
    else:
        return False
while True:
    mfrc522.reset()
    mfrc522.init()
    uid = mfrc522.read_uid()
    if uid is not None:
        if authenticate(uid):
            print("Access granted!")
        else:
            print("Access denied!")
    machine.sleep(100)
```
Note: In all examples, make sure to modify the pin connections and the RFID tag's UID according to your specific setup.
Precautions
Handle the RFID tag and module with care to avoid damage or electrostatic discharge.
 Ensure that the module is properly powered and grounded to prevent damage or data loss.
 When writing data to an RFID tag, make sure to follow the manufacturer's instructions and guidelines to avoid data corruption or tag damage.