ESP32-Based Smart Access Control System with RFID, LCD Display, and Thermal Printer
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed overview of a circuit that includes an ESP32 microcontroller, a relay module, a micro SD card module, an I2C LCD 16x2 screen, an RFID-RC522 module, and a thermal printer. The circuit is designed to interface these components for various functionalities, including data storage, display, RFID reading, and thermal printing.
Component List
ESP32
- Description: A powerful microcontroller with integrated Wi-Fi and Bluetooth.
- Pins: EN, VP, VN, D34, D35, D32, D33, D25, D26, D27, D14, D12, D13, GND, VIN, 3V3, D15, D2, D4, RX2, TX2, D5, D18, D19, D21, RX0, TX0, D22, D23, BOOT
Relay Module
- Description: A module used to control high voltage devices with a low voltage signal.
- Pins: NC, COM, INPUT, GND, VCC
Micro SD Card Module
- Description: A module for interfacing with micro SD cards for data storage.
- Pins: cs, sck, mosi, miso, vcc, gnd
I2C LCD 16x2 Screen
- Description: A 16x2 character LCD screen with I2C interface.
- Pins: SCL, SDA, VCC (5V), GND, VDD, VO, RS, RW, E, D0, D1, D2, D3, D4, D5, D6, D7, BLA, BLK
RFID-RC522
- Description: An RFID reader module for reading RFID tags.
- Pins: VCC (3.3V), RST, GND, IRQ, MISO, MOSI, SCK, SDA
Thermal Printer
- Description: A thermal printer for printing text and images on thermal paper.
- Pins: RX, TX, +, -
Wiring Details
ESP32
- D27: Connected to RFID-RC522 RST
- GND: Connected to Relay Module GND, I2C LCD 16x2 Screen GND, Thermal Printer -, Micro SD Card Module gnd, RFID-RC522 GND
- VIN: Connected to I2C LCD 16x2 Screen VCC (5V)
- 3V3: Connected to Relay Module VCC, Thermal Printer +, Micro SD Card Module vcc, RFID-RC522 VCC (3.3V)
- D2: Connected to Relay Module INPUT
- RX2: Connected to Thermal Printer TX
- TX2: Connected to Thermal Printer RX
- D5: Connected to Micro SD Card Module cs, RFID-RC522 SDA
- D18: Connected to Micro SD Card Module sck, RFID-RC522 SCK
- D19: Connected to Micro SD Card Module miso, RFID-RC522 MISO
- D21: Connected to I2C LCD 16x2 Screen SDA
- D22: Connected to I2C LCD 16x2 Screen SCL
- D23: Connected to Micro SD Card Module mosi, RFID-RC522 MOSI
Relay Module
- GND: Connected to ESP32 GND
- VCC: Connected to ESP32 3V3
- INPUT: Connected to ESP32 D2
Micro SD Card Module
- cs: Connected to ESP32 D5
- sck: Connected to ESP32 D18
- mosi: Connected to ESP32 D23
- miso: Connected to ESP32 D19
- vcc: Connected to ESP32 3V3
- gnd: Connected to ESP32 GND
I2C LCD 16x2 Screen
- SCL: Connected to ESP32 D22
- SDA: Connected to ESP32 D21
- VCC (5V): Connected to ESP32 VIN
- GND: Connected to ESP32 GND
RFID-RC522
- VCC (3.3V): Connected to ESP32 3V3
- RST: Connected to ESP32 D27
- GND: Connected to ESP32 GND
- MISO: Connected to ESP32 D19
- MOSI: Connected to ESP32 D23
- SCK: Connected to ESP32 D18
- SDA: Connected to ESP32 D5
Thermal Printer
- RX: Connected to ESP32 TX2
- TX: Connected to ESP32 RX2
- +: Connected to ESP32 3V3
- -: Connected to ESP32 GND
Documented Code
ESP32 Code
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
This code is a basic template for the ESP32 microcontroller. The setup function is where you initialize your components and settings, and the loop function is where the main logic of your program runs repeatedly.