Measuring Air Pollution Through Small Sensors for Environmental Monitoring in Small Cities

One of the important problems faced by many countries in the world is environmental pollution, the lack of monitoring points for air quality is one of the main environmental and technological challenges. In this scenario, the following question is presented: How much do citizens of a city know about the levels of air pollution they breathe? The Internet of Things (IoT) offers many benefits to be used and applied in the monitoring of environmental pollution. This research seeks to establish monitoring points to assess air pollution for a small city. We have developed low-cost devices with Arduino technology and a mobile application for Android, which allows us to collect information for analysis. The measurements were based on the levels defined by Hidromet ETESA and the decree of the Ministry of Economy and Finance, which indicate the permissible levels of polluting gases. Four variables were used for the study: carbon monoxide, carbon dioxide, humidity and temperature. The values generated from the analysis of the data showed that the concentrations in each place do not exceed the permissible


INTRODUCTION
The urbanization process, which is taking place all over the planet, constitutes one of the global trends, which is inducing big transformations in the cities. Currently, 54% of the world population is urban, and according to the United Nations, in 2050 that percentage will be 66% [1].
Cities develop strategies and plans to respond to the challenges of population growth, demographic change, increasing urbanization, new demands arising from climate change and the depletion of natural resources. This imposes on cities, especially large cities, the need for adaptation mechanisms to ensure their own sustainability [2,3,4].
From an environmental point of view, cities are physical artifacts that transform and shape the natural environment to achieve the permanent settlement of the activities that man develops. This transformation of physical environment is carried out through the construction of extensive infrastructures and buildings, which generally generate significant environmental impacts.
In addition, it is estimated that cities consume about 75% of world's energy and generate around 70% of global CO2 emissions [5], and forecasts suggest that these figures will grow steadily in the coming years. Therefore, the intense urban metabolism and its influence on the aggravation of climate change transfer to our cities the great sustainability challenges of our contemporary society.
Due to the aspects mentioned above, there is a growing interest in cities and their processes of change, which leads to the development of strategies and measures in accordance with the new reality, by different sectors: public administrations, institutions and companies.
The Information and Communication Technologies (ICT), in this context of change and new proposals, acquires a relevant role by inducing a new concept of city under the name of Intelligent City, which currently constitutes the new urban paradigm and model towards which the current cities converge.
Countries such as Spain or Colombia have pioneering cities and reference for the world as smart cities. The city of Medellín, in Colombia, has achieved through the use of technology and sensor networks, monitor their environment, allowing them to have the necessary information for decision making. An example of this is the SIATA system, which extends a network of sensors to measure the air quality of the Aburrá valley, where the city rises; the sensor network is responsible for monitoring the levels of toxicity in the air produced by the CO2 released into the environment by automobiles by 81% and 19% by the large industries of the city [12].
With the applicability of systems and the sensor network, Medellín, as an intelligent city, is able to prevent unhealthy levels in the air; warning of these to citizens and generate corresponding policies to reduce air quality indicators. It is important to highlight the geographical circumstances of the city due to the fact of sitting in a valley surrounded by mountains, twice a year Medellín suffers from this phenomenon that, thanks to the applied network of sensors, allows to improve the air quality of the city when it is At the same time, improve the quality of life of its inhabitants.
The population increase and the urban development that with accelerated rhythm takes Panama, reflect the need to observe and study the behavior of this city and despite the pollution generated in it. In this sense, one of the problems that afflicts Panama is the exorbitant number of vehicles concentrated in the cities. Only in the period of January -February in 2017 were registered 8,768 new vehicles including trucks, buses, sedans, etc. and in that same period a sale for the national consumption of 183,158 gallons of fuel is reported, where 50,732 of them are petrol in their variations of octane and 57,871 of diesel [13]. In relevance to the foregoing, Panama, being a country in advanced technological development compared to others in the region, does not have a mechanism to observe and compare the quality of the environment versus the economic development that is being generated.
Despite having air quality monitors, Panama City does not have an integrated system of sensor networks that allows realtime visualization of air quality indicators. This work focuses on the use of Arduino technology as a low-cost element for the creation of a micro sensor network that allows observing the quality of the environment in the city of David in the province of Chiriquí.
In Panama, David is one of the cities with the most economic activity, this brings the vehicular development in this urban area of the Chiriquí province; This can be seen in the traffic jams that congest the city. generating a large concentration of issuers in the sectors where, in general, there is the greatest number of people in the city. For this reason, it is necessary to observe the air quality indicators of this city, in order to provide David with features such as smart city.
As a main contribution, a prototype was built using open source software and low budget hardware, affordable sensors that send the data wirelessly for the respective analysis of the obtained data. The study framework is a relatively small city.
The article is organized as follows: section 2 presents the methods and materials used in the development of the research, section 3 describes the results obtained, section 4 presents the discussion and the conclusions are at the end.

