IoT Based Indoor Air Quality Monitoring System

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

261

IoT based Indoor Air Quality Monitoring System


Ravi Kishore Kodali1 and Sasweth C. Rajanarayanan2

Department of Electronics and Communication Engineering,


National Institute of Technology, Warangal, Andhra Pradesh 506004, India
1
[email protected] 2 [email protected]

Abstract—The Internet of Things has been proving its potential the most striking air pollutants like Sulphur Dioxide (SO2),
to solve problems where presence of information can contribute Oxides of Nitrogen as NO2, Fine Particulate Matter or PM-
big to a solution or become the solution itself. A whole range 2.5 and Respirable Suspended Particulate Matter or PM-10
of connected things, talking to each other can communicate
processed information to people that would help them in arriving have been identified and are regularly monitored at almost
at meaningful conclusions about abstract, yet important factors. all the locations. There is indeed a direct relation between
One such factor is air and its quality. In a population dense the air quality outdoors and indoors. Pollutants often don’t
world and looking at the trends in the number of casualities due get to dilute well indoors like they do outdoors because of
to unclean air it is highly important that people are informed of indoor environments being largely confined and this ramifies
the quality of air that they breathe. Indoor air quality is a very
important factor to be judged and analysed and the need for an to indoor air quality getting exacerbate [1]. A lot of respiratory
effective solution to do so is inevitable. With air purifiers being ailments like asthma, bronchitis and even lung cancer are
able to clean the air indoors, there is no room for users to check caused due to the presence of certain pollutants in air. Indoor
the consistency of such a process and no provision to study the air quality has been receiving a steady attention not only from
long time behaviour of air they get to breathe. In this paper, the mob, but also from the international scientific community,
a solution that would make users study the air around them
both in real time and over a period of time would be presented. in the past few decades. It comes as a surprise that indoor
A variety of pollutant concentrations would be measured and air has been studied to be much more polluted than the air
informed to users, alerting users thereby of some of the most outside, increasing the emergency coefficient. Problems extant
harmful pollutant concentrations. in the air has encouraged the world health organisation to
Index Terms—IoT, Air quality, Gas Sensors, PM Sensors, come up with benchmarks to reduce health damages due to air
Cloud platform pollution. The World health Organisation, on 12th November,
2014 released various recommendations that promptly high-
lighted the dangers of burning fuels like unprocessed coal
I. I NTRODUCTION
and kerosene in the home and dimensionalized a few ways
Air, a harbinger of life and a vitality since the grand genesis to reduce emissions from cookstoves, fuel-based lamps, space-
of this planet, has no surrogates, given that it is increasingly heaters and most importantly air conditioners. Air conditioners
being polluted. Life forms from all hierachies solicit air of cause havoc to the air around its working space especially
undiminishing quality to have a healthy stay in the planet. when operated with dust and bacteria ridden filters, which is
The current state of air in most of the countries, especially mostly the case in industries and office spaces. Emissions from
India is a matter of significant distress. Increasing popula- machines in workplaces and automated systems in homes also
tion, urbanization and all other implications of population do contribute to air pollution indoors [1]. Inspite of a lot of
growth has increased the number of ways in which air can preventive maintenance systems being employed to counter
be subjected to pollution. Coal and Petroleum at present this problem, it is predictive maintenance that has garnered a
do not have eco-friendly surrogates that can be deployed lot of support from the mob and are extensively potent than
over a large scale.Along with this, a lot of other factors preventive maintenance systems which have lately become
contribute to a pollutant-rich air, which we get to breathe. parochial. The Internet of Things can infact disencumber
Very few measures have been taken to counter these issues people from deleterious consequences of polluted air. The
in the country. It is not one type of pollutant that often work presented in this paper aims at apprising the people
degrades the air quality, but a number of pollutants, which in indoors about the quality of air they breathe, the constituents or
combination would cause major health problems. So, arresting pollutants it bears and their quantities, so that timely solutions
them would mandate a knowledge of what kinds of pollutants can be engendered and health hazards can be thwarted. It
are within safe levels and how many of them exceed safety therefore, reckons on IoT to analyse and flag the air indoors.
levels. Delhi, the capital city of India has been ranked as Apart from real time monitoring of indoor air for all of its
the dirtiest metropolises by the World Health Organisation, constituents which is an important aspect [2] , the monitored
while doctors have asserted that the city has run into a state parameters are also housed on Google Sheets, both in the
of medical emergency. The National Air Quality Monitoring conventional tabular form and in the form of graphs, which
Programme(NAMP) was proposed by the Central Pollution would help users adopt to solutions that are future proof as
Control Board to monitor the ambient air quality. Four of they would be able to know what the air around them was

