ESP32-Based Environmental Monitoring System with Sensors and I2C LCD Display
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary of the Circuit
This circuit integrates various sensors and a display with an ESP32 microcontroller to create a multifunctional sensor system. The ESP32 serves as the central processing unit, interfacing with a DHT22 temperature and humidity sensor, a KY-026 flame sensor, an HC-SR501 motion sensor, an MQ-5 gas sensor, and an I2C LCD 16x2 screen for data display. The sensors are powered by the ESP32's VIN pin, and their outputs are connected to specific GPIO pins on the ESP32 for data reading. The I2C LCD screen is connected to the ESP32 via the I2C bus for displaying sensor data or messages.
Component List
ESP32
- Description: A microcontroller with Wi-Fi and Bluetooth capabilities, featuring a variety of GPIO pins for interfacing with sensors and peripherals.
- 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
I2C LCD 16x2 Screen
- Description: A 16x2 character LCD display that uses the I2C bus for communication, allowing for the display of text and numbers.
- Pins: SCL, SDA, VCC (5V), GND, VDD, VO, RS, RW, E, D0, D1, D2, D3, D4, D5, D6, D7, BLA, BLK
DHT22
- Description: A digital temperature and humidity sensor with a single digital output.
- Pins: +, Out, -
KY-026 Flame Sensor
- Description: A sensor module designed to detect flames or fire, providing both analog and digital outputs.
- Pins: AO, GND, VCC, DO
HC-SR501 Motion Sensor
- Description: A passive infrared sensor (PIR) module designed to detect motion through changes in infrared levels.
- Pins: GND, OUT, VCC
MQ-5 Gas Sensor
- Description: A gas sensor designed for detecting natural gas and liquefied petroleum gas (LPG) concentrations in the air, providing both digital and analog outputs.
- Pins: VCC, GND, Digi Out, Analog out
Wiring Details
ESP32
- VIN: Connected to the power supply lines of all sensors and the LCD screen.
- GND: Connected to the ground lines of all sensors and the LCD screen.
- D34: Connected to the OUT pin of the HC-SR501 Motion Sensor.
- D2: Connected to the AO pin of the KY-026 Flame Sensor.
- D4: Connected to the Analog out pin of the MQ-5 Gas Sensor.
- D5: Connected to the Out pin of the DHT22 Sensor.
- D21 (SDA): Connected to the SDA pin of the I2C LCD 16x2 Screen.
- D22 (SCL): Connected to the SCL pin of the I2C LCD 16x2 Screen.
I2C LCD 16x2 Screen
- SDA: Connected to the D21 (SDA) pin of the ESP32.
- SCL: Connected to the D22 (SCL) pin of the ESP32.
- VCC (5V): Connected to the power supply line.
- GND: Connected to the ground line.
DHT22
- +: Connected to the power supply line.
- Out: Connected to the D5 pin of the ESP32.
- -: Connected to the ground line.
KY-026 Flame Sensor
- AO: Connected to the D2 pin of the ESP32.
- GND: Connected to the ground line.
- VCC: Connected to the power supply line.
HC-SR501 Motion Sensor
- OUT: Connected to the D34 pin of the ESP32.
- GND: Connected to the ground line.
- VCC: Connected to the power supply line.
MQ-5 Gas Sensor
- Analog out: Connected to the D4 pin of the ESP32.
- GND: Connected to the ground line.
- VCC: Connected to the power supply line.
Documented Code
No code has been provided for the microcontroller. The documentation of the code would typically include a description of the functionality, setup, and loop sections, along with any functions or libraries used to interface with the sensors and display. Since no code is available, this section cannot be completed at this time.