ESP32-Based Environmental Monitoring System with DHT11 and MQ6 Sensors
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary of the Circuit
This circuit integrates an ESP32 microcontroller with a DHT11 temperature and humidity sensor, an MQ6 gas sensor, and an I2C LCD 16x2 display. The ESP32 serves as the central processing unit, interfacing with the sensors to collect environmental data and displaying the information on the LCD screen. The DHT11 provides temperature and humidity readings, while the MQ6 sensor detects levels of LPG, butane gas, and propane. The I2C LCD display is used to output the sensor data in a human-readable format.
Component List
ESP32 (30 pin)
- Description: A powerful microcontroller with Wi-Fi and Bluetooth capabilities, featuring a wide range of GPIO pins.
- 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
DHT11
- Description: A basic, low-cost digital temperature and humidity sensor.
- Pins: DATA, GND, VCC
MQ6
- Description: A gas sensor used for detecting LPG, isobutane, propane, LNG.
- Pins: VCC, GND, A0, DO
I2C LCD 16x2 Screen
- Description: A 16x2 character LCD display that uses the I2C communication protocol.
- Pins: SCL, SDA, VCC (5V), GND, VDD, VO, RS, RW, E, D0, D1, D2, D3, D4, D5, D6, D7, BLA, BLK
Wiring Details
ESP32 (30 pin)
- D34: Connected to MQ6 A0
- D26: Connected to DHT11 DATA
- GND: Common ground with MQ6, DHT11, and I2C LCD Screen
- Vin: Common VCC with MQ6, DHT11, and I2C LCD Screen (5V)
- D22: Connected to I2C LCD Screen SCL
- D21: Connected to I2C LCD Screen SDA
DHT11
- DATA: Connected to ESP32 D26
- GND: Common ground with ESP32, MQ6, and I2C LCD Screen
- VCC: Common VCC with ESP32, MQ6, and I2C LCD Screen (5V)
MQ6
- A0: Connected to ESP32 D34
- GND: Common ground with ESP32, DHT11, and I2C LCD Screen
- VCC: Common VCC with ESP32, DHT11, and I2C LCD Screen (5V)
I2C LCD 16x2 Screen
- SCL: Connected to ESP32 D22
- SDA: Connected to ESP32 D21
- GND: Common ground with ESP32, MQ6, and DHT11
- VCC (5V): Common VCC with ESP32, MQ6, and DHT11
Documented Code
No code was provided for the microcontrollers in the circuit. To fully utilize the circuit, embedded code for the ESP32 is required to initialize and read data from the DHT11 and MQ6 sensors, as well as to control the I2C LCD display for outputting the sensor data. The code should include the necessary libraries for interfacing with the DHT11 and MQ6 sensors, as well as the I2C protocol for communication with the LCD display.