A low cost solution to monitor environmental parameters in industrial area perimeters

The monitoring of environmental parameters in active industrial areas where there exist potential sources of pollution, and even more so in the area of decommissioned or closure mining activities, is very important from the point of view of prevention of environmental accidents. In this paper, we propose a solution for the monitoring of the environmental parameters with the local acquisition and processing of the data and the transmission of alarm signals to a higher hierarchical level through the use of radio communications. A flexible hardware structure and software development concept are presented to be integrated into the national air quality monitoring network.


Introduction
The measurement of parameters of the environment and air quality parameters also are among the most relevant information for humans and the other beings. It is known there are parameters like temperature, humidity, but also volatile organic compounds, particulate matter, or CO2, which are highly relevant for the health of human beings.
The measurement of these parameters can be made by periodically collecting air samples or through a monitoring process which means using data acquisition and processing system. If the parameters are monitored at a long distance from the data acquisition points we have a remote monitoring system. Selecting and using the right equipment for remote monitoring and control applications can introduce some challenges to be solved [1], [2]. Selecting and using the right equipment for remote monitoring and control applications can introduce some challenges to be solved. In recent years, new technologies and products have emerged to address some of these challenges, but in many cases, these products must be selected taking into account:  geographic extension of the area where the data is being acquired;  how the data, after primary processing, is transmitted to the higher monitoring level;  how the data is provided to the user, in order to make a decision. The present remote monitoring methods include a wired method and radio method to send the acquired data. The wired method which can involve the trouble in the strength of the connection, the effects of the working environment, the information transmission in time, the operation cost and so resulting that it is not suitable for the most of such applications [3], [4].

Sensors used to monitor environmental parameters
Sensors used to monitor the quality of environmental factors can be classified by destination as follows:  used to determine the pollutants that contaminate the environment;  used to determine the components which are naturally composed an observed environmental factor;  used for the determination of natural and climatic factors. In any of these categories, there may be several types of sensors that are different from each other based on their operating principle. Thus, based on their operating principle, the sensors can be divided into electrochemical sensors, optical sensors, biosensors, piezoelectric and acoustic sensors or electronic sensors. From the point of view of this paper, electronic sensors are of interest.
Generally speaking, there are many methods of measurement have established using electronic sensors in the measurement of the environmental parameters and this category includes catalytic, semiconductor (solid-state), electrochemical and infrared sensors.

Catalytic sensors
The catalytic measuring principle is highly suitable for the detection of the volatile organic compounds (VOCs) that's means combustible gas and vapours.
One of the recent techniques introduced for VOCs detection involves passing the sample of gas over the surface of a semiconductor material, which is maintained at a constant temperature ( fig.1.). The adsorption of gas molecules on to the surface of the semiconductor modifies its electrical conductance. The selectivity of the gas to be detected may be achieved by the choice of semiconductor and the operating temperature. However, filters may be necessary to avoid interference or poisoning from other airborne pollutants [5]. The relationship between sensor resistance and the concentration of deoxidizing gas can be expressed by the following equation over a certain range of gas concentration: where: R S represent electrical resistance of the sensor, [C] represent gas concentration, A represents a sensor construction constant and a is the slope of R S curve. (1) The measurement system uses an embedded compute unity for signal processing and for sensor calibration also and the most used a compute unity in this systems is microcontroller because this integrates as many of the functions as possible in one package.
In general, manufacturers of these types of sensors provide users with a graphical performance feature that can be approximated by exponential or rational functions, like next relations: Here, the quantities (1) S R , (2) S R represents the sensor resistance values corresponding to concentrations (1) C [%] and respectively Using a simple Matlab program it can draw the simplified static characteristic in graphic form of the methane sensor TGS2611. In the fig.2 is represents a comparison between the simplified model (a) and the graphics model provided from TGS2611 methane sensor datasheet (b) where R0 is sensor resistance in 5000 ppm (0.5%) of methane.

