This circuit is designed to interface an ESP32 microcontroller with a variety of peripherals including an RFID-RC522 module, an I2C LCD 16x2 screen, a Servomotor SG90, a Door MC-38 magnetic contact switch, a 5V 2-Relay module, a 12V solenoid lock, an 18650 Li-Ion battery, and an HC-SR501 PIR motion sensor. The ESP32 serves as the central processing unit, controlling the peripherals based on inputs from the RFID reader, the magnetic switch, and the motion sensor. The LCD screen displays system status, the relay module controls power to the solenoid lock, and the servomotor is likely used for some form of actuation. The system appears to be a security or access control system, utilizing RFID for identification, the solenoid lock for physical security, and the PIR sensor for motion detection.
D32
connected to Servomotor SG90 signal pin.D26
connected to Relay module IN1.D27
connected to Door MC-38 signal pin.D13
connected to PIR motion sensor output.GND
connected to common ground.Vin
connected to 5V power from the relay module.D23
, D22
, D21
, D19
, D18
, D5
, D4
connected to RFID-RC522 SPI and I2C pins.3V3
connected to 3.3V power for the RFID-RC522 and PIR motion sensor.MOSI
, MISO
, SCK
, SDA
, RST
connected to corresponding ESP32 pins.GND
connected to common ground.VCC (3.3V)
connected to 3.3V power from ESP32.SCL
, SDA
connected to corresponding ESP32 pins.GND
connected to common ground.VCC (5V)
connected to 5V power from the relay module.SIG
connected to ESP32 D32.GND
connected to common ground.VCC
connected to 5V power from the relay module.S
connected to ESP32 D27.GND
connected to common ground.IN1
connected to ESP32 D26.GND
connected to common ground.VCC
connected to 5V power from the I2C LCD screen.NO
connected to 12V solenoid lock VCC.COM
connected to 18650 Li-Ion battery positive.VCC
connected to Relay module NO.GND
connected to 18650 Li-Ion battery negative.Positive
connected to Relay module COM.Negative
connected to 12V solenoid lock GND.Output
connected to ESP32 D13.Ground
connected to common ground.Power Supply
connected to 3.3V power from ESP32.No code has been provided for the microcontroller. The expected code would handle the initialization and configuration of the peripherals, read inputs from the RFID reader, magnetic switch, and motion sensor, control the LCD display, and manage the state of the relay and servomotor based on the system's logic.