Agawin Manuscript Comments
Agawin Manuscript Comments
AN UNDERGRADUATE THESIS
Presented to
the Computer Engineering Department of
School of Engineering and Architecture
Ateneo de Davao University
E. Jacinto St., Davao City
In Partial Fulfilment
of the Requirements for the Degree of
BACHELOR OF SCIENCE IN COMPUTER ENGINEERING
Air pollution poses a significant threat to global health, ranking as the fifth
leading risk factor for mortality worldwide and correlating with increased
Chronic Obstructive Pulmonary Disease (COPD). Among the major pollutants, ozone
(O3) and particulate matter (PM) are particularly concerning, with inhalation leading
to claim over 500,000 lives annually. Despite efforts by organizations like the
quality monitoring, especially in rapidly growing urban areas like Davao City. The
primary objective of this study is to develop a low-cost air quality monitoring device
capable of real-time data collection for pollutants such as O3, PM2.5, and PM10,
alongside GPS location data. This device aims to address the limitations of existing
stationary air pollution. Additionally, the study seeks to raise public awareness
through visual representations of air pollutant data, aiding decision-making and future
research efforts. By providing accurate and accessible air quality data, the study
The study details the calibration process of the sensor, utilizing the Linear
DENR EMB R-XI and AdDU air quality monitoring stations to ensure consistency.
Data gathering involves testing two deployment types: Mobile and Stationary
functionalities. The Mobile Route along Roxas Avenue provides running average
readings, while the Stationary location near the AdDU PM 2.5 Air Quality monitor
offers stable pollutant readings and corresponding Air Quality Index (AQI) values. A
comparison between data intervals reveals connectivity issues on April 1st due to
Mobile monitoring generates a heat map indicating areas with varying air quality
along the route, aiding in informed decision-making. The study concludes with the
web application developed facilitates data visualization and management, with data
securely stored in a cloud database for accessibility and analysis. These findings
ACKNOWLEDGEMENT vii
LIST OF TABLES x
LIST OF EQUATIONS xi
CHAPTER I 1
CHAPTER II 8
2.1.2 Ozone(O3) 8
CHAPTER III 20
CHAPTER IV 49
CHAPTER V 63
5.1 Conclusions 63
REFERENCES 64
APPENDIX A 69
A.1 NodeMCU V3 70
APPENDIX B 73
APPENDIX C 75
7
APPENDIX D 76
APPENDIX E 77
APPENDIX F 78
8
ACKNOWLEDGEMENT
9
LIST OF FIGURES
Figure 2.2.3: PM2.5 and PM10 AQI 2012 Updated Breakpoints [24] 11
Figure 2.7.2: Enclosure Implementation for Fine Dust Sensor and Ozone Sensor 19
LIST OF TABLES
Table 3.6.1: Linear Regression Data for Raw Data vs DENR PM2.5 Calibration 35
Table 3.6.2: Line of Best Fit DENR PM 2.5 Sensor with Corrected values 36
Table 3.6.3: Linear Regression Data for Raw Data vs AdDU PM2.5 Calibration 38
Table 3.6.4: Line of Best Fit AdDU PM 2.5 Sensor with Corrected values 39
Table 3.6.5: Linear Regression Data for Raw PM10 vs DENR PM10 Calibration 41
Table 3.6.6: Line of Best Fit AdDU PM 10 Sensor with Corrected values 41
LIST OF EQUATIONS
INTRODUCTION
expressing the research problem. It likewise examines the study's objectives, the
1 Hidden marker
Air pollution is the fifth leading risk factor for mortality worldwide. There is also
a relationship between air pollution and increased hospitalizations [1]. In general, air
fuel consuming products. From air pollution, comes tons of possible health risks like
related problems. The health risks are enough reason to monitor the air quality so
According to the American Lung Association’s 2019 “State of the Air” report,
“the number of people exposed to unhealthy air increased to nearly 141.1 million.
That represents an increase from the past two reports: higher than the 133.9 million
in the 2018 report (covering 2014-2016) and the 125 million in the 2017 report
(covering 2013-2015).” Among the major pollutants that affect health are ozone (\
ce{O3} or smog) and particle matter (soot) pollution [1]. The effects of inhaling these
pollutants come in the form of health risks. Inhalation of Ozone and Particle pollution
pose immediate breathing problems, cardiovascular effects, and long term effects
In air pollution, studies show that there is a consistent increase in cardiac and
a major contributor in air pollutants and is estimated to kill more than 500,000 people
2
each year [4]. Particulate matter are also identified as aerosols which are liquid
From the State of the Global Air report of 2019, “on-the-ground air quality
monitoring stations are few and far between in the rapidly growing urban areas of
countries at low and middle levels of development, as well as in rural and suburban
areas throughout the world” [2]. Methods of gathering data are now becoming a trend
and the technology for air quality monitors become readily available for public use.
The methods of measuring air quality are of international standards and allow for a
(DENR), have already made efforts in attaining and monitoring ambient air quality of
broad area, and refers to the atmosphere’s average purity as distinguished from
In Davao, DENR EMB of Region 11(DENR EMB R-XI), also has sensors for
air quality located on very specific areas, which are also unable to collect or provide
for most parts of the City that is highly congested with people and motor vehicles.
The DENR EMB R-XI also only has two monitor locations which are automated and
is able to provide data at any given time. Knowing that Davao is a very large city,
these monitors are not enough to provide quality data and no matter how far the
radius is covers is, it is unable and inefficient to cover where most of the population
Davao City’s ambient air quality data is insufficient due to the lack of
monitoring stations. There is only six air quality monitoring stations deployed in the
city. These stations are situated in Ilang, J.P. Laurel/V. Mapa Street, Davao Memorial
Park, Toril Poblacion Open Park, Calinan National High School, and Davao
International Airport [8]. With the stations, DENR EMB XI used the deduction method
to cover the rest of the city. The deduction method is able to produce better results
when more data is available [9]. Expansion of monitoring stations for the DENR EMB
XI must be met to provide the public with higher quality data for further studies to
utilize.
Out of the six air quality monitoring stations deployed, only two of these are
automated. These are the Calinan District station and the Davao International Airport
station. With this, only the Calinan district station is registered in the Air Visual
database and website [10]. This station has recent data that range from the moderate
(81 air quality index) to a high (102 air quality index). For the both automated
stations, the data that these are able to produce are real-time averages of the
respective area. Most of the industry and population are not located in such far
places. There is higher concentration of people and air pollutants in urban areas,
where poorer air quality poses more detrimental health risks for its residents [7].
The DENR EMB R-XI air quality monitoring stations around the city are
procure and expensive, thus an alternative solution must be explored. The alternative
must be able to produce similar quality of data, should be easily replicated, compact,
and mobile. The current implementation of the reference air quality monitoring
stations require the data retrieval team to collect the data after 6 days [11] [12].
However, there are studies that suggest a real-time implementation of gathering air
pollution data is much more convenient than having to conduct site visits often.
4
device that is able to display real-time data and save the data of deployment areas or
routes with GPS specified locations. To specify, the objectives of the study are the
following:
Matter 2.5 microns, Particle Matter 10 microns(O 3, PM2.5, and PM10), and
microcontroller, a fine dust sensor for PM 2.5, and PM10 microns, and an
O3 sensor.
2. To include the capability of the device for real-time stationary and mobile
The significance of the study is to deliver current and reliable data of air
quality
specifically Ozone(O3), PM2.5 and PM10 with GPS locations for mapping applications.
The study also stands to provide the DENR EMB R-XI with extensive measurements
also for the benefit of the public by spreading awareness that certain locations are
not optimal for travel especially for commuters with breathing-related problems. The
5
study will also open avenues for future research based on the air quality and pollution
The study aims to provide data for the DENR EMB R-XI, for a low cost,
accurate, and multi-point reading. The sensors to be used must be calibrated and
tested in accordance with the present and internationally calibrated sensors available
by the DENR EMB R-XI. The data produced by this study will also benefit the people
of Davao City by way of giving awareness and being able to map or show a
visualized proof of the status of air pollution in certain vicinity’s at given time slots.
Due to limitation in the deployment of the device and the calibration delay
from the DENR, the study will be limiting its area to one stationary and mobile
location respecitively. The stationary location is on the 2 nd floor of the Canisius Bldg.
in the College Campus, while the mobile location is a mobile route along Roxas
Avenue.
The conceptual framework as seen in Figure 1.3 has four levels. The first
level is the Air Pollution Monitor. This level comprises the hardware module of the
study and collects the data from the area. The data is composed of three major parts,
which are the value of the pollutants, the GPS location of the sensor and its time
The second level is the Data Delivery System. In this level, the data is
delivered from the sensors to the read only memory module of the system for offline
7
data storage. Once connected to a Wi-Fi with internet service, the data will be
delivered to a cloud data storage for use with the next level of the system.
The third level is the Web Application. This level is one of the major software-
based level of the study as this will serve as the visualization of the data delivered to
the cloud storage. The data in the cloud storage will then be displayed in the web
application in the form of tabulated data and a constantly updated Air Quality Index
for the specific pollutant and location of the device. The web application level is
The fourth level is Air Quality Information. Having the ability to access the
previous level on any device with a browser installed, gives the users an avenue to
be aware of the current air pollution in the specific areas. The air quality information
also provides the user with quality visual representations of the data produced. This
also stands for the ability to cater future studies with the matter of air quality and the
AQI A numerical value for measuring the quality of air in regards to air pollution and
health concerns.
environmental management.
CHAPTER II
This chapter will discuss recent and past sources related on the study. These
sources include articles and research publications used to further understand the
1 Hidden marker
physical form; gaseous and particulate (PM). Various gaseous and particulate
pollutants have an affect on the incoming or outgoing solar radiation which then
Environmental Protection Agency(US EPA) have set global standards for Air Quality.
These standards lessened the widespread of visible air pollution ranging from the
1970's. However, air pollution is still harmful even when it is not visible. While the
health effects of air pollution differ depending on the gas, the common risks to health
are lung cancer, acute respiratory infections, and chronic obstructive pulmonary
1.1.2 Ozone(O3)
oxides and volatile organic compounds emissions. Reduced ozone levels resulting
from ozone layer depletion implies that there is significantly decreased protection and
The health risks of atmospheric ozone exists in two scenarios. The first
scenario is when the ozone layer absorbs UV light, this reduces the possible
cataracts. The second scenario is the adverse effects of inhalation of ozone which
can increase the frequency of asthma attacks, cause shortness of breath, aggravate
lung diseases, and other breathing related diseases through long-term exposure.
Thus, ozone gas is able to affect humans both internally (lungs) and externally (skin)
particles and liquid droplets found in the air. Common particles like dirt, smoke, dust
or soot are large or dark enough to be visible. PM10 are inhalable particles that scale
Supporting research indicates that PM2.5 exposure causes irritation of the airways,
that particles which are less than 10 micrometers in diameter have the tendency to
The Air Quality Index(AQI) offers a visual idea of how polluted the air is. The
AQI is a numerical value which ranges from 0 - 500, and with respective colors and
concentration over a specific averaging period because these have varying amounts
models. While the range of values and level of indices vary for some nations, the
10
The formula for Pollutant "X" and Air Quality Index as seen in (1). The value
for the AQI is then referred to the respective AQI levels with respective color coding,
varies depending on the pollutant. For Ozone (O3), the updated breakpoints
and health messages are shown in Figure 2.2. For PM2.5 and PM10, the
Figure 2.2.3: PM2.5 and PM10 AQI 2012 Updated Breakpoints [24]
builds a conclusion from a hypothesis and quality data. The definition of deductive is
to simply result to a general from given particulars. In this method, data must first be
assured of its quality so as not to build false conclusions. The amount of data must
also be able to suffice the necessary parameters of using this method. Insufficient
The implementation of the air quality monitoring systems was with the use of the
chosen were temperature, humidity, CO, CO 2, detection of leakage of any gas - smoke,
alcohol, or liquid petroleum gas (LPG). The gas sensors used by the study are all of the
"MQ" series line and these seem to be sufficient for the study as the objective is the
ability
to track the presence of the gases only. The study did fail to state the calibration
procedure
and conclusively states that the air quality monitor is to simply track the changes in air
quality [3].
13
sensor used by the study was also of the "MQ" series sensor and it also shows a
non-linear sensitivity graph for the sensor used. The data presented by the study was
pure raw data and this makes the AQI computed as impractical since the application
of AQI formula requires the sensor reading to have hourly averaging data. The study
tracks the data using an MQ135 gas sensor and sends raw sensor data to the cloud
using an android application. The MQ135 gas sensor was a generic air quality sensor
which was incapable of producing quality data as the sensor was able to gather
identify gases separately and compare air quality index levels using the different
gases recorded. Crowd sensing was the method for data collection and this was by
the use of multiple nodes having gas sensors. The cloud based implementation uses
the data processing model in Figure 2.6. The application uses Bluetooth capabilities
to retrieve data from the sensors and adds the necessary data such as location, time,
and device ID. The cloud service used was Google FireBase which contains the
NodeMCU. The MQTT protocol allowed the communication of data from Machine-to-
Machine (M2M) and serves as an Internet of Things (IoT) tool as well. The system
design of the study in Figure \ref{fig:mqtt}. This study also used an air quality
Figure \ref{fig:mqtt2}. The dashboard contains raw data values of the sensor and
be to produce an effective Air Quality Index value for the specific gas being
measured as this would make the value more comprehensible to the average person
[26].
Design
15
As the Air Quality directly affects the health of the population, another
human physique. The air quality monitor was built into a container that simulates the
inhalation and exhalation patterns using an improvised gas trap which functions
implementation seen in Figure \ref{fig:Enose} was the proof of concept of the study.
However, this study only uses the low cost "MQ" sensors to track the air pollutants
[27].
The study implemented the air quality monitoring station using wireless sensor
networks. A Zigbee module, as seen in Figure 2.9, was used with the Arduino Uno R3
microcontroller to offer the wireless capabilities. The device which was setup as a client
node was able to send data to the server using a router node. The sensor node was
composed of two types. The type one sensor node was able to track Carbon Dioxide
(CO2), volatile organic compounds (VOCs), temperature, and humidity. While the type
two sensor node was able to track Carbon Monoxide (CO), Ozone (O 3), temperature and
humidity. The CO2 sensor was the MG811 chemical sensor which was able to detect
around 350 to 10000 ppm of CO2. The VOC sensor was the TGS2602 heating
semiconductor sensor, which gives results via changes in conductivity that produce an
output signal corresponding to a specific gas concentration. The CO sensor was simply
and MQ7 sensor and it has a detection range of 20-2000 ppm. The Ozone sensor was
the MQ131 sensor, as seen in Figure 2.10, which was the same MQ series that was
faulty in terms of calibration and would only be good for presence detection of the
The implementation of the Air Quality Monitor is by the use of mobile sensor
nodes which are placed on Buses. The concept of Bus as a Sensor (BaaS) is to use
the present implementation of public transportation as the option for deploying the
mobile sensor nodes. The study also uses location data to provide a mapping
visualization as an output. A sample of the air quality map is seen in Figure 2.11. The
useful as these would be able to gather data on the whole route and show a visual
Figure 2.12. The wearable technology device purposely has integrated gas sensors
that detect the air pollutants and these are then sent to the Xamarin-based Android
application using Bluetooth. The data collected by the app is then processed using
the necessary USA EPA standard Air Quality index formula with the respective
breakpoints of the different pollutants. The air quality monitoring favors the use of the
study is meant to cover urban monitoring while neglecting roadside congestion [29].
DGS-O3 968-042 Digital Ozone Sensor as seen for being tested in Figure 2.13 has
the ability to offer readings without the need of a sample space. The sample of air
The enclosure used by the study of wearable sensors for analyzing personal
exposure to air pollution, uses an open chassis. The open chassis, as seen in
Figure \ref{fig:enclosure1} will allow the sensors to read the values of an open air
environment and not of a sample space. The reading will then allow to measure the
natural environment and not a controlled environment. In measuring for air pollution,
studies insist to not use a controlled environment as these readings will only be for
Figure 2.7.2: Enclosure Implementation for Fine Dust Sensor and Ozone Sensor
20
The calibration method used in the study of using Low cost sensors for air
quality monitoring of Ozone and Nitrogen Dioxide, employs the use of Field
Calibration . In calibrating the sensor, the study used a reference air quality
monitoring station maintained by the European Reference Laboratory for Air Pollution
(ERLAP). The method of calibration used was Linear Regression and this was used
on data collected simultaneously within the same location of the reference sensor.
The calibration using Linear Regression seen in Figure 2.15 compares both
reference sensor and the built air quality monitoring device [31].
METHODOLOGY
the Ozone(O3), PM2.5 and PM10 air pollution monitor prototype and web application
software. The chapter will also convey the research design, locale, and necessary
1 Hidden marker
developing, calibrating, and validating the proposed air pollution monitor. The DENR
EMB R-XI have implemented stationary air quality stations which are all situated to
actively use the deduction method to determine the specific AQI of the city [8].
Having only six \gls{AQI} monitoring stations, two of which are automatic, the data is
prone to lapses in using the deduction method [25]. The current number of stations
are widely affected by the high cost of the commercially available sensors, the
immobility of the stations due to its size, and that most of the deployment areas are
private owned. The study seeks to improve this by being able to provide data for the
areas that are deficient in being monitored yet highly populated. The study improves
the current technology by using lower cost and power consumption rates. The study
also enhances the current technology by being able to produce quality real-time data
The stationary location of the study will be at The stationary location is on the
2nd floor of the Canisius Bldg. in the College Campus as seen in Figure 3.1, while the
mobile location is a mobile route along Roxas Avenue as seen in Figure 3.2. The
22
locations were determined by the accessibility of the areas and also the presence of
sensors, microcontroller, and the single-board computer and as well as the assembly
23
of the hardware components into a single compact device and integrating them into
The overview of the system is shown in Figure 3.3. The system is composed
of three levels. The first level is the NodeMCU V3 ESP8266 ESP-12E microcontroller
module equipped with the fine dust sensor, ozone sensor, GPS module, memory
module, and a battery bank as a power supply. Air is freely flowed into a duct
directed to the fine dust and ozone sensors. The calibrated sensors will then take
running average value per minute with an interval time of fifteen minutes for Mobile
Air Quality monitoring and a running average value with an interval time of sixty
minutes for Stationary Air Quality monitoring. The averaged values will then be used
The next level of the system is the data transmission to a local database on
the memory module or to the cloud data storage using a Wi-Fi connection. When
24
there is no Wi-Fi connection available, the data is logged in the cache memory of the
NodeMCU. The offline data will then be uploaded to the cloud data storage once the
device is able to connect to Wi-Fi. Data contents will then be acquired via the
The last level of the system is the Website Application software, which is
accessible via any browser with an internet connection. The web app will display the
data prepared and sent by the previous levels of the system. The data will be
tabulated showing the PM2.5, PM10, Ozone(O3) readings, their respective Air Quality
Index values, and their respective GPS locations per data entry.
This subsection will discuss the design of the proposed air pollution monitor
including the preview of the prototype case and the selection of hardware to be used.
The visual plan of the prototype as seen in Figure 3.3.-2 is the proposed
design of the study and from previous studies, will be able to measure both mobile
and stationary values even without the use of a controlled environment. Air samples
will result in only data of the specific sample space of the environment [17].
25
The chassis will be made up of two types of areas, open air areas and a
closed air areas as seen in Figure 3.3-3. The chassis material is mostly acrylic
plastic. The Particulate Matter sensor which has built-in inlet and outlet ports will be
in the closed area of the chassis but the sensor must be on a corner to accommodate
for the fan and ports. While for the Ozone sensor, it will need to be in the open area
of the chassis to allow it to measure ambient air instead of air samples of a controlled
gathered via the Google Maps API embedded in the NodeMCU code which also
simultaneously tracks the location of the device tailored with a timestamp for every
data collected. Even with the sensors using mostly serial Rx/Tx connections, there is
only 1 microcontroller within the covered area of the chassis. After data collection,
the microcontroller will then apply the necessary computations using the calibration
method for quality control of data and delivers the data via the use of the Mobile Wi-
Fi device in the external part of the case or saves it offline using the NodeMCU cache
memory. To lessen the strain on computing for the NodeMCU the study opts to then
apply the necessary computations using the calibration method for quality control of
26
data in the backend of the cloud data storage. The device also uses a single air
The actual built prototype as seen in Figure 3.3.-4, employs the designations
provided in the previous figure. With this, the casing used is a pre-built plastic casing
so modifications to the design was limited. The sensors and microcontroller are also
only attached using Velcro for easy debugging and removal in case of necessary
adjustments. The prototype also employs the use of an external battery source or
powerbrick and an external placement for the mobile wifi device to provide better
Selection of Sensors
In the selection of the sensors to be used for the specific air pollutants
mentioned, the comparison factor was brought down to the costing and quality of
data. The possible solution for a low cost monitor is the use of the "MQ" series
sensors that offer substandard quality data. The data offered by "MQ" sensors
produce non linear output of graphed data, which makes the calibration of the curve
to be difficult. While a possible solution for the preservation of quality of data was to
use sensors that are branded such as the SPEC Ozone and Nova SDS-011 fine dust
sensors.
For the preservation of the quality of data, the Ozone sensor selected is the
SPEC Digital Ozone Gas Sensor (DGS-O3 968-042), as seen in Figure 3.3-5, with a
measurement range of 0 to 5 ppm (the normal ozone level in the lower atmosphere is
generally 0.04ppm) [23]. The SPEC digital series line offers the ability to easily
integrate with most microcontrollers. The DGS-O3 968-042 consumes only 14mW
In line with the preservation of quality of data, the Fine Dust sensor selected
is the Nova SDS-011, as seen in Figure 3.3-6, which offers a serial input of data via a
Tx/Rx pin configuration which is also common for most microcontrollers. The SDS-
011 sensor offers the ability to output PM2.5 and PM10 which makes it a preferred
choice for a sensor. The measurement range of the SDS-011 sensor is from 0 – 999
μ/Ncm3 (good Particulate Matter levels range from 0 – 20 only) [32] [33].
Selection of Microcontroller
available I/O options and pin configurations as the computations are simple and
as seen in Figure 3.3-7, is the selected microcontroller for the study as it is of a small
form factor, and it uses only minimal power consumption. The NodeMCU V3 also has
29
the necessary amount of digital input pins for the totality of the system and is able to
process the minimal computations needed by the study. Furthermore, there will be
three of the microcontrollers in order to accommodate all the serial Rx/Tx pins of the
sensors, which will still prove to be smaller space consumption than that of other
implemented in the study. This will also discuss the necessary programming tool to
Calibration Method
each. Simple Linear Regression is the calibration method used and will be computed
by side-by-side data gathering between the device and respective online reference
sensors. These online reference sensors are from the Canisius Bldg. PM2.5 sensor
in AdDU Jacinto Campus and the DENR PM2.5 and PM10 sensor located in Tagum
near the National Trade School. The calibration factors will be computed by
comparing the line of best fit with the raw data from each respective entry. This
comparison will return a difference which is also averaged for all instances to arrive
at a mean correction factor that adjusts the data based on the reference sensor being
used. For the Ozone sensor, the factory calibration is the main method used and will
be followed as the sensor has a correction factor coefficient set for each sensor
in the memory of the DGS2 module from the factory according to the datasheet. [35].
With this, the computation for the corrected values will no longer be attached to the
microcontroller as it is near the limits of its on-board memory cache. The computation
for the AQI and correction factors will now be done in the backed of the Web App
Database Creation
function as the main data source for the Web Application. This is accomplished using
Google Script which allows for a more efficient method of to send an ‘HTTP Post’
request and appending values to a Google Sheet for easier data manipulation.
The main webpage is a paid domain setup by using Google Sites and
publishing it onto a custom domain that is bought from a legitimate domain provider.
31
The Google Sites backend will contain all the data sources from the Google Sheets,
Google Scripts, and Looker Studio and this implementation already removes the
need for a running subscription for a database implementation. This also removes
the need for adjusting data by changing multiple data representations for the web
application since the previous implementation for Real time Database to immediately
show data as it is uploaded but also requires a cloud Database to store data for
workaround the real time data is easily represented along with the store data which
allows for much faster navigation when sorting through data collections.
The desktop browser view of the Main Page of the website, “Tigair.online” is a
simple webpage that contains basic information about the study, such as the
objectives, AQI breakpoints for reference of the AQI values in the tables to follow as
well. The main page is also where you will be able to navigate through other pages
such as the Mobile Tracking Heatmap Page and other pages that have info regarding
the project.
The tabular data is the summary of information per entry that includes the
date and time of each entry, the corrected sensor values for each respective
32
gas/pollutant monitored, the AQI values of each of the sensor and also the GPS
Coordinates of the entry. The Summary of Data for Stationary Monitoring in Figure
3.4.2 can be accessed and viewed on the main page of the website.
The tabular data is the summary of information per entry that includes the
date and time of each entry, the corrected sensor values for each respective
gas/pollutant monitored, the AQI values of each of the sensor and also the GPS
Coordinates of the entry. The Summary of Data for Stationary Monitoring in Figure
3.4.2 can be accessed and viewed on the main page of the website.
33
specific table value selected that can also select multiple table values at the same
time.
The next data is the same summary of information per entry that includes the
date and time of each entry, the corrected sensor values for each respective
gas/pollutant monitored, the AQI values of each of the sensor and also the GPS
Coordinates of the entry. The Summary of Data for Mobile Monitoring in Figure 3.4.4
can be accessed and viewed on the Mobile Tracking Heat Map page of the website.
34
The Mobile monitoring heat map as seen in Figure 3.4.5 is the Data
representation of the tabular data in Figure 3.4.4. The heat map is also configurable
by selected single or multiple data entries from the table above. This allows anyone
to manipulate the mapped data to view specific moments as the sensor travels one
location to another.
The study employs the use of the General Air Quality Index Formula of the
Particulate Matter 2.5 Microns, 10 Microns, and Ozone(O 3) AQI. The general AQI
formula is as follows:
35
I Hi−I Lo
I p= ( C −BP Lo ) + I Lo
BP Hi−BPLo p
Where:
Cp = Pollutant Concentration
BPHi = Breakpoint ≥ Cp
BPLo = Breakpoint ≤ Cp
access reference data from the DENR EMB R-XI air quality monitoring stations. This
entails that the raw data produced by the prototype air pollution monitor will be able
to adjust to the line of best fit with regards to the specific correction factor derived
using the linear regression formula in Equation . The simple linear regression line
formula is as follows:
Y =mx+b
Where:
The percent error formula is to determine the error of the prototype data from
the reference data from the DENR EMB R-XI and AdDU air quality monitoring
sensors. The results should be shown as both with reference sensor/s and
prototype’s sensors with a comparison of which is to be more applicable for use. The
Calculated −Accepted
percent error = x 100
Accepted
Where:
unison with the DENR EMB R-XI and AdDU air quality monitoring stations. The
prototype station and the reference station collects data simultaneously and located
in close proximity to produce precise values between each other. The accuracy on
the other hand, will be determined via the calibration method selected which uses
both reference and prototype values and is graphed using the Linear Regression
formula to account for the line of best fit that also provides the correction factor for
so as to provide a linear correlation for the gas or pollutant readings with respect to
time. The linear regression charts are also shown for the Prototype, AdDU and
Table 3.6.1: Linear Regression Data for Raw Data vs DENR PM2.5 Calibration
% Error Raw PM
Raw DENR DATA
Date Time 2.5
PM2.5 PM2.5
vs DENR PM2.5
5:11:06
4/3/2024 PM 9.99 15.9 37.16981132
4:11:25
4/3/2024 PM 10.45 16 34.6875
3:11:44
4/3/2024 PM 3.81 12.3 69.02439024
Average % Error: 46.96056719
The tabular data gathering conducted in the Tagum Location of the DENR PM
2.5 sensor is seen in Table 3.6.1. The tabular data has been graphed and the curve
of the Raw Data has been determined to be Y = 3.090*X - 4.277, while the curve of
are able to plot them and use Linear Regression to determine the Line of Best Fit,
with the curve of Y = 1.7922*X + 6.723. The Table 3.6.2 shows the values for the
Line of Best fit and solving for the correction factor by simply computing a value
difference against the Raw data readings. The average value difference is now
determined to be the correction factor of the Raw PM 2.5 data. The percent
difference of the corrected values and the DENR values are also shown in the last
column of Table 3.6.2. With this, the percentage error using the correction value of
Table 3.6.2: Line of Best Fit DENR PM 2.5 Sensor with Corrected values
% Difference
Raw Line of Value Difference Corrected
Corrected
Date Time PM2. Best Fit Line of Best Fit vs Value
PM2.5
5 PM2.5 Raw Data PM 2.5 vs DENR
PM2.5
0.63857442
4/3/2024 5:11:06 PM 9.99 15.684 5.694 15.79846667
35
-
4/3/2024 4:11:25 PM 10.45 13.8918 3.4418 16.25846667 1.61541666
7
21.8010840
4/3/2024 3:11:44 PM 3.81 12.0996 8.2896 9.618466667
1
Correction Average % 6.94141392
5.808466667
Factor: Error: 3
Using the tabular data, below are the graphical figures during this calibration
process. Figure 3.6.1 shows the Curve of the Line of Best Fit and the PM 2.5
sensors. The Figure 3.6.2, includes the corrected values for the prototype’s PM2.5
sensor. A comparison of both AdDU and DENR sensor is also used due to the
Alongside the completed calibration for PM 2.5 using the DENR station, there
is also a calibration curve using the AdDU monitoring station. The tabular data in
Table 3.6.3 allows for more accurate calibration due to having more data entries as
the prototype station was able to run for a much longer duration. Although having run
Table 3.6.3: Linear Regression Data for Raw Data vs AdDU PM2.5 Calibration
The tabular data gathered with side-by-side testing using the AdDU PM2.5
sensor, located at 2nd Floor Canisius Bldg., and the prototype has the curve values of
Linear Regression is used again to determine the Line of Best Fit. The line of best fit
for this data is determined to be Y = 0.7810635*X + 9.037. Using this curve, we are
able to determine values for the correctional factor and apply it to the Raw Data for
that is seen in Table 3.6.4. With the calculations done, the correction factor for this
set of data is approximately 6.32 μg/Nm3 and the percentage error of the corrected
Table 3.6.4: Line of Best Fit AdDU PM 2.5 Sensor with Corrected values
Value % Difference
Line of Best Corrected
Date Time Difference vs Corrected Value
Fit Value PM2.5
Raw Data vs Addu PM2.5
4/13/2024 1:41:14 AM 19.1908255 13.5008255 12.01752142 50.21901779
4/13/2024 12:41:33 AM 18.409762 15.109762 9.627521423 -3.72478577
4/12/2024 11:41:52 PM 17.6286985 12.6386985 11.31752142 -29.26549111
4/12/2024 10:42:10 PM 16.847635 7.807635 15.36752142 -19.1183083
4/12/2024 9:42:12 PM 16.0665715 5.1465715 17.24752142 -46.10149555
4/12/2024 8:42:30 PM 15.285508 -7.414492 29.02752142 -6.362834119
4/12/2024 7:42:49 PM 14.5044445 -1.9855555 22.81752142 3.716006468
4/12/2024 6:43:07 PM 13.723381 2.023381 18.02752142 28.76801016
4/12/2024 5:43:26 PM 12.9423175 5.9023175 13.36752142 2.827087869
4/12/2024 4:43:43 PM 12.161254 6.731254 11.75752142 30.63912692
4/12/2024 3:14:41 PM 11.3801905 8.1201905 9.587521423 36.96459176
4/12/2024 2:14:58 PM 10.599127 7.679127 9.247521423 32.1074489
4/12/2024 1:15:16 PM 9.8180635 6.9980635 9.147521423 30.67887747
Correction Average %
Factor: 6.327521423 Error: 8.565173269
The curves plotted in Figure 3.6.3 include the Raw PM2.5, AdDU PM2.5 and
Line of Best fit lines. These indicate a correlation that proves the Particulate matter
43
sensor used by the prototype has a linear curve with respect to the AdDU PM 2.5
station. With this, the Figure 3.6.4 shows that the corrected values are more closely
alike for the Line of Best fit curve and will give a more accurate reading when
deployed.
Using the same calibration method for PM 10 readings, there is only the
DENR PM 10 reference readings as this is the only available online reference sensor
in the within the scope the study. The Table 3.6.5 shows the Raw PM 10, DENR PM
10, and percent error of the data set. With this, the curve of the Raw PM 10 and
respectively. The percentage error of the Raw PM 10 data with respect to the DENR
this.
% Error Raw PM 10
Date Time Raw PM10 DENR DATA PM10
vs DENR PM10
4/3/2024 5:11:06 PM 24.73 68.3 63.7920937
4/3/2024 4:11:25 PM 22.5 43.6 48.39449541
4/3/2024 3:11:44 PM 13.39 39.4 66.01522843
Average % Error: 59.40060585
Table 3.6.5: Linear Regression Data for Raw PM10 vs DENR PM10 Calibration
Using both curves, Linear Regression is still used to determine the Line of
Best Fit. The Table 3.6.6 employs this and shows that value for the correction factor
to be approximately 29.29 μg/Nm3. After applying the correction factor to the Raw
PM10 values, the percentage error is only approximately 2.07%. With this, the
prototype sensor for PM10 is now calibrated with a linear slope curve.
% Difference
Line of Best Value Difference vs Corrected
Date Time Corrected Value
Fit PM10 Raw Data PM 10 PM10
vs DENR PM10
4/3/2024 5:11:06 PM 63.675 38.945 54.02333333 20.90287945
4/3/2024 4:11:25 PM 49.5 27 51.79333333 -18.79204893
4/3/2024 3:11:44 PM 35.325 21.935 42.68333333 -8.333333333
Correction Average %
29.29333333 -2.074167603
Factor: Error:
Table 3.6.6: Line of Best Fit AdDU PM 10 Sensor with Corrected values
45
The curves plotted in Figure include the Raw PM10, DENR PM10 and Line of
Best fit lines. These indicate a correlation that proves the Particulate matter sensor
used by the prototype has a linear curve with respect to the DENR PM 10 station.
With this, the Figure 3.6.5 shows that the corrected value curve is now more closely
related to the DENR reference curve and is now fit for data gathering.
refers to each unit produced as being factory calibrated and includes a QR code that
contains a string text which includes a correction factor that is unique for the specific
unit sensor. This enabled the sensor to calculate ozone readings without
supplementary calibration which is ideal for research since it will remove the need to
do further testing on the sensor values [35]. The Figure 3.6.7 shows the actual
barcode of the sensor and scanning this will return the string “020420011529 110406
O3 2002 -41.41” which is a long form string that indicates the Serial Number, Part
Number, Type of Sensor, Date Manufactured(Day, Month), and sensitivity code. This
gives us the correcting factor indicated as the sensitivity adjustment value of -41.41.
The proponent used white box testing to verify the validity and reliability of the
The Air Quality Monitor Testing includes the validation of the methods
readPM25(), readPM10() and readO3() will collect the gas or pollutant data and add
the entry to the NodeMCU’s cache memory for a running average computation. After
the primary average raw data is collected the method requestGPSData() is now
called and will request GPS coordinates using the embedded Google Maps API
script to return and add the GPS data to a string builder for preparation. The
commas in order to be sent as a HTTP Post request using the available internet
connection string. Google Script has implemented the use of an SSL handshake that
requires a ‘fingerprint’ that will authenticate the HTTP Post and allow the
sendHTTPPost() method to append the built string value in order to populate the
For the Web application testing, the Posted data from the microcontroller is
now processed by the backend, which is Google Scripts, and recalculated using
Looker Studio for the application of the correction factor and AQI computations.
Unloading these computations from the microcontroller to the backend allows for
connectivity. From the Database in Google Sheets, the new data is now processed
with Looker Studio calculated fields in order to display the corrected data and AQI
values onto the web application which employs the use of Looker Studio to embed
The study employs the use of black box testing to verify the functionality and
The tests cases that will verify the functionality of the Air Quality Monitor,
along with the components such as the internet signal availability, cache memory
The test cases that will verify the usability of the website, accessibility of the
web application from other devices or locations and the functionality of the data
The results of the real-time air pollution monitor are to be validated by the
DENR EMB R-XI. The validation must include the objectives of the study and provide
comments on the ability of the proposed air pollution monitor. The validation also
includes the real-time capabilities of the device in comparison to the reference air
The validation employs the use of the Four - Point Likert Scale in a conducted
survey. This will evaluate the system in a relevant and fair method to further validate
the system. The proponent conducted user surveys for the Air Quality Monitor and
the web application by allowing the users to access and use the website.
The Likert Scale will serve as the method for evaluating the functionality and
design of the prototype air pollution monitor. The four - point Likert scale will force the
respondent to make a choice when the respondent has no opinion. A sample four -
Very Good 4
Good 3
49
Fair 2
Needs Improvement 1
The Mean Averaging formula will be used to summarize the survey scores
from the Likert Scale. This will offer a numerical representation of the an rating that
the system and the different objectives it aims to resolve. The study employs an
hourly running average is the preferred data value [28]. The formula is as follows:
∑ ❑ Xi
μ= i=1
n
Where:
μ = mean value
50
This chapter will provide all the results and discuss the implication of these
towards the functionality of the Hardware and Software side of the study. The study
1 Hidden marker
Step 1:
Open
Arduino IDE
Step 1: Open
Arduino IDE
PM and Showing
Ozone The data Step 2: the gas or
sensor should be Connect the readPM25(), pollutant
Initialization displayed NodeMCU V3 readPM10() average PASS
and Data in serial & readO3() data in
Step 3: Upload
Acquisition monitor serial
the code and
test monitor
open the serial
monitor
Step 1:
Open
Arduino IDE
Receives
Tests GPS The data Step 2: and prints
Acquisition should be Connect the the value
Data from displayed NodeMCU requestGPSData() entry PASS
Google in serial V3 under
Maps API monitor Step 3: cache
Upload the memory
code and
open the
serial
monitor
Step 1:
Open
Arduino IDE
Prints the
Step 2:
string in full
Building the The data Connect the
on serial
String of should be NodeMCU
monitor and
data for displayed V3 buildString() PASS
saves the
Cache in serial
Step 3: value entry
memory test monitor
Upload the under cache
code and memory
open the
serial
monitor
Step 1:
The code
Open
should be The serial
Arduino IDE
able to monitor will
connect to Step 2: print
the Google Connect the “Published”
sendHTTPPost() PASS
Script cloud NodeMCU when string
database V3 is appended
and store a to the
Step 3:
built string database
Upload the
HTTPS data into it
code
Post Test
Step 1:
The code is The serial
Open
unable to monitor will
Arduino IDE
connect to print
the Google Step 2: “Connection
Script cloud Connect the sendHTTPPost() Error” and PASS
database NodeMCU the Data
and store a V3 string is left
built string in the cache
data into it Step 3: memory for
Upload the the next
55
code
turnaround
HTTP Post
data entry
The if the data
Google visible on the
Script and Coordinate data
website UI
Looker is displayed
corresponds
Sheet Data correctly Studio data correctly on the
with the Data
on the Web source is Website UI
from Google
Application active, and Sheets
website is
online
Expected Actual
Test Case Test Scenario Pre-condition Test steps
result results
Sheets raw
data
Display Air Confirms the The Air Step 1: Plug The PASS
Quality successful Quality the Air Google
Monitoring execution of Monitor is Quality Sheet will
Functionality the read being Monitor to produce a
method, string powered any 5V new line of
builder continuously source via Data set
method, and with no the Micro that should
data cache power USB input be
memory source port complete
method issues with Raw
Step 2:
Sensor
Verify that
data, GPS
the LED on
data and
the
time
microcontroll
stamps
er is blinking
to indicate
Wifi
connectivity
58
Step 3:
Verify that
the PM
sensor LED
is
continuously
blinking as
this is
averaging a
value for
every minute
of the hour
Step 2:
Interact with
the interface
to navigate
through
different
monitoring
views
sensor values
and AQI sensor
Step 3:
computations
Simulate
Relevant data
sensor changes to
data are observe the
integrated reflected
with the updates on
application the interface
The Mobile Route is displayed as the Roxas Avenue mobile route which takes 15-
minute running average readings that also includes readings as the monitor is being
transported via walking from one GPS location to another. The Stationary location is
set to be the 2nd Floor Canisius Bldg just beside the PM 2.5 Air Quality monitor of the
AdDU in order to provide data for PM10 and Ozone and additionally compare more
The stationary data gathering was conducted for multiple days as the initial
calibration data collection, done on April 1st, was unable to collect AdDU data from
their online monitoring website due to the history accessible only being 24hrs.
However, this data is still legitimate because on the 2 nd calibration data collection,
conducted on April 12th, the correctional factor for the PM2.5 sensor is now computed
properly and has a small percentage error with respect to the AdDU sensor readings.
The Table 4.2.1 shows the corrected data readings for the prototype air pollution
monitor data readings, the AQI value and GPS coordinates for April 1 st data
collection. The Figure 4.2.1 also supplies a visual mapped representation of the GPS
locations to help give clarity on locations of where each respective entry value is.
The April 12th data gathering set is shown in Table 4.2.2, the table shows the
corrected data readings for the prototype air pollution monitor data readings, the AQI
value and GPS coordinates for April 12 th data collection. The Figure 4.2.2 also
supplies a visual mapped representation of the GPS locations to help give clarity on
With the gathered data from the two days of data collection for stationary
monitoring, the study is able to provide the stable and informative Gas or Pollutant
readings that offer a bare view of the Air Quality for the location and the specific time
slots. Along with this data, the Stationary Air Quality Monitor also provides the Air
Quality Index value per entry, this offers a supplementary representation via the use
values from sensor readings. The Google Mapping solution also provides a visual
representation of the location of the readings and their respective AQI values. The
comparison of the interval between April 1st and 12th time stamps are also seen that
the April 1st data was unable to append some values due to an inability to connect to
the main Wifi network. The reason for this is the Cellular Data used on the April 1 st
was from a Globe network sim card while the April 12th is now using a Smart network
sim card. This is due to the cellular connectivity is better with a Smart network rather
than the Globe network for the specific downtown area location. Overall, the system
is still able to supply data that can be presented since this data is corrected by the
The mobile data monitoring was conducted on April 13 th along Roxas Avenue
and the mobile route indicated in the research locale. The Table 4.2.3 shows the data
readings for 15 minute running averages of the Gas and Pollutants tracked along
with their respective AQI values and GPS coordinates. The Heat Map in Figure 4.2.3,
aims to provide a supplementary data representation and a heat map is opted rather
than a simple bubble map as the AQI value will provide a colored representation of
the breakpoints in the form of heat map zones per data entry.
64
With the gathered data from Mobile monitoring along the route selected, the
device is able to map and gather accordingly which areas are more likely to have a
slight difference from Good air quality to Moderate or Unhealthy air quality. This
provides the study with information to indicate that the device performs mobile
tracking with the inclusion of a good cellular network in place. In terms of the heat
map in Figure 4.2.3, indicated also are the Air Quality values mapped per data entry
with GPS location. The representation allows the end user to be wary of the possible
locations along the route to avoid during the specific time slot.
66
The study has gathered 9 respondents for the testing and survey. The range
of respondents will vary from DENR Engineers, Ateneo Students, Ateneo Teaching
and Non-Teaching Staff as these are the likely respondents that traverse along
This chapter will provide a conclusion based of the content provided by the
previous chapters. The chapter will also discuss the recommendations that will
1 Hidden marker
1.1 Conclusions
system, objectives of the study, data gathering, and analysis of the data the
PM2.5, and PM10), and GPS data has been achieved. Utilizing
microcontroller, fine dust sensors for PM2.5 and PM10 microns, and
locations and timeslots. Selection of further high traffic areas are also
more plausible.
specific locations within Davao City is accessible via any browser with
69
visualization and management capabilities, the study sets a good foundation for
1.2 Recommendations
In line with the conclusion of the study, the proponent offer the list of
recommendations to amplify and explore ideas that could prove useful to the next
versions of the Air Quality Monitor. The following recommendations are provided:
quality data.
will enable tracking progress towards air quality goals and identifying
9635-9646.
pp. 333-356.
] the U.S. and the EU – a review, vol. 6, 2015, pp. 129 - 137.
Management, 2012.
pp. 165-171.
accountability studies and frameworks, vol. 67, Taylor & Francis, 2017,
pp. 144-172.
8] classification of health risks based on air quality levels, 2017, pp. 58-
61.
73
others, Particulate matter, air quality and climate: lessons learned and
6] monitoring system using node MCU and node-RED, 2018, pp. 1-5.
8] sensor: A mobile sensor nodes network for the air quality monitoring,
0] sensors for analyzing personal exposure to air pollution, 2017, pp. 1-4.
sensors for air quality monitoring. Part A: Ozone and nitrogen dioxide,
5]
7] vehicle tracking system using GPS and GSM modem, 2013, pp. 89-94.
APPENDIX A
DATASHEETS
78
A.1 NodeMCU V3
79
APPENDIX B
DOCUMENTATION
APPENDIX C
GANTT CHART