Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Project Documentation

ESP32-Based Environmental Monitoring System with Gas and Flame Detection

Image of ESP32-Based Environmental Monitoring System with Gas and Flame Detection

Circuit Documentation

Summary of the Circuit

This circuit integrates various sensors and an OLED display with an ESP32 microcontroller. The ESP32 serves as the central processing unit, interfacing with a DHT11 temperature and humidity sensor, an MQ6 gas sensor, a KY-026 flame sensor, and a 1.3" OLED display. The sensors provide environmental data to the ESP32, which can then display the information on the OLED screen or take further action based on the sensor readings. The circuit is designed to monitor environmental conditions such as temperature, humidity, gas presence, and flame detection.

Component List

ESP32

  • Description: A microcontroller with Wi-Fi and Bluetooth capabilities, suitable for a wide range of applications.
  • 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

DHT11

  • Description: A basic, low-cost digital temperature and humidity sensor.
  • Pins: DATA, GND, VCC

OLED 1.3"

  • Description: A small OLED display for visual output.
  • Pins: GND, VCC, SCL, SDA

MQ6

  • Description: A gas sensor for detecting LPG, butane, propane, methane, alcohol, hydrogen, and smoke.
  • Pins: VCC, GND, A0, DO

KY-026 Flame Sensor

  • Description: A sensor for detecting fire or other wavelengths of light at 760 nm - 1100 nm.
  • Pins: AO, GND, VCC, DO

Wiring Details

ESP32

  • VP connected to MQ6 A0
  • D34 connected to KY-026 Flame Sensor DO
  • GND connected to DHT11 GND, MQ6 GND, KY-026 Flame Sensor GND, OLED 1.3" GND
  • VIN connected to DHT11 VCC, MQ6 VCC, KY-026 Flame Sensor VCC, OLED 1.3" VCC
  • D4 connected to DHT11 DATA
  • D21 connected to OLED 1.3" SDA
  • D22 connected to OLED 1.3" SCL

DHT11

  • DATA connected to ESP32 D4
  • GND connected to ESP32 GND
  • VCC connected to ESP32 VIN

OLED 1.3"

  • GND connected to ESP32 GND
  • VCC connected to ESP32 VIN
  • SCL connected to ESP32 D22
  • SDA connected to ESP32 D21

MQ6

  • A0 connected to ESP32 VP
  • GND connected to ESP32 GND
  • VCC connected to ESP32 VIN

KY-026 Flame Sensor

  • DO connected to ESP32 D34
  • GND connected to ESP32 GND
  • VCC connected to ESP32 VIN

Documented Code

No code has been provided for the microcontrollers in the circuit. To fully utilize the circuit's capabilities, embedded code for the ESP32 should be written to initialize and read data from the connected sensors, process the data as needed, and display relevant information on the OLED display. The code should also include appropriate error handling and possibly alerting mechanisms if the sensors detect hazardous conditions.