978-1-5386-9279-0/19/$31.00 ©2019 IEEE

Authorized licensed use limited to: Institut Teknologi Sepuluh Nopember. Downloaded on April 27,2021 at 17:13:09 UTC from IEEE Xplore. Restrictions apply.
262

upto, over a period of time. A mobile application called Blynk on building surfaces. Computer modelling of air flow inside
is used for the real time monitoring of the air quality and buildings are also done to understand the ventilation coefficient
has also been programmed to link with the Google Sheet of the building. Some of the parameters that are generally
through a button click, enabling users to choose between real measured and how they contribute in making the air polluted
time readings in the app and ‘over an epoch’ readings in the are discussed below [6]:
Google Sheet. This paper is divided into six sections. Section 1. Carbon monoxide: This is one of the most acutely toxic
II probes the related work going on in the area of indoor air contaminants indoors and is a bi-product of incomplete
quality. Section III delineates about the important indoor air combustion of fossil fuels. The time-weighted average
quality parameters and their effects on human health. Section (TWA) limit for carbon monoxide indoor is 25 ppm
IV briefs on the hardware setup, while Section V talks about transgressing which would lead to problems like nausea
its software counterpart. Section VI talks about the working of in human beings.
the IoT based indoor air quality monitoring system and how a 2. Carbon dioxide: The carbon dioxide gas, directly corre-
concept lke the Internet of Things can be used to inform users lates with the human metabolic activity. The maximum
about the air around them. carbon dioxide concentrations indoors that is considered
acceptable is 1000ppm.
II. R ELATED W ORK 3. Volatile Organic Compounds: The concentration of these
There has been a lot of research going on in this important compounds are generally found to be higher indoors than
field. Predictive systems for predicting the air quality indoors that outdoors. They engender out of paints and lacquers,
are increasingly being proposed and they all use machine paint strippers, cleaning supplies, pesticides, etc [4].
learning to achieve their purpose. Air is measured of certain 4. Bacteria: Indoor air is generally replete with certain types
parameters such as carbon monoxide content, carbon dioxide of bacteria such as Streptococcus pneumoniae, Mycobac-
content and particulate matter concentrations using sensors terium tuberculosis, Staphylococcus aureus. A gene-based
and patterns are identified in the measured data [3]. Machine analysis is done on environmental samples to probe the
learning algorithms are then used to learn and predict the role of microbes in the indoor environment.
air quality of a time in the future. This would mean a lot Effects on humans due to dampness and mold is a concern,
to households comprising of a dust-sensitive population and no lesser than that due to the aforementioned parameters.
in general to everyone too. Solutions and precautions can be Exposure to mold can induce respiratory diseases, asthma,
taken beforehand to circumvent the predicted events. allergic rhinitis and respiratory infections [7]. Apart from
these, chloroform is emitted when chlorinated water is heated,
III. I NDOOR A IR Q UALITY PARAMETERS benzene is emitted from fuels stored in attached garages.
A poor air quality indoors often amounts to what is pop- Acrolein and formaldehyde are emitted from overheated cook-
ularly known as the Sick Building Syndrome, by virtue of ing oil. A lot of these masked pollutants take down the air
which, subjective and vague health complaints are reported by indoors, making every inhale of air, an unsafe bet. All of
the occupants of affected buildings [4]. The probable causes these factors can help sketch the quality of air that people in a
of sick building syndrome are depicted in fig 1. Indoor air particular indoor environment get to inhale. Gases like carbon
quality (IAQ) has been studied to be affected by gases like monoxide, carbon dioxide, particulate matter like PM 2.5 and
carbon monoxide, carbon dioxide, radon and volatile organic PM 10 are sensed in this work for understanding the air, with
compounds and by particulate matter, microbial contaminants all the measured parameters getting equally accentuated.
or by mass energy stressors. A degrade in IAQ can cause major
health problems [5]. IV. H ARDWARE D ESCRIPTION
Determination of IAQ: A. NodeMCU ESP8266
Indoor air quality is measured by collecting air samples, mon-
itoring human exposure to pollutants and collecting samples The NodeMCU, shown in figure 2, is a hardware devel-
opment board that is based on the LUA firmware for the
ESP8266 wifi SoC that houses a Tensilica L106 32-bit RISC
processor [8], that boasts its capability to achieve extra low
power consumption and a maximum clock speed of 160MHz.
It also houses a CP2102 TTL to USB chip for programming
and debugging.A striking feature of the NodeMCU is that
it can support simultaneous wifi and bluetooth receive. It
contains a micro USB port through which it is powered.The
operating voltage for the NodeMCU is 2.5-3.6V. Its 15-pin
headers provide access to GPIOs, UART, ADC, SPI and power
pins. There is an external flash available, which can be used
to store programs, as there is no programmable ROM in
the SoC. General Purpose Input Output pins 1 and 3 are
used for Tx and Rx respectively of the hardware serial port
Fig. 1. Indoor Air Investigations, Source:www.winnipegairtesting.com (UART). The NodeMCU also boasts an onboard 3.3V voltage

