0% found this document useful (0 votes)
86 views53 pages

Mini Project Final

The document outlines a project titled 'Air Pollution Monitoring System' developed by students of the Bachelor of Artificial Intelligence & Data Science at Konkan Gyanpeeth College of Engineering. It details the design of an IoT-based system that monitors air quality, temperature, and humidity in real-time, utilizing sensors like the MQ-135 and DHT11, with data accessible via the ThingSpeak cloud platform. The project aims to provide an affordable and scalable solution for tracking air pollution and sending alerts when air quality deteriorates.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
86 views53 pages

Mini Project Final

The document outlines a project titled 'Air Pollution Monitoring System' developed by students of the Bachelor of Artificial Intelligence & Data Science at Konkan Gyanpeeth College of Engineering. It details the design of an IoT-based system that monitors air quality, temperature, and humidity in real-time, utilizing sensors like the MQ-135 and DHT11, with data accessible via the ThingSpeak cloud platform. The project aims to provide an affordable and scalable solution for tracking air pollution and sending alerts when air quality deteriorates.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 53

AIR POLLUTION MONITORING SYSTEM

Submitted in partial fulfilment of the requirements

Of the Third Year of Bachelor of Artificial Intelligence & Data Science


By

Bhatkar Vighnesh Prabhakar


(Roll No. 05)

Deshmukh Tushar Sunil


(Roll No. 10)

Jadhav Samarth Sunil


(Roll No. 22)

Mhatre Soham Narendra


(Roll No. 34)

Project Guide
Prof. G.V. Dakhave

DEPARTMENT OF ARTIFICIAL INTELLIGENCE & DATA SCIENCE

KONKAN GYANPEETH COLLEGE OF ENGINEERING


UNIVERSITY OF MUMBAI
(2024-2025)
CERTIFICATE

This is to certify the project entitled “Air Pollution Monitoring System” is a bonafide work of
“Bhatkar Vighnesh Prabhakar-(05), Deshmukh Tushar Sunil-(10), Jadhav Samarth Sunil-
(22), Mhatre Soham Narendra-(34)” submitted to the University of Mumbai in partial
fulfilment of the requirement for the award of the degree of “T.E.” in “Artificial Intelligence
& Data Science”.

Prof. G. V. Dakhave
Project Guide

Prof. G. V. Dakhave Dr.V.J.Pillewan


