An inexpensive environmental monitoring system with IoT agents

Air quality is of great importance for human health and life expectancy. It becomes crucial to monitor atmospheric dust in the air of cities. In connection with the development of mobile networks and low-cost sensory agents, it has become possible to create inexpensive environmental monitoring systems. The paper presents results of studies on the system monitoring dust concentration in city air. The system consists of moving IoT agents placed on vehicles (taxies, busses, private cars) and measure the dust concentration. Agents, using a wireless connection, are sending the data to the recording server. The server application collects the data and visualises them on the map in a certain colour, depending on the dust concentration in the air and the values acceptable by standards. The system architecture, the algorithm of measurements and the agent-server data exchange protocol were presented in the article, as well as the example of data visualisation.


Introduction
Environmental pollution is a big problem all over the world.Nowadays people pay more attention to the physical health.Clean and healthy environment becomes more important to all.Pollution incidents and smog in the cities cause healthiness problems and create welfare threads [1][2][3].
In developing countries more and more attention is paid on building up air quality monitoring systems.Some of them give pretty accurate air quality measurement results with the use of monitoring systems and reference measurement verification [4][5][6].
Current research and development of such monitoring systems can be divided mainly into two solutions: interactive and real time.In the interactive systems the pollutant is chosen and after this the query to the measurement database is performed.After this the related pollutant information is presented [7].In the real time monitoring systems the information on pollutant or dust level is presented online after receiving the measurement data.This kind of systems are the mainstream, however there are various methods of implementation [4,8,9].
With the development of new technologies the new area is open for building the monitoring systems.Such promises technology is Internet of Things (IoT), which is the global network of devices which are allowed to connect to Internet and interact with available web services.
The IoT is significant because a device with the unique ID can represent itself digitally and therefore becomes so called smart thing [10][11][12].
Sensor technologies prices are quickly decreasing and the area of IoT systems is expected to expand very fast.The most popular application areas of IoT include: energy savings and management [13], production management [14], environment protection [15], smart home applications [16], security and monitoring systems [17,18].In Poland and other European countries dust level measuring systems use expensive equipment at fixed locations or dedicated mobile environment monitoring stations.Data obtained in such measurements is used for calculations in dispersion models to get the environmental pollution maps.This kind of system is the system with the coarse sensors network where the measurement points are few and far in-between.The advantage of this system type is the high measurement accuracy due to the used expensive equipment.The main disadvantage is that access to such data is limited only to persons who are well informed on the pollution sources and levels [19,20].
In consequence, measurement stations are very few (Fig. 1) and the results of measurements are available with daily delay.For example, in Lublin province of Poland is the only one air dust concentration monitoring station (Fig. 1).
The other solution is the system with the dense sensors network which can provide more frequent and spatially dense measurements.These types of measurements are essential for monitoring spatially inhomogeneous environments with variable emission sources like in urban areas [23,24].
There are also some related works on low cost air quality monitoring systems.The mobile electrochemical sensors (usually CO, NO and NO 2) designed in highly compact way and carry out by volunteers were shown in [23].Data from sensors were sent directly to Apache server and visualized using Google Maps API.
Brienza et al. in [9] presented low cost sensing system for measuring concentrations of polluting gases in various areas of the city.The users can deployed the nodes in different areas of interest and can change location of the node whenever they want to monitor a different place.Usually nodes were placed on users houses and made use of WiFi connection with user access point.System contained database and web servers which allow users to register sensing nodes and set their geographical coordinates locating them on a map.The work out website uses the Google Maps API to visualize sensor nodes and Air Quality Index levels.
Low-cost wireless monitoring system, which performs air quality (dust, CO and CO2) referential parameters measurements, was presented by Fuertes et al. in [25].The agents were based on Arduino prototyping board and placed in chosen places of the city.Measurements were transferred through the wireless connection to the server.Server web application presents measured values using Google Maps and brief description of point with measured parameters.
Castell et al. in [24] present the novel approach followed in the Citi-Sense-MOB project.The idea of the system consists of the use of lower-cost sensors for monitor-ing air quality at street level and web system offering the user-friendly and visually informative layout.The authors proposed that sensors will be mounted on mobile platforms, such as buses and cars.
In this article, the authors described the system of the big data sensing type, which consists of three main layers: mobile agent, middleware and application.The purpose of the presented work is the collection and analysis of dust level and temperature data from IoT agents.The middleware and application layers are implemented by the dedicated application.This solution offers the scalability, platform independence and realtime data processing and visualization.
The remainder of the paper is organized as follows.Section 2 presents the information on air quality measurements standards.In the Section 3 the layered architecture of the proposed system is described.The details of the implementation of mobility IoT agents are presented in Section 4. Server side application is described in Section 5. Finally, a brief conclusion is made in Section 6.

Air quality measurements standards
The measurement of air quality is carried out by state services based on standards acceptable levels of various substances in the air.Polish and EU standards limit the usual average levels of these pollutants.Polish standard [26] defines maximum levels for dust pollution for two sizes: PM2.5 and PM10.PM2.5 is the concentration of particulate matter with an aerodynamic diameter of grains to 2.5 microns, and PM10 -to 10 microns.Acceptable levels of dust concentrations are determined for the average daily (PM10, the permissible level is 50 μg/m3), or an average annual (PM2.5, the permissible level is 25 μg/m3).The standard [26] was defined two additional levels of pollution (only for PM10): -the level of informing the public (value -200 μg/m3), -the alarm level (300 μg/m3).Both of these levels are defined in the standard for the average daily.Short-term increases in the level of pollution do not therefore constitute formal causes for the alarms (Fig. 2).Such information may, however, be useful in the choice time and places of jogging or resting by citizens.For example, afternoon jogging would be better start after 18 and even better after 20 in the neighbourhood of the measuring station with the data from Fig. 2. The concentration at this time was four times less than 16-17 hours.

