DEVELOPMENT OF A LOW-COST MEASURING SYSTEM FOR THE MONITORING OF ENVIRONMENTAL PARAMETERS THAT AFFECT AIR QUALITY FOR HUMAN HEALTH

In many situations or applications, it is essential to evaluate the air quality in relation to human health. For that reason, a monitoring system has been designed with the objective of accurately measuring temporal trends in the air mixture that we breathe. Parameters such as temperature, relative humidity, several inorganic gases (CO 2 , O 3 , SO 2 , CO), the total volatile organic compounds (TVOC) and the concentration of particulate matter need to be measured simultaneously in order to achieve an operational sensing node. With current technology, it is possible to use open-source hardware and software to create a low-cost monitoring system. At present, the development and selection of the hardware, software platforms and the sensors associated with these applications, constitute a scientific and technological interest. The possibility of creating compact, economically accessible systems, based on open-source hardware and software, increases the possibility to perform such analyses at a larger scale and by simple citizens. The proposed system is a prototype in the initial phase, so only the operational capabilities of the system were evaluated during periods of time of 24 and 72 hours of continuous operation, the response of the sensors to step-type inputs and the measurement of background concentrations in urban interior environments.


I. INTRODUCTION
Several species in air, as well as products derived from them by chemical reactions are responsible for mild problems such as irritation, inflammation and allergic reactions while in other situation the effect on the human body is much worse such as inflammation of the respiratory tract, as well as cancer [1].
Hence, knowing the quality of the air that is breathed is a topic that is investigated by various institutions and organizations at global, national and even local level [2]. Examples of leading organizations dealing with human health related air quality are the World Health Organization (WHO), the Environmental Protection Agency (EPA) or Cuba's Ministry of Science, Technology and Environment (CITMA). Important markers that give an insight in air quality can be classified in 3 categories: (1) inorganic gases such as sulfur dioxide (SO2), carbon monoxide (CO), ozone (O3) or nitrogen dioxide (NO2), (2) organic gases such as the total volatile organic compounds (TVOC), or specific products such as benzene, and (3) particulate matter (PM) such as all particles smaller than 2.5 µm (PM2.5) or all particles smaller than 10 µm (PM10).
A large number of air quality standards developed by the aforementioned institutions estimate the air quality by combining information of inorganic pollutant gases (SO2, CO, O3, NO2) and particulate matter (PM2.5 and/or PM10) [2]. The standards consider the concentration of the pollutants, the time that people are exposed to the pollutions (e.g., short-term exposure time or an exposure time of 8-hourper day) and the impact that the pollution has on our health [3]. It should be emphasized that a community can exists of groups of persons with a different sensitivity toward pollution (e.g., people who suffer from asthma, elderly).
Traditionally, air quality monitoring has been studied for two main purposes: compliance with surveillance legislation, scientific research related to the impact of air quality on our environment, economy or society or more recently citizen science projects [4,5]. For both purposes, measurements provided by fixed air quality monitoring stations distributed across countries are considered as reference information sources. These installations ensure high quality measurements because they use reference methods that comply with legislation, they are equipped with certified instruments and the instruments are maintained by strict routines. The investment and maintenance cost of such facilities is high. So their distribution (https://aqicn.org/map/world/) is not homogeneous in all countries, concentrating mainly in developed ones.
An alternative to such high-cost reference stations is the use of semi-professional stations (e.g., Libelium, Vaisala or AQMesh products) For example, AQMesh, is deployed in several cities to measure a wide range of common contaminants of air in outdoor environments [6]. The Libelium Waspmote Smart Environment [7] is deployed in several European cities and on the African continent [8]. Table 1 summarizes the variables associated with air quality measurements performed by these systems and their ranges for urban air referred by the World Health Organization (the range of several gases does not start at zero because of the natural composition of the atmosphere). Source: Authors, (2020).
Besides, mid-price ready-made measuring devices, there is also the option to build its own measuring device by combining individual hardware components (i.e., low-cost sensors and microcontrollers such as Arduino or Raspberry Pi) and writing accompanying software. These alternatives can be used at fixed locations to analyze outdoor or indoor air, and due to its lower cost, it is possible to deploy several measuring nodes in the zone of interest. The compact size of these devices makes it possible to transport them by vehicles or persons while measuring. When the measurements are complemented with GPS-information, then small areas or whole cities can be mapped.
The amount of literature concerning the design and the use-cases of monitoring systems based on open-source hardware and software and low-cost sensors (LCS) is growing fast [9][10][11][12][13]. In such designs, the real time analysis of air quality is usually performed by coupling a multitude of low-cost sensors to a single microcontroller to simultaneously measure the parameters summarized in Table I. Some of the proposed designs are used in citizen science projects. For some of these platforms, information of a large number of "Do It Yourself" measuring devices are sent through internet to a common Cloud platform. (e.g., Luftdatenplatform, the U-Sense platform, Purple air) to make the information available to the rest of the user community. However, for such applications information about the calibration of sensors is often limited. This makes the information collected up to a certain level unreliable, as several authors debate [14][15][16][17][18]. The other side of the spectrum are research groups that evaluate the performance of such measuring devices by comparing them with reference devices. The comparison can be done by placing low-cost and reference device in a closed box where the environmental conditions can be changed in a controlled way. Another method is to place the low-cost devices in the vicinity of the air quality monitoring stations to study the differences in measurements. In-field calibration in an uncontrolled environment can be done by machine learning where the measurements of the monitoring stations are used to label the measurements of the low-cost devices [19][20][21][22]. However, such high-end calibrations are not always accessible to researchers. In addition, the high-end calibrations are not in accordance with the low cost of the self-assembled measuring device. The research presented in this contribution seeks to delve into the strategy for the development of sensor nodes with low-cost open source hardware and software using sensors available on the market. The goal is to obtain a simple hardware design and a set of low-cost procedures to calibrate the sensors so that a reliable monitoring system can be obtained that is capable of providing accurate information for decision-making. Here we propose 2 simple methods as a first reliability test of the prototype: (1) generating sudden changes in ambient air under controlled conditions and check if the prototype respond to them, and (2) performing a small in-field measuring campaign (72 hours) and check if some typical events such as day-night cycles or moments with elevated amounts of traffic result in abrupt changes in the trends.

II. MATERIALS AND METHODS
In today's market, a variety of ready-made air quality measuring devices are for sale and many manufacturers offer these platforms with product information, use cases and technical support for application development. Also, large communities of developers provide hardware designs and software for free. These circumstances make it possible to rapidly develop a prototype. A wide range of sensors covering the spectrum of gases and particulate matter required for an air quality application can be found on the market [6]. They are based on various detection methods based on electrochemistry, photo ionization or light scattering. The available sensors have variety of accuracies, dimensions and power requirements. For the designed application, size and energy requirements are important because operation on batteries and portability are key requirements for future applications. System components were selected to satisfy these criteria, also following an economic criterion of having an operating prototype at a relative cost of 300.00 USD and able to operate autonomously for at least 24 hours.

III. DESCRIPTION OF THE HARDWARE
From the commercially available computing platforms, the Arduino MEGA 2560 was selected because it meets all the anticipated needs and has the most reasonable price of those analyzed. Clone versions of the Arduino MEGA 2560 provide a hardware and software development environment for a price of around 15 USD. It has 54 I/O digital pins and 16 input pins associated to 10-bit analog converters. It provides pulse width modulation (PWM) outputs and incorporates digital serial communication interfaces such as I2C, UART and SPI. Among the potential for application development is having code libraries that allow adding hardware modules to equip the system with new capabilities, including: wireless communications, wired TCP / IP or external storage. The benefits of the Arduino MEGA 2560 for the development of the prototype are enhanced with the inclusion of the Arduino Mega Click shield from the manufacturer Mikroe (https://www.mikroe.com/arduino-mega-click-shield). This shield carries the signals from the MEGA 2560 pins to 3 mikroBUS ™ type sockets that allow the assembly of 3 additional hardware modules from the same manufacturer without wiring or soldering (iAQ-Core, rtc-click, microsd-click). Above Mikroe's shield is a second custom-designed shield, where the remaining sensors and their conditioning were included. This shield is wired to the Mikroe shield to obtain the analog and communication signals necessary for its operation.
The selected sensors should be available on the Internet for online purchase at a reasonable cost, have several favorable reports on their use, and should be implemented in already published designs [5,12]. Table 2 shows: manufacturer, purpose, measurement ranges and energy requirements of the selected sensors. In addition to the sensors, a storage system (microsd-click) and real time clock (rtc-click) of Mikroe were also added. Source: Authors, (2020).
A cost analysis based on the market value of integrated components in the system developed and discarding engineering design and assembly costs is shown in Table 3, the same verifies that the economical criterion established was satisfied. Source: Authors, (2020). Figure 1 shows the interconnection of the different hardware elements through the Arduino Mega Click shield board. The board established a simplified serial communication by connecting 3 mikroBUS connectors, 3 analog inputs (A6, A10 and A15) with a digital pin (12). RC filters are used to suppress noise levels during measurement of analog signals. The interconnection with the developed Monitoring Software on a PC is established through the USB port of the Arduino MEGA 2560.

IV. DESCRIPTION OF THE SOFTWARE
After defining the hardware design, the operational logic of the implemented software is described. It was developed in the Integrated Development Environment (IDE) version 1.8.5 provided by Arduino. The programming language used is C/C++. Programming is based on a set of open libraries provided by the collaborative development platform GitHub, both for handling the sensors and for the communication between them, the Arduino board, the RTC and the storage. The software developed initializes the hardware, variables concerning the analog and digital pins are defined, followed by a check if the sensors are present by a simple reading of each assigned channel. Taking the ozone sensor MQ-131 as an example, the process would flow as shown in Figure 2. After verifying the presence of sensor MQ-131, the preheat time is set to obtain valid measurements, at that point a cycle is started in which the sensor reading is performed, filtered and validated. Validation is based on the detection of maximums and minimums, also minimum and maximum thresholds based on last values. The Monitoring Software, the prototype's graphical user interface (Figure 3), was developed in the Qt Designer environment, to be cross-platform. Qt is currently one of the most commonly used software for the creation of graphical user interfaces in Internet of Things applications and data acquisition systems [23,24]. The Monitoring Software allows the visualization of information on a PC or other computing device that is sent by the prototype via USB. In the Monitoring Software, each sensor is associated to a different tab page. Each page contains the configuration of parameters (sampling frequency, alarm levels...) and also a graph capability to analyze the individual behavior of the measurement. The acquired data can be graphed from the stored material or in real time after its validation. The configurable sampling rate of the sensors allows to adjust the prototype to the dynamics of the environment to be studied. Valid measurements are stored in a text file (CSV-file) with database structure in the micro SD memory of the prototype. The text file starts each entry of readings with the date provided by the real time clock. If the prototype is connected to a PC or other computing device via USB, it will also send each entry of readings to the Monitoring Software. Each time the prototype is powered, it assumes as operating parameters (sampling frequency of sensors, alarm levels...) the latest configurations saved in it, without the need to be connect to any external computing device. Source: Authors, (2020).

V. RESULTS
As a first result of the investigation, the low-cost system prototype shown in Figure 4 satisfies the requirements imposed in terms of total cost and portability, having dimensions of only 101 mm x 53 mm x 70 mm and a weight of less than 300g. Given its low consumption, , , a cell phone charger that provides 5V / 500mA was used as a power source. In addition, a module comprising a solar panel and a Lipo battery with a capacity of 20,000 mAh (Amazon: Solar Charger Power Bank 20000mAh) was included for autonomy in terms of energy. The same in the evaluations at 72 hours with the prototype connected, demonstrated not to fall below 50% of its capacity. Sudden changes are generated in the ambient air in the vicinity of the prototype shown in Figure 4. In Figure 5 and 6 the response of the temperature and humidity under the influence of a hand hair dryer is evaluated. Jumps can be seen from the environmental conditions of 22 ºC and 72% RH, after applying the hot air flow. Heating up air results in a sudden increase in temperature and a drop in relative humidity. The sensor responds in a matter of seconds. The abrupt drop of relative humidity occurs first, while the sudden increase in temperature follows a few seconds later.   In this case, some cigarette smoke was simply blown at short distance towards the prototype. The prototype responded immediately which is seen as a vertical jump in the trend. However, the sensor was not able to measure the concentration. A simple puff resulted in saturation of the sensor.  In the case of ozone (Figure 8), a sudden increase is generated by fuel combustion. The ozone concentration increases suddenly but keeps on increasing as combustion is running. Fuel ending marks an abrupt end to the signal. Finally, by using the exhaust gases of a "2-stroke" engine, the measurement of the sensors associated with the variables CO2 and total volatile organic compounds (TVOC) was verified (Figures 9 and 10). For CO2, the value of 450 ppm is the background concentration of ambient air and was established as the zero of the measurement according to the manufacturer's information. Both signals resulted in a similar pattern. The signal consists of broader peak with a width of about 10 s with superposed spike-like signals. The first 100 s clearly show that the sensors are responding to the engine, suggesting that the sensors are generating a signal and not noise.  The system prototype has been tested in the urban environment of the city of Santa Clara for continuous periods of 24 and 72 hours (battery powered), showing a stable performance in indoor environments close to areas of high vehicular traffic. In Figure 11, the measurement of particulate matter acquired over a weekend (Friday to Monday), in a house near a major road entrance to the city is presented. The system started its measurements at 22:00 on Thursday (0.0) and worked until Monday at 00:00. A repetitive pattern of 12 hours is identified, marked by the increase in traffic from 6:00 to 8:00 and later from 18:00 to 19:00. Figure 11: Measurement of particulate matter for 72 hours.

VI. CONCLUSIONS
The developed prototype satisfies the established criteria in terms of variables to be analyzed, size, weight, price and energy requirements, given the expected use time in mobile applications (24h) and the sampling frequency. The proposed architecture, based on free hardware and software, based on low-cost elements, is suitable for use in air quality measurement applications.
This investigation used 2 different methods to check the reliability of the measuring system. The first method relied on the generation of sudden changes in the environmental conditions around the prototype using simple methods. Sudden changes in T and RH were generated by means of a hot air blower. A sudden increase in PM was generated by blowing cigarette smoke towards the prototype. Ozone concentration was altered by fuel combustion. Finally, fuel burning by an engine resulted in sudden jumps in CO2 and TVOC. Reliability was also checked by a small measuring campaign and controlling if classic events such as daynight cycles, moments of elevated traffic generated sudden changes in the signal.
In future work, low-cost calibration methods will be developed to improve the accuracy of the sensors incorporated in the prototype Likewise, and taking advantage of the extensive features of the selected hardware platform, it is proposed to integrate a larger number of sensors and an LCD interface so that data can be visualized in the field without the need of a connected PC.

VII. ACKNOWLEDGMENTS
The authors appreciate the support provided by the VLIR-UOS project AIR@PORT: Low-cost decision support system to evaluate the impact of ships on the air quality in the port city Cienfuegos (SI-2019-01-20), which partially funded the research carried out and allowed the exchange between researchers from the Universidad Central "Marta Abreu" de Las Villas and the Antwerp Maritime Academy.