
1. Introduction
The NFC inductive read and write module is generally based on radio frequency induction principle. When an object with the corresponding identification medium (such as RFID tags, NFC tags, etc.) enters the effective induction range (the induction distance varies depending on the module type and power, from a few centimeters to several meters), it can automatically detect and identify the object, trigger subsequent data interaction operations, and is often used in automatic access control systems. When a person carries an authorized inductive card close to the card reader at a certain distance, the access control is automatically opened.
2. Schematic
NFC inductive read-write module RC522-HS-S62-L schematicClick to view
Module Parameters
Pin Name | description |
|---|---|
G | GND (Negative Power Input) |
V | VCC (Positive Power Input) |
SDA | Data pin |
SCK | Communication Clock Pin |
MOSI | Main device input / slave device output pin |
MISO | Main device output / slave device input pin |
RST | Reset signal pin |
Supply voltage: 3.3V-5V
Connection method: 7P Dupont wire wire
Installation method: Lego assembly
4, Circuit Board Size

5 of Arduino IDE example program
Attention: If prompted with an error message about the library file during program upload, please import the library file first!
Arduino IDE Library Download and Import Tutorial:Click to view
Example program (UNO development board):
#include <SPI.h>
#include <MFRC522.h>
#include <Servo.h>
String card[]={"33cb0327","8ff9f659"};
String name[]={"YOU","I"};
MFRC522 rfid(10, 9);
String RFID_CardUID;
Servo servo_3;
String MFRC522_ReadCardUID(MFRC522 *_name){
String _CardUID = "";
for (byte _i = 0; _i < _name->uid.size; _i++){
if(_name->uid.uidByte[_i] < 0x10)
_CardUID += "0";
_CardUID += String(_name->uid.uidByte[_i], HEX);
}
return _CardUID;
}
boolean MFRC522_IsNewCard(MFRC522 *_name){
if(!_name->PICC_IsNewCardPresent())
return false;
if(!_name->PICC_ReadCardSerial())
return false;
return true;
}
void setup(){
Serial.begin(9600);
SPI.begin();
rfid.PCD_Init();
RFID_CardUID = "";
Serial.println("่ฏปๅRFIDๅกๅทๆต่ฏ");
servo_3.attach(3);
}
void loop(){
servo_3.write(80);
delay(10);
if(MFRC522_IsNewCard(&rfid)){
RFID_CardUID = MFRC522_ReadCardUID(&rfid);
Serial.println(String("Card UID๏ผ") + String(RFID_CardUID));
for (int i = (0); i <= (sizeof(card)/sizeof(card[0])); i = i + (1)) {
if (RFID_CardUID == card[i]) {
Serial.println(name[i]);
servo_3.write(173);
delay(2000);
}
servo_3.write(80);
delay(10);
}
rfid.PICC_HaltA();
rfid.PCD_StopCrypto1();
}
delay(10);
}6, ESP32 Python Example (for Mixly IDE/Misashi)
Choose the development board Python ESP32 [ESP32 Generic(4MB)] and upload in code mode
Attention: If prompted with an error message about the library file during program upload, please import the library file first!
Download and import tutorial for Mixly IDE ESP32 library:Click to view
Example program (ESP32-Python):
ๅพ
ๆดๆฐ...7, Mixly example program (graphical language)
Example program (UNO development board):Click to download
Attention: If prompted with an error message about the library file during program upload, please import the library file first!
Download and import tutorial of Mixly IDE Arduino library:Click to view

Example Program (ESP32 Development Board):Click to download
Attention: If prompted with an error message about the library file during program upload, please import the library file first!
Download and import tutorial for Mixly IDE ESP32 library:Click to view
Image pending update...
8. Setting up the Test Environment
Arduino UNO Test Environment Setup
Prepare Components:
UNO-R3 Development Board *1
UNO-R3 Expansion Board *1
USB TYPE-C DATA CABLE *1
NFC inductive read-write module RC522 (HS-S62-L) *1
7P DuPont wire *1
Circuit wiring diagram:

ESP32 Test Environment Setup
Prepare Components:Pending update...
Circuit wiring diagram:Pending update...
9, Video tutorial
Arduino UNO video tutorial:Click to view
ESP32 Python Video Tutorial:Click to view
10, Test results
Arduino UNO test results:
After connecting the device and uploading the program to the Arduino UNO development board, the servo will rotate after swiping a card, causing the blocks to move up and down to simulate opening and closing the door.
