0% found this document useful (0 votes)
16 views8 pages

IJRET20170609007

Uploaded by

barlcarl59
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views8 pages

IJRET20170609007

Uploaded by

barlcarl59
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308

INDOOR AIR QUALITY MANAGEMENT USING RASPBERRY PI AND


GRAPHLAB

Somdeep Acharyya1, Sayan Hazra2, Atanu Pal3, Nabarun Sengupta4


1
Student, Department of Computer Science and Engineering, University Institute of Technology,
Burdwan University, West Bengal, India
2
Student, Department of Electrical Engineering, University Institute of Technology,
Burdwan University, West Bengal, India
3
Student, Department of Applied Electronics and Instrumentation Engineering, University Institute of Technology,
Burdwan University, West Bengal, India
4
Nabarun Sengupta, Department of Electronics and Communication Engineering, University Institute of Technology,
Burdwan University, West Bengal, India

Abstract
Indoor air pollution is a matter of serious concern at present times. Indoor air pollution or indoor air quality degradation is
becoming an issue of discussion among scientists and environmentalists in today’s days. As human beings generally spend most of
their time indoors, having good indoor air quality and its real time information is critical for maintaining human health and
productivity. According to the EPA, indoor air even in centrally air conditioned buildings is more polluted than outdoor air, due
to improperly maintained ventilation systems. Hence it’s an utmost necessity for human beings. Many reports have come out
showing how much harmful is Indoor air quality pollution and the bad effects and diseases caused by such deterioration in the
indoor air quality. Many solutions have been devised to tackle this air abuse and reduce its effects, also several methods of
analyzing the quality of air and further monitoring through specialized sensors, the quality of air inside our household rooms like
bedrooms or drawing rooms, even in classrooms and halls. But each of the other works have their own limitations and restraints,
some are gathering data only from the classrooms or hall rooms. Nowhere there was any implementation of such measuring
system in a bedroom, drawing room. In this research work, we have proposed a quick and easy solution of monitoring the air
quality using dedicated sensors by connecting them to a microcontroller. The entire setup is desired to be placed inside
classrooms full of students as well as in household rooms having people in them, at various times of the day with different
temperature and humidity conditions. The data collected from the classrooms and drawing rooms or bedrooms under several
environmental instances are to be uploaded to a server, from where it would be retrieved into our machines. After this collection
of data, this data to be analyzed using some machine learning tool to invigilate the attributes of the air present in the rooms,
namely the concentration of CO2, CO, the quantity of dust particles and their relative variations with changes in temperature or
humidity or the number of persons present inside the room. Thus we have developed (1) a prototype to measure the indoor air
pollutant concentration (2) a wireless sensor network architecture with a microcontroller (3) a data analyzing algorithm using a
sophisticated but popular machine learning tool. Advantages of this prototype is that it was of very low cost and measurement was
effective, also the presentation of the data was not at all robust but easy to view and monitor.

Keywords: Raspberry pi, CO2, CO, dust, Sensors, temperature and humidity, IAQM, Zigbee, Python, Graphlab
--------------------------------------------------------------------***----------------------------------------------------------------------

1. INTRODUCTION lives as several diseases are introduced to the body due to


this indoor air pollution. Even it is predicted that air borne
Air quality is one of important measures to be closely diseases are occurring in much due to atmospheric air
monitored in real time for today’s urban ecosystems, pollution, but because of the bad quality of air inside the so
because air quality has a major influence on the health, called safe places such as rooms like classrooms, bedrooms,
safety, productivity and comfort of people. With growing drawing rooms and more. According to a report in the
transportation and population density, increasing global National Air quality Standards, the major important factors
warming and sudden climate change, the air quality has which deform the air quality are as such: CO2, CO, Dust
frequently below the environmental quality standards. Many Particles, SO2, Ozone and Radon. The CO2, CO are present
countries have developed their own infrastructure to monitor in minute quantity in the atmosphere, Dust particles are also
and provide alerts to their citizens. However it is presumed present in the air , more due to the human activities, So2 and
nowadays that besides the atmospheric air quality, indoor air some other oxides of Nitrogen and Sulphur also are
quality is deteriorating day by day with enormous use of Air associated with the air pollution. Ozone plays a major role in
conditioners and other gadgets, also due to the excessive use affecting the air quality even inside the room. A very rare
of various devices of particular usage. It is reported that this element Radon is also a part of this game, which is released
degradation of air quality is extremely harmful for human in the air from the damped walls of old buildings and from
_______________________________________________________________________________________
Volume: 06 Issue: 09 | Sep-2017, Available @ http://www.ijret.org 29
IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308