Head of Department Principal
KONKANGYANPEETHCOLLEGEOFENGINEERING,KARJAT.
(AffiliatedtoUniversityofMumbai,ApprovedbyA.I.C.T.E.,NewDelhi.
KonkanGyanpeethShaikshanikSankul,VengaonRoad,Dahivali,Karjat,Dist.-Raigad.410201.(M.S.)

Department Of Artificial Intelligence and Data Science

Project Report Approval

This project report entitled “Air Pollution Monitoring System” by “Bhatkar Vighnesh
Prabhakar(05), Deshmukh Tushar Sunil-(10), Jadhav Samarth Sunil-(22), Mhatre Soham
Narendra-(34)” is approved for the T.E. of Artificial Intelligence and Data Science.

Examiners

1..........................................

2..........................................

Date.

Place.
Declaration
I/We declare that this written submission represents my/our ideas in my/our ownwords
and where others' ideas or words have been included, I/We have adequately cited and
referenced the original sources. I/We also declare that I/We have adhered to all principles of
academic honesty and integrity and have not misrepresented or fabricated or falsified any
idea/data/fact/source in my/our submission. I/We understand that any violation of the above
will be cause for disciplinary action by the Institute and can also evoke penal action from the
sources which have thus not been properly cited or from whom proper permission has not
been taken when needed.

Bhatkar Vighnesh Prabhakar (05) ---------------------------------------


Deshmukh Tushar Sunil (10) ---------------------------------------
Jadhav Samarth Sunil (22) ---------------------------------------
Mhatre Soham Narendra (34) ---------------------------------------

Date:
INDEX
Abstract i
List of Figures ii
1. INTRODUCTION 1
1.1 Introduction 2
1.2 Existing systems 2
1.3 Problem Statement 3
1.4 Objectives 4
1.5 Scope 5
1.6 Proposed System 5

2. REVIEW OF LITERATURE 7

3. REQUIREMENT ANALYSIS 12
3.1 Software Requirements 13
3.2 Hardware Requirements 14
3.3 Working Procedures 19
4. DESIGN AND PLANNING 24
4.1 Working Algorithm 25
4.2 UML Diagram 26
4.3 Data Flow Diagram 27
4.4 UI Design 28
4.5 Gantt Chart 28

5. IMPLEMENTATION PLAN FOR NEXT SEMESTER 29

6. FUTURE ENHANCEMENTS 33

APPENDICES 35

CONCLUSION 40

REFERENCES 42
ABSTRACT

Air pollution is one of the biggest threats to the present-day environment. Everyone is being
affected by air pollution day by day including humans, animals, crops, cities, forests and
aquatic ecosystems. Besides that, it should be controlled at a certain level to prevent the
increasing rate of global warming. This project aims to design an IOT-based air pollution
monitoring system using the internet from anywhere using a computer or mobile to monitor
the air quality of the surroundings and environment. There are various methods and
instruments available for the measurement and monitoring quality of air. The IoT-based air
pollution monitoring system would not only help us to monitor the air quality but also be able
to send alert signals whenever the air quality deteriorates and goes down beyond a certain
level.
In this system, NodeMCU plays the main controlling role. It has been programmed in a
manner, such that, it senses the sensory signals from the sensors and shows the quality level
via led indicators. Besides the harmful gases (such as CO2, CO, smoke, etc) temperature and
humidity can be monitored through the temperature and humidity sensor by this system.
Sensor responses are fed to the NodeMCU which displays the monitored data in the
ThingSpeak cloud which can be utilized for analyzing the air quality of that area.The
following simple flow diagram (as shown in Fig. 1) indicates the working mechanism of the
IoT-based Air Pollution Monitoring System.
i

LIST OF FIGURES

Figure Title Page No.

2.1 Pinout Diagram of NodeMCU V3 15

2.2 Pinout Diagram of DHT11 sensor 15

2.3 The structure of the humidity sensor 16

2.4 MQ-135 Gas Sensor Module 16

2.5 Veroboard 17

2.6 AC-DC Adapter 17

2.7 LEDs 18

2.8 Resistors 19

2.9 Arduino IDE 13

2.10 ThingSpeak Cloud 14

3.1 Circuit Diagram to Pre-heat the DHT11 sensor module 20

3.2 Circuit Diagram to Pre-heat the MQ-135 gas sensor module 21

3.3 Circuit Diagram to Calibrate the MQ-135 Gas Sensor module 22

3.4 Circuit Diagram of the setup 23

4.1 Working Algorithm 25

4.2 UMLDiagrams 26

4.3 Dataflow diagram 27

4.4 UIDesign 28

4.5.Gantt Chart 28

7.1 Pinout diagram of the NodeMCU. 36


ii
CHAPTER 1

INTRODUCTION

1
CHAPTER.1

INTRODUCTION
1.1 Introduction and Motivation

The air pollution issue is massive, affecting human health, animals, plants, and the

environment in general. The increases over time in such toxic gases that have accounted for a
lot of the pollution released by industries, vehicle emissions, and other human activities pose
serious threats to ecosystems. Correct and real-time monitoring of air quality is thus indicated
when urban and industrialization continue to expand. This project introduced an IoT-based Air
Pollution Monitoring System in the context of monitoring temperature, humidity, and even air
quality in isolated places using the ThingSpeak cloud platform. With the adoption of IoT
technology, this system has provided, at the lowest cost, a method that is also easy to use for
real-time monitoring of pollution levels in timely terms. It ensures timely warnings in case the
air quality has worsened beyond safe limits. The need to regulate and minimize this current
dangerous level of emitting substances harming health and the environment forms the impetus
for this work.

Some common pollutants responsible for respiratory diseases and environmental degradation
include carbon monoxide (CO), carbon dioxide (CO₂), and smoke. Real-time monitoring is
essential in ensuring early warnings and prevention of those effects. The traditional
monitoring systems are quite costly and complex, hence not so accessible. The proposed
project aims to design an affordable system that is scalable and efficient, accessible from the
cloud-based platform as well as LED indicators giving simple, instantaneous insight into air
quality levels. The system will encourage users to make informed decisions, bring awareness
about the maintenance of quality air, and would lead to enhancing environmental
sustainability by reducing the detrimental effects of pollutants.

1.2 Existing System

The existing system described in the report titled "IoT Based Air Pollution Monitoring
System" focuses on a real-time, standalone solution to monitor air quality using IoT. Here is
an overview of the system.

2
1.2.1 Main Components.

 NodeMCU V3. An ESP8266 development board that acts as the main controller.
 DHT11 Sensor Module. Measures temperature and humidity.
 MQ-135 Gas Sensor. Detects air quality, including gases like CO2, CO, smoke, and
other harmful substances.
 ThingSpeak Cloud. Stores and displays real-time sensor data for analysis.

1.2.2 System Overview.

 The sensors (DHT11 and MQ-135) collect data on air temperature, humidity, and gas
concentrations.
 This data is processed by the NodeMCU and transmitted to the cloud (ThingSpeak)
for real-time monitoring.
 LED indicators show the air quality levels based on the collected data.
 Green LED. Air quality is safe (below 100 PPM).
 Yellow LED. Moderate pollution (between 100 and 200 PPM).
 Red LED. Dangerous pollution (above 200 PPM).

1.2.3 System Calibration.

 The MQ-135 sensor is calibrated in fresh air, and its resistance (R0) is determined to
improve accuracy.
 The DHT11 sensor is preheated before being used to ensure reliable temperature and
humidity readings.

1.2.4 Data Flow and Monitoring.

 Sensor data is sent to the ThingSpeak cloud, where users can access it through a web
interface.
 Users can remotely monitor air quality, temperature, and humidity from their
computers or mobile devices.

1.3 Problem Statement

The problem statement of the report "IoT Based Air Pollution Monitoring System" revolves
around the growing issue of air pollution, which has become a significant threat to both the
environment and human health. The key concerns highlighted in the problem statement are.

3
 Rising Air Pollution Levels. Due to increased industrialization, vehicle emissions,
urbanization, and population growth, the air quality is rapidly deteriorating, posing
serious health risks and contributing to environmental degradation.
 Impact on Human Health and Ecosystems. The increasing concentration of harmful
gases (such as CO2, CO, and smoke) and particulate matter (PM) in the atmosphere
adversely affects human health, animals, crops, and the overall ecosystem.
 Need for Real-Time Monitoring. Traditional air quality measurement systems are
often inadequate for real-time, localized monitoring, which is essential for taking
timely actions to prevent the harmful effects of pollution.

Thus, the report addresses the need for a cost-effective, real-time air pollution monitoring
system that can continuously monitor air quality and provide instant alerts when pollution
levels exceed safe thresholds. The system leverages IoT technology to enable remote
monitoring via mobile or computer from any location, providing a solution to track and
manage air pollution efficiently[1].

1.4 Objectives

The objectives of the report "IoT Based Air Pollution Monitoring System" are.

1.4.1 Develop a Real-Time Air Quality Monitoring System. Design and implement a
system that can continuously monitor air quality in real-time, measuring key pollutants and
environmental factors such as harmful gases (CO2, CO, smoke) and particulate matter, along
with temperature and humidity.

1.4.2 Leverage IoT for Remote Access. Utilize Internet of Things (IoT) technology to enable
users to monitor air quality remotely from any location using mobile devices or computers,
providing accessibility and convenience.

1.4.3 Provide Alerts for Air Quality Deterioration. The system should be able to send
immediate alerts when air pollution levels exceed safe thresholds, allowing users to take
timely actions to mitigate health risks.

1.4.4 Ensure Cost-Effectiveness and Feasibility. The system should be designed using low-
cost components (such as NodeMCU, DHT11, and MQ-135 sensors) to make the solution
affordable and scalable for broader applications.

4
1.4.5 Promote Awareness and Safety. Through real-time monitoring and alerts, the project
aims to promote awareness about air quality issues and ensure that people can take
precautionary measures to protect their health in case of poor air quality

1.5 Scope

The scope of the "IoT Based Air Pollution Monitoring System" project is as follows.

1.5.1 Real-Time Air Quality Monitoring. The system monitors air quality continuously,
providing real-time data on key environmental parameters such as concentrations of harmful
gases (CO, CO2, smoke), particulate matter, temperature, and humidity.

1.5.2 Remote Monitoring via IoT. The project leverages IoT technology to enable remote
monitoring of air quality. Users can access the system data from anywhere through a web
interface or mobile application using ThingSpeak cloud service.Air Quality Alerts. The
system is designed to send alerts when air pollution crosses certain thresholds, with LED
indicators (green, yellow, red) showing air quality levels based on PPM (parts per million)
values.

1.5.3 Wide Applications. The system can be implemented in various settings such as
industrial

areas, residential neighborhoods, and public spaces to track air quality, detect pollution, and
support health and environmental safety initiatives

1.5.4 Scalability and Customization. The system can be expanded by integrating additional
sensors to measure specific pollutants (e.g., NOx, SOx), and it is designed to be scalable,
allowing for deployment across larger geographic areas.

1.5.5 Cost-Effective and User-Friendly. The project uses affordable components like
NodeMCU, DHT11, and MQ-135 sensors, making it an economical solution for widespread
use. Its simple design and ease of access make it user-friendly for both experts and laypeople.

1.5.7 Environmental and Health Benefits. By providing real-time data on air quality and
issuing timely warnings, the system can help reduce exposure to harmful pollutants,
contributing to improved public health and environmental protection(GR3).

1.6 Proposed System

5
The proposed system in this report focuses on developing an IoT-based Air Pollution
Monitoring System to measure real-time environmental conditions, such as air quality,
temperature, and humidity. The system uses the NodeMCU V3 as the main controller,
programmed to collect data from sensors and upload it to the ThingSpeak cloud for remote
monitoring via a computer or mobile device. Key sensors include the MQ-135 gas sensor,
which detects pollutants like carbon monoxide, carbon dioxide, and smoke, and the DHT11
sensor, which measures temperature and humidity. The system also features LED indicators
that display air quality levels—green indicates good air quality (PPM < 100), yellow
represents moderate air quality (PPM between 100 and 200), and red signals poor air quality
(PPM > 200).

To ensure accurate readings, the sensors require preheating and calibration, with the MQ-135
sensor being calibrated against fresh air to establish a baseline reference. The Arduino IDE is
used to program the NodeMCU and manage data from the sensors. Additionally, the
ESP8266WiFi library enables cloud integration, while the ThingSpeak library facilitates
uploading data to the cloud. This system allows users to monitor air quality remotely and
provides real-time alerts when pollution levels exceed safe thresholds, empowering timely
actions to mitigate health risks. The LED-based indicators further enhance usability by
providing immediate, visual feedback about the air quality in the surroundings.

6
CHAPTER 2

REVIEW OF LITERATURE

7
CHAPTER.2

REVIEW OF LITERATURE
2.1 Methodology

The report on the "IoT-Based Air Pollution Monitoring System" focuses on developing a real-
time system to monitor air quality using Internet of Things (IoT) technology. The
methodology, themes, contributions, and challenges related to the project are outlined below:
The project leverages IoT technology to monitor air pollution levels using a system that
collects and processes data from sensors such as the MQ-135 gas sensor and DHT11
temperature and humidity sensor. The NodeMCU microcontroller is used to process the data,
which is then uploaded to the ThingSpeak cloud for remote monitoring. The system
undergoes calibration and preheating processes to ensure sensor accuracy. The algorithm
controls the data flow, LED indicators, and cloud data management, with user access to air
quality data via mobile or computer.[1]

2.1.1.Theme
The central theme of the project is environmental sustainability, addressing air pollution, a
critical issue that affects global health. By leveraging IoT, the system enables real-time
monitoring of air quality, raising awareness and promoting actions to combat pollution. The
system integrates technological innovations, such as IoT connectivity, cloud-based data
storage, and real-time alerts, with a focus on improving public health and safety through
accessible air quality data.

2.1.2 Positive Contributions

 Enhanced Environmental Monitoring: The system allows for continuous, real-time


tracking of air quality, which can help authorities and individuals take timely action to
reduce pollution exposure.

 Remote Accessibility: Using IoT technology, the system can be accessed remotely
from anywhere, making air quality data more widely available to users.

 Affordable Implementation: The project demonstrates that monitoring air pollution


can be done affordably with minimal hardware, using sensors and a microcontroller,
making it feasible for broader use in various environments.

8
Public Awareness: By providing easily interpretable data on air quality, the system promotes
awareness of environmental conditions, encouraging individuals and organizations to
contribute to pollution mitigation.

2.1.3 Challenges

 Accuracy Limitations: The MQ-135 sensor can detect harmful gases but cannot
provide detailed breakdowns of specific pollutants such as carbon monoxide or carbon
dioxide, limiting its specificity.

 Internet Dependency: The system requires a stable internet connection to upload data
to the cloud, which may not be reliable in all locations, especially in remote or
underdeveloped areas.

 Power Supply Issues: Ensuring adequate power for all components, particularly during
calibration and preheating of the sensors, is essential for accurate data collection. The
project had to use separate power supplies to overcome the challenge of voltage drops
affecting sensor output.

 Cost Constraints: While the system is designed to be cost-effective, adding more


sensors to increase the range of pollutants detected would increase the project's overall
cost, which may not be feasible for widespread adoption.

2.2Methodology
The system utilizes sensors like MQ9, MQ2, and PMS3003G3, connected to a NodeMCU
ESP8266 module. It measures the concentration of harmful gases and particulates in real-time
and uploads the data to the ThingSpeak platform. The system includes a display unit and
buzzer to alert users when pollutants exceed safe levels. [2]

2.2.1Theme
The central theme is environmental sustainability and health. The system addresses the urgent
need for accessible and low-cost air quality monitoring, aiming to mitigate health risks posed
by air pollution. By leveraging IoT technology, it provides real-time data that helps
individuals and communities stay informed about air quality in their vicinity.

9
2.2.2 Positive Contributions

 Cost-Effective Monitoring: The system offers an affordable solution for air quality
monitoring, which can be easily installed in homes or small spaces.

 Real-Time Alerts: It provides immediate alerts through a buzzer and visual graphs,
enabling swift action to minimize exposure to harmful pollutants.

 User-Friendly: The system is portable and simple to use, making it accessible for
widespread adoption, particularly in developing regions with limited resources.

2.2.3 Challenges

 Limited Sensor Accuracy: While the system measures key pollutants, sensor
calibration could be improved for more accurate data, particularly for gases like
ammonia or nitrogen oxides.

 Internet Dependency: The system's reliance on the internet for data uploading may
be a limitation in areas with poor connectivity. Additionally, future improvements
could include integrating mobile notifications to make it more user-friendly.

2.3Methodology
The system employs multiple sensors connected to an Arduino board, interfaced with
Raspberry Pi. The data is transmitted via the cloud to IBM Bluemix, enabling real-time
visualization and monitoring of air quality through Node-RED programming.[3]

2.3.1Theme
The key theme is environmental protection, addressing rising air pollution and its impact on
public health. By leveraging IoT and cloud computing, the system provides real-time air
quality data, enabling proactive measures against pollution.

2.3.2 Positive Contributions

 Low-Cost Solution: The system is designed to be affordable, using a Raspberry Pi


and low-power sensors to monitor air quality parameters effectively.

 Real-Time Monitoring: The data from the system is accessible globally via the cloud,
providing users with real-time information on air quality, which can help inform
decisions to mitigate exposure to harmful pollutants.

10
 Versatile System: With the integration of multiple sensors, the system measures a
range of environmental parameters, enhancing its usefulness for different applications
such as urban monitoring and health risk assessment

2.3.3 Challenges

 Limited Range of Pollutants Monitored: The system focuses on monitoring PM 2.5,


carbon monoxide (CO), carbon dioxide (CO2), temperature, humidity, and air
pressure. However, other critical pollutants such as sulfur dioxide (SO2), nitrogen
dioxide (NO2), and ozone (O3) are not included, leaving the monitoring incomplete
(kumar2017).
 Data Accuracy and Calibration: The sensors used in the system, while low-cost and
effective for certain pollutants, may have limitations in terms of accuracy and require
frequent calibration. This can affect the reliability of the data, particularly for long-
term monitoring(kumar2017).

11
CHAPTER 3

REQUIREMENT ANALYSIS

12
CHAPTER.3

REQUIREMENT ANALYSIS
3.1 Software Components

3.1.1 Arduino IDE

3.1.2 ThinkSpeak Cloud

3.1.1 Arduino IDE

The Arduino IDE is open-source


software, which is used to write
and upload code to the Arduino
boards. The IDE application is
suitable for different operating
systems such as Windows, Mac
OS X, and Linux. It supports the
programming languages C and C+
+. Fig 2.9Arduino IDE

Here, IDE stands for Integrated Development Environment. The program or code written in
the Arduino IDE is often called sketching. We need to connect the Genuino and Arduino
board with the IDE to upload the sketch written in the Arduino IDE software. The sketch is
saved with the extension '.ino.'

3.1.2 ThingSpeak Cloud

ThingSpeak is open-source software written in Ruby which allows users to communicate


with internet-enabled devices. It facilitates data access, retrieval and logging of data by
providing an API to both the devices and social network websites. ThingSpeak was
originally launched by ioBridge in 2010 as a service in support of IoT applications.
ThingSpeak has integrated support from numerical computing software MATLABfrom
MathWorks, allowing ThingSpeak users to analyse and visualize uploaded data using
MATLAB without requiring the purchase of a MATLAB license from MathWorks.

13
Fig 2.10 ThingSpeak Cloud

3.2 Hardware Components

3.2.1 NodeMCU V3

3.2.2 DHT11 Sensor Module

3.2.3 MQ-135 Gas Sensor Module

3.2.4 Veroboard(KS100)

3.2.5 Breadboard

3.2.6 Connecting Wires

3.2.7 AC-DC Adapters

3.2.8 LEDs emitting green, yellow and red colours

3.2.8 Resistors

3.2.1 NodeMCU V3

NodeMCU V3 is an open-source ESP8266 development kit, armed with the CH340G


USBTTL Serial chip. It has firmware that runs on ESP8266 Wi-Fi SoC from Espressif
Systems. Whilst cheaper, CH340 is super reliable even in industrial applications. It is tested
to be stable on all supported platforms as well. It can be simply coded in Arduino IDE. It has
a very low current consumption between 15 µA to 400 mA.

14
Fig. 2.1 (Pinout Diagram of NodeMCU V3)

3.2.2 DHT11 Sensor Module

The DHT11 is a temperature and humidity sensor that


gives digital output in terms of voltage. It uses a
capacitive humidity sensor and a thermistor to measure
the surrounding air. As shown in Fig. 2.2, we need to
supply a voltage of 5V (DC) to the Vcc pin and ground it
to the GND pin.

The sensor output can be easily read from the Data pin in Fig.2.2
terms of voltage (in digital mode). Humidity Measurement. The humidity sensing capacitor
DHT11sensor) has two electrodes with a moisture-holding substrate as a dielectric between
them as shown in Fig 2.3. Change in the capacitance value occurs with the change in
humidity levels. The IC measure, process these changed resistance values and then converts
them into digital form.