II.
MATERIALS AND METHODS Different pollutant gases were analyzed, their effects on the environment and the human being, as well as the units of their measurement values. The variables used in the case study are carbon monoxide concentration, carbon dioxide levels, temperature and humidity.

A. Carbon monoxide
Carbon monoxide (CO) is the most abundant air pollutant, especially in the environment of large cities. It is a colorless, odorless and tasteless gas, its boiling point is -192 ° C. It has a density of 96.5 percent, which makes it a very light gas. For this reason, it is not particularly soluble in water. It is flammable and burns with a blue flame, although it does not maintain combustion [9].
CO usually occurs as a result of any of the following chemical processes: • Incomplete coal combustion.
• Reaction at high temperature between CO2 and carbon materials. • Dissociation of CO2 at high temperatures.
• The atmospheric oxidation of methane (CH4) forms an anaerobic (without air) fermentation of organic matter. • Chlorophyll production and degradation.
• Incomplete combustion of fuels in automobiles. [9] Health effects: The presence of high concentrations of carbon monoxide (CO) in the air represents a threat to the health of all forms of life. Inhaled CO combines with hemoglobin in the blood, leading to the formation of carbon hemoglobin, which reduces the blood's ability to transport oxygen from the lungs to tissues.
It has been shown that a saturation of carboxyhemoglobin above 10% can cause effects on the psychomotor function that is manifested with signs and symptoms of fatigue, headache and coordination disorders. Once this gas reaches saturation above 5% in the air, changes in cardiac and pulmonary functions occur, and the visual threshold increases. No evidence of significant effects was found with a carboxyhemoglobin concentration lower than 2% [9].

B. Carbon dioxide
Carbon dioxide (CO2) is a colorless and odorless gas. It is non-toxic and denser than air. CO2 is produced in the atmosphere in concentrations ranging between 250 and 400 ppm [10].
In fact, it cannot be considered a pollutant in the strict sense because it is a non-toxic gas that is found naturally in pure atmospheres. However, it is considered a polluting substance due to the possible risks of its accumulation in the atmosphere. This fact produces alterations in the CO2 cycle due to human activities that could lead to a modification of the earth's climate [10].
It is important to mention carbon dioxide in this work, since it is one of the most responsible for this phenomenon.
CO2 levels above 1,000 ppm are related to complaints of minor health problems, such as eye and throat irritation, headache and fatigue. Interestingly, it is unlikely that CO2 is causing these problems. One of the reasons why CO2 levels are high is due to poor ventilation in some buildings and the accumulation of other toxic gases. On the other hand, CO2 levels above 5,000 ppm are considered an occupational hazard and can cause drowsiness and other problems. In fact, very high levels (above 10 percent) cause loss of consciousness [11].
Units of measurement: Carbon dioxide levels in air are generally expressed in parts per million (ppm) by volume. The normal concentration of CO2 in the air is between 300 and 400 ppm outdoors. Interior levels are usually a bit higher, mainly due to the concentration of exhaled air from people in the building. In addition, CO2 levels in office buildings typically range between 350 and 2500 ppm. It has been shown that levels above 1000 ppm tend to cause health problems. It has also been shown that levels above 1000 ppm tend to cause health problems. Therefore, a general guideline is that levels should be below 800 ppm to ensure that overall comfort is that levels should be below 800 ppm [11].