cemented floors even. Though in minute quantity, still the change of values, whereas reference [5], [6] takes real time
presence of Radon in the air present inside the rooms is action based on the values from the sensors. [4] Has a
harmful for the persons living inside them. Dust particles problem of issues such as spectrum availability detection,
play a major role in the pollution and are extremely harmful. interference mitigation and spectrum sharing. Reference [7]
Many studies have shown that exposure to atmospheric to improve accuracy and energy efficiency, MAQS
particulate matter (PM) is associated with adverse health incorporates three novel techniques an accurate temporal n-
impacts such as heart and respiratory diseases. In this gram augmented Bayesian room localization method that
research, we have developed an air quality sensor system requires few Wi-Fi fingerprints an air exchange rate based
using CO2, CO, Dust sensors. We have chosen only these IA sensing method, which measures general IAQ using only
gases as these are the major pollutants that affect the indoor CO2 sensors and a zone-based proximity detection method
air quality. Along with these, we have used a Temperature for collaborative sensing, which saves energy and enables
and Humidity sensor to view the changes that take place in data sharing among users. Others use Wi-Fi module,
the concentration of CO2, CO, dust in the air with the whereas reference [2],[9], [10] uses Zigbee devices for
changes in temperature, humidity or the number of people communication between sensors and an interface for
present inside the rooms. Our challenges are to: monitoring.
Getting involved in participatory air quality monitoring to
collect useful data to interpret the degree of pollution inside 3. SETUP
the rooms. These involve providing with:
1>Low-cost and low-power measurement hardware suitable The IAQ assessment system deals in the detection and
for measurements of indoor air quality. analysis of Indoor Air Quality. In fact, Indoor Air Quality is
2>Unobtrusive and user-friendly data acquisition and measured in the built environment, provides a continuous
processing and observation tool, a machine learning tool. stream of information for monitoring the air conditions
3>Support in gathering high quality data. inside the room and provides a platform for informed
decision making.
To measure the urban air pollution we needed to setup the
system in the streets or in railway stations or in busy public The prototype has two layers, a Raspberry Pi based system
pacifies. However this will have a big disadvantage. If gas associated with CO sensor, CO2 sensor, Temperature and
sensors are placed on vehicles running on the streets, the gas Humidity sensor and dust sensor and a monitoring system-
sensors can be moved or dislocated easily at random. At Graph Lab Create with Jupyter Notebook. This study
some frequency, every sensor runs with other sensors and describes the IAQ system, developed by the authors, which
they share a single location. Since several types of sensors aims to ensure autonomously and accurately the IAQ
are used in the network at the same time, the attributes or the monitoring in different indoor places such as bedrooms,
characteristics of the measurement error are different. Some drawing rooms, and classrooms. The system consists of a
of the sensor outputs are lower than real gas concentration low cost indoor air quality monitoring wireless sensor
and the others are higher than real concentration, although system, developed using Raspberry PI, Wi-Fi modules and
they are exposed to the same gas concentration at the same micro sensors, for storage and availability of monitoring
place. data on the server in real time and analyzes the changes in
the concentration of particles and compounds with
temperature and humidity.
2. RELATED WORKS
This section summarizes the prior work and efforts for We have placed the system in the air conditioned as well as
monitoring indoor air quality using sensors and then non AC classrooms of University Institute of Technology,
wirelessly monitoring accordingly. In reference[3] provides Burdwan University, at different times of the day, at such a
an integrated sensing node or WSN System for monitoring places where ample amount of student activity is available
build upon a Raspberry Pi architecture that experimented at and flow of air is also sufficient. We have put the setup there
various places such as church, classrooms and bedrooms ensuring there is proper variation in CO 2 and CO
whereas reference[5] integrates the use of portable AQS and concentration over time. We have also placed the system in
monitoring using smartphone on Arduino architecture which bedrooms at daytime and night for when (1) the room was
use AQS and a zone-based proximity detection method for empty (2) there were people working in the room (3) people
collaborative sensing, which saves energy and enables data were sleeping at night.
sharing among users but uses only C02 sensor similar to
smartphone sensor designed in [7], whereas Air quality is In order to achieve this objective a comprehensive review of
defined by 7 factors which is being using by reference[1] in the literature of journal articles, conference papers and
Arduino platform only using Wi-Fi communication and [11] edited volumes. Given that IAQ sensing is still in formative
uses IOT and wireless sensors. stages and not yet been realized, it was necessary to consider
a wide range of sources for a comprehensive review of the
Real time indoor sensors are being used in most of the topic. The IAQ is still in a conceptual state and the field is
references for indoor in some cases such as [4], [5], [8], and very dynamic at this point, reviewing only journal articles
[12] whereas [6] designed for urban Air Quality monitoring. that make a specific contribution to the IAQ would yield
Most of them uses an Arduino and auto calibration sensors. only a very limited review.
Reference [3], [4] produces a feedback alert for any abrupt
_______________________________________________________________________________________
Volume: 06 Issue: 09 | Sep-2017, Available @ http://www.ijret.org 30
IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308

