Smart Real-Time Indoor Air Quality Sensing System and Analytics

- Indoor air quality monitoring and analytics is one of the important interdisciplinary research areas, which is attracting significant attention of various researchers from environment, mathematics, material science and electrical and computer engineering. According to a research study conducted by World Health Organization (WHO), pollution of indoor air is the most known hazardous case for respiratory diseases such as lung cancer, asthma and chronic diseases. Lack of information about the pollution sources and its serious impact on health leads to a huge number of people likely to be affected by various types of respiratory diseases. With the recent developments in sensing technology, machine learning and communication technology, IoT based Smart Real Time Indoor air quality sensing and analytics have been implemented to promote better awareness for users to alert them about indoor air quality to maintain the wellbeing in their indoor environments. The paper provides a proof of concept on IoT based Indoor air quality sensing system and analytics. The data is collected for analyzing indoor air quality in various indoor settings such as kitchen for oily based cooking, living room for insecticide spray, and smoking and flour mill for detecting flour dust during crop grinding. We used J48 and Naïve Bayes machine learning algorithm to model the air quality status. Result shows that the Naïve Bayes Algorithm detects 99.11% and J48 algorithm detects 99.30 % accurately


II. RELATED WORKS
Researchers have studied the problems related to air pollution using different technologies. Some of participatory sensing technique was developed for utilizing each person's mobile phone to create a collaborative sensor network to collect, share and analyze data.
In [7], [8] authors presented the concentration of carbon dioxide (CO 2 ) in indoor environment and analyzed the growth and decay rate of the pollutant. Brett J. et al. [9] shown that smoking is the most significant contributor to indoor air pollution in addition to a portion of the outdoor contribution. Researchers also proposed a cloud-based approachcomprising of particulate matter sensors and air quality analytics engine in the cloud for measuring PM2.5 in real time basis [10], [12]. In [11] Jong-J.etal. presented the role of sensor networkfor sensing various indoor air pollutants and airborne particles. They also discussed several factors that contributes to poor air quality in past and current building structure, so that the latter buildings are more airtight and hence brings in less fresh air from the outside. Sunyoung et al. [12], also developed a homebased PM 2.5 monitoring system to visualize and share the real time indoor air information with othersincreasing people' awareness towards IAQ. Haryonoet al. [13] emphasized on the pollutants emission from house hold activities and fuel based cooking especially liquid petroleum gas (LPG). They have shown that cooking ingredients and cooking methods strongly influences quality of indoor air. They have revealed that two typical cooking methods frying and boiling produces fine particles (PM2.5) and CO. Another researchers presented the rise of sensing technology for the energy management and IAQ in urban environments, also identified the major challenges for their large-scale deployment, and shown the research gaps that should be covered by future investigations along with the introduction of low-cost sensors technology [14]. In another study researchers also used the air quality data for building a model, based on artificial neural network to estimate how much hours an HVAC system should be turned on ahead of its original schedule to reduce indoor PM2.5 to a best situation [15]. Goncalo M. and Rui P. [16] developed an indoor air quality system based on an IoT paradigm for ambient assisted living to know a variety of environmental parameters such as air temperature, relative humidity, luminosity and concentration of carbon monoxide (CO), carbon dioxide (CO2) gases. Authorsalso developed air quality prediction model using neural network for environmental engineering problems [17] - [18]. Various parameters such assulfur dioxide (SO2), carbon monoxide (CO), nitrogen dioxide (NO2), nitric oxide (NO), temperature, relative humidity and air velocity were used for modeling to minimize the increasing effects of air pollution. The concentration and composition of particles in indoor air are affected by both indoor and outdoor pollution sources. Furthermore, in another machine learning approach, KingsyGrace. R et al. in [21] presented analysis of air pollution using k-means clustering algorithm and compared the result with Possibility based Fuzzy C-Means clustering algorithm. The research work highlights that traditional methods are too complex to process and analyze the bulky data, and therefore heterogeneous data is converted into meaningful information by using data mining approaches for decision making. Luis P. and Sanchez F. [24], presented models for assessment and prediction of air quality. Firstly, they developed an air quality assessment by using computational model for evaluating toxic compounds that affect sensitive people. They also proposed the model that predicts the concentrations of air quality by using an autoregressive technique to provide air quality index based on the fuzzy inference system previously developed.Another study in [25] found that smoking, candle, frying, grilling, stove use, toasting, cooking pizza, vaporizing oil and fan heater use could raise the indoor micrometer particleconcentration levels. Asmaa A. et al. also shown that the rise in concentration of CO2 at a work place leads to a rise in the amount of volatile organic compounds (VOCs), hence decreases the performance of the workers in office [28].
III. METHODOLOGY This section describes the methodology used in the study, the hardware and software components, threshold based algorithm, ML algorithm, andanalysis of data generated by sensors, android app usedfor visualizing the sensor data. The air quality sensors, microcontroller and other important devices used for the study are explained in detail.Architectural design: The crucial components used in the system development are described in the following section.

