183 The Mobile Environment Monitoring System with a Web Interface Nataliia Furmanova, Galina Shilo, Anton Kalynychenko, Pavlo Kostianoi Department “Information technology of electronic devices”, Zaporizhzhia National Technical University, UKRAINE, 69063, Zaporizhzhia, Zhukovskogo str., 64, shilo.gn@gmail.com, nfurmanova@gmail.com Abstract: In the scientific work the mobile system has - measurement of gases in the air; been developed that will allow to remotely control the - processing information by microcontroller; level of atmospheric air pollution. The statistic data of air - recording results on the server; pollution are shown at the developed web site. These - presenting results on the site; statistics is allowed to forecast the air pollution at the - view the given information by end-users. district Existing air pollution monitoring devices do not have the Keywords: air pollution, environment monitoring, ability to transmit data for their analysis remotely. ecological device, software complex, mobile system. Based on the considered analogs, we have put forward and implemented the following requirements: I. INTRODUCTION A. Modularity Environmental monitoring is complex observations of the environment, including components of the natural To be able to use complex on different objects, cities, environment, natural ecological systems, processes in them, countries-complex must have universal measurements. This phenomena, assessment and changes forecast of the flexibility has been achieved by using a series of sensors MQ, environment. which allow you to measure a huge range of gases without The development of monitoring as a complex method of changing the polling algorithm. the gathering information about the observed object and its B. Measurement ranges activity analysis allows to talk about the formation of an information monitoring technology that combines diagnostics It can be achieved the following ranges of measurements (assessment of the current), genesis (assessment of the past), of different gases with a combination of different sensors: and the forecast (assessment of the future) of the state of the LPG and propane: 200ppm-5000ppm studied objects [1]. Butane: 300ppm-5000ppm This article proposes the development of a software and Methane: 5000ppm-20000ppm hardware complex that will allow remote control over the H2: 100ppm-10000ppm level of air pollution. This complex can be used by installing Alcohol: 100ppm-2000ppm remote monitoring modules at multiple points to control CH4 and natural gas: 200-10000ppm emissions produced by industry and cars and quickly provide LNG and iso-butane: 200-1000ppm control environmental conditions for a rapid response Carbon-monoxide: 20ppm-2000ppm structures of civil defense and labor protection in enterprises Ozone: 10-1000ppm and government agencies. Ammonia, Benze, Hydrogen: 10ppm-10000ppm H2S: 1ppm-200ppm II. FORMULATION OF THE PROBLEM Ammonia: 5ppm-500ppm Issues of environmental monitoring are relevant today. Toluene, Acetone, Ethanol: 5ppm-500ppm This is evidenced by a large number of scientific papers on C. Data gathering this topic. Thus, in [2, 3] environmental monitoring is The complex provides remote collection of information considered as a part of Smart Cities and the importance of from a variety of monitoring modules located at a great control with air content in urban cities is emphasized. distance from each other. The collection is carried out by Different mathematical models are used for solving the transferring information from each module to the server using task of modeling air pollution. In [4] forecast methods of the the SIM800L GSM modem. This solution has some ecological situation on the basis of a hidden Markov model advantages in comparison with the using of Wi-Fi. Firstly, are specified. Using the interval difference operators for mobile communication covers significantly larger territories. analysis of air pollution from vehicular traffic is proposed in Secondly, in the absence of communication device will write [5]. Wireless sensor networks using Wi-Fi are proposed in data in the memory and send them later. [6], but this decision has some constraints, so we are proposed using SIM modem. D. Presentation of information III. THE MAIN FEATURES The ability to display information in the form of interactive graphs using any device with Internet access is implemented, Following steps realize the processing of information in as well as daily, weekly, monthly sampling data with the developed monitoring system: information about exceedances. ACIT 2018, June 1-3, 2018, Ceske Budejovice, Czech Republic 184 Reporting is carried out by a web application, where you control rate, sending and receiving GPRS data (TCP / IP, can select the data for the certain period of time (Fig. 1) and HTTP, etc.). look through them in the form of interactive graphs, as well D. Temperature and humidity sensor as a table (Fig. 2). As a temperature and humidity sensor it was optimal to choose one product in order to reduce the cost and dimensions of the device. As a combined humidity and temperature sensor, we chose the DHT22 digital sensor. The main characteristics of the sensor are ultra-low power consumption, lack of tying, long life time, digital interface. Fig. 1. The page of selecting data samples for the period of time. E. Energy consumption It implements the ability to work from the power supply 5 V, as well as due to the very low energy consumption from the battery. F. Price Since reviewed analogues are rather expensive, they cannot be used in combination. Therefore, one of the main tasks was to maximally reduce the cost of individual monitoring modules. This problem was solved due to relatively cheap components: a microcontroller (PIC16f887), gas sensors of the MQ series and a temperature and humidity sensor DHT. Due to this we were able to reduce the cost of the device to approximately 750 UAH. III. HARDWARE A. The microcontroller There are following requirements to the microcontroller: at least 3 analog-to-digital converters, low power consumption, built-in UART interface, low cost. Based on this, the PIC16F887 microcontroller was chosen. B. The gas sensors As sensors for determining the gas concentration optimally take sensors MQ-X series by FC-22. The main advantage of this series is that identical in function to the sensors ensure Fig. 2. The page with information of air pollution. the measurement of the concentration of a whole range of gases. It allows to measure several parameters, as well as to E. Printed circuit board (PCB) interchange the sensors without changing the polling Due to the use of surface mounting elements and plating of algorithm. the board, we were able to place all components on a single- Table I lists all kinds of compatible sensors. sided PCB with dimensions of 50x22 mm. C. GSM modem Tracing of the printing unit was carried out on the basis of an electric schematic diagram in the easyEDA system. As a As a remote data transmission module, the GSM/GPRS result, a template was created and a photorealistic image of modem SIM800L is used. The standard SIM800L control the printed circuit board was obtained (Fig. 3). interface provides access to GSM/GPRS 850/900/1800 / As a material of the designed PCB heat-resistant glass fiber 1900 MHz network services for sending calls, SMS messages was chosen. Its thickness is 1.5 mm, it has copper oxide foil, and exchanging digital GPRS data. The module is controlled 50 mkm. via the UART interface using AT commands. The shape of the printed circuit board is rectangular; the The SIM800L component has an implemented TCP / IP board is fastened using a threaded connection. Radiolements protocol stack, automatic detection of the AT command are fixed on the board by soldering. ACIT 2018, June 1-3, 2018, Ceske Budejovice, Czech Republic 185 TABLE 1. MQ SERIES is developed as a prototype, to test the housing and the device as a whole, housing parts were manufactured by 3D printing Model Target Gas using a 3D printer for FDM technology. PLA (polylactide) MQ-2 General combustible gas based on environmental materials was chosen as the material. Diameter of the used plastic fibers is 1.75 mm, which is due MQ-3B Alcohol to the features of the printer structure. A three-dimensional MQ-4 Natural gas, Methane model was created in the SolidWorks system (Fig. 5). The housing consists of four parts: the base, partitions with MQ-5B LPG, Natural gas, Coal gas sensor mount and a lid. The overall dimensions of the MQ-6 LPG, Propane assembled housing are 70x70x40 mm. After testing it is possible to produce a series of pressure casting housings, that MQ-7B Carbon Monoxide (CO) will reduce the cost of the housing unit as a whole in mass MQ-8 Hydrogen production. MQ-9B CO and Combustible gas MQ131 Ozone O3 Air Quality Control (NH3, Benzene, MQ135 Alcohol, smoke) MQ136 Sulfureted Hydrogen (H2S) MQ137 Ammonia (NH3) VOC (Mellow, Benzene, Aldehyde, MQ138 Ketone, Ester) Fig. 5. The housing model without a lid. IV. SOFTWARE A. The software part of a module When the module is turned on, the microcontroller calibrates the MQ-X gas sensors, and then it initializes the connection to the GSM module. After that, the cyclic starts measure the level of air pollution, the information is gathered Fig. 3. Photorealistic image of the PCB. from the sensors and sent it to the server. The time between The appearance of the printed circuit board is shown at the measurement and sending can be changed from 10 seconds to Fig. 4. several days. During the delay between the measurements, the controller switches to sleep mode, which reduces power consumption. If the connection to the GSM module has not been established, the microcontroller will write the data into memory and retry the sending of data at the next cycle pass. Sending data to the server occurs through the HTTP POST request. This allows to record the readings in the form of a JSON string and to process on the server side easy. B. The Server The work of the complex is to monitor a large area and collect information from a variety of modules. Therefore, it is necessary to store, process and submit a fairly large flow of Fig.4. The appearance of the produced PCB. information, so we chose the following software tools: 1) MySQL - Database management system, which is F. The housing of device used to store information received from modules. For the developed PCB of the device, we designed a 2) WEB server (in particular nginx HTTP server + php) rectangular shaped housing made of plastic. Since the model - using REST requests, we can use it both to receive ACIT 2018, June 1-3, 2018, Ceske Budejovice, Czech Republic 186 information from the modules and display information to the functioning of the device is developed. A layout and trace of end user. the printed circuit board were created; performance characteristics were calculated. The technology of production C. Server Software of parts and assemblies was chosen an experimental model When the SIM800 modem installed in the module is was created. A system for storing, processing and reporting accessed to the server, the script parses the incoming JSON information on air pollution in a user-friendly form was string to an array of data from each sensor, as well as developed. information about the module, and places these data to the Analysis of the collected information on the state of the database. environment, taking into account rose winds allows to Information about the database tables used for the determine the source of emissions of certain gases; to operation of the complex is given below (Table II, Table III). simulate environmental conditions and predict the movement TABLE 2. TABLE DEVICES of air currents in the event of emergencies. Features of the developed ecological monitoring system: Column name Information - a wide range of air pollution coverage; - the possibility of modification or individual assembly on Id Record number (table key) request of the customer; The physical address of the - small, in comparison with similar devices, cost; Address installation - relatively simple process of production using typical Name The device name technological processes; - gathering information from a set of modules located at Description Device description / Notes different points. These properties allow using a proposed system for TABLE 3. TABLE READINGS – INFORMATION FROM SENSORS educational purposes. It was realyzed at the Zaporizhzhia Parameter Meaning National Technical University in form of laboratory stand. This stand was developed to study the basics of data analysis Id Record number (table key) by students. The stand allows them to vary the components of Dev_id ID of device the modules, test their operation in practice and improve its features using modern approaches for gathering and analysis Datetime Time and date of data fixation of data. Temp Temperature from DHT22 sensor REFERENCES Humidity Humidity DHT22 sensor [1] J. Awange, and J.B. Kyalo Kiema, Environmental Geoinformatics: Monitoring and Management, New York, Module1 Sensor 1 readings Springer, 2013, 533 p. … … [2] H. Song, R. Srinivasan, T. Sookoor and S. Jeschke, Smart Module9 Sensor 1 readings Cities:Foundations, Principles, and Applications, Wiley; Hoboken, NJ, USA: 2017. D. User Interface [3] M. Bacco; F. Delmastro; E. Ferro and A. Gotta “Environmental Monitoring for Smart Cities,” IEEE When designing the complex, the ability to view Sensors Journal, Vol. 17, Issue: 23, 2017, pp. 7767 – 7774 information from any device in an easy and understandable [4] Wei Sun, Hao Zhang, Ahmet Palazoglu et al., "Prediction way has provided. Therefore, for these purpose it was of 24-hour-average PM2.5 concentrations using a hidden decided to create a web interface and present data in the form Markov model with different emission distributions in of interactive graphs. Experimental results are shown in [7]. Northern California", Science of the Total Environment, The web application was written in javascript, which pp. 93-103, 2013. makes a selection for a given period of time and displays this [5] I. Voytyuk, N. Porplytsya, A. Pukas and T. Dyvak data using the library chart.js. “Identification the interval difference operators based on V. CONCLUSION artificial bee colony algorithm in task of modeling the air pollution from vehicular traffic,” 14th International In this paper, a system for environmental monitoring is Conference The Experience of Designing and Application proposed. A module has been developed that will allow to of CAD Systems in Microelectronics (CADSM), 2017, pp. monitor the level of air pollution remotely. 58-62. The low cost of the developed module will make it [6] M. Pavani, P.T. Rao, "Real time pollution monitoring possible to produce and install a large number of modules for using Wireless Sensor Networks", 2016 IEEE 7th Annual environmental monitoring to cover extended areas. Information Technology Electronics and Mobile The following tasks were solved. The automation system Communication Conference (IEMCON), pp. 1-6, 2016. for determining the concentration of gases in the atmosphere [7] Statistics of air pollution monitoring: by means of sensors was studied. An algorithm for the http://ecomon.devus.tk ACIT 2018, June 1-3, 2018, Ceske Budejovice, Czech Republic