Temperature Measurement. For measuring the temperature, the DHT11 sensor uses a
negative temperature coefficient thermistor, which causes a decrease in its resistance value
with an increase in temperature. To get a wide range of resistance values, the sensor is made
up of semiconductor ceramics or polymers. has two electrodes with a moisture-holding
substrate as a dielectric between them as shown in Fig 2.3. Change in the capacitance value
occurs with the change in humidity levels. The IC measure, process these changed resistance
values and then converts them into digital form.

Temperature Measurement. For measuring the temperature, the DHT11 sensor uses a negative
temperature coefficient thermistor, which causes a decrease in its resistance value with an
15
increase in temperature. To get a wide range of resistance values, the sensor is made up of
semiconductor ceramics or polymers.

Fig 2.3(The structure of the humidity sensor)

3.2.3 MQ-135 Gas Sensor Module

The material of MQ135 is SnO2, it is a special material. when exposed to clean air, it is
hardly being conducted, however, when put in an environment with combustible gas, it has a
pretty performance of conductivity. Just make a simple electronic circuit, and convert the
change of conductivity to a corresponding output signal. MQ135 gas sensor is sensitive to
Ammonia, Sulphide, Benzene steam, smoke and other harmful gases. Used for family,
surrounding environment noxious gas detection device, apply to ammonia, aromatics,
sulphur, benzene vapor, and other harmful gases/smoke, gas detection, tested concentration
range. 10 to 1000ppm. In a normal environment, the environment which doesn’t have
detected gas set the sensor’s output voltage as the reference voltage, the analog output
voltage will be about 1V, when the sensor detects gas, harmful gas concentration increases
by 20ppm per voltage increase by 0.1V.