A. Sensing components
The IAQ Sensing layer consists of the air quality sensors, those are PM 2.5 and VOCs, CO, Temperature and humidity sensors.   The air quality sensorsare described in the following sections. 1) MQ-135 Air quality sensor: thismeasures general air quality because it is sensitive to many gazes and VOCs (Volatile Organic Compounds) including formaldehyde, benzene, ammonia (NH3), nitrogen oxides (NOx), alcohol, smoke and carbon dioxide (CO2). We used this sensor for sensing VOC pollutions.
2) MQ-7 Carbon monoxide (CO) sensor:used for detection of CO concentration. The detection Range is 0-500ppm (part per million). The Application area is domestic CO gas leakage alarm. The MQ-7 gas sensor is SnO2, which with lower conductivity in clean air. It detects CO at low temperature (heated by 1.5V). The sensor's conductivity gets higher along with the CO gas concentration is rising. 3) DHT22 Temperature and humidity sensor:DHT22 is a digital, temperature and humidity sensor. It uses a capacitive humidity sensor and a thermistor to measure the surrounding air, and generate a digital signal on the data pin (no analog input pins used).It is shown in fig. 5 Cost effective having 4 pins  Uses 3 to 5V power  Good for -40 to 125°C temperature readings  Good for 0-100% humidity readings 4) Sharp GP2Y1010AU0F:This is an optical air quality sensor, designed to sense dust particles with small size. An infrared emitting diode and a phototransistor are diagonally arranged into this device, to allow it to detect the reflected light of dust in air. It is effective in detecting very fine particles like cigarette smoke, and also commonly used in air purifier systems. It is shown in fig. 5(b) 5) HC-05 Bluetooth module: It is IEEE 802.15.1 standardized protocol, through which one can build wireless Personal Area NetworkHC-05 Bluetooth module is designed for wireless communication. It uses serialport to communicate with microcontroller devices. It is used for many applications like wireless headset, game controllers, wireless mouse, wireless keyboard etc. It has range up to <100m. It is shown in fig. 5(c) B. Connecting and interfacing equipment's 1) Abreadboard: is a device used as a construction base in developing an electronic circuit.It is a good unit for making temporary circuits and prototyping.It is made of plastic having strips of metal underneath with a numerous holes and it is solder less, which allows them to be reusable.
2) Jumper wires are an electrical wire with a connector or pin at each end. Used to interconnect the components of a breadboard with other equipment or components, without soldering.
3) Resistors: are usedto reduce current flow, adjust signal levels, divide voltages, and terminate transmission lines.
4) Capacitorare used for storing energy electrostatically in an electric field. It also used for power conditioning. We used capacitor 220µF (microfarad) with PM2.5 sensor. C. Processing and communication components 1) Arduino Uno R3 microcontroller: an arduino is a microcontroller used for building and interfacing various sensors and devices required for a given project. It allows uploading sketches/programs into the microcontroller memory. Arduino consists of both a physical programmable circuit board (often referred to as a microcontroller) and a software, or IDE. . It is shown in fig. 4(a).
2) Gateway device:we used the personal computer as a gate way.

3) Bluetooth technology:
It is IEEE 802.15.1 standardized protocol, through which one can build wireless Personal Area Network. HC-05 Bluetooth module is designed for wireless communication.It uses serial port to communicate with microcontroller devices. It is used for many applications like wireless headset, game controllers, wireless mouse, wireless keyboard etc.It has range up to <100m. The

A. Experimental Setup
Data Collection:the data collection hasbeen completed in two weeks in three various environments to obtain the sufficient amount of data. We deployed our sensor module during home based activities especially cooking in the kitchen, smoking and spraying of insecticide in the living room and grinding flour mill. The sensor module was kept around two to five meter (2-5m) near to the cooking, smoking, spraying and grinding activities to detect the emission of pollution. The generateddata was stored to comma delimited value (CSV) file format for further analysis. The features on the CSV file are temperature, humidity, PM2.5, VOC, CO, AQI and Air quality status. B. ML algorithm for classification of the air quality WEKAis a suit of machine learning software tool having various standard data mining tasks such as data preprocessing, regression, clustering, association rules, classification, prediction, feature selection and visualization. After gathering air quality data, we performed the preprocessing such filling or cleaning missing data values, removing inconsistent data points. 1) Naive Bayes Machine Learning Algorithm:This algorithm is a classification algorithm used for binary (two-class) and multi-class classification problems. The technique is easiest to understand when described using binary or categorical input values.We applied the naïve Bayes algorithms to our data set, the algorithm detects 99.11% instances correctly as healthy and 0.89% as unhealthy.
2) J48 Machine Learning Algorithm:This is one of best predictive and classification ML algorithm. We used this ML algorithm for accurately classifying the AQI category either healthy or unhealthy depending on the available features of the data set. We followed the EPA AQI standard to group the AQI categories of good and moderate as healthy and group the remaining four AQI categories as unhealthy [32]. The total data set contains 3043 instances. The algorithm detects 99.31% instances correctly as healthy and 0.69% asunhealthy.

Result of Naïve Bayes Algorithm
The pollu the graph ution event du hs in fig. 7 ue to various

C. Sma
The goal streaming applicatio applicatio be displa smart ph pollution e above graph sho rt phone appl l of developin g indoor air on, thelogin w on. If the user ayedThen esta hone through n, AQI and eac (c) ows (a) CO, (b) P genera lication ngan android quality data window will r want to exit, ablishing the B serial port by ch pollutant co PM