QB046 RFID RC522 I2C Module

1.Product Introduction

../../_images/RFID-1.png

Radio-Frequency Identification (RFID) is a technology used to wirelessly identify and track objects, which is based on the principle of wireless communication through the use of RFID tags and RFID readers.

RFID tag: An RFID tag is a small chip that contains a unique identifier UID (usually a numeric code) along with some memory for storing additional information. These tags usually consist of an RFID chip and an antenna.

RFID Reader: An RFID reader is an electronic device that generates a radio frequency signal and sends it to a nearby RFID tag. The reader is also responsible for receiving the response signal from the tag and decoding the tag’s information.

Rf communication: When an RFID reader sends an RF signal, it activates nearby RFID tags. Passive RFID tags get energy from the reader’s signal as well as operational commands and use it to send their own response signals. Active RFID tags have their own electricity supply, so they can actively send signals.

Application reference: Scenarios requiring object recognition such as management systems and security systems.

2.Parameter Specification

Parameter Value//Description
Operating voltage 3.3V~5V
Operating temperature -40°C~+80°C
Protocol standard ISO 14443A,ISO 14443B
Support card type mifare S50, mifare S70
Frequency 13.56MHz
Communication mode IIC
Size 4.72cm*2.38cm
../../_images/RFID-5.jpg

3.Wiring Diagram

../../_images/RFID-2.png
RFID RC522 I2C Module UNO
VCC 5V
GND GND
SCL Analog Pin A5
SDA Analog Pin A4

4.Sample Code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//www.acebott.com
#include <Wire.h>
#include "MFRC522_I2C.h"
// 0x28 is the i2c address on SDA. If it doesn't match, use i2cscanner to check your address
MFRC522 mfrc522(0x28);   // Create MFRC522 instance.
String rfid_str = "";
void setup() {
 Serial.begin(115200);      // Set baud rate to 115200
 Wire.begin();          // Initialize I2C
 mfrc522.PCD_Init();       // Initialize MFRC522
}
void loop() {
if ( ! mfrc522.PICC_IsNewCardPresent() || ! mfrc522.PICC_ReadCardSerial() ) {
 delay(50);
 return;
}
 rfid_str = ""; // Clear the string
 Serial.print(F("Card UID:"));
 for (byte i = 0; i < mfrc522.uid.size; i++) { // Dump UID
  rfid_str = rfid_str + String(mfrc522.uid.uidByte[i], HEX); // Convert to string
 }
 Serial.println(rfid_str);
}

5.Test Result

After uploading the code to the controller board, open the serial port monitor of the Arduino IDE, set the baud rate to 115200, and switch to scroll mode.

When we put the RFID tag on the RFID reader, the serial port will display the unique identifier of the RFID tag, UID.

../../_images/RFID-3.png

6.Related Resources

7.Get One Now

B2B Business: info@acebott.com

Individual buyer: shop on aliexpress