. Air Quality Monitoring System Using Arduino UNO ~ SmartElectronicsDIY

Air Quality Monitoring System Using Arduino UNO

 

Project Title

Design and Implementation of an Air Quality Monitoring System Using Arduino UNO


🔷 Abstract

Air pollution is a major environmental issue affecting human health. This project monitors air quality in real time using gas sensors connected to an Arduino UNO. The system detects harmful gases and displays air quality levels. When pollution crosses a threshold, a buzzer/fan/LED is activated as an alert. The system is low-cost, portable, and suitable for smart home and smart city applications.


🔷 Objectives

  • Measure air pollution level

  • Detect harmful gases (CO, LPG, smoke)

  • Display real-time air quality

  • Trigger alert when pollution is high

  • Create awareness about air pollution


🔷 Block Diagram

Gas Sensor (MQ) → Arduino UNO → LCD / Serial Monitor ↓ Buzzer / Fan

🔷 Components Required

🔹 Hardware

ComponentQuantity
Arduino UNO1
MQ-135 / MQ-2 Gas Sensor1
16x2 LCD (I2C optional)1
Buzzer1
DC Fan / Relay Module1
220Ω Resistor1
Breadboard1
Jumper WiresAs required
USB Cable1

🔷 Sensor Selection

  • MQ-135 → CO₂, NH₃, Benzene, smoke (best for air quality)

  • MQ-2 → LPG, smoke, hydrogen

  • MQ-7 → Carbon Monoxide (CO)


🔷 Working Principle

  • Gas sensor detects pollutant gases

  • Sensor output voltage changes with pollution level

  • Arduino reads analog value

  • Air quality is classified (Good / Moderate / Poor)

  • Alert system activates when pollution is high


🔷 Circuit Connections

🔹 MQ-135 → Arduino

MQ SensorArduino
VCC5V
GNDGND
AOA0

🔹 LCD (I2C)

LCDArduino
SDAA4
SCLA5

🔹 Buzzer / Fan

  • Buzzer + → D8

  • Fan via relay → D9


🔷 Arduino Code

#include <LiquidCrystal_I2C.h> LiquidCrystal_I2C lcd(0x27,16,2); int gasPin = A0; int buzzer = 8; int fan = 9; void setup() { lcd.init(); lcd.backlight(); pinMode(buzzer, OUTPUT); pinMode(fan, OUTPUT); Serial.begin(9600); } void loop() { int gasValue = analogRead(gasPin); lcd.setCursor(0,0); lcd.print("Air Quality:"); lcd.setCursor(0,1); lcd.print(gasValue); Serial.println(gasValue); if (gasValue > 400) { digitalWrite(buzzer, HIGH); digitalWrite(fan, HIGH); lcd.setCursor(12,1); lcd.print("BAD"); } else { digitalWrite(buzzer, LOW); digitalWrite(fan, LOW); lcd.setCursor(12,1); lcd.print("OK "); } delay(1000); }

🔷 Output

  • LCD displays air quality value

  • Buzzer sounds when pollution is high

  • Fan activates automatically

  • Serial monitor shows live readings


🔷 Advantages

✔ Low-cost system
✔ Real-time monitoring
✔ Easy to build
✔ Scalable to IoT

0 comments:

Post a Comment