IOT Based Air Quality Monitoring and LPG Gas Leakage Detection System
IOT Based Air Quality Monitoring and LPG Gas Leakage Detection System
IOT Based Air Quality Monitoring and LPG Gas Leakage Detection System
Team Members:
Slot: G2 + TG2
S.NO. Contents
1 Abstract
2 Introduction
3 Literature Review
4 Proposed Method
5 Implementation
6 Screenshots
An IOT Based Air Quality Monitoring and LPG Detection System is a technology which can be
used to monitor the Air Quality and detect gas leakage over a web server using internet and will
trigger an alarm when the air quality exceeds beyond a certain limit which means that there are
sufficient amount of harmful gases present in the air like CO2, smoke, alcohol, benzene and NH3
which are fatal to our health and lifestyle. 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. 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.
The advantage of this automated detection and alerting system over the manual method is that it
offers quick response time and accurate detection of an emergency and in turn leading faster
diffusion of the critical situation. The Arduino plays a major role in this project. In this project gas
leakage is identified by using sensors which works only in closed environment. In present situation
there are many cases related to gas leakage which causes innocent people lives and property
damage. Implementing this application can be useful for companies, houses, which can save lives
of people. We use Arduino UNO to perform the desired task by interfacing Gas sensor, Buzzer
with Arduino. The output of the Gas sensor is in analog form. Initially when there is a leak the Gas
sensor detects it and gives voltage related to the amount of gas that is getting escaped from the
apparatus. We create a set-point to the Arduino so as if the Gas sensor gives the output above the
set-point the controller drives the buzzer ON as an indication to the user. This can be used as an
application in chemical and hazardous industries where there is a continuous need of monitoring
the gas leaks. By using different kinds of sensors for every gas we can almost identify leaks for
every kind of gases.
It has become important factor nowadays to bring the technology into our home and office. By
making the place smart, the day-to-day activities are becoming more and easier. The development
of home automation has become mandatory in homes as people are moving towards to the smart
home concepts. With the help of assistant systems like ‘Okay Google’, ‘Alexa’ and ‘SIRI”, the
normal routine activities like turning ON the light can be implemented with just a single voice
command. With these comforts flowing into a person’s life, it has become essential to protect it
from damages and accidents. This is where ‘Internet of things (IoT)’ comes into picture. As only
the regular works has become smart, the things used are still the same like Gas cylinder in homes.
INTRODUCTION
MOTIVATION
Air pollution has become a common phenomenon everywhere. Specially in the urban areas, air
pollution is a real-life problem. A lot of people get sick only due to air pollution. In the urban areas,
the increased number of petrol and diesel vehicles and the presence of industrial areas at the
outskirts of the major cities are the main causes of air pollution. The problem is seriously
intensified in the metropolitan cities. Also, the climate change is now apparent. The governments
all around the world are taking every measure in their capacity. Many European countries have
aimed to replace petrol and diesel vehicles with the electric vehicles by 2030. Even India has aimed
to do so by 2025.
Air quality in the Delhi area has dipped slightly the past month and climbing levels of dangerous
particulate matter are being reported across the region. Data from the Delhi Pollution Control
Committee and the Central Pollution Control Board show that levels of PM 2.5 -- particulate matter
less than 2.5 microns in diameter that lodge deep in the lungs -- have climbed to very unhealthy
levels in most parts of the Delhi and the NCR. For example, based on the most recent updates as
of 9.34 am, the PM 2.5 levels in Sector 16A Faridabad and Sanjay Nagar in Ghaziabad were 278
and 275, respectively. Air pollution in Delhi, one of the world's most polluted cities, has been the
subject of intense public debate as it usually during the onset of winter and has received
international attention.
Continued exposure to environments with poor air quality is a major public health concern in
developed and developing countries. It is estimated that the pollutants responsible for poor air
quality cause nearly 2.5 million premature deaths per year world-wide. Significantly, around 1.5
million of these deaths are due to polluted indoor air, and it is suggested that poor indoor air quality
may pose a significant health risk to more than half of the world’s population. Due to its link with
industrialization, societal health problems associated with poor air quality disproportionately
affects developed and developing nations – it is estimated that air pollution is responsible for the
premature deaths. Remedial action to improve air quality is often easy to implement once air borne
pollutants have been detected.
According to the reports, over 1500 LPG accidents happen in India every day. This is equivalent
to the death of 1500 people including the children. Even the neighbourhood is affected by a single
accident. Hence, there comes the need to bring in technology to prevent accidents. IoT is a fast-
growing technology in Industries, Cars. IoT is basis for Industry 4.0 development.
PROBLEM STATEMENT AND APPLICATION AREAS
It is now important to monitor air pollution in real time in most of the urban areas. This project is
aimed at developing an IOT device which can monitor air pollution in real time and log data to a
remote server. Remote monitoring was facilitated using classical motes in the past, which has some
pitfalls like limited memory, processing speed and complex programming strategies. By using
Internet of Things and recording sensor data to a remote server, the limitations of memory in the
monitoring devices and manual collection of data from the installed devices can be overcome. The
IOT also helps monitoring the data in real time.
The advantage of this automated detection and alerting system over the manual method is that it
offers quick response time and accurate detection of an emergency and in turn leading faster
diffusion of the critical situation. The Arduino plays a major role in this project. In this project gas
leakage is identified by using sensors which works only in closed environment. In present situation
there are many cases related to gas leakage which causes innocent people lives and property
damage. Implementing this application can be useful for companies, houses, which can save lives
of people.
Real-Time monitoring and analysis of air quality which can viewed on a webpage and notification
system to alert a user when the air quality decreases in their area. The user can also view graphs
with Air Quality in Y-Axis vs Time in X-Axis that can be used to track and monitor air quality
and gas leakage at any specific time and can also be used to predict and analyse the air quality in
the future. Predictive analysis is the next step. We can further use this technology to place air
quality sensors around the city and map air quality in the city and create a website so users can
track the pollution in their respective regions
LITERATURE REVIEW
Varma A., Prabhakar Gas Leakage 2017 This system Unlike the The limitation of
S. and Jayavel K. Detection and provides home traditional the system
Smart Alerting safety for the system, this would be the
and prediction users. An MQ-2 new system not loss of internet
using IoT gas detector only detects the connectivity and
sensor is used to gas with high loss of power to
detect gases precision, but the system.
such as H2, also sends as
CH4, CO, alert message
Alcohol, over the internet
Smoke, concerned
Propane. When persons, it also
harmful gases protects the
are detected at a house by
harmful rate, the cutting the
system alerts the power supply to
owners, the house when
concerned any leakage is
authorities and detected.
cuts the power
supply to the
house, thus
preventing an
electric fire.
Keshamoni K, Smart Gas 2017 The main This system is It is not capable
Hemanth S Level purpose of this capable of of detecting
Monitoring, IoT system is to detecting gas other harmful
Booking & Gas watch over the leakage using gases except
Leakage gas levels in the MQ 2 sensor. It LPG
Detector over cylinders in the also detects low
IoT house. It has a quantity of gas
day to day use. present in the
A load cell is cylinder and
used to detect also places an
the weight of the order for gas
cylinder where cylinders
lower weight
means lesser gas
level. The
microcontroller
sends a message
using GSM, or
internet and
books gas
cylinders where
it detects low
amount of gas.
It also uses
MQ2 LPG
sensor to detect
any leakages of
gas as a security
measure.
Jetendra Joshi, Vishal Performance 2017 This paper aims The merits of The limitations
Rajapriya, S R Rahul, Enhancement at increasing this system are in the type of
Pranith Kumar, and IoT Based connectivity that it instantly system is the
Siddhanth Polepally, Monitoring for among all the notifies the user data traffic.
Rohit Samineni and D Smart Home available if there is any Since all the
G Kamal Tej devices in and anomality or devices are
around the threat present in simultaneously
house. All the the house. All generating data,
smart devices the appliances everything has to
are connected in the house can be captured by
with each other be controlled the
over a network and monitored microcontroller
and is controlled from anywhere and sent to the
by a raspberry pi around the web serve.
microcontroller. globe. Using HTTP
All the data is protocol creates
sent to the cloud a huge overhead
through the web to send
server. The data continuous
is watched amount of data.
closely by the
cloud and when
there any threat
indicated in the
data received,
the mobile
device
connected to the
web server is
indicated
immediately.
Asmi, A., Putra, J. C. A Study of 2012 This paper The important The
P., &Rahman, I. B. A. Indoor Air presents a study IAQ parameters measurements
Quality of of IAQ in toilets considered in were conducted
Public Toilet in located in, this study are during break
University's University Tun SO2, NO, and hour and taken
Building Hussein Onn CO2. using air quality
Malaysia monitoring.
(UTHM) to Hence would
determine the give different
level of gas values at
pollutants exist different times
in the male and of the day
female toilets.
Qasem AbuAl-Haija Monitoring of 2017 In this paper, a Based on the Moreover, the
HasanAl-Qadeeb AIR Quality in WSN based normal gas circuit can be
Abdulmohsen Al- King Faisal microcontroller levels of the improved to
Lwaimi University equipped with clean air, the measure the
Using a gas sensors have obtained results level of other
Microcontroller been actively indicate that gases in the air
and WSN used for air there is a big such Sulfureted
quality difference in the Hydrogen
monitoring. gas levels of (H2S),
However, the both gases Ammonia
acquired results (LPG and CO) (NH3), Alcohol
for the air which obtained and many others
quality control from the several
inside the KFU tests and circuit
buildings show runs.
no risky
situation to be
considered for
further actions.
Atkia Samiha ; GSM based 2019 The project in The system In future, this
Farhad Hossain Gas Leakage this paper aims includes a GSM device can be
Sarker ; Roza Naser Detection and to help LPG module, which reached out to
Khan Chowdhury ; A Ventilation user by makes the user various sectors
K M Rubaiyat Reza System using notifying on any or owner of the and has ample
Habib ; Arduino and unnoticed gas place observant possibilities to
Servo Motor emission or by sending a stand out. The
leakage text message on sensor can be
accident their phones. In utilized to be
through addition to that, familiar with
alarming them in order to more different
as well as maximize the variety of gas
creating range of the spillage. We,
opportunities people notified, furthermore,
for them to take a buzzer and plan on to embed
critical and LCD module is the system to
immediate employed so local authorities
actions; so that that the where the fire
the damages to residents next brigade or
loves and door can also be service and other
wealth can be made aware of forces can also
avoided or this mishap. be notified in
minimized. The case of these
proposed gas accidents
leakage occurring
detection
system will
detect gas
within a certain
area using a
MQ2 sensor and
any moment a
gas leakage due
to a vital
mistake or pipe
crack is sensed,
it will
immediately
turn on a
ventilation
system for the
leaked gas to
pass out.
Metta Santiputri ; IoT-based Gas 2018 This paper aims The gas sensor The system is
Muhammad Tio Leak Detection to provide a provides data to dependent on
Device solution to this NodeMCU, and WIFI
problem by then the results connection. In
building a are displayed as the event of a
device that a warning to the WiFi
utilizing sensors user via an malfunction
connected to Android-based there is no
NodeMCU. The smartphone option to notify
device performs device. Using the how owner.
area monitoring this device,
continuously. users will be
able to prevent
accidents that
occur due to gas
leaks so that
accidents can be
avoided.
Anandhakrishnan S, IOT Based 2017 The main aim is The smart gas In this system, a
Deepesh Nair,Rakesh Smart Gas to propose the system which sensor (load cell)
K,Sampath Monitoring design and provides home is used to
K,Gayathri S Nair System construction of safety, detects monitor the
a SMS based the leakage of weight of the gas
Gas Leakage the LPG and cylinder ,if it
Alert System. alerts the goes below a
Gas sensors are consumer about critical value
used to detect the leak by a the sensor
gas leakages in a notification senses this
kitchen. With through by condition and
the help of an using android sends a
infrared sensor app through notification via
the issue of gas Internet Of internet to gas
wastage is also Things agency for
monitored. An (IOT)and booking a LPG.
alarm goes off consumer can However, the
whenever the turn off the gas sensor is prone
sensor doesn’t valve , from to Malfunction
detect any anywhere in the due to the high
vessel over the world. The pH value of the
burner beyond a additional gas
particular time advantage of
period the system is
that it
continuously
monitors the
level of the
LPG present in
the cylinder
using load
sensor and if
the gas level
reaches below
the threshold
limit of gas so
that the user can
replace the old
cylinder with
new in time and
books the
cylinder by
automatically
send a
notification to
the gas agency.
P.Kanaka Maha An IOT Based 2019 The Framework Here the MQ5 A gas at certain
Lakshmi,P.S.G.Aruna LPG Leakage will assist in sensor is focus probably
Sri, P.Gopi Krishna Sensing and allowing assigned in this won't be
Alerting effective channel. The combustible at
System protection to figure below low temperature
human being shows the yet may have
and belongings. demonstrates touchy nature at
Internet of the trial setup high
things is a of the temperature.
gadget driver framework. The Therefore
which is setup gives expansion of a
identified with brief data about Temperature and
varieties of the interfacing Humidity Sensor
sensors. With of segments to will be
the help of the Raspberry exceptionally
attached to the pi. We useful. The
ARPANET guarantee you other alteration
which is fit for that the planned which can be
exchanging technique will actualized in
data by fulfill the this gas spill
utilizing client's locator is
Internet of prerequisites. It utilizing a
things. Its gives the sign in tripped circuit
purpose can be less time which will trip
extended for contrasted with off the principle
expanding the the best supply once the
endure strategies gas spill is
insurance distinguished.
models. It
assists in
making
applications
which are price
productive.
Internet of
things stage
takes an
essential job
around the
security to the
human life
Shruti Bhoir1, IoT Based Gas 2018 The proposed The proposed The application
Snehanjali Go Detection system will system makes of this method is
regaonkar2, Pro f. System continuously use of AT limited to
Shilpa Satre monitor the mega 328 industrial
surroundings micro workplaces and
for any leakage. controller. not residential
In case of any Arduino UNO areas
leakage board is used as
detection, it a base for the
will alert the whole system.
user via a buzzer The system
and by using the consists of an
Ethernet shield MQ-6 gas
module and an sensor Rese
Android arch Article
application; it Volume 7 Issue
will alert the No.4
user about the
environmental
conditions like
the gas level
and
temperature of
that location of
installation.
PROPOSED METHOD
ARCHITECTURE DESIGN
The air pollution monitoring device developed in this project is based on Arduino UNO. The Arduino board
connects with ThingSpeak platform using ESP8266 Wi-Fi Module. As the cities usually have Wi-Fi hotspots
at most of the places, so the device can be easily installed near any hotspot for its operation. The
ThingSpeak is a popular IOT platform which is easy to use and program. The sensors used for monitoring
the air pollution is MQ-135 and MQ6 gas sensor. The sensor data is also displayed on a character LCD
interfaced in the monitoring IOT device.
The sensing of data and sending it to the ThingSpeak server using Wi-Fi module is managed by the Arduino
Sketch. The Arduino sketch is written, compiled and loaded to the Arduino board using Arduino IDE.
ThingsHTTP and REACT are 2 applications in ThingSpeak which can be used to send triggers to a mobile
device with the help of If This Then That (IFTTT) Application. The IFTTT is an easy to use application that
can be installed on mobiles to send custom notifications by SMS, E-mail or Call. On mapping ThingSpeak
with IFTTT, we are able to get a notification every time the air quality level is high, or gas leakage is
detected. ThingSpeak is bundled along with MATLAB software to extend applications. Data is represented
by a graph with Air Quality in Y-Axis vs Time in X-Axis. This can be used to track and monitor air quality
and gas leakage at any specific time and can also be used to predict and analyse the air quality in the
future. Predictive analysis is the next step. ThingsView is a mobile application which can be used to track
the air quality by a single touch.
REQUIREMENTS:
Hardware Requirement
MQ135 Gas sensor
MQ6 LPG sensor
Arduino Uno
Wi-Fi module ESP8266
16X2 LCD
Breadboard
Buzzer
LED
Software Requirement
ARDUINO 1.6.13 software
Embedded C language
ThingSpeak
If This Then That (IFTTT) Application
MODULE’ DESCRIPTION
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 MQ6 sensor for Gas
Leakage system which prints the units on the LCD display. On connecting these sensors to
Arduino, the air quality and LPG gas are detected and get the Pollution level in PPM (parts per
million). The data from the MQ135 gas sensor is sent to ThingSpeak via the ESP WiFi module.
Once this data is mapped on ThingSpeak, we can move on to the next part which is notification.
ThingsHTTP and REACT are two applications supported by ThingSpeak to trigger a
notification every time the level exceeds. IFFFT is used to send a notification to your mobile
device. When sensor value exceeds the limit of 1000 PPM, then it starts causing headaches,
sleepiness and stagnant, stale, stuffy air and if exceeds beyond 2000 PPM then it can cause
increased heart rate and many other diseases. Whenever the value of MQ6 sensor exceeds 50
units, then the buzzer will start beeping, LED turns on and the LCD will display the LPG units
every second.
MODULE INTEGRATION
Integration of the LCD and Arduino:
1) Arduino Uno: Arduino Uno is a microcontroller board. It has digital and analog I/O pins. It has
14 digital I/O pins, 6 analog I/O pins. We program it with Arduino IDE via a type B USB cable.
We use Arduino in our project to load programs. We use it to mount sensors on it. Those sensors
then fetch data and processing is done. So, it won’t be incorrect if we say that Arduino Uno is the
brain of our application as it processes the data from the sensors. We have used C language to
code.
2) Wi-Fi module ESP8266: Gives access to Wi-Fi networks. It is used to establish Wi-Fi
connection between Arduino and platform. It makes simple TCP/IP connections using Hayes-style
commands.
3)16X2 LCD: Liquid Crystal Display is a screen used to display. It means it can display 16
characters per line and there are 2 such lines. Each character is displayed using a 5x7 pixel matrix.
Command register is used to store commands given to display and data register stores the data that
has to be displayed.
4) MQ135 Gas Sensor: Detects wide range of gases such as NH3, NOx, Alcohol, Benzene,
Smoke, CO2. This module is powered with a voltage source and we can see the LED to glow. The
LED remains turned off if no gas detection is done. This sensor also measures PPM.
5) MQ6 Gas Sensor: This sensor is particularly used to detect LPG concentration in air. It can
detect concentration in the range 200-10000 ppm.
7) Web Page: The web page is used to display the concluded result. It displays the channel data
obtained from sensor to ThingSpeak. IFTTT applets are created to send email and notifications.
We connect MQ135 and MQ6 sensors to Arduino. The sensor sends the data to ThingSpeak via
ESP Wi-Fi module. ThingsHTTP and REACT are two applications supported by ThingSpeak to
trigger a notification every time the level exceeds. ThingSpeak is bundled with software. IFFFT
sends notifications to user’s mobile. It informs what was the problem diagnosed, when was it
diagnosed, average air quality for the past day, current air quality and the quality level. The buzzer
beeps every time the value read by MQ6 exceeds 50 units. This turns on the LED and units of LPG
are displayed every second.
CODE
LiquidCrystal lcd(1, 2, 4, 5, 6, 7); // Creates an LC object. Parameters: (rs, enable, d4, d5,
d6, d7)
int gas_in =
A1; int buzz =
8;
int val;
void setup() {
void loop() {
lcd.print(val);
lcd.clear();
digitalWrite(buzz, LOW);
#include <ESP8266WiFi.h>;
#include <WiFiClient.h>;
#include <ThingSpeak.h>;
int val;
WiFiClient client;
unsigned long myChannelNumber = 894553; //Your Channel Number (Without Brackets)
void setup()
Serial.begin(9600);
delay(10);
WiFi.begin(ssid, password);
delay(500);
Serial.print("."
);
ThingSpeak.begin(client);
}
void loop()
//int val1=80;
delay(1000);
ThingSpeak.writeField(myChannelNumber,1,val, myWriteAPIKey);
ThingSpeak.writeField(895806,1,val,"I2RAGQTTV854HCQZ");
//Update in ThingSpeak
delay(100);
}
SCREENSHOTS
This system to monitor the air pollution of environment using Arduino microcontroller, IOT
Technology is proposed to improve quality of air. Gas Leakage detection system can be used
to alert and notify the user on his mobile device thus saving lives. 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, we use the MQ135 and MQ6 gas sensor
which gives the sense air quality and Arduino which is the heart of this project. Wi-Fi module
connects the whole process to internet and LCD is used for the visual output. ThingsSpeak is
used to monitor, analyse and display data while IFTTT application is used to notify and alert
the user.
The recent air pollution incidents have proved how harmful it is breathing bad air. Delhi can be
used as an apt example of air pollution and its ill effects on human health and lifestyle. It is
now too late to make any changes to the city which is also the capital of India. Life expectancy
decreases when you breathe bad air. We can use Delhi as an example and learn from our
mistakes by monitoring and tracking air quality and thus make effective changes.
We can further use this technology to place air quality sensors around the city and map air
quality in the city and create a website so users can track the pollution in their respective
regions.