Chapter 1: Introduction: Department of ECE, JNTUCEA
Chapter 1: Introduction: Department of ECE, JNTUCEA
CHAPTER 1: INTRODUCTION
1.1 Introduction
Increasing of air and sound pollution is the main growing issue these days. It is
necessary to monitor and keep it under control in order to save our health and
environment. Internet of Things (IoT) is getting popular day by day because it has
flexibility of storing and accessing the information over cloud and with low cost.
Increasing of urbanization and vehicles use on road atmospheric conditions have
considerably affected harmful effects of pollution include mild allergic reactions such
as irritation of throat, eyes, ears and nose as well as some serious problems like heart
diseases, pneumonia, lung and asthma. Here we propose an air quality as well as sound
pollution monitoring system that allows us to monitor and check live air quality as
well as sound pollution in an area through IoT. This system uses air quality and sound
sensors to sense presence of harmful gases/compounds in the air and sound levels in
the surrounding areas and constantly transmit this data. Also, system keeps measuring
sound level and reports it.
In[1] In this project we are going to make an IoT Based Air Pollution Monitoring
System in which we will monitor the Air Quality over a web server using internet and
will trigger a alarm when the air quality goes down beyond a certain level, means
when there are sufficient amount of harmful gases are present in the air like CO2,
smoke, alcohol, benzene and NH3. It will show the air quality in PPM on the LCD and
as well as on webpage so that we can monitor it very easily. Previously we have built
the LPG detector using MQ6 sensor and Smoke detector using MQ2 sensor but this
time we have used MQ135 sensor which is the best choice for monitoring Air Quality
as it can detects most harmful gases and can measure their amount accurately. In this
IoT project, you can monitor the pollution level from anywhere using your computer
or mobile. We can install this system anywhere and can also trigger some device
when pollution goes beyond some level, like we can switch on the Exhaust fan or can
send alert SMS/mail to the user.
In[2]The level of pollution has increased with times by lot of factors like the
In[3]The level of pollution has increased with times by lot of factors like the
increase in population, increased vehicle use, industrialization and urbanization which
results in harmful effects on human wellbeing by directly affecting health of
population exposed to it. In IOT Based Air Pollution Monitoring System the Air
Quality is measured over a web server using internet and will trigger a alarm when
the air quality goes down beyond a certain level, means when there are sufficient
amount of harmful gases are present in the air like CO2, smoke ,alcohol, benzene and
NH3.It will show the air quality in PPM on the LCD and as well as on webpage so
that we can monitor it very easily.MQ135 sensor which is the best choice for
monitoring Air Quality as it can detects most harmful gases and can measure their
amount accurately. The pollution level can be monitored anywhere using computer or
mobile. Install this system anywhere and can also trigger some device when pollution
goes beyond some level, like it can switch on the Exhaust fan or can send alert.
In[4] Air and sound pollution is growing issue these days. It is necessary to
monitor air quality for a better future and healthy living for all. In this paper, we
propose an air quality as well as sound pollution monitoring system that allows us to
monitor and check live air quality as well as sound pollution in particular area
through IoT. It uses air sensors to sense the harmful gases like NH3, Benzene, smoke
and CO2. Also system keeps measuring sound level and reports it to the online server
over IoT. The main aim of the paper is to monitor air pollution in different areas and
we can keep a watch on noise pollution.
In[5] In order to monitor the various toxic gases in the atmosphere we are going to
make an IOT Based Air Pollution Monitoring System in which we will monitor the
Air Quality over a web server using internet and will trigger a alarm when the air
quality goes down beyond a certain level, means when there are sufficient amount of
harmful gases are present in the air like CO2, smoke, alcohol, benzene and NH3. The
level of pollution has increased with times by lot of factors like the increase in
population, increased vehicle use, industrialization and urbanization which results in
harmful effects on human wellbeing by directly affecting health of population
exposed to it. It will show the air quality in PPM on the LCD and as well as on
webpage so that we can monitor it very easily. In this IOT project, you can monitor
the pollution level from anywhere using your computer or mobile.
In[6] The pollution of air and sound is increasing abruptly. To bring it under
control its monitoring is majorly recommended. To overcome this issue, we are
introducing a system through which the level of sound and the existence of the
harmful gases in the surroundings can be detected. The growing pollution at such an
alarming rate has started creating trouble for the living beings, may it be high decibels
or toxic gases present in the environment leaves a harmful effect on human’s health
and thus needs a special attention. This monitored data can be obtained from remote
location without actually visiting it due to the access of internet. The framework of
this monitoring system is based on combination or collaboration of affective
distributed sensing units and information system for data composition. The role of
IoT is the new concept used in air and sound pollution measurement, which allows
data access from remote locations.
the hazardous impacts from air and sound pollution. To monitor the quality of air and
sound levels, a new framework is proposed that monitors the parameters of the
environment around us such as CO, CO2, NH3 and CH4. Pollution monitoring system
used to measure the amount of pollution level in our environment. By measuring those
values awareness can be created among public to control them.
Chapter4: Results and Discussion: In this Chapter, we have discussed about the
experimental model and working procedure of the system.
Chapter 5: Conclusion: In this Chapter, Conclusion and future scope of the project
are discussed.
2.1 Introduction
In this Chapter we have discussed about the components used for implementing
this project. The development board we have used for this project is NODEMCU
ESP8266. It is a cost-effective WiFi module that supports both TCP/IP and
microcontrollers. It runs at 3V with maximum voltage range around 3.6V. More often
than not, it also comes under name ESP8266 Wireless Transceiver. In order to
monitor the quality of air in the atmosphere we have used MQ 135 sensor and to
monitor the sound levels we have used Sound sensor. All these parameters are
monitored using a virtual platform which will be discussed in upcoming chapters.
Specifications
Voltage : 3.3v.
RAM: 32K+80K.
Here is the complete List of MQSensors with their names and type of gases
measured.
The MQ-135 Gas sensors are used in air quality control equipment’s and are
suitable for detecting or measuring of NH3, NOx, Alcohol, Benzene, Smoke, CO2.
The MQ-135 sensor module comes with a Digital Pin which makes this sensor to
operate even without a microcontroller and that comes in handy when you are only
trying to detect one particular gas. If you need to measure the gases in PPM the
analog pin need to be used. The analog pin is TTL driven and works on 5V and so can
be used with most common microcontrollers. If you are looking for a sensor to detect
or measure common air quality gases such as CO2, Smoke, NH3, NOx, Alcohol,
Benzene then this sensor might be the right choice foryou.
You can either use the digital pin or the analog pin to do this. Simply power the
module with 5V and you should notice the power LED on the module to glow and
when no gas it detected the output LED will remain turned off meaning the digital
output pin will be 0V. Remember that these sensors have to be kept on for pre-heating
time (mentioned in features above) before you can actually work with it. Now,
introduce the sensor to the gas you want to detect and you should see the output LED
to go high along with the digital pin, if not use the potentiometer until the output gets
high. Now every time your sensor gets introduced to this gas at this particular
concentration the digital pin will go high (5V) else will remain low(0V). You can also
use the analog pin to achieve the same thing. Read the analog values (0-5V) using a
microcontroller, this value will be directly proportional to the concentration of the gas
to which the sensor detects. You can experiment with this values and check how the
sensor reacts to different concentration of gas and develop your program accordingly.
MQ-135 gas sensor applies SnO2 which has a higher resistance in the clear
air as a gas-sensing material. When there is an increase in polluting gases, the
resistance of the gas sensor decreases along with that. To measure PPM using MQ-
135 sensor we need to look into the (Rs/Ro) v/s PPM graph taken from the
MQ135datasheet.
The value of Ro is the value of resistance in fresh air (or the air
with we are comparing) and the value of Rs is the value of resistance in
Gas concentration. First you should calibrate the sensor by finding the
values of Ro in fresh air and then use that value to find Rs using the
below formula:
Once we calculate Rs and Ro we can find the ratio and then using the
graph shown above we can calculate the equivalent value of PPM for
that particular gas.
Parameter Value
+ 5 V DC from your Arduino
G GND from your Arduino
D0 Connect to Digital Input Pin
A0 Connect to Analog Input Pin
Power LED Illuminates when power is applied
Sound Detect
Illuminates when sound is detected
LED
Potentiometer CW = More Sensitive
On the top of the sound sensor is a little flathead screw you can turn to
adjust the sensitivity and analog output of the sound sensor. To calibrate the
sound sensor you can make some noise and keep turning it until you start
seeing the sensor-LED on the module starts blinking with the rhythm.
Blynk App - allows to you create amazing interfaces for your projects using
various widgets we provide.
Blynk Server - responsible for all the communications between the smart
phone and hardware. You can use the Blynk Cloud or run your private Blynk
server locally. It’s open-source, could easily handle thousands of devices and
can even be launched on a Raspberry Pi.
Now imagine: every time you press a Button in the Blynk app, the message
travels to the Blynk Cloud, where it magically finds its way to your hardware.
It works the same in the opposite direction and everything happens in a blynk
of an eye.
Arduino was born at the Ivrea Interaction Design Institute as an easy tool for
fast prototyping, aimed at students without a background in electronics and
programming. As soon as it reached a wider community, the Arduino board
started changing to adapt to new needs and challenges, differentiating its offer
from simple 8-bit boards to products for IoT applications, wearable, 3D
printing, and embedded environments. All Arduino boards are completely open-
Why Arduino?
Open source and extensible hardware - The plans of the Arduino boards are
published under a Creative Commons license, so experienced circuit designers
can make their own version of the module, extending it and improving it. Even
relatively inexperienced users can build the breadboard version of the module in
order to understand how it works and save money.
Early LEDs were often used as indicator lamps, replacing small incandescent
bulbs, and in seven-segment displays. Recent developments have produced
white- light LEDs suitable for room lighting. LEDs have led to new displays
and sensors, while their high switching rates are useful in advanced
communications technology.
LEDs have many advantages over incandescent light sources, including lower
energy consumption, longer lifetime, improved physical robustness, smaller
size, and faster switching. Light-emitting diodes are used in applications as
diverse as aviation lighting, automotive headlamps, advertising, general
lighting, traffic signals, camera flashes, lighted wallpaper and medical devices.
Unlike a laser, the color of light emitted from an LED is neither coherent nor
monochromatic, but the spectrum is narrow with respect to human vision, and
functionally monochromatic.
There are different types of jumper wires. Some have the same type of
electrical connector at both ends, while others have different connectors. Some
Crocodile clips
Banana connectors
Registered jack
RCA connectors
RF connectors
3.1 Introduction
The sources of man-made air pollution (or emission sources) are of basically two
types:
In addition, there are also natural sources of pollution (e.g., eroded areas,
volcanoes, certain plants which release great amounts of pollen, sources of bacteria,
spores and viruses). Natural sources are not discussed in this article.
Air pollutants are usually classified into suspended particulate matter (dusts, fumes,
mists and smokes), gaseous pollutants (gases and vapours) and odours. Some
examples of usual pollutants are presented below:
Suspended particulate matter (SPM, PM-10) includes diesel exhaust, coal fly-
ash, mineral dusts (e.g., coal, asbestos, limestone, cement), metal dusts and fumes
(e.g., zinc, copper, iron, lead) and acid mists (e.g., sulphuric acid), fluorides, paint
pigments, pesticide mists, carbon black and oil smoke. Suspended particulate
pollutants, besides their effects of provoking respiratory diseases, cancers, corrosion,
destruction of plant life and so on, can also constitute a nuisance (e.g., accumulation
of dirt), interfere with sunlight (e.g., formation of smog and haze due to light
scattering) and act as catalytic surfaces for reaction of adsorbedchemicals.
While some odours are known to be caused by specific chemical agents such
as hydrogen sulphide (H2S), carbon disulphide (CS2) and mercaptans (R-SH or R1-S-
R2) others are difficult to definechemically.
exposure (e.g., 8 hours per day, 5 days per week) of adult and supposedly healthy
workers.
Emissions inventory
Comparison with emission standards
Air pollutant concentrations inventory
Simulated air pollutant concentrations
Comparison with air quality standards
Inventory of effects on public health and the environment
Causal analysis
Control Measures
Cost of Control Measures
Cost of public health and environmental effects
cost-benefit analysis (costs of control vs. costs of efforts)
transportation and land-use planning
enforcement plan; resource commitment
The emissions inventory is a most complete listing of sources in a given area and of
their individual emissions, estimated as accurately as possible from all emitting point,
line and area (diffuse) sources. When these emissions are compared with emission
standards set for a particular source, first hints on possible control measures are given
if emission standards are not complied with. The emissions inventory also serves to
assess a priority list of important sources according to the amount of pollutants
emitted, and indicates the relative influence of different sources—for example, traffic
as compared to industrial or residential sources. The emissions inventory also allows
an estimate of air pollutant concentrations for those pollutants for which ambient
concentration measurements are difficult or too expensive to perform.
The air pollutant concentrations inventory summarizes the results of the monitoring of
ambient air pollutants in terms of annual means, percentiles and trends of these
quantities. Compounds measured for such an inventory include the following:
Sulphurdioxide
Nitrogen oxides
Suspended particulate matter
Carbonmonoxide
Ozone
Heavy metals (pb, cd, ni, cu, fe, as,be)
Starting from the emissions inventory, with its thousands of compounds which
cannot all be monitored in the ambient air for economy reasons, use of dispersion
modeling can help to estimate the concentrations of more “exotic” compounds. Using
appropriate meteorology parameters in a suitable dispersion model, annual averages
and percentiles can be estimated and compared to air quality standards or guidelines,
if they exist.
3.7 Inventory of Effects on Public Health and the Environment - Causal Analysis
For particulate matter: inertial separators (e.g., cyclones); fabric filters (bag
houses); electrostatic precipitators; wet collectors(scrubbers)
For gaseous pollutants: wet collectors (scrubbers); adsorption units (e.g.,
adsorption beds); afterburners, which can be direct-fired (thermal incineration)
or catalytic (catalytic combustion).
Wet collectors (scrubbers) can be used to collect, at the same time, gaseous
pollutants and particulate matter. Also, certain types of combustion devices can burn
combustible gases and vapours as well as certain combustible aerosols. Depending on
the type of effluent, one or a combination of more than one collector can be used.
The control of odours that are chemically identifiable relies on the control of the
chemical agent(s) from which they emanate (e.g., by absorption, by incineration).
However, when an odouris not defined chemically or the producing agent is found at
extremely low levels, other techniques may be used, such as masking (by a stronger,
more agreeable and harmless agent) or counteraction (by an additive which
counteracts or partially neutralizes the offensive odour).
Adequate housekeeping and storage Examples: strict sanitation in food and animal
product processing; avoidance of open storage of chemicals (e.g., sulphur piles) or
dusty materials (e.g., sand), or, failing this, spraying of the piles of loose particulate
with water (if possible) or application of surface coatings (e.g., wetting agents,
plastic) to piles of materials likely to give off pollutants.
Motor vehicle emissions are controlled by controlling emissions per vehicle mile
travelled (VMT) and by controlling VMT itself (Walsh 1992). Emissions per VMT
can be reduced by controlling vehicle performance - hardware, maintenance - for both
new and in-use cars. Fuel composition of leaded gasoline may be controlled by
reducing lead or sulphur content, which also has a beneficial effect on decreasing HC
emissions from vehicles. Lowering the levels of sulphur in diesel fuel as a means to
lower diesel particulate emission has the additional beneficial effect of increasing the
potential for catalytic control of diesel particulate and organic HC emissions.
While such approaches promote fuel conservation, they are not yet accepted by the
general population, and governments have not seriously tried to implement them. All
these technological and political solutions to the motor vehicle problem except
substitution of electrical cars are increasingly offset by growth in the vehicle
population. The vehicle problem can be solved only if the growth problem is
addressed in an appropriate way.
The estimation of the costs of public health and environmental effects is the most
difficult part of a clean air implementation plan, as it is very difficult to estimate the
value of lifetime reduction of disabling illnesses, hospital admission rates and hours
of work lost. However, this estimation and a comparison with the cost of control
measures is absolutely necessary in order to balance the costs of control measures
versus the costs of no such measure undertaken, in terms of public health and
environmental effects.
service will ultimately alter land-use patterns. There is an optimum split that will
minimize air pollution; however, this may not be acceptable when non-environmental
factors are considered.
Land-use planning for air pollution control includes zoning codes and
performance standards, land-use controls, housing and land development, and land-
use planning policies. Land-use zoning was the initial attempt to accomplish
protection of the people, their property and their economic opportunity. However, the
ubiquitous nature of air pollutants required more than physical separation of industries
and residential areas to protect the individual. For this reason, performance standards
based initially on aesthetics or qualitative decisions were introduced into some zoning
codes in an attempt to quantify criteria for identifying potential problems.
The clean air implementation plan should always contain an enforcement plan
which indicates how the control measures can be enforced. This implies also a
resource commitment which, according to a polluter pays principle, will state what the
polluter has to implement and how the government will help the polluter in fulfilling
the commitment.
In the sense of a precautionary plan, the clean air implementation plan should
also include estimates of the trends in population, traffic, industries and fuel
consumption in order to assess responses to future problems. This will avoid future
stresses by enforcing measures well in advance of imagined problems.
A strategy for follow-up of air quality management consists of plans and policies on
how to implement future clean air implementation plans.
Sound Sensor
d
In this project we are going to make an IOT based air pollution monitoring
system in which we will monitor the air quality over a web server using internet
when the air quality goes down beyond a certain level, means when there are
sufficient amount of harmful gases are present in the atmosphere like CO2,CO,NH3
and CH4. It will show the air quality in ppm levels on the serial monitor or smart
phones so that we can monitor it very easily. In this air quality system we are using
nodemcu. It is an forward step an arduino, the nodemcu is a combination of the
arduino and Wi-Fi module(ESP 8266).
In this system we are using NODEMCU, MQ135 Gas sensor, LEDs, jumper wires
and bread board. NODEMCU is the microcontroller,MQ1345 gas sensor is the air
quality sensor, LEDs are the indicating the quality of air, jumper wires are using
connecting the devices, the MQ135 gas sensor sense the air quality. In this sensor
having sno2 layer which has a higher resistance in the clear air as a gas sensing
material. When there is an increase in pollution gases, the resistance of the gas sensor
decreases along with that. To measure ppm using MQ135 sensor we need to look into
the (RS/R0).
The values of R0 is the values of the resistance in fresh air and the value of RS
is the value of the resistance at gas concentration. First you should calibrate the sensor
by finding the values of R0 in fresh air and then use that value to find RS using the
formulas. Once we calculate RS and R0 we can find the ratio we can calculate the
equivalent value of PPM for that particular gas.
In this system we are using the leds that are indicates quality of air in the
environment. How it is we are giving the levels of the gases. The MQ135 sensor has
sense the air when the air is polluted beyond the level of normal condition it indicates
the level of the pollution. when the air is not polluted the that is normal condition the
green leds will be blinks. That means the surrounding air quality is not polluted. when
the surrounding environment is polluted the red leds will be blinks. It means the
environment will be polluted with chemical gases that are CO, CO2, NH3 and CH4.
Now in this project we are using locally available gas sensor for observing the
polluted gases like Carbon monoxide (CO), Carbon dioxide (CO2) and parameters
like temperature, humidity. By using this method people can view the level of
pollution through wireless system. It reduced cost, reliable and comfortable for any
place where we are monitoring the gases.
Toxic Gases
Toxic gases are carbon dioxide and carbon monoxide. These gases are very
harmful and dangerous to the people
Carbon Monoxide(CO)
Carbon monoxide threat from exposure to CO is most serious for those who
suffer from cardiovascular disease. Healthy individuals are also affected but only at
higher levels of exposure. Exposure to elevated CO levels is associated with visual
impairment, reduced work capacity, reduced manual dexterity, poor learning ability
and difficulty in performing complex tasks.
Carbon dioxide (CO2) is a colorless, odorless and non-flammable gas that is a product
of cellular respiration and burning of fossil fuels. It has a molecular weight of
44.01g/mol. Although it is typically present as a gas carbon dioxide also can be a
solid form as dry ice and liquefied depending on temperature and pressure. This gas is
utilized by many types of industry including breweries, mining ore, manufacturing of
carbonated drinks, drugs, disinfectants, pottery and baking powder. It also a primary
gas associated with volcanic eruptions. CO2 acts to displace oxygen, making
compressed CO2 the main ingredient in fire extinguishers.
Occupations that are most at risk from CO2 exposure include miners, brewers,
carbonated beverage workers and grain elevator workers. CO 2 is present in the
atmosphere at 0.035%. In terms of worker safety, Occupational Safety and Health
Administration (OSHA) has set a permissible exposure limit (PEL) for CO 2 of 5,000
parts per million (ppm) over an 8-hour work day, which is equivalent to 0.5% by
volume of air. Similarly the American Conference of Governmental Industrial
Hygienists (ACGIH) TLV (threshold limit value) is 5,000 ppm for an 8hour workday
with a ceiling exposure limit of 30,000 ppm for a 10-minute period based on acute
inhalation data.
Ammonia
Methane
Methane is a chemical compound with the chemical formula CH4 (one atom of
carbon and four atoms of hydrogen). It is a group14 hydride and the simplest alkane,
and is the main constituent of natural gas. The relative abundance of methane on
Earth makes it an attractive fuel, although capturing and storing it poses challenges
due t o its gaseous state under normal conditions for temperature and pressure.
Natural methane is found both below ground and under the sea floor. When it
reaches the surface and the atmosphere, it is known as atmospheric methane.[6]The
Earth's atmospheric methane concentration has increased by about 150% since 1750,
and it accounts for 20% of the total radiative forcing from all of the long-lived and
globally mixed greenhouse gases.
Uses of Methane
methane yields carbon black, which is widely used as a reinforcing agent in rubber
used for automobile tyres.
The components used in this project are mainly NODEMCU (Wi-Fi module is
in built in NODEMCU), MQ135 gas sensor, Sound Sensor, Mobile Phone, Blynk
application, jumper wires and bread board. The NODEMCU is an open source IoT
platform, it includes firmware which runs on ESP8266 Wi-Fi SOC (system on chip)
from Espressif system, and hardware which is based on ESP-12 module. The term
“NODEMCU” by default refers to the firmware rather than the development kit.
The sensitive material used in MQ135 sensor is SnO 2 (Stannic Oxide). The
conductivity of this material is lower in clean air. The sensor conductivity increases
with the increasing concentration of target pollution gases. MQ135 can monitor
different kind of toxic gases such as CO, CO2, NH3 and CH4. The detection range is
10 to 10000 ppm with voltage rate of 5V DC.
The MQ135 gas sensor will have 4 pins i.e., Vin, Ground, Analog and digital
output pins. The analog pin of MQ135 gas sensor is connected to analog port (A0) of
nodemcu, the Vcc pin of MQ135 gas sensor is connected to the 3V pin ( of the
nodemcu board and GND of the MQ135 gas sensor is connected to the GND of the
nodemcu. Similarly sound sensor will also have 4 pins i.e., Vin, Ground, Analog and
digital output pins. We are using Blynk application to monitor different parameters of
air and sound remotely. When there are no polluted gases present in the atmosphere
green leds will glows on, when the air is polluted with toxic gases we can see the
blinking of red led.
The MQ135 Gas sensor takes the supply from the nodemcu so that it sense the
concentration of different kinds of gases mainly toxic gases. The gases which are
sensed by the sensor will be sent to the Blynk application with the help of built in
WiFi module. Data received from nodemcu board can monitor different kind of gases
concentration individually and display in ppm values through serial monitor and also
through smart phones using Blynk App. Similarly the analog value received from
Sound sensor is directly sent to cloud through built in WiFi module and the received
data will be displayed through widgets specifying the range of sound level.
In this air pollution monitoring system are using leds because of the each
gases having 2 leds(green and red). When the level of the toxic gas is in safe level the
green led will be blink, when the toxic gas level is high, the effect of pollution will
also be high, and during this case the red led will be glow. This air monitoring system
senses 4 toxic gases that are namely carbon monoxide, carbon dioxide and Nitrogen
dioxide.
After downloading the app from Google Play store(Android users), create an account
and log in. (If possible than log in with your real mail id for better connectivity later.)
You’ll also need to install the Blynk Arduino Library, which helps generate
the firmware running on your ESP8266. Download the latest release from
https://github.com/blynkkk/blynk-library/releases and follow along with the directions
there to install the required libraries.
Click the “Create New Project” in the app to create a new Blynk app. Give it any
name. Blynk works with hundreds of hardware models and connection types. Select
the Hardware type. After this, select connection type. In this project we have select
WiFi connectivity.
Then you’ll be presented with a blank new project. Connection Time option should be
opted as WiFI and we can assign our customized project name in Project Name field.
We have an option of selecting the theme after that press create button to create a new
project.
The Auth Token is very important – you’ll need to stick it into your ESP8266’s
firmware. For now, copy it down or use the “E-mail” button to send it to yourself.
In Widget Box, multiple numbers of widgets are available for representing the output
of the project. We need to choose the widgets which are suitable for our project. Here
we are choosing Gauge widgets under displays category
#include <Blynk.h>
#include<ESP8266WiFi.h>
#include<BlynkSimpleEsp8266.h>
int trigger_pin = 2;
int echo_pin = 3;
int t;
int distance;
#define MQ_PIN 2 //define which analog input channel you are going to use
#define GAS_CO2 2
#define GAS_CO 3
#define GAS_No2 4
#define GAS_CH3 6
#define GAS_CH3_2CO 7
#define GAS_C2H5OH 9
#define GAS_CO_sec 13
float Ro4 = 2.511; //MQ135 2.51 this has to be tuned 10K Ohm
void setup()
pinMode(A0,INPUT);
// pinMode(13,OUTPUT);
pinMode(13, OUTPUT);
Serial.print("This will take approx "); //prints "this will take approx "
Serial.print(CALIBARAION_SAMPLE_TIMES *
CALIBRATION_SAMPLE_INTERVAL/1000); //prints "# of seconds"
NUMSAMPLES X SAMPLEINTERVAL / 1000
Serial.print(" MQ135:");
// Ro4 = MQCalibration(MQ_PIN);
//Serial.println(Ro4);
Serial.print("kohm)\n");
Serial.print("\n");
delayMicroseconds (10);
delayMicroseconds(10);
//Serial.println(distance);
if (distance >=10)
Serial.println (distance);
delay (500);
else {
Serial.println (distance);
delay (500);
void gasSensor()
Serial.print("MQ135 :");
Serial.print("CO2:");
Serial.print(MQGetGasPercentage(MQRead(MQ_PIN)/Ro,GAS_CO2 ) );
Serial.print( "ppm" );
Serial.print(" ");
Serial.print("NO2:");
Serial.print(MQGetGasPercentage(MQRead(MQ_PIN)/Ro,GAS_CO) );
Serial.print( "ppm" );
Serial.print(" ");
Serial.print("CO:");
Serial.print(MQGetGasPercentage(MQRead(MQ_PIN)/Ro,GAS_No2) );
Serial.print( "ppm" );
Serial.print(" ");
Serial.print("\n");
delay(1000);
if ( gas_id == GAS_CO2 ) {
return value1;
return value2;
return value3;
return ( ((float)RL_VALUE*(1023-raw_adc)/raw_adc));
int i;
float val=0;
val += MQResistanceCalculation(analogRead(A0));
delay(CALIBRATION_SAMPLE_INTERVAL);
val = val/RO_CLEAN_AIR_FACTOR;
return val;
int i;
float rs=0;
for (i=0;i<READ_SAMPLE_TIMES;i++) {
rs += MQResistanceCalculation(analogRead(A0));
delay(READ_SAMPLE_INTERVAL);
rs = rs/READ_SAMPLE_TIMES;
return rs;
if (sensor_id == MQ135_SENSOR ){
if ( gas_id == GAS_CO2 ) {
return 0;
void loop()
gasSensor();
// Serial.println(value1);
//if(value1> 300||value2>1000||value3>10)
// Serial.println(sonar.ping_cm());
delay(1000);
4.5 SUMMARY
5.1 Conclusion
Our system is made to monitor various toxic gases and sound pressure level in
the environment by using the appropriate sensors. In our monitoring system we had
used IoT technology to enhance the process of monitoring the levels of toxic gases
and sound pressure level in the atmosphere. Our proposed frame work will collect the
data that can be used to make informed decisions to manage and improve the environment.
With the help of our System, people can monitor the levels of toxic gases and sound pressure
level remotely at any time just with their mobile phones. It also helps to create awareness
among the public to control the pollution. This system will supports the new technology
which is easy to access the data remotely and by controlling the pollution it
effectively supports the healthy life concept.
In order to monitor toxic gases in the atmosphere we have used MQ135 gas sensor
also called Air Quality sensor which has few disadvantages. This sensor can sense
only few toxic gases in atmosphere but not all the gases. Also this sensor doesn’t have
cent percent accuracy in providing the data. In future, there is a possibility of
manufacturing new sensors which can measure all the gases and provide data
accurately.
REFERENCES
[1] Harsh N. Shah and Zishan Khan, "IOT Based Air Pollution Monitoring System",
International Journal of Scientific & Engineering Research Volume 9, Issue 2,
February-2018, ISSN 2229-5518.
[4] Rajat Sankhe, Pravin Shirodkar, Avinash Nangare, Abhishek Yadav and Prof.
Gauri Salunkhe, "Iot Based Air and Sound Pollution Monitoring System", Paper ID :
IJERTCONV5IS01037, Volume & Issue : ICIATE – 2017 (Volume 5 – Issue 01),
ISSN (Online) : 2278-0181
[5] K.Chandra Sekhar, K. Sai Sruthi and Aman Kumar, "IOT Based Air & Sound
Pollution Monitoring System", AEGAEUM JOURNAL, ISSN NO: 0776-3808.
[6] Arushi Singh, Divya Pathak and Prof. Priti . C. Golar, "IOT based Air and Sound
Pollution Monitoring System", International Journal of Advanced Research in
Electrical, Electronics and Instrumentation Engineering, Vol. 6, Issue 3, March 2017,
ISSN (Print) : 2320 – 3765, ISSN (Online): 2278 – 8875.
[8] Riteeka Nayak, Malaya Ranjan Panigrahy , Vivek Kumar Rai and T AppaRao:IOT
based air pollution monitoring system Vol-3, Issue-4,2017
[9] Navreetinder Kaur , Rita Mahajan and Deepak Bagai: Air Quality Monitoring
System based on Arduino Microcontroller Vol. 5, Issue 6, June2016
[10] PalaghatYaswanth Sai: An IoT Based Automated Noise and Air Pollution
Monitoring System Vol. 6, Issue 3, March2017