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

ESP32-Based Air Quality and Temperature Monitoring System

Image of ESP32-Based Air Quality and Temperature Monitoring System

Circuit Documentation

Summary of the Circuit

This circuit integrates an ESP32 microcontroller with a DHT11 temperature and humidity sensor, an MQ135 air quality sensor, and a 16x2 LCD screen with an I2C interface. The ESP32 serves as the central processing unit, reading sensor data from the DHT11 and MQ135, and displaying information on the LCD screen. The circuit is designed to monitor environmental parameters and provide real-time feedback on air quality and temperature/humidity conditions.

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

MQ135

  • Description: An air quality sensor for detecting a wide range of gases, including NH3, NOx, alcohol, benzene, smoke, and CO2.
  • Pins: VCC, GND, A0, D0

LCD screen 16x2 I2C

  • Description: A 16-character by 2-line LCD display with an I2C interface for easy communication.
  • Pins: SCL, SDA, VCC, GND

Wiring Details

ESP32

  • D34 connected to MQ135 A0
  • D26 connected to DHT11 DATA
  • GND connected to GND of all other components
  • VIN connected to VCC of all other components
  • D21 (SDA) connected to LCD screen SDA
  • D22 (SCL) connected to LCD screen SCL

DHT11

  • DATA connected to ESP32 D26
  • GND connected to common ground
  • VCC connected to common VCC

MQ135

  • A0 connected to ESP32 D34
  • GND connected to common ground
  • VCC connected to common VCC

LCD screen 16x2 I2C

  • SCL connected to ESP32 D22
  • SDA connected to ESP32 D21
  • VCC connected to common VCC
  • GND connected to common ground

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 DHT11 and MQ135 sensors, process the data as needed, and display the results on the LCD screen using the I2C communication protocol.

The code should include the following functionalities:

  • Initialization of the I2C interface for communication with the LCD screen.
  • Reading and processing data from the DHT11 sensor.
  • Reading and processing data from the MQ135 sensor.
  • Displaying the processed data on the LCD screen.

Since no code is available, it is recommended to develop the firmware considering the specific libraries and functions compatible with the ESP32 and the sensors used in this circuit.