Digital sensors
Digital sensors provide digital information to the user with the benefit of eliminating the need to use the analog signal filters to eliminate spikes specific to such an analog signal. Unlike the case described above for digital sensors, due to signal processing, there is a possibility of integrating multiple functions into the same hardware structure [6].
The BME680, produced by Bosch Sensortec, is a digital 4-in-1 sensor which can be used for gas, humidity, pressure and temperature values measurement based on specific Model provided by rational equation Model provided by exponential equation measurement principles. The sensor module is housed in a compact package with small dimensions and low power consumption. These characteristics enable the integration in battery-powered or frequency-coupled devices, such as handsets devices or other measurement systems. This sensor uses specific software (BSEC: Bosch Software Environmental Cluster) which is built to work with the 4-in-1 integrated sensors inside the BME680. Based on an intelligent algorithm, the BSEC provides output information. For an indoor environment, this output is in an index indoor air quality (IAQ) that can have values between 0 and 500 with a resolution of 1 to indicate or quantify the quality of the air available in the surrounding. Furthermore, the BSEC solution supports different operation modes for the gas sensor to address the necessary power budget and update rate requirements of the endapplication [7].
The sensor provides, for delivery the information to the user, two digital interfaces SPI (3-wire/4-wire) and I2C, any of which can be selected. The measurement can be triggered through a request from the user or can be performed at regular intervals.
The sensor can be operated in three power mode: sleep mode, normal mode, and forced mode. In sleeping mode, no measurements are performed to keep the minimal power consumption. In normal mode, the sensor operation automatic switching between the measurement period and standby period. In forced mode operation the sensor performs a single measurement on user request and after that switch in sleep mode until a new user request. This operation mode is recommended for applications which requires a low sampling or in applications where is used a user synchronization signal.

Chemiresistive Sensors
Many VOC measurement techniques have been developed and include thermalconductivity detectors (TCDs), gas chromatography (GC) detectors, non-dispersive infrared (NDIR) sensors, and many others.
Current-generation air quality sensors typically use a chemiresistor that is a semiconductor material that varies its resistance in response to changes in the surrounding chemical environment. A chemiresistor works through adsorption and desorption, which are surface processes that involve the accumulation or release of gas molecules. Adsorption and desorption vary the free charge carrier concentration in the material, causing the change in resistance. Both p-type and n-type semiconductors can exhibit chemiresistance and the used material are materials metal oxides (MOx), such as zinc oxide (ZnO), tin oxide (SnO2), indium oxide (In2O3), tungsten trioxide (WO3), copper oxide (CuO), and nickel oxide (NiO).
A MOx sensor makes use a thin-film metal-oxide layer to measure air quality; the sensor outputs an analog signal that indicates the concentration of the target gases. This signal is then converted into a digital equivalent in which specific gases are quantified. The adsorption process requires high temperatures, so the MOx sensor is packaged with a heating element as shown in fig.3

