Air Pollution and Temperature Humidity Monitring System Project
Air Pollution and Temperature Humidity Monitring System Project
Date: 2019/04/09
ABSTRACT
Air pollution affects our day to day activities and quality of life. It poses a
threat to the ecosystem and the quality of life on the planet. The dire need to
monitor air quality is very glaring, owing to increased industrial activities
over the past years. People need to know the extent to which their activities
affect air quality. This project proposes an air pollution monitoring system.
The system was developed using the Arduino microcontroller. The air
pollution monitoring system was designed to monitor and analyze air
quality in real-time and log data to a remote server, keeping the data
updated over the internet. Air quality measurements were taken based on the
Parts per Million (PPM) metrics and The air quality measurements taken by
the designed system was accurate. The result was displayed on the designed
1|Page
Table of content INTRODUCTION
Sr. no Chapter Pg No 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
1. Introduction 7 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
2. Objective 8 that we can monitor it very easily.
2|Page
OBJECTIVE 3. Carbon monoxide (CO) - CO is a colorless, odorless, toxic yet non-
irritating gas. It is a product by incomplete combustion of fuel such as
To develop a wireless network technology based Air Pollution natural gas, coal or wood. Vehicular exhaust is a major source of carbon
And Monitoring System (Mote1) that can detect the pollution rate monoxide.
and provide the value in ppm (parts per million) and Temperature Temperature and humidity are very important parameters of the
Humidity Monitoring System (Mote2) will identify and recognize environment in various industries like medicine, food, paper mills,
the Temperature and Humidity in environment and provide value textile, etc. In recent years, optical fiber sensors have attracted more
attentions in sensing and measurement areas due to their many
in Degree Celsius(C) and Percentage (%). advantages over their conventional electronic counterparts. The response
of our designed system presents the temperature or humidity is out of
The core objectives are:
range as defined by the user by using Arduino and DHT11.
But majority of times such an alerting message could easily go
1. Check the air quality relative to standards or limit values. unnoticed, the user or the person in charge is sleeping in case if the
intended person in sleeping. so it is better to log the data in a remote
2. Detect the importance of individual sources. computer in case of such an event so that he can keep an track of the
data. Another work in use the alarming system for the Attending staff .
3. Inform the public about the air quality and raise the awareness. The temperature and humidity measurement sensor can fail if the user of
the in charge is Away for the situation where the emergency is taking
place.
REVIEW OF LITERATURE
An air pollutant is a substance in the air that can have adverse effects on PROBLEM STATEMENT
humans and the ecosystem. The substance can be solid particles, liquid Air Pollution Monitoring System in which we will monitor the Air
droplets, or gases. A pollutant can be of natural origin or man-made. Quality over a web server using internet and will trigger a alarm when
Pollutants are classified as primary or secondary. Primary pollutants are the air quality goes down beyond a certain level, means when there are
usually produced from a process, such as ash from a volcanic eruption. sufficient amount of harmful gases are present in the air like CO2,
Pollutants are either emitted directly or formed from other primary smoke, alcohol, benzene and NH3. It will show the air quality in PPM on
pollutants. the LCD and as well as on webpage so that we can monitor it very
Major primary pollutants produced by human activity include: easily.MQ135 sensor can sense NH3, NOx, alcohol, Benzene, smoke,
1. Sulfur oxides (SOx) - particularly sulfur dioxide, a chemical compound CO2 and some other gases, so it is perfect gas sensor for our Air Quality
with the formula SO2. it is produced by volcanoes and in various Monitoring System.
industrial processes. Coal and petroleum often contain sulfur The temperature and humidity monitoring system will identify and
compounds, and their combustion generates sulfur dioxide. recognize the temperature and humidity.
2. Nitrogen oxides (NOx) - Nitrogen oxides, particularly nitrogen dioxide,
are expelled from high temperature combustion, and are also produced
during thunderstorms by electric discharge.
3|Page
PROPOSED SYSTEM
The design consists more on actual planning of hardware part than the
code to be created. A number of software and hardware implementation COMPONENT DETAILS
techniques were used to design and develop the system. The system
design consists three sections - one senses the humidity and temperature
by using humidity and temperature sensor DHT11. The second section 1. MQ135 Gas Sensor
reads the DHT sensor module’s output and extracts temperature and
humidity values into a suitable number in percentage and Celsius scale.
And the third part of the system displays humidity and temperature on
LCD. The system connection is based on single wire serial
communication. First Arduino send a start signal to DHT module and
then DHT gives a response signal containing temperature and humidity Air quality sensor for detecting a wide range of gases, including NH3,
data. Arduino collect and extract in two parts one is humidity and second NOx, alcohol, benzene, smoke and CO2. Ideal for use in office or
is temperature and then long term stability. This sensor has a resistive factory. MQ135 gas sensor has high sensitivity to Ammonia, Sulfide and
type humidity measurement component and NTC type temperature Benze steam, also sensitive to smoke and other harmful gases. It is with
measurement component with an 8-bit microcontroller inbuilt which has low cost and particularly suitable for Air quality monitoring application.
a fast response and cost effective and available in 4-pin single row
package. DHT11 module works on serial communication i.e. single wire 1. DTH11 TEMPERATURE HUMIDITY SENSOR
communication. This module sends data in form of pulse train of specific
time period. Before sending data to Arduino it needs some initialize
command with a time delay.
Hardware Requirements:
1. MQ135 Gas Sensor
2. Arduino Uno DHT11 module works on serial communication i.e. single wire
communication. This module sends data in form of pulse train of
3. Wi-Fi module ESP8266
4.16X2 LCD specific time period. Before sending data to Arduino it needs
5. Breadboard 6.Buzzer some initialize command with a time delay.
7.DHTT Temperature Humidity Sensor And the whole process time is about 4ms. The single-wire serial
interface makes system integration quick and easy. Its small size,
low power consumption and up-to-20 meter signal transmission
making it the best choice for various applications, including those
most demanding ones. The component is 4-pin single row pin
package.
4|Page
Software used
CIRCUIT DIAGRAM
C Language
C is a structured programming language developed by Dennis Ritchie in Air Pollution Monitoring System
1973 at Bell Laboratories. It is one of the most popular computer
languages today because of its structure, high-level abstraction, machine
independent feature etc. C language was developed to write the UNIX
operating system, hence it is strongly associated with UNIX, which is
one of the most popular network operating system in use today and heart
of internet data superhighway. C language is a very good language to
introduce yourself to the programming world, as it is a simple procedural
language which is capable of doing wonders. Programs written in C
language takes very less time to execute and almost executes at the speed Temperature And Humidity Monitoring System
of assembly language instructions. Initially C language was mainly used
for writing system level programs, like designing operating systems, but
there are other applications as well which can be very well designed and
developed using C language, like Text Editors, Compilers, Network
Drivers etc.
Arduino
The Arduino integrated development environment (IDE) is a cross-
platform application (for Windows, macOS, Linux) that is written in the
programming language Java. It is used to write and upload programs to
Arduino board. The source code for the IDE is released under the GNU
General Public License, version 2.
5|Page
SOFTWARE IMPLEMENTATION delay(1000);
#include <MQ135.h> #include <SoftwareSerial.h> #define int connectionId = esp8266.read()-48; /* We are subtracting 48
DEBUG true from the output because the read() function returns the ASCII
SoftwareSerial esp8266(10,11); // This makes pin 9 of Arduino as decimal value and the first decimal number which is 0 starts at
RX pin and pin 10 of Arduino as the TX pin 48*/
const int sensorPin= 0; int air_quality; String webpage = "<h1>IOT Air Pollution Monitoring
#include <LiquidCrystal.h> LiquidCrystal lcd(12,11, 5, 4, 3, 2); System</h1>"; webpage += "<p><h2>";
webpage+= " Air Quality is "; webpage+= air_quality;
void setup() { pinMode(8, OUTPUT); lcd.begin(16,2); webpage+=" PPM";
lcd.setCursor (0,0); lcd.print ("Project on: "); lcd.setCursor (0,1);
lcd.print ("Gas Detection "); delay(1000); Serial.begin(9600);
void loop() {
// Hardware Serial on Mega, Leonardo, Micro... // Please don't send more that 10
values per second. int
8|Page
sense=analogRead(A0); #include <SoftwareSerial.h> SoftwareSerial Serial1(2, 3);
Blynk.virtualWrite(V0, sense); #define dht_dpin 12
#define heart 13 dht DHT;
} char *api_key="SIWOYBX26OXQ1WMS"; // Enter your Write API key
from ThingSpeak
static char postUrl[150]; int humi,tem;
ESP8266 wifi(&EspSerial); void httpGet(String ip, String path, int port=80);
void setup()
void setup() {
{ lcd.begin(16, 2);
// Debug console Serial.begin(9600); lcd.clear();
lcd.print(" Humidity "); lcd.setCursor(0,1); lcd.print("
delay(10); Measurement "); delay(2000);
lcd.clear(); lcd.print("Circuit Digest "); lcd.setCursor(0,1);
lcd.print("Welcomes You"); delay(2000); Serial1.begin(9600);
// Set ESP8266 baud rate EspSerial.begin(ESP8266_BAUD); delay(10); Serial.begin(9600); lcd.clear();
lcd.print("WIFI Connecting"); lcd.setCursor(0,1);
Blynk.begin(auth, wifi, ssid, pass); timer.setInterval(1000L, lcd.print("Please wait ");
myTimerEvent); Serial.println("Connecting Wifi ");
} connect_wifi("AT",1000); connect_wifi("AT+CWMODE=1",1000);
connect_wifi("AT+CWQAP",1000); connect_wifi("AT+RST",5000);
connect_wifi("AT+CWJAP=\"1st floor\",\"muda1884\"",10000);
void loop() Serial.println("Wifi Connected");
{ lcd.clear();
Blynk.run(); lcd.print("WIFI Connected."); pinMode(heart, OUTPUT); delay(2000);
t.oscillate(heart, 1000, LOW); t.every(20000, send2server);
timer.run(); // Initiates BlynkTimer }void loop()
} {
DHT.read11(dht_dpin); lcd.setCursor(0,0); lcd.print("Humidity: ");
CODE 2: For Temperature & humidity Sensor humi=DHT.humidity;
lcd.print(humi); // printing Humidity on LCD lcd.print(" % ");
lcd.setCursor(0,1); lcd.print("Temperature:"); tem=DHT.temperature;
#include"dht.h" // Including library for dht #include<LiquidCrystal.h> lcd.print(tem); // Printing temperature on LCD lcd.write(1);
LiquidCrystal lcd(14,15,16,17,18,19); #include<Timer.h> lcd.print("C "); delay(1000); t.update();
Timer t;
9|Page
OUTPUT CONCLUSION
ensured that the nested wired systems can be replaced by the wireless sensor
controller. Gas sensor gives the sense of different type of dangerous gases. It
10 | P a g e
References
11 | P a g e