Major Project Final Submission
Major Project Final Submission
Major Project Final Submission
of
This is to certify that the project report entitled “Monitoring and analysis of ambient air pollutant”,
The work embodied in this report has not formed earlier for the basis of the award India in the faculty
of Civil Engineering in partial fulfillment of the requirements for the award of ‘Bachelor of
Technology’ in ‘Civil Engineering’. This is the result of the original work and contribution under
supervision and guidance of Dr. Rashmita Srinivasan of any degree or compatible certificate or similar
title of this for any other diploma /examining body or university to the best of knowledge and belief.
Submitted by
This is to certify that the mini project report entitled “Monitoring and analysis of Ambient Air
Babasaheb Ambedkar Marathwada University, Aurangabad, Maharashtra State, India in the faculty of
Civil Engineering in partial fulfillment of the requirements for the award of ‘Bachelor of Technology’
in ‘Civil Engineering’.
This is the result of the original work and contribution under my supervision and guidance. The work
embodied in this report has not formed earlier for the basis of the award of any degree or compatible
certificate or similar title of this for any other diploma examining body or university to the best of
Submitted by
Asst. Prof. Ashwin Chavan Dr. Rashmita Srinivasan Dr. Santosh Bhosale
The following Students have done the appropriate work for the award of Bachelor of Technology in
Name of Student:
Guide
Date :- _________
I am very happy for the completion of this mini project. I would like to express my special thanks to
our guide Asst. Prof. Ashwin Chavan, who gave us the golden opportunity to do this wonderful mini
project and his valuable guidance and constant support with all necessary help in our work. I am also
thankful to all my teachers and college staff who have helped us to complete this mini project.
We are grateful to Dr. Rashmita Srinivasan. Head of the department Civil engineering for giving the
support and encouragement that was necessary for completion of the mini project.
Secondly, I would also like to thank my parents who helped a lot by encouraging me to give thanks
again to all my friends, my group members and those who directly or indirectly helped me during this
project.
Nowadays air pollution has turned out to be one of the significant issues because of the
increase in the quantity of vehicles and during the time spent industrialization and
urbanization. This expansion in the level of contamination brings about destructive
consequences for prosperity. This project explains the depiction and execution of an Air
Pollution detection system. The innovation grasped here, is a hands-on execution of the idea
of Internet of Things. This detailed work is an exploration of the possibilities of consumption
of this innovation, in this world, where natural well-being is turning into a genuine risk. The
work is actualized utilizing the microcontroller board of Arduino. In this project I am going
to make an IoT based Air Pollution Detection Monitoring System in which I will monitor the
Air Quality over a web server using ESP8266 Wi-Fi device and will a trigger alarm when the
air quality goes down a certain level means when there is amount of harmful gases is present
in the air like CO2. It will show the air quality in PPM (Parts Per Million) as like “Fresh Air”,
“Poor Air”, “Danger Air” on LCD and webpage so that I can monitor it very easily.
TABLE OF CONTENTS
Page
Certificate by student ii
certificate iii
mini project approval sheet iv
List of Tables and Figures v
List of Abbreviations vi
Acknowledgements vii
Abstract viii
Chapter 1 Introduction and Background 1
1.1 Introduction 1
1.2 Purpose of the Project
2 1.3 Objectives of Monitoring Air Quality 2
1.4 Air Quality Parameters 3
The air quality monitoring program design dependent upon the monitoring specific objectives
specified for the air quality management in the selected area of interest. Defining the output
influence, the design of the network and optimize the resources used for monitoring. It also
ensures that the network is specially designed to optimize the information on the problems at
hand. There might be different objectives for the development of the environmental
monitoring and surveillance system. Normally, the system has to provide on-line data and
information transfer with a direct /automatically/ on-line quality control of the collected data.
Several monitors, sensors and data collection systems to be applied to make on-line data
handover and control likely. The main objectives stated for the development of an air quality
measurement and surveillance program might be to facilitate the background concentration(s)
measurements, monitor current levels as a baseline for assessment, check the air quality
relative to standards or limit values, detect the importance of individual sources, enable
comparison of the air quality data from different areas and countries, collect data for the air
quality management, traffic and land-use planning purposes, observe trends (related to
emissions), develop abatement strategies, determine the exposure and assess the effects of air
pollution on health, vegetation
or building materials, inform the public about the air quality and raise the awareness, develop
warning systems for the prevention of undesired air pollution episodes, facilitate the source
apportionment and identification, supply data for research investigations, develop/validate
management tools (such as models), develop and test analytical instruments and to support
legislation in relation to the air quality limit values and guidelines. The relationships between
the data collected and the information to be derived from them must be taken into account
when a monitoring program is planned, executed and reported. This emphasizes the need for
users and potential users of the data to be involved in planning surveys, not only to ensure
that the surveys are appropriate to their needs but also to justify committing the resources.
Sulphur Dioxide (SO2) - Sulphur Dioxide is a colorless gas, detectable by the distinct odor
and taste. Like CO2, it is mainly due to fossil fuels boiling and to manufacturing processes. In
high attentions may cause breathing problems, especially in sensitive groups, like asthmatics.
It contributes to acid rains.
Nitrogen Dioxide (NO2) – Nitrogen Dioxide is a brownish gas, easily detectable for its odor,
very corrosive and highly oxidant. It is produced as the result of fossil fuels burning.
Frequently NO terrified to the atmosphere is converted in NO2 by chemical processes. In high
absorptions, NO2 may principal to respiratory problems. Like SO2, it contributes to acid rains.
Smoke - About 1 million people are in custom of tobacco smoking globally of which
majority population is from rising countries. Every year nearly 4.9 million people expired due
to smoking allow to 2007 report. In addition, second hand smoke is serious threat to the
health of people of all age’s causes 41000 deaths each year.
LPG - Liquefied petroleum gas (LPG) is an odorless and colorless liquid which evaporates
readily into a gas. Leakage is generally noticed by adding an odorant into it. It is considered
under the category of highly flammable gases and it can be classified as a carcinogen and
mutagen if Butadiene content is more than 0.1%. LPG may escape in the form of a gas or a
fluid. If it escapes in the form of a liquid, it vanishes quickly and will eventually form large
cloud of gas in air, which is relatively thicker than air thus drops to the ground. Whereas,
LPG vapors travel along the ground for a long distance and gets collected in drains or
basements. Gas principals to burn or detonate after getting in touch with a source of ignition.
Temperature and humidity- Quantity of temperature is an important for safety of people and
affects our life skills. Greenhouse outcome can be observed by measuring temperature and
comparing temperature changes from historical to present time especially since the industrial
revolution using climate data. Humidity is a type of gas that guards us from UV rays from the
sun and helps trick heat on Earth, thereby making the climate on Earth, a pleasant one for
living. However, as humidity increases, the warmth on Earth also increases which makes our
life uncomfortable. Humidity is essential for various storage and food processing facilities.
Air is one of the most basic and important elements for human being to survive. Clean and
Sound air is the key to a good and healthy life. But now days in city life it has become the
most threatened factor. Pollution of air has become the most concerned and affected issue
now for us. A diversity of air pollutants has known or suspected injurious effects on human
health and the atmosphere. In most areas, these toxins are principally the products of
combustion from space warming, power generation or from motor vehicle traffic flow.
Pollutants from these sources may not only prove a problem in the immediate locality of
these sources but can travel long distances. Generally, if someone is young and in a good
state of health, moderate air pollution levels are unlikely to have any serious short term
effects. However, higher levels and long term exposure to air pollution can lead to more
serious symptoms and conditions causing human health. This not only affects the respiratory
and inflammatory response systems, but can also lead to more serious conditions such as
heart disease and cancer. People with lung or heart situations to be more vulnerable to the
effects of air pollution. Air pollution has also been recognized by doctors as one of the
world’s greatest 10 killers seeing some 29,000 premature deaths in UK and 430,000
worldwide in one year. Air pollution can cause both short term and long term effects on
health and many people are concerned about pollution in the air that they breathe. These
people may include:
● People with heart or lung situations, or other breathing problems, whose health to be
exaggerated by air pollution.
● Parents, careers and healthcare professionals who look after someone whose health is
sensitive to pollution.
● People who want to know more about air pollution, its causes, and what they can do
to help reduce it.
Monitoring air quality is essential for local authorities as well as for major public and private
industries to understand and prevent air pollution and measure emission sources, in order to
reserve health and donate to the fight against the greenhouse influence. Industrial operatives
use air quality monitoring apparatus to cost effectively monitor and manage emanations on
their perimeter, which helps them recover relationships with controllers and communities.
With air quality rule shifting the burden from publicly funded monitoring to observing funded
by industry, it has been progressively important for businesses to obtain their individual
quality monitoring equipment. To get the best results from the environment about the
pollution level of air, toxicity and harmfulness for human, air quality monitoring device is
vastly used. An air quality monitor is an expedient that actions the level of common air
toxins. Displays are available for both indoor and outdoor locations. Indoor air quality
monitors are naturally sensor based tools. Some of them are able to quantity ppb levels and
come as either varied gas or moveable units. Sensor based tools and air quality monitoring
systems are used widely in outdoor ambient claims.
1.6.2 Beneficiaries
1. Society People
2. Special Care Units in the hospitals
3. Urban and Rural planning sector and green building management system
1.7 SWOT Analysis
Most of the time we see that the use of Arduino techniques for doing business add value
either by the reducing transaction cost or by creating some type of network effect, or by a
combination of both. In SWOT analysis, the acronym is short for Strengths, Weaknesses,
Opportunities and Threats; here we try to find out the strengths and weaknesses of our project
in respect of Arduino technology. Then I try to recognize opportunities presented by that
environment and the threats posed by that environment. As shown in the following, figure
which shows the questions that an analyst would ask in conducting a SWOT analysis.
Strength Weakness
Opportunity Thread
2.1 Introduction
This chapter reviews some of the past works in processing and understanding IoT based air
pollution detection monitoring system. Air pollution is not only natural medical matters
impact on creating nations alike. The strong effect of air pollution on wellbeing are extremely
mind blowing as there are a broad area of sources and their particular influence differ from
one another. The synthetic substances reason an assortment of mankind and natural medical
issues enlarge in air contamination impacts on condition also on human wellbeing. The
proposed framework unit incorporates an Arduino, MQ135 Gas sensor, LCD and ESP8266
Wi-Fi Device. Almost all the past and recent works in IoT based on methods that implement
these steps sequentially and independently.
Environment detection: IoT systems offer environmental and ecological, such as forest and
glacier, checking; disaster, such as volcanoes and seismic, monitoring; and factory
monitoring. All are automatic alarm systems using environmental parameters collected by
large number of sensors.
Remote medical monitoring: IoT analyze the recurring indicator data collected from the
device placed on patients’ body and provide the users with health trends and health advice.
Remote Controlling: IoT systems control IoT terminals and execute functions based on
application commands combined with information collected from things and service
requirements.
Appliance control: People remotely control operating status of appliances through IoT system.
Disaster recovery: Users remotely start disasters treatment facilities to minimize losses
caused by disasters according to the monitoring mentioned before.
Ad Hoc Networking: IoT system have rapidly self-organized networking capability and can
interoperate with the network/service layer to provide related services [7]. In the vehicle
network, in order to transfer the data, the network between vehicles and/or road
infrastructures rapidly self-organized.
Secure Communication: IoT system further establish secure data transmission channel
between the application or service platform and IoT terminals based on service requirements
Public and Operating: A general IoT architecture is organized to take over public IoT
applications with open operating competence. A public IoT system integrate multiple IoT
requests into one architecture.
Open, Scalable, and Flexible: An open IoT architecture with open resources, open standards,
and open interfaces easily extend its functionality and the scale of performance. It adapts to
different requirements including technical growths flexibly.
Resource and Administration Platform: Network and service layer includes backbone
networks and resource administration stages. The backbone network contains 3G, 4G,
internet, optical fiber network, Ethernet network, satellite networks, and private network. The
resource and
administration stage provides common capabilities which can be used by different IoT
applications, such as data processing, data storage, security management, and application
supporting. These abilities may also be invoked by specific IoT application support
capabilities, e.g., to build other specific IoT application support capabilities. This stage also
provides relevant control functions of network connectivity, such as access and transport
resource control functions, mobility management, or authentication, authorization, and
accounting for IoT terminals, services, applications, users, and developers.
Open Application Platform: Modularization design in this application stage provides common
function and open application programming interface (API). An IoT application provider
develop its application using these APIs. Meanwhile, this stage supports application
managements. Various applications can be obtainable to the application stage and users get
application information and subscribe applications through this platform. Suitable and easy
deployment, distribution, and flexible application environment are the characteristics of this
stage.
Technical Challenge: IoT technology to be complex for variety of reasons. First, there are
legacy heterogeneous architectures in the present networking technologies and applications,
e.g., different applications and environments need different networking technologies, and the
ranges as well as other features of cellular, wireless local area network, and RFID
technologies are much unlike from each other. Second, communication technologies,
including fixed and mobile communication systems, power stripe communications, wireless
communication, and short-range wireless communication technologies, for both fixed and
mobile devices, either simple or complicated, should be low cost and with reliable
connectivity. At last, there are thousands of unlike applications; it is in natural to have
different requirements on what parties need to communicate with each other, what kind of
security solutions are appropriate, and so on. To recap, complexity and alternative
technologies may introduce problems; unnecessary competition and deployment barriers in
markets may also introduce problems; systems and communication mechanisms with
needless dependencies may block the relocation of IoT systems to the most economic and
efficient stages. All the above may block IoT to join as many “Things” as possible.
Hardware Challenge: Smart devices with improved inter-device communication will lead to
smart systems with high degrees of intelligence. Its independence enables rapid deployment
of IoT applications and creation of new services. Therefore, hardware researches are focusing
on designing wireless recognizable systems with low size, low cost yet sufficient
functionality. As the bandwidth of IoT terminals could vary from kbps to mbps from sensing
simple value to video stream, supplies on hardware are diverging. However, two requirements
have been nevertheless the basics: one is the extremely low power consumption
other is ultra-low cost. Suppose the snoozing time over active time is one million, the escape
power of an IoT terminal at least be one million time less than that of active. It is so far
incredible when an IoT terminal is snoozing and receiving RF signals. It difficult when using
advanced CMOS silicon with relatively more leakage power. Hardware and protocol code sign
for snoozing has been thus the first hardware challenge of IoT. Billions of IoT terminals used;
the cost of an IoT terminal necessity be ultra-low. Though, so far, there is no low cost locating
solution for IoT, especially the positioning precision of a short-range IoT terminal must be high.
Low energetic power is also a contest for low-cost terminal. Traditionally, low cost equals to
lower presentation or longer process latency. Longer treating latency ends up to higher energy
consumption. As the range resource is very limited at the lower part in L band, IoT may use
higher RF such as the frequency bands higher than 5 GHz. The higher the RF, the more power
feasting from RF PA will be. In another way, not yet used very narrow spectrum band between
two used bands have to be used by future IoT. To use very narrow band with strong power
neighbors, the cost of passive component not be low and that will definitely be a potential
challenge in the future.
Privacy and Security Challenge: Compared with outdated networks, security and privacy
issues of IoT become more prominent. Much information includes privacy of users, so that
defense of privacy becomes an important security issues in IoT. Because of the mixtures of
things, services, and networks, security of IoT needs to cover more administration objects and
levels than traditional network security. Existing security architecture is intended from the
perception of human communication, may not be suitable and directly applied to IoT system.
Using existed security instruments block logical relationship between things in IoT. IoT needs
low- cost- and M2M-oriented technical solutions to assurance the privacy and the security. In
many use cases, the security of a system has been considered as a general feature. Related
research shall focus on privacy control. Low cost, low latency, and energy-efficient
cryptography algorithms and related supple hardware to be essential for sensor or device.
Standard Challenge: Standards play a significant role in forming IoT. A standard is important
to allow all actors to equally access and use. Developments and coordination of standards and
proposals promote efficient development of IoT infrastructures and applications, services,
and devices. In general, standards developed by cooperated multi parties, and information
models and protocols in the standards, shall be open. The standard development process shall
also be open to all participants, and the resulting standards publicly and freely available. In
today’s network world, global standards are naturally more relevant than any local
arrangements.
Business Challenge: For a mature application, its business model and request scenario are
clear and easy to be mapped into technical necessities. So the developers do not need to spend
much time on business-related aspects. But for IoT, there are too many potentials and
uncertainties in business models and application states. It is inefficient in terms of
business-technology alignment, and one solution not fit possibilities for all. The IoT is a
stimulating traditional business model. Although small-scale applications have been lucrative
in some industries, it is untenable when extended to other industries. In the early stage of IoT
development, business aspects should be careful to reduce the risk of failure.
Intelligent System: The IoT bring seamless business and social networking over fast reliable
and protected networks into our society. System intelligence important for the development of
IoT and the key point context awareness and inter-things information exchange. Therefore,
increasing and familiarizing the intelligence at the device level will be a focus of research,
such as the integration of sensors and actuators, high efficiency, multi standard and adaptive
communication subsystems, and adaptable antennae. Intelligences can be presented using
micro control unit (MCU) on upper layers. However, physical layer so far has been far behind
the mandatory intelligent level, for example, to adapt IoT devices under different radio
infrastructures. Four parts in physical layer must be further advanced to adapt to and/or to
form an intelligent IoT device, which are as follows. Programmable baseband processor used
to adapt to different modulation algorithms, different error correction algorithms, different
channel bandwidths, and diverse channel scenarios. Software-controlled RF essential for
transceiver to adapt to the local radio frequency necessities. Fully digital RF PA the
indispensable device to consume less low power and offer programmability for PA to adapt
radio transmission requirements. Finally, controllable integrated passive components an
essential glue to connect intelligent semiconductor components into a sensor node with low
cost, low size, and low power.
2.6 Conclusion
3.1 Introduction
The paper aims at designing an air pollution monitoring system which can be installed in a
specific locality and to enhance the system from the previously developed systems beating
the earlier disadvantages by developing an android app available for the public. This app can
be used by anyone to get in live updates about the pollution in their region. It uses Arduino
integrated with individual gas sensors like carbon monoxide, ammonia along with particulate
matter, humidity, and smoke which measures the concentration of each gas separately. The
collected data is uploaded to the cloud using thing speak platform at regular time intervals.
Ethernet shield is used for connecting Arduino and cloud. Pictorial or graphical
representation of values can be shown in Thing speak The users can install an android
application through which they get the recent updates and graphical content up to date [6].
The average concentration of each gas is analyzed using matlab. Then certain time control is
assigned based on the standard level of each gas measured and the result can be viewed in
android application. The architecture of air pollution monitoring and awareness creation
system. The concentration level of each gas can be viewed both as a graph and in numerical
format. Based on these values the air quality index value is calculated and the nature of the
air quality in that area is determined which is also displayed through the app. Along with this,
the health effects for the corresponding air quality is displayed to create awareness among the
public. Additionally, they could also get to know the temperature and weather in that region.
The users will not get disturbed with irrelevant data as the values displayed are location
specific and help them stay tuned to the current status of air pollution.
3.2 Proposed System Architecture
Internet of Things (IoT) mainly deals with connecting smart devices to internet by joining the
advantage of OSI layered Architecture. In the context of this work we propose a cluster of Air
Quality Monitoring Gas Sensor MQ135 motes, which are used to measure the concentration
of Air pollutants in the air. The Gas Sensors MQ135 is interface with a tiny entrenched
platform equipped with other [7]. We have mainly used the Arduino UNO which is an open
source development boards with ESP8266-12E chips. MQ135 Gas Sensor is used to collect
gas concentration measurements. This sensor data would be captured and sent to the Arduino
UNO for IoT (Internet of Things) based data acquirement.
Connect pin VCC to the 5V of the Arduino; Connect pin GND to the GND of the Arduino;
Connect pin RS to the pin 12 of the Arduino; Connect pin RW & GND (Read/Write) to used
Jumper pin; Connect pin E to the pin 11 of the Arduino; The following four pins are data pins
which are used to communicate with the Arduino; Connect pin D4 to pin 5 of Arduino;
Connect pin D5 to pin 4 of Arduino; Connect pin D6 to pin 3 of Arduino; Connect pin D7 to
pin 2 of Arduino.
I have connected the MQ135 gas sensor and ESP8266 Wi-Fi device with the Arduino.
Connected the VCC and the ground pin of the sensor to the 5V and ground of the Arduino
and the Analog pin of sensor to the A0 of the Arduino. Connected a buzzer to the pin 7 of the
Arduino which is start to beep when the condition becomes true. The MQ135 sensor can
sense NH3, NOx, alcohol, Benzene, smoke, CO2 and some other gases, so it is faultless gas
sensor for our Air Quality Observing Detection Project. When I connect it to Arduino then it
senses the gases, and I get the Pollution level in PPM (parts per million). MQ135 gas sensor
gives the output in form of voltage levels and I need to convert it into PPM. Sensor is giving
us value of
0.1 when there is no gas near it and the safe level of air quality is 0.5 PPM and it is not
exceeding 0.5 PPM. When it exceeds the limit of 0.5 PPM, then it starts cause Headaches,
sleepiness and stagnant, stale, stuffy air and if exceeds beyond 1 PPM then it can cause
increased heart rate and many other diseases [10]. When the value is being less than 0.5 PPM,
then the LCD and serial monitor is displayed “Fresh Air”. Whenever the value is increased
0.5
PPM, then serial monitor is displayed “Poor Air, Open Windows”. If it is increased 1 PPM,
then the buzzer is kept beeping and the LCD is displayed “Danger! Move to fresh Air”. After
uploading the code, I am connected to the Wi-Fi of my ESP8266 device, the serial monitor
has opened and it is showing the IP address like shown below (192.168.43.57). If I have
typed mentioned IP address in my browser, it is shown the output as below. I have to refresh
the page again if I want to see the current Air Quality Value in PPM. After uploading code,
the value is being less than 0.5 PPM, then the LCD and Web Browser is displayed “Fresh
Air”. After uploading code, the value is increased 0.5 PPM, then the LCD and web browser
are displayed “Poor Air, Open Windows”. After uploading code, When the value is increased
1.00 PPM then the buzzer is kept beeping and the LCD and Web Browser are displayed
“Danger! Move to fresh Air”.
i. Arduino Uno
ii. Gas sensor MQ135
iii. ESP8266 Wi-Fi Device
iv. 16x2 LCD
v. Buzzer
vi. 0.5m Arduino A-B Cable
vii. Jumper wire
This Module makes use of the MQ-135 air quality detector and hazardous gas detector chip.
Other circuit components such as the LM393 analog comparator chip on this module makes it
easy to integrate this module into a project that can detect hazardous gases. The Module
requires a 5V power supply and provides a digital Logic output (1 or 0) and an analog level
output (0-4V). The digital logic output is LOW (0) when no gas is detected but goes HIGH
(1) when hazardous gas concentration in the environment reaches the set threshold set via a
potentiometer on the module. The analog level output provides an output voltage within the
range of 0 to 4V based on the concentration of the hazardous gas in the environment; 0V for
lowest concentration, 4V for maximum concentration. You can use it detects hazardous gases
such as Ammonia, Nitrogen Oxide, Alcohol, Benzene, Smoke (Carbon Monoxide), Carbon
Dioxide and other air contaminants in our DIY project. The MQ-135 device on this module
uses a heating element. After initial power ON, please wait at least 20 Seconds before reading
outputs to ensure data validity. The Sensitive material used in MQ135 gas sensor is SnO2.
The conductivity of this material is lower in clean air. The sensor conductivity increases with
the increasing concentration of target pollution gas. MQ135 can monitor different kinds of
toxic gases such as sulphide, ammonia gas, benzene series steam and CO2. The detection
range is 10-10,000 ppm with the voltage rate of about 5.0V±0.1V AC or DC The important
features are long life span, low cost, simple driver circuit and good sensitivity to toxic gases.
MQ 135 gas sensor is widely used in industrial gas alarm, portable gas detector and domestic
gas alarm as shown in Fig.6. MQ-135 is used in this framework for monitoring CO2 in air.
The amount of CO2 present in the atmosphere is 400.7 ppm according to which the sensor is
calibrated.
3.6.4 Buzzer
Buzzer is also known as Piezo Speakers (buzzers). You want to generate sound in our project
you can use this simple magnetic buzzer. This is the same buzzer we have used in our
development boards. This one generates a continuous beep usually when supplied with power
but you can generate any tone as you wish by interfacing it with a microcontroller with
proper coding.
MQ135 Sensor and Speaker is connected with the Arduino; VCC pin is connected to the pin
5 v of the Arduino; GND pin is connected to the GND of the Arduino; AO is connected to the
A0 of the Arduino; The pin of speaker is connected to the GND & the pin 7 of the Arduino;
LCD is connected with Arduino; VCC & GND pin is connected to the 5 V & GND of the
Arduino; RS pin is connected to the Arduino pin 12; E pin is connected to the Arduino pin
11; D4, D5, D6 & D7 pin are connected to the Arduino pin 05, 04, 03 & 02
1. First I need to test the Wi-Fi module by sending AT command, it revert back a
response containing OK.
1 = Station mode
(client) 2 = AP mode
(host)
3. Now I need to disconnect my Wi-Fi module from the previously connected Wi-Fi
network, by using the command AT+CWQAP, as ESP8266 is default auto connected with
any previously available Wi-Fi network
4. After that, user can reset the module with AT+RST command. This step is optional.
command: AT+CIFSR
It returns an IP Address.
7. Now enable the multiplex mode by using AT+CIPMUX=1 (1 for multiple connection
and 0 for single connection)Now configure ESP8266 as server by using AT+CIPSERVER=1,
port_no (port may be 80). Now your Wi-Fi is ready. Here ‘1’ is used to create the server and
‘0’ to delete the server.
8. Now by using given command user can send data to local created
9. After sending ID and Length to the server, I need to send data like:
Serial.println(“mursil.seip@gmail.com”);
command: AT+CIPCLOSE=0
11. Now type IP Address in Address Bar in web browser and hit enter. Now user can see
transmitted data on webpage.
// //
//Include Software Serial Library for allow serial communication on PIN no. and declare some
variables and strings.
#include<SoftwareSerial.h>
SoftwareSerial client(2,3); //RX, TX
String webpage="";
int i=0,k=0;
String
readString; int
x=0;
boolean
No_IP=false;
String IP="";
char temp1='0';
//After this, I have to define some functions for performing my desired tasks.
In Setup () function, I initialize inbuilt serial UART communication for ESP8266 as
client. begin (9600); at the baud rate of 9600.
void setup ()
{
Serial.begin(9600);
client.begin(9600);
wifi_init ();
Serial.println("System Ready...");
}
//In wifi_init () function, I initialize the Wi-Fi module by sending some commands like reset,
set mode, connect to router, configure connection etc. These commands have also been
explained above in description part.
void wifi_init ()
{
connect_wifi("AT",100);
connect_wifi("AT+CWMODE=3",100);
connect_wifi("AT+CWQAP",100);
connect_wifi("AT+RST",5000);
//In connect_wifi() function, I send commands data to ESP8266 and then read response from
ESP8266 Wi-Fi module.
void connect_wifi(String cmd, int t)
{
int temp=0,i=0;
while(1)
{
Serial.println(cmd);
//sendwebdata( ) function is used for sending data to Local Server or Webpage.
void sendwebdata(String webPage)
{
int ii=0;
while(1)
{
unsigned int l=webPage.length();
Serial.print("AT+CIPSEND=0,");
client.print("AT+CIPSEND=0,");
//void send() function is used for sending data strings to sendwebdata() function. That it is further
sent to webpage.
void Send()
{
webpage = "<h1>Welcome to IoT based Air Pollution Detection Monitoring
System</h1><body bgcolor=f0f0f0>";
sendwebdata(webpage);
webpage=name;
webpage+=dat;
//get_ip() function is used for getting IP address of Local created server.
//In void loop () function, I send instruction to user for refreshing the page and check whether
the server is connected of not. When user refresh or request the webpage, data automatically
transmitted to the same IP address [14].
void loop()
{
k=0;
Serial.println("Please Refresh your Page");
while(k<1000)
4.2 Result
The MQ135 sensor can sense CO2 and some other gases, so it is perfect gas sensor for my
Air Quality Monitoring Detection System Project. When I connect it to Arduino then it
senses the gases, and I get the Pollution level in PPM (parts per million). MQ135 gas sensor
gives the output in form of voltage levels and I need to convert it into PPM [15]. So for
converting the output in PPM. Sensor is giving me value of 0.1 when there was no gas near it
and the safe level of air quality is 0.5 PPM and it is not exceeding 0.5 PPM. When it exceeds
the limit of
0.5 PPM, then it starts cause Headaches, sleepiness and stagnant, stale, stuffy air and if
exceeds beyond PPM then it can cause increased heart rate and many other diseases. When
the value less than 0.5 PPM, then the LCD and webpage will display “Fresh Air”. Whenever
the value increase 0.5 PPM, then the LCD and webpage will display “Poor Air, Open
Windows”. If it increases 1 PPM, then the buzzer keeps beeping and the LCD and webpage
will display “Danger! Move to fresh Air”.
Type this IP address in your browser, it shows the output as shown below. I have to refresh
the page again if I want to see the current Air Quality Value in PPM. After uploading code
[16], When the value less than 0.5 PPM, then the LCD and Web Browser will display “Fresh
Air”.
when the value increase 0.5 PPM, then the LCD and web browser display “Poor Air, Open
Windows”.
when the value increase 1 PPM then the buzzer keeps beeping [17] and the LCD and Web Browser
display “Danger! Move to fresh Air”.
5.1 Conclusion
The system to monitor the air of environment using Arduino microcontroller, IoT Technology
is proposed to improve quality of air. With the use of IoT technology enhances the process of
monitoring various aspects of environment such as air quality monitoring issue proposed in
this paper. Here, using the MQ135 gives the sense of different type of dangerous gas and
Arduino is the heart of this project. Which control the entire process, Arduino module
connects the whole process to LCD and serial monitor is used for the visual Output.