Fig 2.4 (MQ-135 Gas Sensor Module)

3.2.4 Veroboard (KS100)

16
Veroboard is the original prototyping board.
Sometimes referred to as ‘stripboard’ or ‘matrix
board’ these offer total flexibility for hard
wiring discrete components. Manufactured from
a copper clad laminate board or Epoxy based
substrate, it is offered in both single and
doublesided formats. Vero boards are available
in a wide range of board sizes and in both
imperial and metric pitch – Veroboard is an
ideal base for circuit construction and offers
even greater adaptability using our range of terminal Fig 2.5
Veroboard

pins and assemblies. As with other stripboards, in using Veroboard, components are
suitably positioned and soldered to the conductors to form the required circuit.
Breaks can be made in the tracks, usually around holes, to divide the strips into
multiple electrical nodes enabling increased circuit complexity. This type of wiring
board may be used for initial electronic circuit development, to construct prototypes
for bench testing or in the production of complete electronic units in small
quantities.

3.2.5 AC-DC Power Adapter

An AC-DC power supply or adapter is an electrical device that obtains electricity from a
grid-based power supply and converts it into a different current, frequency, and voltage. AC-
DC power supplies are necessary to provide the right
power that an electrical component needs. The
ACDC power supply delivers electricity to devices
that would typically run-on batteries or have no other
power source. .
. Fig 2.6 AC-DC Powe Adapter