Inexpensive environmental monitoring system architecture
Inexpensive Environmental Monitoring system consists of two basic components (Fig. 3): -mobile measuring stations, -server-side software.
Many mobile measuring stations, placed on the public transport vehicles (buses, taxi) or private (volunteers) during motion collect data on the concentration of dust in the air.They used algorithms to optimize energy consumption and make sense of measurement and act as IoT agents.
Measuring stations transfer the data to the server in a situation where they will in the field of public WiFi network (e.g.accessible to the public in buses or other free Hot Spots located in different places of the city).This solution reduces the operating costs of the system.In addition, the algorithms of transfer the measurement data to the server optimize energy consumption and transmission time.
On the server side are implemented three basic features: -mobile measuring stations (IoT agents) registration, -measurement data acquisition, -data presentation in various forms, layouts and profiles.
The software has been developed using the responsive web design (RWD) approach and modelview-controller (MVC) architecture.

The moving IoT agent for dust concentration measurements
The measuring station, which also acts as IoT agent, is designed in the compact way to fulfil the mobility requirements.The overall architecture of the station is shown in Fig. 4. Station consists of the few sensors.The main one is the dust sensor for measuring the dust concentration, which gives a good indication of the air quality in an environment.However due to the specific way of dust sensor automatic measurement, this values cannot be assumed as reference values for dust concentration.
The other two sensors are: GPS for determining the position and temperature sensor for acquire working temperature.The range of working temperatures is important due to the dust sensor operation temperatures which are from -10 o C to +65 o C.
The heart of the IoT agent is the Arduino prototyping platform with Atmega chipset onboard.Arduino platform allows for programming all components together and act as single IoT agent.The measurement data is written to SD memory card for later transmission.In the designed system the WiFi module connected to the Arduino board acts as wireless connector.Wiring of the designed measurement station is shown in Fig. 5. On the top of Arduino Uno board the GPS shield is set.This shield is also equipped in SD card slot and additionally allows for transparent wire connection of external devices to Arduino board.All other devices of an IoT agent i.e. dust sensor, temperature sensor and WiFi module are properly connected to the supplying pins (GND, +5V, +3.3V) and digital and analogue input pins (Fig. 5).An agent is supplied with the electrical system of the car or the USB power bank of about 10000 mAh capacity.That allows for approximately 6 hours measurement and communication session.
The hardware parameters of an IoT mobile dust level measuring station are shown in Table 1.Total cost of the station with additional hardware (cables, resistor, and casing) is about 125 €.
The agent performs measurements according to flowchart shown in Fig. 6.The series of measured data are averaged (10 measurements of dust level and temperature per second) and the averaged value is written to the file.That was assumed, that with allowed speed limit in the cities in Europe which is 50 km/h the vehicle changes its position by the 13.8 m during one second.
Table 1.Hardware parameters of IoT mobile dust concentration measuring station.

Arduino programmable board
Arduino Uno board which is used as a main platform for sensors and dedicated agent software.Maximum current consumption is 46.5 mA with supplying voltage equals to 5V.Price 25€

Optical Dust Sensor
The sensor GP2Y1010AU0F has a very low current consumption (20mA maximum), supplying voltage up to 7V of direct current.
The output of the sensors is an analogue voltage proportional to the measured dust density, with a sensitivity of 0.5V/0.1mg/m3.

Server-side application
Server application was developed using technology WAMP (Windows + Apache + MySQL + PHP).Developed software for server-side part of the system has functionalities shown in Table 2.
The systems stores all collected data in the database.The data from mobile stations are stored in MMStations and Measurements tables.The structure of system's data base is presented in Fig. 8.

Conclusions and future works
The paper presents the results of the studies on inexpensive system to monitor the dust level in the air by IoT agents.The system can be implemented in industry due to its reliability, modularity and low implementation costs.The independent scaling of each layer was applied in the project.This allows for expansion of this solution de-pending on the needs.Designed moving IoT agents allow for dust level, temperature and position recording as also as sending the data to server system.
On the basis of data obtained during the operation of the system will be possible to implement different data mining algorithms, including: -Search incorrectly operating measurement agents.
-Mapping of pollution (temporary and average) by averaging and approximation of data.
-Analysis of the dynamics of the propagation of dust pollution with the ability to detect sources (backward approximation and modelling of the pollutant propagation).

Fig. 3 .
Fig. 3. Architecture of the Inexpensive Environmental Monitoring System.

Fig. 4 .
Fig. 4. Architecture of the moving measuring station of dust concentration.

Fig. 7 .
Fig. 7. Flowchart of the sending the measurement data to server protocol.

Fig. 8 .
Fig. 8. Structure of the system database.Server side application can present in graphic way conducted measurements.They are represented as spots in a colour corresponding to the intensity of the dust level.The examples of the server-side application screens are shown in Fig. 9.

Table
Users contains the information on registered in system users.

Table 2 .
Functionalities of server-side part of the system.