C. Temperature and humidity
The gases mentioned above affect the environment in different ways. The phenomena that occur significantly alter the temperature. For this reason, it is necessary to measure it and, as the relative humidity is proportional to the temperature, it is also a case study variable.
Units of measure: the temperature is measured in degrees Celsius (°C) and the humidity is calculated as a percentage (%).

D. Materials
For the development of the monitoring platform, different devices must be used, which together would capture and store the information and for further analysis.
A sensor node usually consists of five main parts, as shown in Figure 1 below: • One or more sensors that collect environmental data.
• The central unit as a microprocessor that manages the task. • A transceiver (included in the communication module) communicates with the environment. • A memory, which is used to store temporary data generated during processing. For the evaluation of hardware to be used, criteria such as robustness, energy distribution, processing, storage capacity and the facility to display the information coming from the sensors in real time were considered (Arduino, 2013). In figure 2 the assembled components can be seen. Figure 3 shows the set inside the acrylic boxes.  The type of sampling given was intentional, different points were taken as a frame of reference for sampling.
The location is very important. In this sense, the devices were placed in strategic places during peak hours, when there is usually a large flow of people and cars (collective transport, selective transport and private cars).
The installation height of the devices was 2.50 m compared to the ground.
An important activity is the calibration of the sensors. In this sense, the MQ-7 sensor due to its versatile functionality and its analog responses must be calibrated with respect to the gas that is being analyzed.
This sensor should receive 5V continuously for 60 seconds in addition to 1.4V for 90 seconds [14]. The Arduino board allows us to obtain these constants in the hardware, the necessary 1.4V, can be obtained directly from the board, however it is not continuous. Coming from a square wave voltage from 0 to 5V, the average voltage of the working cycle must be determined (Figure 4).
The pulse width modulation or PWM, allows to efficiently simulate a digital signal in a wide range of analog values.
Determining the following: with the time when the signal is at its highest level and the period occupied by the signal between the states of the signal and , with the time of the signal at its low level.
When using a PWM output we solve this problem, since the PWM outputs allow us to vary the duty cycle of the power source, using the function analogWrite(...) of the programming language of the Arduino board. This function takes as a reference values from 0V to 5V, where 0 is the lowest value in the expression and 255 is 100%, to determine the work cycle.
Applying a rule of three we can determine what will be the value within the range of 0 to 255 that must be applied to obtain the voltage of 1.4.
In where corresponds to the lowest voltage, the highest voltage. The integrated circuit of this sensor allows through programming to switch the times of the voltages necessary to solve the possible occasional variants of the real value of the voltage that can invalidate the reading of the information. The analog output of the sensor must be transformed to voltage, it corresponds to values between 0 and 1023 bit. The following function is used where is the value that the sensor returns to us through the function analogRead(…).
The resistors incorporated in the sensor form a voltage divider, therefore the output of the sensor is related to it. By applying the following formula, you get the value of resistance of the sensor to the amount of gas.
Where is the resistance that is sought in the reading of the sensor that corresponds to the reaction of the sensor to the gas, is the load resistance determined by the sensor datasheet, corresponds to the circuit voltage 1023 which are translated into 5v and is the sensor output information.
To determine the CO concentration, number of samples must be collected to obtain to then proceed to determine this concentration. Figure 5 shows the characteristics of the sensitivity of the sensor to the CO. In order to graph and obtain the gas information with respect to its in the environment, the previous graph must be used. The graph is presented in logarithmic scale, which is why the following function is presented: . Where A is the result of the approximate line of the table that is used as a window to calculate the slope:   III. RESULTS Figure 6 shows the average value per day, with a maximum value of 285 ppm. With reference to the data provided by Executive Decree N °. 38 of June 3, 2009, from the Ministry of Economy and Finance, the city of David is below the allowed limits. This means that the levels of carbon monoxide contamination are minimal.
The permissible limit that was established by Executive Decree No. 38 of June 3, 2009, of the Ministry of Economy and Finance is 5000 ppm.  The mobile application allowed to generate information in real time. It showed the minimum, maximum and average levels of temperature, relative humidity, carbon monoxide and carbon dioxide at each point where the devices were installed. It should be noted that in the figures that will be shown, they cover the average data of a location, in this case, it will be exemplified by location A, Hotel Ciudad de David, with all the parameters analyzed, which also include a filter by date, showing the average data of a day. Figure 8 shows the level of carbon monoxide in ppm, with the minimum level being 278 ppm, the average level of 284.96 ppm and the maximum level of 302 ppm. These data were generated in a single day. In addition, the level of carbon dioxide in ppm, the minimum level presented was 500 ppm, the average level of 574.92 ppm and the maximum level of 649 ppm, these data were also generated in a single day. IV. DISCUSSION Wireless sensor networks are one of the most widely used technologies for climate monitoring today. The lowcost integrated systems are the most commonly used for the acquisition of data from transducers that collect information on the different environmental variables.
In general, the type of air we breathe is not considered, but over time. It can affect the quality of life of the human being, since it can be influenced by high levels of carbon monoxide and dioxide, as well as other pollutants for a long time. When acquiring the collected data and comparing them with the permissible levels for each analyzed parameter, we reach the conclusion that during the peak hours (from 1:00 pm to 2:00 pm) the parameters analyzed in the city of David are affected by the number of people in the place. It should be mentioned that one of the parameters that varies the most is the amount of carbon dioxide in the air (approximately within a range of 560 ppm to 615 ppm within the permissible limits). Carbon monoxide had an analysis range of 240 ppm to 285 ppm, and this, in the same way, meets the permissible limits established by the Ministry of Economy and Finance of Panamá. The humidity of the air between 60% and 76% was affected by rainy days (days 2 and 4 of analysis), within the permissible limits established by Hidromet ETESA. The temperature was around 28 ºC to 35 ºC, being the minimum temperature related to those days with more precipitation. V. CONCLUSION System integration installation: the integration of the system to evaluate air pollution parameters can be an exhaustive task. However, it has never been more accessible than now in the 21st century with the help of avant-garde tools and technologies. It can be implemented in different areas of the country without any problem, evaluating the construction components of the sensors to resist climate changes and many analysis parameters that depend on the needs of the region to determine specific pollutants.