17
3.2.6 LED (Red, Green & Yellow)

A light-emitting diode (LED) is a semiconductor light source that emits light when current
flows through it. Electrons in the semiconductor recombine with electron holes, releasing
energy in the form of photons. The colour of the light (corresponding to the energy of the
photons) is determined by the energy required for electrons to cross the band gap of the
semiconductor. White light is obtained by using multiple semiconductors or a layer of
lightemitting phosphor on the semiconductor device. LEDs have many advantages over
incandescent light sources, including lower power consumption, longer lifetime, improved
physical robustness, smaller size, and faster switching. In exchange for these generally
favourable attributes, disadvantages of LEDs
include electrical limitations to low voltage and
generally to DC (not AC) power, inability to
provide steady illumination from a pulsing DC

or an AC electrical supply source, and lesser


maximum operating temperature and storage
temperature. In contrast to LEDs, incandescent
Fig 2.7 LEDs

lamps can be made to intrinsically run at virtually any supply voltage, can utilize either AC
or DC current interchangeably, and will provide steady illumination when powered by AC
or pulsing DC even at a frequency as low as 50 Hz. LEDs usually need electronic support
components to function, while an incandescent bulb can and usually does operate directly
from an unregulated DC or AC power source.

3.2.7 Resistors

A resistor is a passivetwo-terminalelectrical component that implements electrical resistance


