Air Pollution and Temperature Humidity Monitring System
Air Pollution and Temperature Humidity Monitring System
UNIVERSITY OF MUMBAI
(2018-2019)
1
CERTIFICATE
Principal
2
CERTIFICATE OF APPROVAL
1. ——————————————
-
2. ——————————————
-
Date:
Place:
3
DECLARATION
We declare that this written submission represents our ideas in our own words
and where others’ ideas or words have been included, we have adequately cited
and referenced the original sources. We also declare that we have adhered to all
principles of academic honesty and integrity and have not misrepresented or
fabricated or falsified any idea/data/fact/source in our submission. We understand
that any violation of the above will be a cause for disciplinary action by the
Institute and can also evoke penal action from the sources which have thus not
been properly cited or from whom proper permission has not been taken when
needed.
Date:
4
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 hardware's display interface and could be accessed via
the cloud on any smart mobile device.
5
Table of content
Sr. no Chapter Pg No
1. Introduction 7
2. Objective 8
3. Literature Review 9
5. Problem Statement 10
6. Proposed System 11
7. Implementation 19
8. Output 21
9. Conclusion 24
10. Reference 25
6
INTRODUCTION
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.
DHT11 sensor gives very precise value of humidity and temperature and ensures
high reliability and long term stability.
In this Arduino Project we will learn how to use the DHT11 or the DHT22 sensor
for measuring temperature and humidity with the Arduino board. Traditional
analog humidity sensor need signal circuit design, adjustment and calibration, for
which, the precision can not be guaranteed, so does the linearity, repetition,
interchanging and consistency. DHT11 and DHT22 is a new type
temperature/humidity sensor made by Sensirion Company based on CMOSens
technology, which combines CMOS chip with sensor. Temperature /humidity
sensor, signal magnifier, A/D switch and 12C bus interface are intergrade in one
chip. The author designs a temperature/ humidity measurement and sends system
with SHT1x sensor for temperature/humidity measurement in close
circumstances. Live temperature or humidity value is sent to a forage receiver
through wireless signal.
7
OBJECTIVE
To develop a wireless network technology based Air Pollution And Monitoring
System (Mote1) that can detect the pollution rate and provide the value in ppm
(parts per million) and Temperature Humidity Monitoring System (Mote2) will
identify and recognize the Temperature and Humidity in environment and
provide value in Degree Celsius(C) and Percentage (%).
3. Inform the public about the air quality and raise the awareness.
8
REVIEW OF LITERATURE
An air pollutant is a substance in the air that can have adverse effects on
humans and the ecosystem. The substance can be solid particles, liquid droplets,
or gases. A pollutant can be of natural origin or man-made. Pollutants are
classified as primary or secondary. Primary pollutants are usually produced
from a process, such as ash from a volcanic eruption. Pollutants are either
emitted directly or formed from other primary pollutants.
9
PROBLEM STATEMENT
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.MQ135 sensor can sense NH3, NOx,
alcohol, Benzene, smoke, CO2 and some other gases, so it is perfect gas sensor
for our Air Quality Monitoring System.
The temperature and humidity monitoring system will identify and recognize
the temperature and humidity .
10
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 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 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 data. Arduino
collect and extract in two parts one is humidity and second is temperature and
then long term stability. This sensor has a resistive type humidity measurement
component and NTC type temperature measurement component with an 8-bit
microcontroller inbuilt which has a fast response and cost effective and
available in 4-pin single row package. DHT11 module works on serial
communication i.e. single wire 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:
2. Arduino Uno
4.16X2 LCD
5. Breadboard
6.Buzzer
11
COMPONENT DETAILS
Air quality sensor for detecting a wide range of gases, including NH3, NOx,
alcohol, benzene, smoke and CO2. Ideal for use in office or factory. MQ135 gas
sensor has high sensitivity to Ammonia, Sulfide and Benze steam, also sensitive
to smoke and other harmful gases. It is with low cost and particularly suitable
for Air quality monitoring application.
12
2. DTH11 TEMPERATURE HUMIDITY SENSOR
13
Software used
C Language
C is a structured programming language developed by Dennis Ritchie in 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 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
14
CIRCUIT DIAGRAM
15
Temperature And Humidity Monitoring System
16
SOFTWARE IMPLEMENTATION
#include <MQ135.h>
#include <SoftwareSerial.h>
int air_quality;
#include <LiquidCrystal.h>
void setup() {
pinMode(8, OUTPUT);
lcd.begin(16,2);
lcd.setCursor (0,0);
lcd.setCursor (0,1);
delay(1000);
Serial.begin(9600);
lcd.clear();
void loop() {
if(esp8266.find("+IPD,"))
delay(1000);
webpage += "<p><h2>";
webpage+= air_quality;
webpage+=" PPM";
18
webpage += "<p>";
if (air_quality<=10)
else if (air_quality>=20)
webpage += "</h2></p></body>";
cipSend += connectionId;
cipSend += ",";
cipSend +=webpage.length();
cipSend +="\r\n";
sendData(cipSend,1000,DEBUG);
sendData(webpage,1000,DEBUG);
19
cipSend = "AT+CIPSEND=";
cipSend += connectionId;
cipSend += ",";
cipSend +=webpage.length();
cipSend +="\r\n";
closeCommand+="\r\n";
sendData(closeCommand,3000,DEBUG);
lcd.print (air_quality);
lcd.setCursor (0,1);
if (air_quality<=10)
lcd.print("Fresh Air");
digitalWrite(8, LOW);
20
}
digitalWrite(8, HIGH );
else if (air_quality>=20 )
lcd.scrollDisplayLeft();
delay(1000);
while(esp8266.available())
// The esp has data so display its output to the serial window
21
char c = esp8266.read(); // read the next character.
response+=c;
if(debug)
Serial.print(response);
return response;
#include <ESP8266_Lib.h>
// Set/#include <BlynkSimpleShieldEsp8266.h>
22
char ssid[] = "CPH1701";
#include <SoftwareSerial.h>
BlynkTimer timer;
// This function sends Arduino's up time every second to Virtual Pin (5).
// In the app, Widget's reading frequency should be set to PUSH. This means
void myTimerEvent()
int sense=analogRead(A0);
Blynk.virtualWrite(V0, sense);
23
}
ESP8266 wifi(&EspSerial);
void setup()
// Debug console
Serial.begin(9600);
delay(10);
EspSerial.begin(ESP8266_BAUD);
delay(10);
timer.setInterval(1000L, myTimerEvent);
void loop()
Blynk.run();
24
CODE 2: For Temperature & humidity Sensor
#define dht_dpin 12
#define heart 13
dht DHT;
void setup()
{
lcd.begin(16, 2);
lcd.clear();
lcd.print(" Humidity ");
lcd.setCursor(0,1);
lcd.print(" Measurement ");
delay(2000);
lcd.clear();
lcd.print("Circuit Digest ");
lcd.setCursor(0,1);
lcd.print("Welcomes You");
delay(2000);
Serial1.begin(9600);
Serial.begin(9600);
lcd.clear();
lcd.print("WIFI Connecting");
lcd.setCursor(0,1);
25
lcd.print("Please wait....");
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);
Serial.println("Wifi Connected");
lcd.clear();
lcd.print("WIFI Connected.");
pinMode(heart, OUTPUT);
delay(2000);
t.oscillate(heart, 1000, LOW);
t.every(20000, send2server);
}void loop()
{
DHT.read11(dht_dpin);
lcd.setCursor(0,0);
lcd.print("Humidity: ");
humi=DHT.humidity;
lcd.print(humi); // printing Humidity on LCD
lcd.print(" % ");
lcd.setCursor(0,1);
lcd.print("Temperature:");
tem=DHT.temperature;
lcd.print(tem); // Printing temperature on LCD
lcd.write(1);
lcd.print("C ");
delay(1000);
t.update();
26
OUTPUT
27
28
CONCLUSION
This proposed system can provide a convenient method for effective monitoring
of temperature and humidity in real time. This system is compact to an extent
and cost effective when compared to prices of instruments used to measure the
environmental factors. From the above all analysis, it is ensured that the nested
wired systems can be replaced by the wireless sensor networks to get an
accurate data as well as to avoid many hazardous issues. The system to monitor
the air of environment using Arduino micro controller. Gas sensor gives the
sense of different type of dangerous gases. It supports new technology and
healthy life concept.
29
REFERENCE
1. J.M.Huges, Aurdino A Technical Reference ,O’Reilly Media, In May2016
2. www.winsen-sensor.com/
3. https://en.wikipedia.org/wiki/ESP8266
4. www.instructables.com/id/ESP8266-Wi-fi-module-explain-and-connection/
5.https://www.olimex.com/Products/Components/Sensors/...MQ135/.../SNS-
MQ135.pdf
6. https://en.wikipedia.org/wiki/Internet_of_things
8. http://www.ardumotive.com/iot-wifi-temp-andhumidity.htm
30