International
Economical: the cost of sensors is more accessible with the tools currently available that result in the configuration and implementation of the collection of valuable data with a lower investment than in previous years. This project was implemented with low budget sensors, collecting data without decimals, but despite this, it was possible to discover averages and compare them with the permissible limits of each parameter.
Data evaluation: obtaining the collected data and comparing them with the permissible levels for each parameter analyzed (temperature, humidity, carbon monoxide and carbon dioxide), we conclude that during the peak hours (from 1:00 pm to 2:00 pm) : 00 pm) The parameters analyzed in David City are affected by the number of people living there. It should be emphasized that one of the parameters that varies the most is the amount of carbon dioxide in the air (approximately in a range of 560 to 615 ppm), but in spite of that, it is within the permissible limits. Similarly, carbon monoxide had an analysis range of 240 ppm to 285 ppm, in the same way, it is within the permissible limits established by Ministry of Economy and Finance of Panamá. The humidity of the air between 60% and 76% was affected by rainy days (days 2 and 4 of analysis), within the permissible limits established by Hidromet ETESA. Finally, the temperature was around 28 ° C to 35 ° C; being the minimum temperature on the days when there was precipitation, it must be taken into account that the temperature will always be affected by the location, since the readings made by Hidromet ETESA at the Enrique Malek airport had an average reading of 28.3 °C.