Hardware structure
In this paper, it is considered the case where the processing unit is an ESP8266 module to which on I2C bus the digital environmental sensors BME680 are connected. Thus, this processing unit also assures the connection to a wireless network.
The ESP8266 module is low cost standalone wireless transceiver with full TCP/IP stack and microcontroller capability that can be used for IoT development systems.
The ESP8266 can be used as such or can be applied to any microcontroller design as a Wi-Fi adaptor through SPI/SDIO or I2C/UART interfaces. Besides the Wi-Fi functionalities, ESP8266 also integrates an enhanced version of the 32-bit processor and on-chip SRAM. It can be interfaced with external sensors and other devices through the GPIOs, resulting in low development cost at the early stage and minimum footprint. ESP8266 integrates antenna switches, RF balun, power amplifier, low-noise receive amplifier, filters, and power management modules.
Typically, the ESP8266 is integrated into a development board so that the user can easily access the pins to use the features provided by it. Typically, the ESP8266 is integrated into a development board so that the user can easily access the pins to use the features provided by it. One of the simplest such development boards is the ESP8266 WeMos D1 mini that also includes a USB CH340 interface that allows it to be connected and programmed directly from the computer.
The fig.4.a. shows the functional blocks of ESP8266 and the fig.4.b. shows ESP8266 WeMos D1 development board [9]. The I2C bus is a means of connecting several peripheral input and output devices that support I2C on two wires. One of those wires is the DATA line called the SDA, and the other is the CLOCK line called the SCL. The information is sent on these two lines through the I2C communication protocol using the specified DIO lines, or other common DIO lines of the ESP8266 module. I2C can be used to connect up to 127 nodes via a bus that only requires two data wires, known as SDA (connected to D2 pin) and SCL (connected to D1 pin). To test the functionality of the ESP8266-BME680 assembly, acquisition of environmental parameters from two different measuring points was achieved by using two BME680 sensors connected to the ESP8266 module via the I2C bus according to the diagram shown in fig.5.
The BME680's default address is 0x76 (which you get when SDO is connected to GND). If SDO is connected to VDD the address can be forced to 0x77.
To enable communication on I2C bus, pull-up resistors R1 and R2 need to be connected from the I2C lines to the supply as shown in fig.5. These resistors pull the line in a logichigh state when it is not driven to the logic-low state by the open-drain interface and the value of the pull-up resistor is an important design consideration for I2C systems as an incorrect value can lead to signal loss [7].
For the pull-up resistances are imposed two requirements. Thus, the pull-up resistor must limit the current to a level that does not exceed the maximum drain current of the output transistor and also must prevent excessive current consumption when the SCL or SDA signal is in the logic-low state.
The minimum value R min of these resistances is imposed by the maximum sink current on the lines in the logic-low state of these and which is I OL =3 mA for the standard and fast operation modes of the bus. For operating with V DD = 3.3 V and considering the minimum V OL = 0 V for the logic-low state, it results: For calculating the maximum value of the resistors R1 and R2, it is assumed that they together with the electrical capacitance C of the SCL and SDA lines will determine the transition times, or rise time, between the logical states low to high, t LH , and it cannot be less than I2C standard rise time specifications. It is known that the response of an RC circuit to a voltage step of amplitude VDD, starting at time t = 0 is characterized by a time constant RC and the voltage waveform can be written as: Considering that the rise time is defined between the moments t H and t L of obtaining the corresponding to the logic-low state voltage V IL = 0.5 V and logic-high state voltage V IH = 1.2 V on the SCL and SDA lines, it follows: By defining the rise time t LH based on the difference t H -t L from relations (6), it results: Choosing the standard I2C bus specifications values of t LH = 150 ns, V IL = 0.5 V, and V IH = 1.2 V, and assuming a bus capacitance of C=150 pF, we have the maximum of resistance value R max for pull-up resistors: 3.5 max Rk  (9) The value of an I2C pull-up resistor must be large enough to reduce unnecessary current consumption and small enough to produce an acceptable rise time. The calculations above are helpful in choosing the value range for pull-up resistors, but it is possible to adjust them based on the SCL and SDA line capacity variations, depending on the application.

Software considerations
The ESP WeMOS D1 module is programmable so that the operation of the environmental parameter monitoring system is accomplished by programming the acquisition, processing and wireless transmission of the data [10].
The ESP8266 Wemos D1 mini Pro is an Arduino-like board that runs using the ESP8266 microcontroller and the most important difference to an Arduino module is that the ESP8266 has the wireless capability that means this can be natively connected to a Wi-Fi network.
Based on this observation, it is possible to program this module using Arduino development board-specific programming environments. It can be used a text programming languages such as the familiar Arduino IDE or visual programming media such as Visuino. Figure 6 shows the way to achieve the required programs in these two programming environments.

Conclusions
There are many solutions, some in function, to monitor environmental parameters. The proposed solution involves acquisition, processing, and transmitting, which can be directly into the Internet, of the data obtained through a simple and especially low-cost system.
The type of sensors can be expanded provided that the same protocol type is used to include the user in a network.