The module can read data from RFID tags, including UID (Unique Identifier), data blocks, and other information stored on the tag.
The module can read data from RFID tags, including UID (Unique Identifier), data blocks, and other information stored on the tag.
The module can write data to RFID tags, allowing users to store or update information on the tag.
The module supports authentication protocols to ensure secure communication between the reader and tag.
Key Features
Pinouts
| The RC522 RFID Reader Writer Module has the following pinouts |
3.3V power supply
Ground
Slave Select ( SPI )
Clock ( SPI )
Master Out Slave In ( SPI )
Master In Slave Out ( SPI )
Reset
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 |
RC522
13.56 MHz
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.
RC522 RFID 13.56MHZ Reader Writer Module DocumentationOverviewThe 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.PinoutThe 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 ProtocolThe 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 ArduinoThis example demonstrates how to read an RFID tag using an Arduino board and the RC522 module.HardwareArduino Uno or similar board
RC522 RFID 13.56MHz Reader Writer Module
RFID tagSoftware```c++
#include <SPI.h>
#include <MFRC522.h>#define RST_PIN 9
#define SS_PIN 10MFRC522 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.HardwareRaspberry Pi
RC522 RFID 13.56MHz Reader Writer Module
RFID tagSoftware```python
import RPi.GPIO as GPIO
import mfrc522GPIO.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 tagwrite_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.HardwareESP32 board
RC522 RFID 13.56MHz Reader Writer Module
RFID tagSoftware```python
import machine
import-mfrc522spi = 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 Falsewhile 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.PrecautionsHandle 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.