Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

ESP32-Based Air Quality Monitor with LCD Display and Exhaust Fan Control

View and Edit Project In Cirkit DesignerImage of ESP32-Based Air Quality Monitor with LCD Display and Exhaust Fan Control

Circuit Documentation

Summary

The circuit in question is designed to monitor environmental parameters such as temperature, humidity, air quality (CO2, NH3, NOx), and carbon monoxide (CO) levels. It utilizes an ESP32 Devkit V1 microcontroller to interface with various sensors and an LCD display for real-time data output. The circuit also includes a relay module to control an exhaust fan based on sensor readings or predefined conditions.

Component List

ESP32 Devkit V1

Lcd 20x4 i2c

12v Power Supply

Exhaust Fan 12"

DHT11

MQ-135 SENSOR AIR QUALITY

MQ-7 Breakout

1 Channel 5V Relay Module

Wiring Details

ESP32 Devkit V1

Lcd 20x4 i2c

12v Power Supply

Exhaust Fan 12"

DHT11

MQ-135 SENSOR AIR QUALITY

MQ-7 Breakout

1 Channel 5V Relay Module

Documented Code

LCD Display Code (sketch.ino)

#include <hd44780.h>                 
#include <hd44780ioClass/hd44780_I2Cexp.h> 

hd44780_I2Cexp lcd;
void setup() {
  // Initialize serial communication
  Serial.begin(9600);
  delay(1500);

  // Initialize the LCD (20 columns x 4 rows)
  lcd.begin(20, 4);  
  lcd.backlight();
}

void loop() {
  // Variables for sensor data (placeholders)
  float t, h, co2_value, co_value;

  // Read sensor data here (code not provided)

  // Display Temperature
  lcd.setCursor(0, 0);
  lcd.print("Temp:");
  lcd.print(t);
  lcd.print(" C");

  // Display Humidity
  lcd.setCursor(0, 1);
  lcd.print("Humidity:");
  lcd.print(h);
  lcd.print(" %");

  // Display Air Quality
  lcd.setCursor(0, 2);
  lcd.print("CO2,NH3,NOx: ");
  lcd.print(co2_value);
  lcd.print(" ppm");

  // Display CO Level
  lcd.setCursor(0, 3);
  lcd.print("CO: ");
  lcd.print(co_value);
  lcd.print(" ppm");

  // Update every second
  delay(1000);
}

Note: The actual sensor data reading and processing code is not provided. The placeholders t, h, co2_value, and co_value should be replaced with actual sensor data variables obtained from the respective sensors.