as a circuit element. In electronic circuits, resistors are used to reduce current flow, adjust
signal levels, to divide voltages, bias active elements, and terminate transmission lines,
among other uses. High-power resistors that can dissipate many watts of electrical power as
heat may be used as part of motor controls, in power distribution systems, or as test loads for
generators. Fixed resistors have resistances that only change slightly with temperature, time
or operating voltage.

18
3.3 Working Procedures

NodeMCU plays the main controlling role in this project. It has been programmed in a
manner, such that, it senses the sensory signals from the sensors and shows the quality level
via led indicators. The DHT11 sensor module is used to measure the temperature and the
humidity of the surroundings.With the help of the MQ-135 gas sensor module, air quality is
measured in ppm. These data are fed to the ThinkSpeak cloud over the internet. We have
also provided LED indicators to indicate the safety levels.

STEP 1. Firstly, the calibration ofthe MQ-135 gas sensor module is done. The sensor
is set to preheat for 24 minutes. Then the software code is uploaded to the
NodeMCU followed by the hardware circuit to calibrate the sensor has been
performed.

STEP 2. Then, the DHT11 sensor is set to preheat for 10 minutes.

STEP 3. The result of calibration found in STEP 1 is used to configure the final
working code.

STEP 4. The final working code is then uploaded to the NodeMCU.

STEP 5. Finally, the complete hardware circuit is implemented.

19
The hardware circuits are described in the following chapters.

3.3.1 Hardware Model to Preheat DHT11 Sensor Module

As discussed earlier, we need to preheat the DHT11 sensor so that it can work accurately.

The following steps were performed to preheat the DHT11 sensor module.

STEP 1 . The Vcc pin of the DHT11 sensor module was connected with the VU pin of

NodeMCU.

STEP 2 . The Gnd pin of the DHT11 sensor module was connected with the Gnd pin of
NodeMCU.

STEP 3 . The NodeMCU is powered with a 12V DC via AC-DC adapter for 20 minutes.

STEP 4 . The setup was then disconnected

Fig. 3.1 (Circuit Diagram to Preheat the DHT11 sensor module)

20
3.3.2 Hardware Model to Preheat and Calibrate MQ-135 Gas Sensor Module

The following steps were performed to preheat the MQ-135 gas sensor module

STEP 1 . The Vcc pin of the MQ-135 gas sensor module was connected with the VU pin
of NodeMCU. .

STEP 2 . The Gnd pin of the MQ-135 gas sensor module was connected with the Gnd
pin of NodeMCU.

STEP 3 . The NodeMCU is powered with a 12V DC via AC-DC adapter for a day.

STEP 4 . The setup was then disconnected.

Fig. 3.2(Circuit Diagram to Preheat the MQ-135 Gas sensor module)

The following steps were performed to calibrate the MQ-135 gas sensor module

STEP 1 . The Vcc pin of the MQ-135 gas sensor module was connected with the VU pin
of NodeMCU.

STEP 2 . The Gnd pin of the MQ-135 gas sensor module was connected with the Gnd
pin of NodeMCU.

STEP 3 . The analog DATA pin of the MQ-135 gas sensor module was connected with
the A0 Pin of the NodeMCU.

21
STEP 4 . The software code to calibrate the sensor is then uploaded to the NodeMCU
and the value of R0in fresh air is collected from the serial monitor of the
Arduino IDE.

STEP 5 . The setup was then disconnected.

Fig. 3.3(Circuit Diagram to Calibrate the MQ-135 Gas sensor module)

3.3.3 Final Hardware Model

The following steps were performed to execute the project

STEP 1 . The Vcc pin of the MQ-135 gas sensor module and DHT11 sensor module was
connected via Veroboard with an adapter delivering around 5V.

STEP 2 . The Gnd pin of the MQ-135 gas sensor module, DHT11 sensor module and the
cathode of the LED indicators was connected via Veroboard with the Gnd pin
of the NodeMCU.

STEP 3 . The analog DATA pin of the MQ-135 gas sensor module was connected with
the A0 Pin of the NodeMCU.

STEP 4 . The DATA pin of the DHT11 sensor module was connected with the D0 pin of
the NodeMCU.

22
STEP 5 . The anode of the three LED indicators (green, yellow, and red) were connected
to the D2, D3, and D4 pins of the NodeMCU respectively.

STEP 6 . The software code to execute the project was then uploaded to the NodeMCU.

STEP 7 . The setup was then powered with 9V DC via AC-DC adapter.