Fig-3: MQ7 sensor.

Fig-1: shows implementation of IAQM kit in household. 2>MQ135 Sensor: We are using this sensor for collecting
the amount of CO2 in air in ppm. A high sensitivity and
The symbol represents the kit. wide range and fast response gas sensor which can detect
NH3, NOx, Benzene and Carbon Dioxide (CO2) with a
range of 10-1000 ppm. Circuit voltage 5V±0.1 and works
well at a temperature range of -10°C to 45°C. Requires
manual calibration. It can collect data in 65%±5% humidity.

Fig-2: shows implementation of IAQM kit in classroom.

Each sensor is connected to a ZigBee radio transceiver i.e.,


the XBee module. There is a user application program on Fig-4:MQ135 sensor.
each sensor node, which handles sampling data from
sensors. The XBee module on the base station is configured 3>GP2Y1010AU0F Sensor: A dust sensor by optical
as coordinator and the XBee modules on the sensor nodes sensing system. It detects the reflected light of dust in the air
are configured as routers. To access the sensor nodes and the and is very sensitive to dust. The working temperature is -
data from the outside world, a web application is developed 10°C to +65°C and the working voltage is -0.3V to 7V.
on the base station. A web application is developed to Requires manual calibration.
provide users the data that is collected form the sensors to
our local machines for the purpose of analysis using
Graphlab.

4. HARDWARE SPECIFICATIONS
The IAQ sensors are built using the RaspberryPi a mini
computer that has all the features of a computer processor.
The operating system used is Raspbian and the Linux core is
Debian. The firmware of the Sensor kit was implemented
using the SSH Putty and the commands and codes for the
sensors was given in a command terminal using basic Linux
commands for Debian core.
Fig-5:GP2Y1010AU0F sensor.
A brief description of each sensor and components is given
below:- 4>DHT11 Sensor: A digital temperature and humidity
1>MQ7 Sensor: A highly sensitive, stable and long life sensor, containing a calibrated digital signal output of the
Carbon Monoxide(CO) sensor with a range of 10ppm- temperature and humidity. The sensor includes a resistive
500ppm with an operating voltage of 5V±0.1 and works sense of wet components and an NTC temperature
well in temperature range of -20°C to 50°C. Humidity measurement device and connected with a high performance
Range– (55±5% RH). Requires manual calibration. It 8 bit microcontroller. Temperature range: 25°C±2°C.It
require a preheat time of 48 hours. requires a power supply of 3.5V-5.5V DC.
_______________________________________________________________________________________
Volume: 06 Issue: 09 | Sep-2017, Available @ http://www.ijret.org 31
IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308

2> The system was again operated at evening in another


classroom in the same institution in which the room was
empty for the first 20 minutes and then it was occupied
with students. Data was collected from that room for
about 2 hours.
3> The IAQM kit was again used in two bedrooms, one at
the noon, another in the same room in evening, both
instances had people activity; while the last data
collection was done in another room at midnight with
Fig-6:DHT11 sensor. people sleeping in it

