Iot Air Quality Monitoring System: Submitted by
Iot Air Quality Monitoring System: Submitted by
Submitted by
BACHELOR OF TECHNOLOGY
It is certified that this Minor Project-II report entitled ”IoT BASED AIR QUALITY
MONITORING SYSTEM” is the bonofide work of K AJAY KUMAR (21UEEE0503),
M RISHITH (21UEEE0505) and P VENKATA SUSANTH(21UEEE0507).
i
ACKNOWLEDGEMENT
We express our deepest gratitude to our respected Founder Chancellor and President
Col.Prof.Dr.R RANGARAJAN, B.E. (EEE), B.E. (MECH), M.S (AUTO). DSc.,
Foundress President Dr.R SAGUNTHALA RANGARAJAN, M.B.B.S., for their
immense contribution in making this organization and providing me the state of the art fa-
cilities to do this project. It is our heartfelt thankfulness to Chairperson and Manag-
ing Trustee, Mrs.K. MAHALAKSHMI RANGARAJAN and also Vice President,
Mr.K.V.D KISHORE KUMAR for their deep commitment and dedication, to bring this
institution to the peak in terms of discipline and values.
We thank our Parents, Department faculty, Supporting staff and friends for their help and
guidance to complete this project.
ii
ABSTRACT
This abstract presents a concept for power generation using a speed breaker roller mech-
anism, a simple yet promising technology designed to capture the kinetic energy of moving
vehicles and convert it into electrical power. The proposed system employs strategically de-
signed speed breakers equipped with rolling mechanisms to efficiently harvest the mechanical
energy generated when vehicles traverse them. By transforming the vertical displacement of
the vehicles into rotational motion, the system can generate electricity. Key features include
compatibility with various types of vehicles, scalability, and the potential for use in high-traffic
urban settings.
iii
TABLE OF CONTENTS
Page.No
ABSTRACT iii
LIST OF FIGURES v
1 INTRODUCTION 1
1.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
5 CONCLUSION 24
6 FUTURE SCOPE 25
7 REFERENCES 26
List of Figures
vi
Chapter 1
INTRODUCTION
1.1 Motivation
In this modern era, the problem of air pollution is becoming more and more
important, especially when air pollution is mainly in urban areas, because air
pollution affects almost all urban areas. This air pollution is mainly caused by
human activities such as open burning, vehicle exhaust fumes, cigarette smoke
and smoke emissions from industrial funnels. During the operation, various
harmful gases such as carbon dioxide, nitrogen oxide, carbon monoxide, am-
monia, methane, some rare components and many other gases are released,
which can harm a person by inhaling the gas Air quality is a major problem
in developed countries and has been linked to ecosystem health effects. In ad-
dition, this air pollution also contributes to global warming . Global warming
can cause the melting of ice at the North Pole, excessive melting of ice can
cause serious floods, or reduce the size of the Earth . This polluted air can
also cause acid rain in polluted air areas. If a person is exposed to long-term
acid rain, they may develop fever, cough and cold, and they will have to pay
for hospital treatment immediately. That is why it is very important to de-
velop an air quality monitoring system capable of reporting air quality levels to
solve the problems of poisonous gas poisoning in the environment. This paper
presents IoT-based air quality monitoring with low energy consumption using
an Arduino Uno microprocessor based on Blynk App integration. IoT systems
with embedded air quality sensors, microcontroller units (MCUs) and electronic
software frameworks to provide data exchange and related information.
1
1.2 Overview
IoT (Internet of Things) has become an integral part of our lives and has
already made an impact in several sectors, including the environment. Air
pollution is a major problem that has been affecting our planet for years. That
is why we need a reliable and effective air pollution control system so that
we can protect ourselves from its harmful effects. An IoT-based air pollution
monitoring system is an ideal solution that can provide real-time information
and knowledge about air quality in a specific area. The IoT-based air pollution
monitoring system consists of several hardware and software components that
work together. collect and process data. Hardware components include sensors,
microcontrollers and communication modules. The software components consist
of a cloud platform, a mobile application and a web-based dashboard.
2
Chapter 2
3
analysis, machine learning or deep learning to detect anomalies, pattern recog-
nition and predict air quality trends.Calibration and maintenance: Learn about
the importance of sensor calibration to ensure accurate and reliable measure-
ments over time. Understand calibration procedures and common requirements.
Also explore sensor maintenance strategies, including regular cleaning, sensor
replacement, and quality assurance practices.Environmental factors: Consider
environmental factors that can affect sensor performance and data accuracy,
such as temperature, humidity, altitude, and exposure to pollutants . . De-
velop strategies to mitigate these factors and ensure the longevity of the moni-
toring system.Regulatory oversight: Understand the regulatory frameworks and
standards governing air quality monitoring systems, especially if the system is
intended for use in a specific area or industry. Ensure compliance with relevant
regulations to ensure data integrity and legal compliance.User Interface and Vi-
sualization: Explore techniques to design user-friendly user interfaces and data
visualization tools to present air quality data to end users. Consider the needs
of various stakeholders, including policymakers, environmental agencies, scien-
tists, and the public.Case studies and best practices: Review existing IoT air
quality monitoring projects, case studies, and best practices to learn from suc-
cessful applications and identify potential challenges and pitfalls to avoidEthical
Considerations: When implementing air quality monitoring systems, especially
in vulnerable communities or sensitive areas, consider the ethical implications
in relation to data protection, security and environmental laws.By doing in-
depth background research in these areas, you will. be well equipped to design
and implement an effective IoT-based air quality monitoring system..
2.2.1 Reference 1
TITLE
4
AUTHOR
2.2.2 Reference 2
TITLE
AUTHOR
M. Zhong, F. Yang
Summary: This paper describes the design and implementation of an IoT-based system that
not only monitors but also forecasts air quality using machine learning algorithms. Integration
of environmental sensors with IoT devices that collect data analyzed using predictive analytics
to forecast pollution levels. Results indicate that the forecasting model can effectively predict
air quality levels with significant accuracy, providing a useful tool for urban planning and public
health management.
2.2.3 Reference 3
TITLE
Real-time Urban Air Quality Monitoring Using IoT and UAV Technologies
AUTHOR
A. Turner, B. Miller
Summary: Explores the combination of IoT sensors and unmanned aerial vehicles (UAVs)
for dynamic and spatially diverse air quality monitoring. UAVs equipped with sensors provide
a mobile monitoring platform that complements static IoT sensor stations, enabling data col-
lection from otherwise inaccessible areas. Enhanced monitoring flexibility and area coverage,
demonstrating an innovative approach to capturing real-time air quality data in various urban
environments.
5
2.2.4 Reference 4
TITLE
AUTHOR
P. K. Sharma, D. Chen
Summary: Discusses the deployment of a Raspberry Pi-based IoT system for monitoring air
quality with a focus on user accessibility and cost-effectiveness.Utilization of a Raspberry Pi
as a central controller to collect sensor data, which is then made available online for real-time
monitoring. The system proved to be an effective educational tool as well as a practical solution
for community-based air quality monitoring initiatives.
6
2.3 Objectives
1. The objective of our project develop an air quality monitoring app tool that is connected
to the data storage cloud and displays information.
2. The system aims to give structural information and trace of air pollution level at particular
monitoring station. The particular monitoring location (node) is connected to IoT/M2M
server via GSM network using GPRS feature and display on IoT/M2M application in web
form.
3. Air quality monitoring aims to protect public health, maintain environmental sustainabil-
ity, and ensure compliance with air quality regulations
7
Chapter 3
shows a single block diagram to represent the whole system the air quality monitoring system’s.
The MCU needs a 5V power supply to switch on. The NodeMCU is connected to the LM35
temperature sensor and the MQ-2 gas sensor, and the NodeMCU output pin is connected to the
communication network. The NodeMCU is programmed using the Arduino IDE in accordance
with the needs of the sensor unit. Through the use of the Blynk app and the NodeMCU, all
sensor data is sent to mobile apps. The buzzer will sound to alert people when the sensor
determines that the air in the area is contaminated.
8
3.2 Hardware components
1. ESP8266.
2. DHT11 SENSOR.
3. GAS SENSOR.
4. PRODUCT SPECIFICATIONS.
5. LCD DISPLAY.
6. I2C CONVERTER.
3.2.1 ESP8266
The ESP8266 is a system on a chip (SOC) Wi-Fi microchip for Internet of Things (IoT)
applications produced by Espressif Systems. Given its low cost, small size and adaptability
with embedded devices, the ESP8266 is now used extensively across IoT devices.
9
3.2.2 DHT11 SENSOR
DHT11 is a Humidity and Temperature Sensor, which generates calibrated digital output.
DHT11 can be interface with any microcontroller like Arduino, Raspberry Pi, etc. and get
instantaneous results. DHT11 is a low cost humidity and temperature sensor which provides
high reliability and long term stability.
The MQ-135 Gas sensor can detect gases like Ammonia (NH3),CO2, and other harmful
gases and smoke. Similar to other MQ series gas sensor, this sensor also has a digital and
analog output pin. When the level of these gases go beyond a threshold limit in the air the
digital pin goes high.
10
Figure 3.4: Gas sensor
3. Operating voltage 5v
11
3.2.5 LCD DISPLAY
This is a basic 16 character by 2 line Alphanumeric display. White text on Blue back-
ground. Utilizes the extremely common HD44780 parallel interface chipset . Interface
code is freely available. You will need Minimum 6 general I/O pins to interface to this
LCD screen. Includes LED backlight. Works in 4bit and 8 bit Mode.
12
Figure 3.7: I2C CONVERTERl
13
3.3.1 Simulation circuit
Source code
14
{
0 b00111 ,
0 b00101 ,
0 b00111 ,
0 b00000 ,
0 b00000 ,
0 b00000 ,
0 b00000 ,
0 b00000 } ;
c h a r auth [ ] = BLYNK AUTH TOKEN;
BlynkTimer t i m e r ;
i n t g a s = A0 ;
int sensorThreshold = 100;
#d e f i n e DHTPIN 2 // Connect Out p i n t o D4 i n NODE MCU
#d e f i n e DHTTYPE DHT11
DHT dht (DHTPIN, DHTTYPE) ;
WiFiClient c l i e n t ;
v o i d sendToThingSpeak ( f l o a t temperature , f l o a t humidity , i n t a i r Q u a l i t y )
{
i f ( c l i e n t . c o n n e c t ( s e r v e r , 8 0 ) ) // ” 1 8 4 . 1 0 6 . 1 5 3 . 1 4 9 ” o r a p i . t h i n g s p e a k . com
{
S t r i n g p o s t S t r = apiKey ;
p o s t S t r += ”&f i e l d 1=” ;
p o s t S t r += S t r i n g ( t e m p e r a t u r e ) ;
p o s t S t r += ”&f i e l d 2=” ;
p o s t S t r += S t r i n g ( humidity ) ;
p o s t S t r += ”&f i e l d 3=” ;
p o s t S t r += S t r i n g ( a i r Q u a l i t y ) ;
p o s t S t r += ” \ r \n\ r \n” ;
c l i e n t . p r i n t ( ”POST / update HTTP/ 1 . 1 \ n” ) ;
c l i e n t . p r i n t ( ” Host : a p i . t h i n g s p e a k . com\n” ) ;
c l i e n t . p r i n t ( ” Connection : c l o s e \n” ) ;
c l i e n t . p r i n t ( ”X−THINGSPEAKAPIKEY: ” + apiKey + ” \n” ) ;
c l i e n t . p r i n t ( ” Content−Type : a p p l i c a t i o n /x−www−form−u r l e n c o d e d \n” ) ;
c l i e n t . p r i n t ( ” Content−Length : ” ) ;
c l i e n t . print ( postStr . length () ) ;
c l i e n t . p r i n t ( ” \n\n” ) ;
c l i e n t . print ( postStr ) ;
S e r i a l . p r i n t ( ” Temperature : ” ) ;
S e r i a l . p r i n t ( temperature ) ;
S e r i a l . p r i n t ( ” d e g r e e s C e l s i u s , Humidity : ” ) ;
S e r i a l . p r i n t ( humidity ) ;
S e r i a l . p r i n t ( ”%, Air Q u a l i t y : ” ) ;
15
Serial . print ( airQuality ) ;
S e r i a l . p r i n t l n ( ” PPM. Sent t o ThingSpeak . ” ) ;
}
c l i e n t . stop () ;
}
void sendSensor ( )
{
f l o a t h = dht . readHumidity ( ) ;
f l o a t t = dht . readTemperature ( ) ;
i n t a n a l o g S e n s o r = analogRead ( g a s ) ;
Blynk . v i r t u a l W r i t e (V2 , a n a l o g S e n s o r ) ;
Blynk . v i r t u a l W r i t e (V0 , t ) ;
Blynk . v i r t u a l W r i t e (V1 , h ) ;
S e r i a l . p r i n t ( ”Gas Value : ” ) ;
S e r i a l . println ( analogSensor ) ;
S e r i a l . p r i n t ( ” Temperature : ” ) ;
Serial . print ( t ) ;
Serial . print (” Humidity : ” ) ;
Serial . println (h) ;
// Send data t o ThingSpeak
sendToThingSpeak ( t , h , a n a l o g S e n s o r ) ;
}
void setup ( )
{
S e r i a l . begin (115200) ;
Blynk . b e g i n ( auth , s s i d , p a s s ) ;
dht . b e g i n ( ) ;
t i m e r . s e t I n t e r v a l ( 2 0 0 0L , s e n d S e n s o r ) ;
lcd . begin () ;
lcd . createChar (1 , degree symbol ) ;
lcd . setCursor (3 , 0) ;
l c d . p r i n t ( ” Air Q u a l i t y ” ) ;
lcd . setCursor (3 , 1) ;
lcd . p r i n t ( ” Monitoring ” ) ;
delay (1000) ;
lcd . clear () ;
S e r i a l . p r i n t l n ( ” Connecting t o WiFi . . . ” ) ;
WiFi . b e g i n ( s s i d , p a s s ) ;
w h i l e ( WiFi . s t a t u s ( ) != WL CONNECTED)
{
delay (500) ;
Serial . print (” . ”) ;
16
}
S e r i a l . p r i n t l n ( ”” ) ;
S e r i a l . p r i n t l n ( ”WiFi c o n n e c t e d ” ) ;
}
void loop ( )
{
Blynk . run ( ) ;
t i m e r . run ( ) ;
f l o a t h = dht . readHumidity ( ) ;
f l o a t t = dht . readTemperature ( ) ;
i n t ga sValu e = analogRead ( g a s ) ;
lcd . setCursor (0 , 0) ;
l c d . p r i n t ( ” Temperature ” ) ;
lcd . setCursor (0 , 1) ;
lcd . print ( t ) ;
lcd . setCursor (6 , 1) ;
lcd . write (1) ;
lcd . setCursor (7 , 1) ;
l c d . p r i n t ( ”C” ) ;
delay (1000) ;
lcd . clear () ;
lcd . setCursor (0 , 0) ;
l c d . p r i n t ( ” Humidity ” ) ;
lcd . print (h) ;
l c d . p r i n t ( ”%” ) ;
delay (1000) ;
lcd . clear () ;
i f ( g asVal ue < 1 2 0 )
{
lcd . setCursor (0 , 0) ;
l c d . p r i n t ( ”Gas Value : ” ) ;
l c d . p r i n t ( gas Value ) ;
lcd . setCursor (0 , 1) ;
l c d . p r i n t ( ” Fresh Air ” ) ;
S e r i a l . p r i n t l n ( ” Fresh Air ” ) ;
delay (1000) ;
lcd . clear () ;
}
17
3.3.2 Blynk application output
18
3.3.3 WORKING MODEL
(a) Connect the MQ135 sensor to the ESP8266’s analog input pin. This sensor will
provide analog readings representing the air quality. Connect the DHT11 sensor to
the ESP8266’s digital pins. This sensor will provide digital readings for temperature
and humidity. Connect the LCD display and the I2C converter to the ESP8266. The
I2C converter enables communication between the ESP8266 and the LCD display
using the I2C protocol.Power up the ESP8266 and ensure all connections are properly
made
(b) Write code for the ESP8266 to read analog data from the MQ135 sensor and digital
data from the DHT11 sensor. Calibrate the MQ135 sensor readings to convert them
into meaningful air quality measurements (e.g., parts per million of pollutants). Read
temperature and humidity data from the DHT11 sensor. Use the Blynk library
to integrate the ESP8266 with the Blynk platform. This involves generating an
authentication token from the Blynk website and including it in your code. Set up
virtual pins in the Blynk app to receive data from the ESP8266. Send sensor readings
19
(air quality, temperature, and humidity) to the corresponding virtual pins using the
Blynk library.
(c) Create a new project in the Blynk app and add widgets (e.g., Value Display, Graph)
corresponding to the virtual pins set up in the code. Associate each widget with its
corresponding virtual pin. Customize the appearance and behavior of the widgets to
display the sensor readings in a user-friendly format. Once the project is configured,
deploy it in the Blynk app. Data Visualization and Monitoring: Open the Blynk
app on your smartphone or tablet. Select the project you created and deployed. You
should see real-time readings of air quality, temperature, and humidity displayed on
the widgets in the app. Blynk also allows you to set up notifications or alerts based on
predefined thresholds for each parameter. For example, you can receive a notification
if the air quality exceeds a certain level.
(d) With the Blynk app, you can remotely monitor the air quality in your environment
from anywhere with an internet connection. Additionally, you can control other
devices or systems based on the sensor readings. For example, you could activate an
air purifier if the air quality deteriorates beyond a certain threshold.
20
3.7.1 Advantages
i. Sure, here are some different perspectives on the advantages of IoT-based air
quality monitoring systems:
: Identifies pollution sources for targeted interventions, promoting conservation
of natural resources.
ii. Public Health: Enables effective health impact assessment, preventing diseases
and reducing healthcare costs.
iii. Economic: Cost-effective solutions drive economic development and productivity
gains.
iv. Technological: Drives innovation in sensor tech and integrates with smart city
systems for efficient resource management.
v. Policy Governance: Supports evidence-based policymaking, promotes trans-
parency, and empowers communities.
vi. Community Engagement: Engages citizens in monitoring efforts, fostering aware-
ness and social cohesion.
3.7.2 Disadvantages
21
Chapter 4
The air quality monitoring device was placed in four distinct settings for data collec-
tion: a village, a city, an industrial region, and an area with open burning or haze.
The city area is situated in a high-density area surrounding the Klang Valley, while
the village area is close to Kampung Sungai Pusu, Gombak, Selangor. The Gombak
industrial area is the location of the chosen industrial district. Garbage burning op-
erations were strategically placed in the Gombak area to collect reading data from
open burning scenarios. Every five minutes during the day, from 10:00 am to 2:00
pm, data was collected. The chosen time frame was chosen due to a variety of ac-
tivities, including grilling and gas stove cookery food, industrial operations, driving
automobiles for transit, and burning trash were all actively carried out by each person
under the four previously mentioned circumstances. After being recognized by the
sensor, the data is transferred straight to the user through a connected internet line
and shown on the LCD. Through the developed Blynk App, users receive information
regarding the state of the air quality. An LCD module that presents the data reading
obtained from the MQ-2 sensor is demonstrated in Figure 5. Users of the Blynk apps
will receive a notification when there is poor air quality, guiding them to take the
appropriate safety measures.
Average AQI reading of the LCD module at four different locations. The four levels
of the air quality stage are classified according to the gas density of a given area.
According to the World Environmental Protection Agency, AQI levels are described
as; Normal, AQI 50, moderate, 51 AQI 100, unhealthy 101 AQI 1500, and
dangerous AQI 151. Potential health effects are listed next to the corresponding AQI
reading. Users can monitor air quality remotely using any mobile app with Blynk
apps.Data collected from sensors used in the air quality monitoring system. The
average AQI level is displayed for four different environments, where it can indicate
different AQI conditions. A graphical user interface (GUI) screen will direct the
Blynk application when the MQ-2 gas sensor has detected gases in the environment.
22
4.0.1 SPECIFIED RATING OF COMPONENTS
(a) ESP8266: Voltage: 3.3V Wi-Fi: IEEE 802.11 b/g/n Flash: 512KB - 16MB GPIO: 11
digital, 1 analog Current: 170 mA during transmission
(b) DHT11 Sensor: Voltage: 3V - 5.5V Temp Range: 0°C - 50°C Humidity Range: 20Ac-
curacy: ±2°C (temp), ±5Response Time: ¡5 seconds
(c) Gas Sensor: Voltage: 5V Sensing: Specific to gas type Warm-up Time: 1-2 minutes
Sensing Time: ¡10 seconds
(d) LCD Display: Voltage: 5V Type: Character or graphical LCD Size: Typically 16x2
or 20x4 Backlight: LED Interface: Parallel or I2C/SPI
(e) I2C Converter: Voltage: 3.3V or 5V Bus Speed: Standard (100 kHz) or fast (400 kHz)
Channels: Single or multiple Interface: Serial to I2C conversion
23
Chapter 5
CONCLUSION
The development of Blynk IoT platform for air quality monitoring systems using Ar-
duino Uno is presented. To demonstrate the air quality monitoring system, the implemen-
tation of the system was done through testing. Some valuable achievements have been
achieved by the air quality monitoring system, the development of IoT-based systems that
use mobile applications to deliver alerts or notifications depending on the concentration
and temperatures of air gases, the reliability and durability of the sensors used in the ex-
tended system. allows the user to easily install the platform in various suitable monitoring
environments, and the NodeMCU is the key component of the project, and uses the whole
monitoring system with WiFi and LCD to display data in real time.In the future, the air
quality monitoring systems can be improved by integrating IoT with artificial intelligence,
in which case the system can be realized in an automated way. In addition, the device
system can be improved in the future by connecting it to an automatic ventilation system,
where the system can be activated when it detects polluted air in the environment.
24
Chapter 6
FUTURE SCOPE
25
Chapter 7
REFERENCES
26