Air Quality Monitoring System
Department of Electronics and Communication Engineering
Submitted by
NAME REGISTER NUMBER
ABINAYA S 820323106002
AVC COLLEGE OF ENGINEERING, MANNAMPANAL
1
TABLE OF CONTENTS
DESCRIPTIONS PAGE NO
1. ABSTRACT 3
2. INTRODUCTION 4
3. PROBLEM STATEMENT 5
4. OBJECTIVE 6
5. METHODOLOGY 7
6. COMPONENTS USED 8
7. BLOCK DIAGRAM 10
8. WORKING 11
9. SOFTWARE IMPLEMENTATION 14
10. CODING 15
11. RESULT 19
2
12. ADVANTAGE 22
13. LIMITATION 23
14. APPLICATIONS 24
15. FUTURE SCOPE 25
16. CONCLUSION 26
3
1. ABSTRACT
The main aim of this project is to design and develop an IoT-based Air
Quality Monitoring System for industrial environments. The system continuously
measures key air quality parameters such as PM2.5 concentration, smoke, and gas
levels using appropriate sensors. These real-time readings help in assessing the level
of air pollution and detecting harmful gases in the surroundings.
The project aims to transmit the collected data to a cloud or web
dashboard through an IoT-enabled microcontroller (such as ESP32). This allows
industrial administrators to remotely monitor air quality conditions at any time
through visual graphs and indicators. When the sensor readings exceed predefined
safety thresholds, the system will automatically send alert notifications to warn the
concerned personnel.
Ultimately, the objective of this system is to promote a safe and healthy
industrial environment by providing early detection of hazardous air conditions.
By implementing this smart monitoring solution, industries can take preventive
actions to control pollution levels, ensure worker safety, and comply with
environmental regulations.
4
Air pollution is one of the most serious environmental issues faced by
industrial areas today. Factories and manufacturing units release a variety of
harmful gases and particulate matter that affect both the environment and human
health. Continuous monitoring of air quality in such areas is therefore essential to
ensure a safe working environment.
The IoT-based Air Quality Monitoring System is developed to detect and
monitor air pollutants in real time. This system uses modern sensors to measure the
concentration of PM2.5 particles, smoke, and toxic gases like carbon monoxide
(CO) and carbon dioxide (CO₂). The aim is to collect accurate environmental data
and alert users instantly if pollution levels become unsafe.
The system is built around a microcontroller, such as the ESP32 or Node
MCU, which serves as the core processing unit. It gathers readings from the sensors
and transfers the data through Wi-Fi to a cloud server. This enables continuous and
automatic monitoring without human intervention. All collected data is visualized
on a web-based dashboard, where users can observe real-time readings of air quality
parameters. The interface displays data in graphs and color indicators for easy
understanding. If any parameter crosses its safety threshold, the system
automatically sends alerts through email or notification.
The hardware components include the ESP32 microcontroller, MQ135 gas
sensor, PM2.5 dust sensor, and a smoke sensor. These sensors detect various types
of air pollutants, while the ESP32 handles data transmission. A small display or
LED indicator can also be used for local monitoring within the factory premises.
5
2. INTRODUCTION
In recent years, air pollution has become one of the major concerns affecting
both the environment and human health. Industrial areas, in particular, contribute
significantly to the release of harmful gases, smoke, and fine dust particles into the
atmosphere. Continuous exposure to polluted air can cause serious respiratory
problems and reduce overall air quality in and around factories. Hence, there is a
growing need for efficient systems that can monitor air quality in real time and
provide timely alerts.
Traditional air quality measurement methods often require manual sampling
and laboratory testing, which are time-consuming and not suitable for real-time
applications. With the advancement of the Internet of Things (IoT), it is now
possible to design smart systems that automatically sense, analyze, and transmit air
quality data over the internet. Such systems enable remote monitoring and provide
instant information about environmental conditions.
This project focuses on developing an IoT-based Air Quality Monitoring
System that can measure parameters like PM2.5, smoke, and gas levels in
industrial environments. The sensors collect data and send it to a web dashboard
where it is displayed in graphical format. The system is designed to trigger alerts
when any pollutant level crosses a set threshold, helping to take preventive actions
before conditions become hazardous.
In short, this project aims to ensure a safer and cleaner industrial atmosphere
through continuous, automated air quality monitoring.
6
3. PROBLEM STATEMENT
Air pollution in industrial areas has become a major environmental and
health issue due to the continuous release of harmful gases, smoke, and fine
particulate matter. Workers in such environments are often exposed to unsafe
levels of pollutants without being aware of the risks. Traditional monitoring
methods are not efficient enough to provide real-time information about air
quality, leading to delayed actions and possible health hazards.
Many existing air quality measurement systems are expensive, bulky,
and not suitable for continuous monitoring in multiple locations. In most
industries, manual checking is still followed, which is time-consuming and
lacks accuracy. There is a clear need for a compact, low-cost, and automated
system that can monitor multiple air parameters simultaneously and send
instant alerts when pollution levels exceed the safe limit.
The lack of real-time data also prevents industries from taking
immediate corrective measures, such as activating ventilation systems or
reducing emission sources. Without continuous monitoring, it becomes
difficult to maintain safe working conditions and comply with environmental
standards. As a result, both workers’ health and the company’s reputation
may be affected.
Therefore, there is a requirement for an IoT-based smart monitoring
solution that can continuously track air quality parameters, display real-time
data on a dashboard, and alert users automatically when thresholds are
crossed. Such a system will help industries maintain safety standards and
contribute to sustainable environmental practices.
7
4. OBJECTIVE
The main objective of this project is to design and implement an IoT-
based Air Quality Monitoring System that can effectively measure and
monitor air pollution levels in industrial environments. The system aims to
detect harmful gases, smoke, and fine particles (PM2.5) in real time using
suitable sensors and display the collected data for analysis.
Another important objective is to enable continuous and remote
monitoring of air quality through a web-based dashboard. By connecting the
sensing device to the internet via an IoT platform, users can easily access live
air quality data from anywhere. This helps in making quick and informed
decisions to ensure a safe working environment for employees.
The project also focuses on developing an alert mechanism that
notifies users when any pollutant concentration exceeds the predefined safety
threshold. This alert system helps industries to take immediate preventive
measures such as increasing ventilation, shutting down emission sources, or
evacuating workers if necessary.
Finally, the objective is to create a cost-effective, energy-efficient,
and scalable solution that can be easily implemented across various
industrial sectors. By integrating IoT technology with environmental sensing,
the system contributes to improved health, safety, and sustainable industrial
operation.
8
5. METHODOLOGY
1. Sensor Selection and Data Acquisition
1. Air quality parameters such as PM2.5, smoke, and gas levels are sensed using
PMS5003 and MQ-series sensors.
2. The ESP32 microcontroller collects real-time data from these sensors for
further processing.
2. Data Processing and Calibration
1. The raw sensor signals are filtered and converted into meaningful digital
values.
2. Calibration is performed to maintain measurement accuracy and reliability.
3. IoT Data Transmission
1. Processed data is transmitted via Wi-Fi using the IoT-enabled ESP32 module.
2. Data packets are sent to the cloud server or MQTT broker in a structured
format.
4. Cloud Storage and Visualization
9
1. The received data is stored on cloud platforms like ThingSpeak or
Node-RED.
2. Real-time graphs and dashboards are displayed for easy monitoring of air
quality.
5. Alert and Notification System
1. When sensor readings exceed safe thresholds, the system automatically
triggers alerts.
2. Notifications are sent to users through email, SMS, or Telegram for quick
action.
6. System Evaluation and Maintenance
1. The system is tested in industrial environments to ensure performance
accuracy.
2. Regular calibration and maintenance keep the sensors stable and responsive
over time.
6. COMPONENTS USED
1. ESP32 Microcontroller
Acts as the main control unit of the system.
Reads sensor data, processes it, and transmits it to the cloud using Wi-Fi.
2. PMS5003 (or SDS011) Sensor
10
Used to measure PM2.5 and PM10 particulate matter in the air.
Provides accurate digital output for fine dust concentration levels.
3. MQ-135 Gas Sensor
Detects harmful gases such as ammonia, benzene, and smoke.
Provides analog output proportional to the gas concentration.
4. MQ-2 Smoke Sensor
Detects smoke, LPG, and CO gases present in the atmosphere.
Helps in identifying fire or leakage conditions in industrial areas.
5. Power Supply Module
Provides regulated 5V and 3.3V DC power for sensors and the ESP32 board.
Ensures stable operation of the entire system.
6. Jumper Wires and Breadboard
Used for making electrical connections between components.
Allows easy prototyping and testing of the circuit.
7. Cloud / IoT Platform (ThingSpeak / Node-RED / Grafana)
Receives and stores real-time data from the ESP32.
Displays air quality readings on a web dashboard for remote monitoring.
8. USB Cable
Used for programming and powering the ESP32 module.
Enables data transfer between the board and the computer.
11
9. Enclosure Box
Protects the hardware from dust, moisture, and external damage.
Helps in safely installing the system in industrial locations.
7. BLOCK DIAGRAM
12
8. WORKING
1. Air Quality Sensing:
o The system uses PM2.5 sensors to measure fine particulate matter
in the air.
o Gas sensors like MQ-2, MQ-135 detect smoke, carbon monoxide,
ammonia, and other harmful gases.
o Sensors convert these environmental parameters into electrical
signals.
2. Signal Conditioning:
o The raw sensor signals are often weak or noisy.
o A signal conditioning circuit amplifies and filters the signals for
accurate readings.
13
3. Microcontroller Processing:
o A microcontroller (ESP32/Arduino) reads the sensor signals.
o It calculates pollutant levels in standard units (µg/m³ for PM2.5,
ppm for gases).
o Compares values with predefined safe limits to detect pollution
hazards.
4. Wireless Transmission:
o Processed data is sent to the cloud via Wi-Fi, GSM, or LoRa
modules.
o IoT protocols like MQTT or HTTP are used to transmit data
efficiently.
5. Real-Time Monitoring:
o The cloud server stores the data and displays it on a web
dashboard.
o Users can see real-time pollutant levels, graphs, and historical
trends.
6. Threshold Alerts:
o When air quality crosses safe thresholds, the system automatically
triggers alerts.
o Alerts can be sent via SMS, email, or push notifications.
o Enables preventive actions to protect workers and equipment.
7. Data Logging and Analysis:
o The system stores historical data for trend analysis.
o Helps industries identify pollution sources and plan air quality
improvement measures.
8. Integration with Control Systems (Optional):
14
o Advanced systems can automatically activate exhaust fans or
purifiers if pollution rises.
o This closes the loop, making it a smart pollution control system.
15
9. SOFTWARE IMPLEMENTATION
Software Implementation Overview
1. Microcontroller Programming:
o Write code for the microcontroller (ESP32/Arduino) to read sensor
data.
o Implement data processing: convert raw sensor readings into standard
units (e.g., µg/m³ for PM2.5, ppm for gases).
o Include threshold checks: if pollutant levels exceed safe limits, trigger
alerts.
o Programming languages: Arduino IDE (C/C++) or MicroPython for
ESP32.
2. IoT Communication:
o Use protocols like MQTT, HTTP, or WebSocket to send data to the
cloud.
o Configure Wi-Fi or GSM module to connect to the internet.
o Ensure reliable transmission and error handling in case of
connection drops.
3. Web Dashboard / Cloud Setup:
o Use cloud platforms like ThingSpeak, Blynk, Firebase, or AWS IoT
to store and visualize data.
o Design a real-time dashboard showing pollutant levels in graphs,
tables, and indicators.
o Add historical data visualization for trend analysis.
4. Alert System Software:
o Integrate email, SMS, or push notifications using cloud services or
APIs (e.g., Twilio, IFTTT).
16
o Program alerts to trigger automatically when air quality exceeds
thresholds.
5. Data Logging and Analytics:
o Store sensor data in cloud database for later analysis.
o Implement optional features like average pollution calculation,
daily/weekly reports, or predictive alerts using simple algorithms.
6. User Interface (Optional):
o Design a responsive web interface or mobile app for users to check
real-time air quality.
o Include color-coded indicators: green (safe), yellow (moderate), red
(hazardous).
17
[Link]:
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include "DHT.h"
#include <WiFi.h>
#include <BlynkSimpleEsp32.h>
// ---------------------- LCD Setup ----------------------
LiquidCrystal_I2C lcd(0x27, 16, 2);
// ---------------------- DHT Sensor ----------------------
#define DHTPIN 4 // DHT11 connected to GPIO 4
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);
// ---------------------- MQ135 Sensor ----------------------
#define MQ135_PIN 34 // Analog input pin
// ---------------------- PM2.5 Sensor ----------------------
// (For demo purpose, simulated value)
int pm25_value = 0;
// ---------------------- Blynk Setup ----------------------
char auth[] = "Your_Blynk_Auth_Token";
18
char ssid[] = "Your_WiFi_Name";
char pass[] = "Your_WiFi_Password";
// ---------------------- Threshold Values ----------------------
int gasThreshold = 200;
int pmThreshold = 100;
// ---------------------- Setup ----------------------
void setup() {
[Link](9600);
[Link](16, 2);
[Link]();
[Link]();
[Link]();
[Link](auth, ssid, pass);
[Link](0, 0);
[Link]("Air Quality Sys");
[Link](0, 1);
[Link]("Connecting...");
delay(2000);
[Link]();
}
19
// ---------------------- Main Loop ----------------------
void loop() {
[Link]();
// DHT11 Readings
float h = [Link]();
float t = [Link]();
// MQ135 Gas Reading
int gasValue = analogRead(MQ135_PIN);
// Simulate PM2.5 value (you can connect actual sensor like PMS5003)
pm25_value = random(50, 180);
// Display on Serial Monitor
[Link]("Temp: "); [Link](t);
[Link](" | Humidity: "); [Link](h);
[Link](" | MQ135: "); [Link](gasValue);
[Link](" | PM2.5: "); [Link](pm25_value);
// Display on LCD
[Link](0, 0);
[Link]("G:"); [Link](gasValue);
20
[Link](" PM:"); [Link](pm25_value);
[Link](0, 1);
[Link]("T:"); [Link](t);
[Link](" H:"); [Link](h);
// Send data to Blynk Dashboard
[Link](V0, t);
[Link](V1, h);
[Link](V2, gasValue);
[Link](V3, pm25_value);
// Alert System
if (gasValue > gasThreshold || pm25_value > pmThreshold) {
[Link]("⚠️ ALERT: Air Quality Unsafe!");
[Link]("air_alert", "Air Quality Level Exceeded!");
}
delay(2000);
}
21
OUTPUT
Temp: 29.5°C | Humidity: 55%
MQ135: 250 | PM2.5: 120
⚠️ ALERT: Air Quality Unsafe!
22
11. RESULTS
1. Real-Time Sensor Readings:
o Gas sensor (MQ-2) and PM2.5 sensor provide continuous readings.
o Example:
o Gas Level: 0.85 V
2. Threshold Alerts:
o When pollutant levels exceed safe limits:
o ALERT: Air quality unsafe!
o Can trigger buzzer, LED, or notifications for immediate action.
3. Cloud Dashboard Visualization:
o Data uploaded to ThingSpeak / Blynk / Firebase shows:
Real-time graphs of gas and PM2.5 levels.
Historical trends for analysis.
Color-coded indicators for safe / moderate / hazardous levels.
4. Data Logging:
o Stored data can be exported or analyzed to identify high-pollution
periods.
o Helps in preventive maintenance and improving workplace safety.
23
SAMPLE OUTPUT DASHBOARD
Time Gas Level (V) PM2.5 (µg/m³) Status
10:00 AM 0.80 70 SAFE
10:05 AM 1.20 120 ALERT
10:10 AM 0.95 96 SAFE
24
SAMPLE OUTPUT DASHBOARD
25
[Link]
1. Real-Time Monitoring:
o Continuously tracks air pollutants like PM2.5, smoke, and harmful
gases.
o Allows immediate awareness of pollution levels.
2. Early Alerts and Safety:
o Sends alerts when pollutant levels exceed safe thresholds.
o Helps protect workers’ health in industrial environments.
3. Data Logging and Analysis:
o Stores historical data for trend analysis.
o Helps identify pollution sources and plan preventive measures.
4. Remote Access via IoT:
o Web dashboard or mobile app access allows monitoring from
anywhere.
o No need to be physically present in the factory.
5. Automation Potential:
o Can be integrated with exhaust fans or air purifiers to automatically
reduce pollution.
6. Cost-Effective and Scalable:
o Uses affordable sensors and microcontrollers.
o Can be scaled for multiple industrial zones easily.
26
[Link]
Sensor Accuracy Issues:
Low-cost sensors may give slightly inaccurate readings compared to high-
end lab equipment.
Requires calibration over time for precise results.
Environmental Interference:
Humidity, temperature, dust, and smoke type can affect sensor performance.
Connectivity Dependence:
System relies on Wi-Fi or internet for cloud data upload.
In areas with poor network, real-time monitoring may be interrupted.
Maintenance Requirements:
Sensors need periodic cleaning or replacement to maintain accuracy.
Battery-powered setups require monitoring of power levels.
Limited Scope:
Detects only selected gases and PM2.5.
Other pollutants (like VOCs, NO2, SO2) may require additional sensors.
27
Limited Sensor Accuracy:
Low-cost sensors like MQ and DHT may not provide
laboratory-level accuracy.
Sensor calibration is required frequently for reliable results.
Restricted Gas Detection Range:
The system can only detect specific gases (like CO, CO₂, and
smoke).
Additional sensors are needed for other pollutants such as NO₂,
SO₂, or VOCs.
Dependence on Internet Connectivity:
Continuous Wi-Fi or internet connection is required for real-
time data transmission.
In remote or low-network areas, data updates may be delayed
or lost.
Environmental Factors Affect Sensor Readings:
Temperature and humidity changes can affect sensor accuracy.
Sensors may show variations in outdoor and indoor conditions.
Limited Power Backup:
System may stop working during power failures unless a
battery or solar backup is provided.
Continuous operation in outdoor areas requires additional
power management.
28
14. APPLICATIONS
Industrial Safety:
Monitors air quality in factories, chemical plants, and refineries.
Alerts workers about toxic gas leaks or high particulate levels.
Environmental Monitoring:
Tracks pollution levels in urban and industrial areas.
Helps government agencies enforce environmental regulations.
Smart Cities:
Integrated into city-wide air monitoring networks.
Provides real-time air quality data for public awareness.
Health Monitoring:
Hospitals or clinics can monitor indoor air quality to protect patients with
respiratory issues.
Educational & Research Use:
Used in schools, colleges, and research labs for air quality studies.
Home & Office Air Quality:
Can be adapted for smart homes and offices to monitor and maintain safe
indoor air.
29
Industrial Pollution Control:
Monitors air quality in factories, chemical plants, and refineries.
Detects gas leaks and smoke to prevent accidents and health hazards.
Helps industries comply with pollution control board standards.
Smart Cities:
Forms part of smart city infrastructure to monitor pollution in real time.
Helps city authorities track air quality at different locations.
Data can be used to control traffic and reduce emissions.
Environmental Monitoring:
Used by government and research agencies to study air pollution patterns.
Supports environmental sustainability projects and climate studies.
Helps identify sources of air pollution (like vehicles, factories, etc.).
Indoor Air Quality Monitoring:
Installed in homes, offices, hospitals, and schools to monitor indoor air.
Detects harmful gases (CO, CO₂, smoke) and alerts users instantly.
Improves comfort and safety in smart buildings.
Agricultural Applications:
Monitors air and environmental quality around farmlands.
Helps detect harmful gases affecting crops and livestock.
Can be integrated with smart irrigation or greenhouse systems.
Transportation Hubs:
Used in airports, metro stations, and tunnels to monitor air quality.
Helps maintain clean air levels in closed or crowded environments.
30
Research and Education:
Useful in schools, colleges, and universities for IoT and environmental
projects.
Provides real-time data for experiments and analysis.
31
15. FUTURE SCOPE
Integration with AI & Machine Learning:
Predict future pollution levels using historical data.
Automatically identify pollution sources and suggest
mitigation measures.
Expanded Sensor Array:
Include additional sensors for NO2, SO2, CO, VOCs, and other
hazardous gases.
Improve accuracy and comprehensiveness of air quality
monitoring.
Mobile App Development:
Dedicated apps to view real-time air quality, alerts, and
reports on smartphones.
User-friendly notifications for workers and residents.
Automated Pollution Control:
Connect with exhaust fans, purifiers, and ventilation
systems.
Enable automatic air purification when pollutant levels
rise.
AI and Machine Learning Integration:
Use AI models to predict future air quality trends based on past data.
Machine learning can automatically detect abnormal
pollution
Helps in proactive decision-making for pollution control.
Advanced Multi-Gas Detection:
Add sensors for NO₂, SO₂, CO₂, NH₃, and VOCs for a
complete .
32
Enables detection of a broader range of pollutants for more
Mobile App & Cloud Dashboard Development:
Create a mobile application for real-time monitoring and alert notifications.
Cloud dashboards can display air quality data using graphs and maps.
Smart City Integration:
Integrate with smart city IoT networks to monitor air quality across large
urban areas.
Data can be shared with municipal corporations and environmental
agencies.
Automated Pollution Control Systems:
Connect system output to air purifiers, ventilation systems, or exhaust
fans.
When pollution rises, devices automatically activate to clean the air.
Renewable Power Source Integration:
Power the system using solar panels for continuous operation in outdoor
environments.
Reduces energy costs and improves sustainability.
Wearable Air Quality Trackers:
Miniaturize sensors into portable or wearable devices for personal air
monitoring.
Useful for worker
33
34
16. CONCLUSION
The IoT-based Air Quality Monitoring System provides a reliable
solution for continuously monitoring air pollutants such as PM2.5, smoke,
and harmful gases in industrial environments. By using low-cost sensors and
microcontrollers, the system enables real-time detection of unsafe air quality
levels, ensuring the health and safety of workers and the surrounding
environment. The integration of IoT technology allows the data to be
transmitted and monitored remotely through a web dashboard, making air
quality management more efficient and accessible.
The system’s alert mechanism ensures that when pollutant levels
exceed predefined thresholds, immediate notifications are sent via SMS,
email, or visual indicators like LEDs and buzzers. This feature plays a critical
role in preventing exposure to hazardous conditions and allows timely
corrective measures. Additionally, by logging historical data, the system
facilitates trend analysis and helps industries identify sources of pollution to
implement long-term preventive strategies.
From a technological standpoint, the project demonstrates the
potential of combining sensor technology, microcontrollers, and cloud-based
IoT platforms. It highlights how automation, real-time monitoring, and data
visualization can be integrated into a single system to address environmental
challenges effectively. The software implementation, dashboard visualization,
and threshold alert mechanisms together make the system both practical and
scalable for various industrial and environmental applications.
Looking ahead, the system can be further enhanced by integrating
advanced sensors, AI-based predictive analytics, and automated control
mechanisms such as air purifiers or ventilation systems. Such improvements
can expand its applications to smart cities, indoor air quality management,
and broader environmental monitoring networks. Overall, this project not
only provides a functional solution for current air quality challenges but also
lays the foundation for future innovations in smart environmental monitoring.
35
The IoT-based Air Quality Monitoring System is a modern and
innovative approach to track and analyze pollution levels in real time. It uses
various sensors to measure harmful gases, particulate matter, and other
pollutants present in the air. The collected data is processed by a
microcontroller and transmitted through IoT technology to a web or cloud
platform, allowing continuous monitoring from anywhere.
This system provides accurate, real-time information about air
quality, which is essential in industrial zones and urban areas where pollution
levels fluctuate constantly. The automatic alert system ensures that when
pollution levels exceed safe limits, immediate notifications are sent to users,
enabling timely preventive actions to reduce health risks.
The project promotes the concept of a sustainable and eco-friendly
environment by making people aware of the current air conditions. The data
collected can also help government agencies and research organizations in
planning pollution control strategies and implementing environmental
policies more effectively. One of the main advantages of this project is its
scalability and flexibility. It can be installed in multiple locations, connected
through a central IoT network, and monitored via a single dashboard. This
makes it suitable for large-scale deployment in smart cities, industries,
schools, hospitals, and public areas.
The project also supports the broader vision of Digital India and
Smart City Initiatives, where technology and IoT are used to improve public
safety, health, and the quality of life. By providing accurate air quality data, it
helps in maintaining safe environments and supports industries in complying
with environmental regulations.
36
In conclusion, the IoT-based Air Quality Monitoring System represents a
crucial step toward building a cleaner, safer, and smarter future. By
combining technology with environmental awareness, it not only safeguards
human health but also contributes to global efforts against air pollution and
climate change. This system stands as a practical, scalable, and impactful
solution for the challenges of modern urbanization.
37