Authorized licensed use limited to: Institut Teknologi Sepuluh Nopember. Downloaded on April 27,2021 at 17:13:09 UTC from IEEE Xplore. Restrictions apply.
263

Fig. 4. MQ-135 Gas Sensor

Fig. 2. NodeMCU

Fig. 5. Dust Sensor for PM-10 measurement

Fig. 3. MQ-7 Gas Sensor


D. PM 10 sensor
The SHARP GP2Y1010AU0F dust sensor has been used
divider circuitry and its ADC(Analog to Digital Converter)
for PM-10 measurement. The air is tested for smoke, dust,
has a 10-bit resolution. 80 percentage of the processing power
etc. with the help of an optical sensing system built into the
is allowed to be available for user application programming
sensor [9]. It is effective in detecting fine particles like the ones
and development because of the RTOS(Real Time Operating
in cigarette smoke. The sensor internally contains a diagonal
System) and WiFi stack. While reading from the external
arrangement of a phototransistor and an infrared light emitting
source, the ADC has an input voltage range of 0-1V.The
diode. This arrangement detects the reflected light from the
NodeMCU is an inexpensive board and aids well in IoT
dust present in the air and produces a corresponding output
prototyping. This board has therefore been used in this work.
voltage. This sensor is increasingly finding its place in air
purifier systems. The output voltage provided is proportional
B. MQ7 Gas Sensor to the density of dust in the air. It has a sensitivity of
The MQ7 Gas sensor is a Carbon Monoxide Coal gas 0.5V/0.1mg/m3. The sensor also draws a very low current
sensor module and is shown in figure 3. This sensor measures of 20mA and can also be comfortably interfaced with the
the carbon monoxide content in air and produces an analog NodeMCU.
output.The higher the concentration of carbon monoxide in a
room, the higher would be the measured output voltage. This E. PM-2.5 sensor
sensor can measure concentrations from 10ppm to 1000ppm. The 2.5 in PM-2.5 refers to the size of particles to be
This module is capable of providing both digital and analog detected in air. In this case, particles of size 2.5 microns
outputs. The module also has a preset button on the board are to be detected in the air. The PM-2.5 air quality sensor
which can be used to adjust the threshold value of the digital by Adafruit offers a reliable meaurement of concentrations
output. It can operate in temperatures between -10 and 50 of 2.5 micron sized particles in the air. The sensor houses a
degrees Celcius and typically consumes less than 150mA at computational unit, that obtains a curve of the amount of light
5V. The MQ-7 sensor can seamlessly be interfaced with a scattered as a function of time, when the suspended particles
microcontroller and is highly responsive too, exhibiting rapid in air are radiated with a laser beam within. The equivalent
recovery characteristics. particle sizes are calculated by the microprocessor. It supports
an input voltage of 5V with logic being 3.3V. A power pin and
C. MQ-135 Gas Sensor the data pin for UART Tx is all that is required. This sensor
is compatible with the NodeMCU and thus has been used in
The MQ-135 Gas Sensor has been widely identified in the this work.
field of domestic air pollution detection. This sensor is capable
of measuring gases like ammonia, NOx, alcohol, benzene,
V. S OFTWARE D ESCRIPTION
smoke and CO2. This sensor has been used in this work to
detect the levels of CO2 in the air. It hosts a simple drive A. Google Sheets
circuit and is fast and responsive. It also has a good sensitivity Google Sheets is a Web application that facilitates the
towards all the gases that it is capable of measuring and creation, updation and modification of spreadsheets and also
consumes less than 800mW of power. It is quite inexpensive, makes sharing the data online, possible. It also supports a
stable and has an extensively long life time. It is readily graph based view of the stored data. This work uses such
compatible with a board like the NodeMCU and thus has been a web-application as Google Sheets to aid in proposing
used in this work. an Internet of Things based solution for indoor air quality