It can be now turned ON/OFF as per the requirements. Fig 3.4 represents the circuit diagram
of the setup.

Fig. 3.4(Circuit Diagram of the setup)

23
CHAPTER.4

DESIGNING AND PLANNING

24
CHAPTER.4

DESIGNING AND PLANNING

4.1 Working Algorithm

25
4.2 UML Diagrams

26
4.3 Dataflow diagram

27
4.4 UI Design

28
4.5 Gantt Chart

29
CHAPTER 5

IMPLEMENTATION PLAN FOR NEXT SEMESTER

30
CHAPTER.5

IMPLEMENTATION PLAN FOR NEXT SEMESTER


To expand the proposed "IoT Based Air Pollution Monitoring System," several enhancements
can be added to increase its functionality, data accuracy, and sustainability. Here’s how the
system can be expanded.

5.1 Integration with Google Sheets for Real-Time Data Comparison

 Feature. The data collected from the sensors can be linked to Google Sheets using
APIs to provide a live, real-time comparison with official weather data and air quality
indexes available through sources like Google or public weather APIs.

 Benefit. This would enable users to automatically compare their local sensor data with
verified weather data from external sources, ensuring accurate real-time analysis and
easier record-keeping for future reference.

5.2 Solar Power Integration

 Feature. The system can be made solar-powered by adding photovoltaic (solar)


panels for sustainable, energy-efficient operation, especially in remote areas.

 Benefit. Solar powering the system would make it independent of conventional


electricity sources, allowing for deployment in off-grid locations, reducing energy
costs, and contributing to a greener solution.

5.3 GPS Module Addition for Location Tracking

 Feature. Adding a GPS (Global Positioning System) module to the system will
allow location-based tracking of air quality data.

 Benefit. This would be particularly useful for mobile or portable units, enabling the
system to provide air quality information specific to different geographical locations.
It can map pollution data in real-time, making the system beneficial for city-wide
pollution tracking and mobile environmental monitoring.

5.4 Noise Level Detection

 Feature. Integrating a noise level sensor (such as an SPL meter) will allow the system
to monitor and report noise pollution along with air quality.

31
 Benefit. This feature expands the system’s utility to monitor multiple types of
pollution. Noise pollution is an increasing concern in urban areas, and combining air
and noise pollution data would provide a comprehensive environmental monitoring
solution.

5.5 UV Index Sensor for Radiation Monitoring

 Feature. A UV index sensor can be added to measure ultraviolet radiation levels from
the sun, which is a health risk in high doses.

 Benefit. This would be particularly useful for public health monitoring, providing
information on potential risks of UV exposure in real-time, especially in areas with
high sunlight intensity.

5.6 Rainfall Sensor for Weather Monitoring

 Feature. A rainfall sensor can measure precipitation levels, adding another


dimension to weather and environmental data monitoring.

 Benefit. Including rainfall data would allow for better correlation between air quality,
weather patterns, and pollution levels. For instance, after rain, particulate matter in the
air may reduce, and tracking this can provide insights into how weather impacts
pollution.

5.7 Multiple Gas Detection for Enhanced Pollution Monitoring

 Feature. The system can be expanded to include additional gas sensors (such as MQ-7
for CO, MQ-9 for CO and methane, MQ-2 for LPG and smoke).

 Benefit. This would allow the system to differentiate between various gases in the
atmosphere, offering a more detailed analysis of pollutants. For instance, specific
gases like NOx or SOx could be critical for industrial or traffic-heavy regions.

5.8 Integration with Local Authorities for Automated Alerts

 Feature. The system can be connected with local authorities’ networks (municipal or
environmental bodies) to send automatic alerts when pollution levels exceed safety
thresholds.

32
 Benefit. Authorities can be notified in real-time to take immediate action, such as
issuing public warnings or implementing emergency measures to reduce pollution
sources.

5.9 Machine Learning and Predictive Analytics

 Feature. Data collected over time can be fed into machine learning algorithms to
predict future pollution trends based on past data, weather conditions, and seasonal
changes.

 Benefit. Predictive analytics can help in forecasting potential pollution spikes, helping
authorities and individuals prepare in advance and take preventive measures.

5.10 Mobile App for Real-Time Data and Notifications

 Feature. Develop a mobile app that users can download to access real-time pollution
data, compare historical trends, receive alerts, and take precautionary actions.

33
CHAPTER 6

FUTURE ENHANCEMENTS

34
CHAPTER.6

FUTURE ENHANCEMENT
6.1 Integration with Additional Gas Sensors:

Expanding the system to detect more specific pollutants like nitrogen oxides (NOx), sulfur
dioxide (SOx), and volatile organic compounds (VOCs) would make it more comprehensive.
This would be particularly beneficial in industrial areas where these pollutants are prevalent.

6.2 Mobile Application and Real-Time Alerts:

Developing a mobile app to complement the system would provide users with real-time
notifications and data visualization on their smartphones. The app could include features like
location-based air quality reports, health recommendations, and personalized alerts when
pollution levels exceed safe limits.

6.3 GPS Module for Location-Based Tracking:

Integrating a GPS module would allow the system to provide geographically tagged air
quality data. This would be useful for mobile units or city-wide deployments, enabling more
precise tracking of pollution hotspots and helping authorities take localized action.

6.4 Predictive Analytics with Machine Learning:

Incorporating machine learning algorithms to analyze historical data and weather patterns
could help predict future pollution trends. This predictive feature would enable authorities and
users to anticipate pollution spikes and implement preventive measures in advance.