5. SOFTWARE IMPLEMENTATION Thus, these were the instances under which data was
collected and this data was sent to the server via the
After the collection of data from the server to our local communication system associated with Raspberry pi.
machine, we are converting the file into csv format. Python
is used as the programming language for the entire purpose Then graphical analysis is done for all the data for Carbon
of analysis of data. We are using Jupyter Notebook for the Monoxide (CO), Carbon Dioxide (CO2) and dust particles
programming, along with GraphLab Create developed by with respect to time, temperature and humidity. The
Turi Company. Jupyter Notebook App is a server-client graphical display of the environment factors allows a greater
application that allows editing and running notebook perception of the behavior of the monitored parameter than
documents, i.e. ipynb files via a web browser. Jupyter numerical display format.
notebook has a notebook kernel which is a “computational
engine” that executes the code contained in a Notebook In the ipynb file that contained the python code os package
Document. An ipython kernel referenced in this module and graphlab package was imported to convert the file to csv
executes python code. We are also using GraphLab Create format and start graphlab analysis respectively. On
which is a graph based, high performance, distributed executing the entire code together by running all the cells,
computation framework written in C++. It is an open source we could start the Graphlab view in a Google chrome tab,
project using an Apache license. The GraphLab framework through which we could view the data and their relative
is a parallel programming abstraction targeted for sparse variations in Scatter plot format or in Bar graph format or in
iterative graph algorithms and it provides a high level Heat maps. We can also calculate the mean, median,
programming interface, allowing a rapid deployment of regression coefficients and other statistical parameters by
distribute machine learning algorithms. For the installment using the Graphlab software.
of Jupyter Notebook, Anaconda is must in any machine. So
we have also installed Anaconda. The following Figs show the results that were obtained from
Graphlab from the data collected from the classrooms of the
We have developed an ipynb file where the python code is institute.
written, and a C program to initiate the ipynb file. For the
browser required for the Jupyter Notebook, we have used A sample of the code used is shown over here:
Google Chrome. The ipynb file, the csv files which contains
all the data, the C program all are kept in the same directory # coding: utf-8
in which Anaconda is located. This is extremely important # In[49]:import graphlab# In[50]:import os#
for the correct execution of the system. Another thing that In[51]:file="text.doc"# In[52]:fd=open(file,"r")#
was initially a limitation that the csv file did not have the In[53]:m=fd.read()#
column names specified (what values in what columns In[54]:data=graphlab.SFrame.read_csv(m)#
represented which parameter). So we separately added In[55]:g=data.show()# In[56]:sqft_model =
column names to each and every csv file containing data graphlab.linear_regression.create(data, target='CO2',
using python commands in Jupyter Notebook. features=['Index'],validation_set=None)# In[57]:print
sqft_model# In[58]:print sqft_model.evaluate(data)#
6. ANALYSIS AND RESULTS In[59]:sqft_model.get('coefficients')# In[60]:print
The AQM Sensor kit collects all the transfers via the sqft_model.show()
communication device to the server. Samples of data were
taken from rooms containing variable number of people
were taken and recorded and varied according to
temperature changes.
1> The system was initially placed in the Computer
Science Lab (air conditioned) in University Institute of
Technology, Burdwan University during a lab session at
the noon time for about 1 hour and 30 minutes. The lab
was filled with pupils and there was a continuous
stream of air flow as well.

_______________________________________________________________________________________
Volume: 06 Issue: 09 | Sep-2017, Available @ http://www.ijret.org 32
IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308

Fig-7: shows the variation of CO2with Time (Index).

Fig-8: shows the variation of CO with Time (Index) in ScatterPlot.

_______________________________________________________________________________________
Volume: 06 Issue: 09 | Sep-2017, Available @ http://www.ijret.org 33
IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308

Fig-9: shows the variation of dust (VOMeasure) with Time (Index).

Fig-10: shows the Statistics of CO vs CO2 measure.

_______________________________________________________________________________________
Volume: 06 Issue: 09 | Sep-2017, Available @ http://www.ijret.org 34
IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308

Fig-11: shows the Graphlab canvas of the dataset.

Fig-12: shows the datasheet.

_______________________________________________________________________________________
Volume: 06 Issue: 09 | Sep-2017, Available @ http://www.ijret.org 35
IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308

7. FURTHER DEVELOPMENTS Monitoring System With Forecasting Models”, IEEE