Authorized licensed use limited to: Institut Teknologi Sepuluh Nopember. Downloaded on April 27,2021 at 17:13:09 UTC from IEEE Xplore. Restrictions apply.
264

Fig. 6. PM-2.5 Air Quality Sensor

Fig. 7. The Hardware Setup


monitoring. A google sheet created for housing sensor data
that is posted by the NodeMCU, is deployed as a web app
that anyone could have access to. Google Scripts app makes
this possible. No third party pushing service or plugin is used
for URL redirection when the NodeMCU attempts to send
the sensor values to the Google sheet. Google Sheets are
also much more approachable than other cloud IoT platforms.
To make sure that there is a consistent data communication
between the NodeMCU and Google Sheets, a continuous
internet connectivity for the NodeMCU is necessary.

B. Blynk App
The Blynk is a platform that offers quality programmable
Fig. 8. Communication with Google Sheets and Blynk App
iOS and Android apps to control boards like Arduino, Rasp-
berry Pi, NodeMCU etc., through the internet. The app packs
in a digital dashboard where a graphical interface can be
programmed to be created using built-in widgets. This project
uses this app to obtain a real time graphical plot of the
sensor data over time, which would give a straight forward yet
eloborate information about the quality of air around a user.
The app here has also been programmed to connect directly
to the data housed on the Google Sheets. The NodeMCU
interfaced with all the four aforementioned sensors has been
named as ‘Breathe Pill’ because of its ability to inform the
users about the pollutants in the air around them, allowing
them to rank the air.

VI. W ORKING
The NodeMCU is interfaced with the MQ-7 sensor that
measures Carbon monoxide in the air, the MQ-135 sensor that
measures the Carbon dioxide levels in the air, the dust sensor
by Sharp that measures the PM-10 concentration in the air
and the PM-2.5 air quality sensor that measures the PM-2.5
levels in the air. The entire hardware setup is something that
we would call ‘The Breathe Pill’. The Breathe Pill is shown in
fig 7. The NodeMCU has been programmed to simultaneously
send the measured sensor values to the BLYNK app and
the key-specific Google sheet. The NodeMCU solicits an Fig. 9. The Blynk App
uninterrupted internet connectivity so that it sends the sensor
values to the app and to the Google Sheet. The air is sensed
for the pollutant concentrations, every 15 minutes. This would be converted to a different URL by the browser,
This paper handles the process of sending the sensor data to upon request from Google Servers. A browser is very well
the Google Sheet differently. Generally for accessing a Google capable of doing this. But, in case of the NodeMCU it would
Sheet, a GET request has to be made over a URL in a browser. be a herculean task to perform a URL redirection upon request

Authorized licensed use limited to: Institut Teknologi Sepuluh Nopember. Downloaded on April 27,2021 at 17:13:09 UTC from IEEE Xplore. Restrictions apply.
265

VIII. F URTHER S COPE


