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

Call for Papers Engineering Research Journal June 2019

Download Full-Text PDF Cite this Publication

Text Only Version

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

Lilia Munoz, Mel Nielsen, Vladimir Villarreal

Grupo de Investigacion en Tecnologias Computacionales Emergentes Universidad Tecnologica de Panama

Abstract 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 thresholds.

Keywords:-Pollution, Internet of Things; Small Cities


    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 real- time 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.


    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.

    1. 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 ombustion [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].

    2. 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].

    3. 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 (%).

    4. 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.

      • The battery to provide enough energy to each element. Arduino is an open source technology, which is used in the creation of applications where it is necessary that both

    hardware and software are widely coupled. Figure 1 shows these components.

    1. Tin and cables

    2. Bluetooth HC-05 module

    3. MicroSD module

    4. DHT-11 sensor

    5. 9V rechargeable battery

    6. MG-811 sensor

    7. Arduino UNO board

    8. Printed Circuit Board

    9. MQ-07 sensor

    Figure 1. Components used in the Project.

    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.

    Figure 2. Assembled components on the PCB.

    Figure 3. Acrylic boxes with all components assembled inside.

    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 an

    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:

    alog 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.

    being referential points of the sensor

    datasheet. B on the other hand corresponds to the coordinates of the graph obtained based on the corresponding function:

    The values of correspond to calibration values of the sensor to clean air, this value corresponds to according to the component datasheet.

    Figure 4. MQ-7 sensor signal graph [14].

    Figure 5. Sensitive characteristics of the MQ-7 sensor [14].


    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.

    Figure 6. Averages of Carbon Monoxide levels per date from data collection of all the places analyzed.

    Figure 7 shows the averages of each day, with a maximum value observed in Cable Onda of 615.8 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 levels of carbon dioxide pollution were minimal in the evaluation area. The permissible limit that was established by Executive Decree N °. 38 of June 3, 2009, of the Ministry of Economy and Finance is 125000 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.

    Figure 7. Averages of Carbon Dioxide levels per date from data collection of all the places analyzed.


    Wireless sensor networks are one of the most widely used technologies for climate monitoring today. The low- cost 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.

    Figure 8 a) Carbon Monoxide levels in the Android Application. b) Carbon Dioxide levels in the Android Application.


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.

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.


This work has been supported by Technological University of Panamá.


  1. M. Holzer,M., A. Shark, Y. Zheng y A. Manoharan. The Digital Governance in Municipalities Worldwide Survey (2013-2014). A Longitudinal Assessment of Municipal Websites Throughout the World The e-Governance Institute. National Center for Public Performance School of Public Affairs and Administration Rutgers, the State University of New Jersey, 2014

  2. ARUP Smart Cities: Transforming the 21st-century city via the creative use of technology, 2010

  3. AMETIC. Smart Cities. Disponible en:, 2012

  4. J. Fernández. Ciudades Inteligentes: La mitificación de las nuevas tecnologías como respuesta a los retos de las ciudades contemporáneas. Econmía Industrial, 1, pp.17-23, 2015

  5. UN-HABITAT: Cities and Climate Change: Global Report on Human Settlements 2011. London: Earthscan, 2011.

  6. P. Howard. "How big is the Internet of Things and how big will it get?". The Brookings Institution. part-1.

  7. Z. Pang. Technologies and Architectures of the Internet-of-Things (IoT) for Health and Wellbeing. (Doctoral thesis). Royal Institute of Technology. Stockholm, Sweden. 2013

  8. M. Asghar & N. Mohammadzadeh. Design and simulation of energy efficiency in node based on MQTT protocol in Internet of Things. 2015 International Conference On Green Computing And Internet Of Things (ICGCIOT).

  9. U.S. National of Library of Medicine, Carbon Monoxide Poisoning., 2016

  10. National Oceanic & Atmospheric Administration. Trends in atmospheric Carbon Dioxide., 2017

  11. Dräger Technology for Life. Introduction to Gas Detection System. 421_en-1.pdf

  12. International Case Studies of Smart Cities: Medellin, Colombia | Publications. (n.d.). Retrieved April 11, 2019, from cities-medellin-colombia

  13. Instituto Nacional de Estadística y Censo – Panamá. (n.d.). Retrieved April 28, 2019, from EGORIA=1&ID_CIFRAS=40&ID_IDIOMA=1

  14. MQ-7 CO Gas Sensor Datasheet | Parallax Inc. (n.d.). Retrieved April 28, 2019, from gas-sensor-datasheet

Leave a Reply

Your email address will not be published. Required fields are marked *