Table of Contents

Play Video

AIR POLLUTION MONITORING SYSTEM

The Air Pollution Monitoring System utilizes an MQ-2 gas sensor, DHT11 temperature and humidity sensor, and an Arduino with an I2C LCD display to monitor and display air quality, temperature, and humidity levels in real-time, providing essential data to help improve environmental health and safety.

The Air Pollution Monitoring System is a vital environmental initiative designed to continuously monitor and report air quality parameters. Using advanced sensors, this system measures levels of harmful gases such as carbon monoxide, sulfur dioxide, and nitrogen dioxide, as well as temperature and humidity. It provides real-time data, allowing for timely interventions to improve air quality and ensure a healthier environment. This system plays a crucial role in raising awareness about air pollution, helping authorities make informed decisions, and encouraging the public to adopt practices that reduce pollution. By understanding and acting on this data, we can work together to create a cleaner, safer world for everyone.

Components:

  • MQ-135 Gas Sensor: Detects various air pollutants including ammonia (NH3), nitrogen oxides (NOx), alcohol, benzene, smoke, and carbon dioxide (CO2).
  • DHT11 Sensor: Measures temperature and humidity levels.
  • Arduino Uno: Central microcontroller for data processing and control.
  • I2C LCD Display: Displays real-time data including air quality, temperature, and humidity.
  • 10K Resistor: A resistor is a passive two-terminal electrical component that implements electrical resistance as a circuit element. In electronic circuits, resistors are used to reduce current flow.
  • Breadboard: A reusable platform for building and testing circuits without soldering, ideal for prototyping and adjustments.

Setup and Installation:

  • Connect the MQ-135 gas sensor to the Arduino’s analog pin A3.
  • Connect the DHT11 sensor to the Arduino’s digital pin 2.
  • Connect the I2C LCD to the Arduino using the I2C interface (pins A4 for SDA and A5 for SCL).
  • Set up the alarm system to trigger alerts when hazardous gas levels are detected.
  • Power the Arduino via a USB cable or external power source.

Operation/Circuit:

  • The MQ-135 gas sensor continuously monitors air pollutants.
  • The DHT11 sensor provides real-time temperature and humidity readings.
  • The Arduino processes the sensor data and displays it on the I2C LCD.
  • The system categorizes air pollution levels based on MQ-135 readings and triggers the alarm system if unsafe levels are detected.

CODE

#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <DHT.h>

LiquidCrystal_I2C lcd(0x27, 16, 2);
const int mq135Pin = A3;
const int dhtPin = 2;

DHT dht(dhtPin, DHT11);

void setup() {
  lcd.begin(16, 2);
  lcd.backlight();
  Serial.begin(9600);
  dht.begin();
}

void loop() {
  int mq135Value = analogRead(mq135Pin);
  int humidity = dht.readHumidity();
  int temperature = dht.readTemperature();

  // Calculate pollution level based on MQ-135 value
  String pollutionLevel;
  if (mq135Value < 200) {
    pollutionLevel = "Low";
  } else if (mq135Value >= 200 && mq135Value < 400) {
    pollutionLevel = "Moderate";
  } else if (mq135Value >= 400 && mq135Value < 600) {
    pollutionLevel = "High";
  } else {
    pollutionLevel = "Very High";
  }

  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("Air Pollution");
  lcd.setCursor(0, 1);
  lcd.print("Level: ");
  lcd.print(pollutionLevel);
  lcd.setCursor(10, 1);
  lcd.print("Humidity: ");
  lcd.print(humidity);
  lcd.print("%");
  delay(1000);

  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("Temperature");
  lcd.setCursor(0, 1);
  lcd.print("Temp: ");
  lcd.print(temperature);
  lcd.print("C");
  delay(1000);
}

Testing and Calibration:

  • Conduct thorough testing to ensure the system accurately detects and reports gas concentrations, temperature, and humidity.
  • Calibrate the MQ-135 gas sensor and DHT-11 sensor for precise measurements.
  • Test the alarm system to confirm it alerts users effectively at the set thresholds.

Benefits:

  • Provides real-time monitoring of air quality, temperature, and humidity.
  • Enhances environmental health by detecting and reporting hazardous gas levels.
  • Promotes timely action through alarm notifications, minimizing risks.
  • Supports efforts in environmental conservation and pollution control.
  • Educates users on the importance of air quality and the impact of pollutants.
Scroll to Top