This work discusses a cost effective solution to deter-
mine the indoor air quality. Carbon monoxide, carbondioxide,
respirable particulate matter and fine particulate matter are
some of the pollutants measured in this project. There are
other parameters like Volatile organic compounds, bacteria and
molds which also pose major threats to human health when
inhaled through air. This work can therefore be extended to
Fig. 10. The Google Sheet visualisation measure these pollutant levels also, inorder to draw a bigger
picture of the air indoors and to rank it better. Predictive tools
can also be used to predict a particular pollutant concentration
from Google’s severs, without a third party plugin. The Google
taking the data collected and housed in the Google Sheet as
Sheet here has therefore been deployed as a Web-App. A script
the dataset. This would in turn help in preventing respiratory
ID generated once it is deployed as a web app, is used by the
diseases and disorders.
NodeMCU to gain access to the Google Sheet and post the
sensor values to it. The air is sensed and sampled of all the
aforementioned pollutants and the measured values are sent to R EFERENCES
the Blynk app. The in-app interface of the Blynk app has been [1] M. F. M. Firdhous, B. H. Sudantha, and P. M. Karunaratne, “Iot enabled
proactive indoor air quality monitoring system for sustainable health
programmed in such a way that a user would be presented with management,” in 2017 2nd International Conference on Computing and
an aesthetic representation of data in the form of gauges, in Communications Technologies (ICCCT), Feb 2017, pp. 216–221.
which the maximum allowed value of a particular pollutant [2] B. Merikhi, F. Y. Nejad, and M. Abbaspour, “Sc-iaqm model for indoor
air quality monitoring in a smart community,” in 2016 24th Iranian
is shown for reference. So, the real time concentration of a Conference on Electrical Engineering (ICEE), May 2016, pp. 1562–
pollutant shown in the Blynk app is with reference to the 1567.
maximum allowed level for that pollutant. The app’s interface [3] W. Chen, C. Wang, and M. Lin, “An experimental study on fuzzy control
for indoor air quality and the energy consumption in a building,” in
is shown in figure 9. The app has been programmed to link 2015 International Conference on Machine Learning and Cybernetics
with the Google sheet where the measured values are housed. (ICMLC), vol. 1, July 2015, pp. 452–455.
A button labelled Pro-Analysis, when clicked, would redirect [4] L. Jingtao, S. Jichao, W. Jincui, H. Guanxing, J. Jihong, X. Xiaoping,
C. Xi, and Z. Yuxi, “Comparison of effects on volatile and semi-
the user to the Google Sheet. The sensor values are visualised volatile organic compounds in water by different sampling methods,” in
on the Google Sheet using graphs alongside conventional 2009 International Conference on Energy and Environment Technology,
tables housing the sensor data, as shown in fig 10. Therefore, vol. 2, Oct 2009, pp. 480–483.
[5] J. Esquiagola, M. Manini, A. Aikawa, L. Yoshioka, and M. Zuffo,
a quick grasp of the weight with which a pollutant has been “Monitoring indoor air quality by using iot technology,” in
polluting the air around a user can be obtained. 2018 IEEE XXV International Conference on Electronics,
Electrical Engineering and Computing (INTERCON), Aug 2018,
pp. 1–4.
VII. C ONCLUSIONS [6] A. Tapashetti, D. Vegiraju, and T. Ogunfunmi, “Iot-enabled air quality
As this work unfolds and when a user is inside the app, he monitoring device: A low cost smart health solution,” in 2016 IEEE
Global Humanitarian Technology Conference (GHTC), Oct 2016, pp.
gets to choose between the real time view of sensor data of the 682–685.
app and an elaborate long time view of the sensor data of the [7] R. Darooei, A. Mahloojifar, and M. R. Raoufy, “Asthma diagnosis based
Google Sheets, within the app itself. That makes this app an on respiratory dynamic using sparse representation based-classifier,” in
2015 22nd Iranian Conference on Biomedical Engineering (ICBME),
important and one stop-shop solution to gain an insight of the Nov 2015, pp. 216–220.
data gathered by the Breathe Pill. The Breathe Pill along with [8] R. K. Kodali and B. S. Sarjerao, “Mqtt based air quality monitoring,”
its integrations to the cloud and the app comes as an example in 2017 IEEE Region 10 Humanitarian Technology Conference (R10-
HTC), Dec 2017, pp. 742–745.
of how a potential concept like the Internet of Things can be [9] H. Liang and F. Wang, “An improved back scattering photoelectric dust
used to solve an important problem like indoor air pollution sensor,” in 2011 Symposium on Photonics and Optoelectronics (SOPO),
and be both reliable and cost effective while doing so. May 2011, pp. 1–4.

Authorized licensed use limited to: Institut Teknologi Sepuluh Nopember. Downloaded on April 27,2021 at 17:13:09 UTC from IEEE Xplore. Restrictions apply.

You might also like