SENSORS JOURNAL, VOL. 16, NO. 8, APRIL 15, 2016.
Further developments that can be done in this field that is, [7]. Yifei Jiang, Kun Liz, LeiTian, Ricardo Piedrahita,
this IAQM kit can be installed in an HVAC system or in Xiang Yun et al, ”MAQS: A Personalized Mobile Sensing
household air conditioning system so that it can monitor the System for Indoor Air Quality Monitoring”, UbiComp'11 /
air condition preset inside the room and then take several Beijing, China
measures if the amount CO2 or dust present in the room is [8]. Xuxu Chen, Yu Zheng, Yubiao Chen et al,” Indoor Air
over adequate limits. This kit can also be implemented to Quality Monitoring System for Smart Buildings”,
build automatic air purification devices. Besides some UBICOMP '14, SEPTEMBER 13 - 17, 2014, SEATTLE,
notification system can be joined with it so that it can notify WA, USA.
the user if the pollution quantity goes over a limit. The best [9]. H. Ghayvat , S.C. Mukhopadhyay, X. Gui, “Issues and
result of this all is that system like this can help for the mitigation of interference, attenuation and direction of
benefit of health by stopping and preventing the burden of arrival in IEEE 802.15.4/ZigBee to wireless sensors and
symptoms and diseases linked with that of indoor air networks basedsmart building”, Measurement 86 (2016)
pollutants. In addition to this validation study, physical 209–226 .
system and web portal improvements can be done by adding [10]. PetrosSpachos, Liang Song, and DimitriosHatzinakos,”
a real time feedback process to our android smartphone Prototypes of Opportunistic Wireless Sensor Networks
which is proposed in future for further development in Supporting Indoor Air Quality Monitoring’, The 10th
AQM. Annual IEEE Consumer Communications and Networking
Conference – Demos.
8. CONCLUSION [11]. George Mois, TeodoraSanislav, and Silviu C. Folea,
In this project work, we have developed an effective indoor “A Cyber-Physical System for Environmental Monitoring”,
air quality monitoring system with Raspberry pi IEEE TRANSACTIONS ON INSTRUMENTATION AND
microcontroller and specific sensors for collection of data. MEASUREMENT, VOL. 65, NO. 6, JUNE 2016.
The main purpose was to show the show the changes for [12]. Yun Xiang, Ricardo Piedrahita, Robert P. Dick,
environmental parameters with persons which is shown Michael Hannigan, Qin Lv, Li Shang,” A Hybrid Sensor
effectively. The advantage of this model is its small size, System for Indoor Air Quality Monitoring”, 2013 IEEE
low cost and high modularity; also the process of International Conference on Distributed Computing in
observation of data is easy and very user friendly. The result Sensor Systems.
was obtained monitoring classrooms, bedrooms and other
room with some persons and the obtained results were very BIOGRAPHIES
promising giving a significant contribution to indoor air Somdeep Acharyya, 3rd year Student of
quality management. Dept. of Computer Science and
Engineering in University Institute of
REFERENCES Technology, Burdwan University
[1]. Erik Wilhelm, San.draSiby, Yuren Zhou, Xavier pursuing B.E. degree.
JayarajSiddarth Ashok, et al. , Wearable Environmental
Sensors and Infrastructure for Mobile Large-Scale Urban Email id: somdeep.acharyyasomdeep@ gmail.com
Deployment “,IEEE SENSORS JOURNAL, VOL. 16, NO.
22, NOVEMBER 15, 2016. Sayan Hazra, 3rd year Student of Dept. of
[2]. Sean Dieter Tebje Kelly, Nagender Kumar Suryadevara, Electrical Engineering in University
and Subhas Chandra Mukhopadhyay,“Towards the Institute of Technology, Burdwan
Implementation of IoT for Environmental Condition University pursuing B.E. degree.
Monitoring in Homes” IEEE sensors journal, vol. 13, no. 10, Email id:[email protected]
October 2013.
[3]. Jung-Yoon Kim, Chao-Hsien Chu, and Sang-Moon Shin
“ISSAQ: An Integrated Sensing. Systems for Real-Time Atanu Pal, 3rd year Student of Dept. of
Indoor Air Quality Monitoring” IEEE sensors journal, vol. Applied Electronics and Instrumentation
14, no. 12, december 2014. Engineering in University Institute of
[4]. Petros Spachos, Dimitrios Hatzinakos, “Real-Time Technology, Burdwan University pursuing
Indoor Carbon Dioxide Monitoring Through Cognitive B.E. degree.
Wireless Sensor Networks,” IEEE sensors journal, vol. 16, Email id:[email protected]
no. 2, january 15, 2016.
[5]. DivyaLohani and DebopamAcharya,”SmartVent: A Nabarun Sengupta, 3rd year Student of
Context Aware IoT System to Measure Indoor Air Dept. of Electronics and Communication
Qualityand Ventilation Rate,” 2016 17th IEEE International Engineering in University Institute of
Conference on Mobile Data Management. Technology, Burdwan University pursuing
[6]. Khaled Bashir Shaban, Senior Member, IEEE, Abdullah B.E. degree.
Kadri, Member, IEEE, and EmanRezk, “Urban Air Pollution
Email id: [email protected]
_______________________________________________________________________________________
Volume: 06 Issue: 09 | Sep-2017, Available @ http://www.ijret.org 36

You might also like