ESP32-Based Smart Home Safety System with Flame, Gas, and Motion Detection
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit is designed to interface an ESP32 microcontroller with various sensors and output devices. The ESP32 reads data from a PIR sensor, a flame sensor, and an MQ-2 gas sensor. It also controls a buzzer and displays information on a 16x2 I2C LCD. The circuit is powered by the 3.3V and Vin pins of the ESP32.
Component List
ESP32 (30 pin)
- Description: A powerful microcontroller with built-in Wi-Fi and Bluetooth capabilities.
- Pins: EN, VP, VN, D34, D35, D32, D33, D25, D26, D27, D14, D12, D13, GND, Vin, D23, D22, TX0, RX0, D21, D19, D18, D5, TX2, RX2, D4, D2, D15, 3V3
16x2 I2C LCD
- Description: A 16x2 character LCD display with I2C interface.
- Pins: GND, VCC, SDA, SCL
KY-026 Flame Sensor
- Description: A sensor module for detecting flame or fire.
- Pins: AO, GND, VCC, DO
MQ-2
- Description: A gas sensor module for detecting LPG, i-butane, propane, methane, alcohol, hydrogen, and smoke.
- Pins: GND, VCC, ANALOG, Digital
PIR sensor
- Description: A passive infrared sensor for motion detection.
- Pins: VDD, SIG, GND
Buzzer
- Description: An audio signaling device.
- Pins: PIN, GND
Wiring Details
ESP32 (30 pin)
- 3V3: Connected to VCC of MQ-2, VDD of PIR sensor, and VCC of KY-026 Flame Sensor.
- GND: Connected to GND of MQ-2, GND of PIR sensor, GND of KY-026 Flame Sensor, GND of 16x2 I2C LCD, and GND of Buzzer.
- Vin: Connected to VCC of 16x2 I2C LCD.
- D32: Connected to SIG of PIR sensor.
- D34: Connected to DO of KY-026 Flame Sensor.
- D35: Connected to Digital of MQ-2.
- D23: Connected to PIN of Buzzer.
- D22: Connected to SCL of 16x2 I2C LCD.
- D21: Connected to SDA of 16x2 I2C LCD.
16x2 I2C LCD
- GND: Connected to GND of ESP32.
- VCC: Connected to Vin of ESP32.
- SDA: Connected to D21 of ESP32.
- SCL: Connected to D22 of ESP32.
KY-026 Flame Sensor
- GND: Connected to GND of ESP32.
- VCC: Connected to 3V3 of ESP32.
- DO: Connected to D34 of ESP32.
MQ-2
- GND: Connected to GND of ESP32.
- VCC: Connected to 3V3 of ESP32.
- Digital: Connected to D35 of ESP32.
PIR sensor
- GND: Connected to GND of ESP32.
- VDD: Connected to 3V3 of ESP32.
- SIG: Connected to D32 of ESP32.
Buzzer
- GND: Connected to GND of ESP32.
- PIN: Connected to D23 of ESP32.
Code
No code provided for this circuit.