6.5 Noise Pollution Monitoring:

Adding sensors to monitor noise pollution would expand the system’s functionality, making it
a more comprehensive environmental monitoring tool.

6.6 Weather Monitoring Sensors:

Integrating additional sensors for measuring weather parameters such as wind speed, rainfall,
and UV index would help provide a more complete environmental picture. This would allow

35
users to correlate weather patterns with pollution levels, improving the accuracy of air quality
assessment.

36
APPENDICES

37
APPENDICES
7.1 Pin Description Of Nodemcu

7.1 Pinout diagram of the NodeMCU.

38
Description.

Pin Category Name Description

Power Micro-USB, Micro-USB. NodeMCU can be powered through

3.3V, GND, the USB port


Vin 3.3V. Regulated 3.3V can be supplied to this pin to
power the board

GND. Ground pins

Vin. External Power Supply

Control Pins EN, RST The pin and the button reset the microcontroller

Analog Pin A0 Used to measure analog voltage in the range of 0-


3.3V

GPIO Pins GPIO1 to NodeMCU has 16 general purpose input-output


pins on its board
GPIO16

SPI Pins SD1, CMD, NodeMCU has four pins available for SPI
communication.
SD0, CLK

UART Pins TXD0, RXD0, NodeMCU has two UART interfaces, UART0
(RXD0 & TXD0) and UART1 (RXD1 & TXD1).
TXD2, RXD2
UART1 is used to upload the firmware/program.

I2C Pins NodeMCU has I2C functionality support but due


to the internal functionality of these pins, you have
to find which pin is I2C.

39
7.2 Description Of Software Libraries Used

ESP8226WiFi Library

The ESP8266WiFi library provides a wide collection of C++ methods (functions) and
properties to configure and operate an ESP8266 module.

Commands used are as follows.

• WiFi.begin(“ WiFi Name”, “WiFiPassword”);  Command to connect with WiFi network.

• WiFi.status();  To check the status of the connection.

If it returns – WL_CONNECTED  WiFi is connected

If it returns – WL_IDLE_STATUS  WiFi is connected but no internet found

If it returns – WL_CONNECT_FAILED  WiFi is not connected

DHT11 sensor Library

The DHT sensor library provides a wide collection of C++ methods (functions) and properties
to configure and operate the DHT11 sensor module.

The commands used are as follows.

• DHT dht(D5, DHT11);  Set the pin for reading data.

• dht.begin(); Command to connect with DHT11 sensor module.

• dht.readTemperature();  Returns the value of the temperature in Celsius.

• dht.readHumidity();  Returns the value of humidity in percentage.

ThinkSpeak Library

The ThinkSpeak library provides a wide collection of C++ methods (functions) and properties
to configure and operate the ThinkSpeak cloud.

The commands used are as follows.

• ThingSpeak.writeField(myChannelNumber, 1, t, myWriteAPIKey);  To upload data in


the ThinkSpeak Field.

40
7.3 Cost Estimation Of The Project

For making the project we have used the following components (as mentioned in Table 2). As
per the pricing on the online websites for electronic components, we have formulated a cost
estimation.

Components Price (in Rs)

NodeMCU V3 288

DHT11 Sensor Module 120

MQ135 Gas Sensor Module 135

Connecting Wires 60

LEDs (Red, Green & Yellow) 9

AC-DC Power Adapter 120

Female PCB Berg Terminal and cable 80

Veroboard 100

Breadboard 70

Total 982

Table 2. Cost Estimation of the Project

41
CONCLUSION

42
CONCLUSION
The "IoT-Based Air Pollution Monitoring System" presents an innovative, scalable solution
for addressing the growing issue of air pollution. By utilizing affordable components such as
the NodeMCU V3, MQ-135 gas sensor, and DHT11 temperature and humidity sensor, the
system enables continuous real-time monitoring of key environmental parameters like CO₂,
CO, smoke, and particulate matter. The collected data is transmitted to the ThingSpeak cloud,
allowing users to remotely monitor air quality through a web interface or mobile device,
making the system highly accessible.

LED indicators provide immediate visual feedback on air quality, with green, yellow, and red
LEDs signaling safe, moderate, and dangerous pollution levels, respectively. Its low-cost
design makes it a practical solution for deployment in homes, public spaces, and industrial
zones, helping to mitigate pollution’s harmful effects. Potential system upgrades, including
solar power integration, GPS tracking, and machine learning for predictive analytics, could
greatly enhance its effectiveness. This system ultimately promotes public health and
environmental sustainability by empowering users to make informed decisions and take
proactive measures against air pollution.

The potential for further development, such as incorporating multiple gas sensors to detect
specific pollutants like NOx or SOx, adds to its versatility. Furthermore, its potential use in
conjunction with local authorities could streamline public health initiatives by issuing
automated warnings during critical pollution events. Overall, this system stands as a key
contributor to long-term environmental protection and public health improvement efforts.
REFERENCE
REFERENCE
[1] Agniva Banerje, Bonny Ikdar, Sourav Roy, 8th June, 2022,IoT Based Air Pollution
Monitoring System, [1]

[2] Ajitesh Kumar, Mona Kumari, Harsh Gupta,28-29 February 2020,Design and Analysis of
IoT based Air Quality Monitoring System[2]

[3] Somansh Kumar, Ashish Jasuja, 2017Air Quality Monitoring System Based on IoT using
Raspberry Pi ,[3]

You might also like