A low-power IoT architecture for the monitoring of chemical emissions ACTA IMEKO ISSN: 2221-870X June 2019, Volume 8, Number 2, 53 - 61 ACTA IMEKO | www.imeko.org June 2019 | Volume 8 | Number 2 | 53 A low-power IoT architecture for the monitoring of chemical emissions Tommaso Addabbo1, Ada Fort1, Marco Mugnaini1, Lorenzo Parri1, Stefano Parrino1, Alessandro Pozzebon1, Valerio Vignoli1 1 Department of Information Engineering and Mathematical Sciences, University of Siena, Via Roma 56, 53100 Siena, Italy Section: RESEARCH PAPER Keywords: chemical emissions; LoRa; IoT Citation: Tommaso Addabbo, Ada Fort, Marco Mugnaini, Lorenzo Parri, Stefano Parrino, Alessandro Pozzebon, Valerio Vignoli, A low-power IoT architecture for the monitoring of chemical emissions, Acta IMEKO, vol. 8, no. 2, article 8, June 2019, identifier: IMEKO-ACTA-08 (2019)-02-08 Editor: Alessandro Depari, University of Brescia, Italy Received July 26, 2018; In final form June 04, 2019; Published June 2019 Copyright: This is an open-access article distributed under the terms of the Creative Commons Attribution 3.0 License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited. Corresponding author: Alessandro Pozzebon, e-mail: alessandro.pozzebon@unisi.it 1. INTRODUCTION It is now apparent that the man-made pollution of the atmosphere can have serious consequences. Therefore, monitoring air quality is of the utmost importance. Among other pollutants, CO and NOx, which are by-products of combustion, are extremely harmful and dangerous, even if they are very diluted in the atmosphere and appear in very low concentrations (including below the ppm range) [1]. For this reason, toxic gas monitoring in ambient air is a difficult task. The required measurement accuracy and resolution are challenging [2]-[4]. It is obviously convenient to also monitor the sources of toxic gas emissions from the point of view of a policy of emission abatement. In this context, there is great interest in developing systems that are able to continuously monitor the combustion processes that are a certain source of air pollutants. Moreover, the monitoring of combustion products also allows us to optimise combustion operations and to alleviate the instabilities and severe consequences thereof [5]. There are many different technologies and instrumentations that can be used to measure gaseous emissions of combustion processes, but they are usually expensive and complex, and they require frequent, cumbersome, and time-consuming calibration procedures. In practice, gaseous emissions are rarely monitored on a continuous basis, even if the advantages of such a measurement are apparent. In this work, an IoT framework for the continuous monitoring of chemical emissions is presented. Such an infrastructure may be extremely important in several different contexts. The most important scenario is clearly the industrial one. Industrial plants contribute significantly to the introduction of pollutants into the atmosphere, and their vast size makes the realisation of pervasive monitoring infrastructures complex and expensive, while the maintenance of these systems may be just as onerous as the installation phase. Nevertheless, the industrial scenario is not the only one that could benefit from the realisation of a system as that which is proposed in this paper. Such an architecture could also be employed to monitor the chemical emissions and environmental conditions in a smart city ABSTRACT In this work, a low-power IoT architecture for the monitoring of chemical emissions is presented. This system is expected to be employed to set up monitoring infrastructures in industrial plants or public buildings. The proposed system has been designed to embed different sensors. In particular, each sensor node manages a humidity sensor and an array of temperature and electrochemical gas sensors for the detection of carbon monoxide (CO), nitrogen oxides (NOx), and oxygen (O2). Moreover, it exploits some dedicated processing algorithms to mitigate the dependence of the sensor response on temperature. The sensor node has been designed to minimise power consumption as much as possible, and it is provided with LoRa LPWAN connectivity, which allows for wide-area data transmission. Tests carried out in urban areas proved that a 3 km communication range is achievable in noisy environments. A network architecture and a data acquisition and management structure are then described. A multilayer modular topology that combines the features of LoRa technology with shorter and larger range telecommunication channels in order to develop an IoT framework that can be customised according to the physical and technical features of the deployment scenario. mailto:alessandro.pozzebon@unisi.it ACTA IMEKO | www.imeko.org June 2019 | Volume 8 | Number 2 | 54 scenario. In this case, monitoring the emissions of public buildings may be useful in terms of improving the quality of life of citizens and optimising the energy consumption of buildings. Finally, such a system may be used to monitor the impact of every single citizen on the environment by measuring the emissions of private buildings pervasively and in real time. This practice may lead, for example, to the implementation of taxation policies. Wireless sensor networks (WSNs) for gas monitoring have been the subject of an increasingly large number of research studies [6]. The majority of such studies that aim to implement gas emission monitoring in industrial environments are based on local networks rather than on Internet-connected architectures. Many works have proposed local area WSNs based on resistive prototypal or commercial metal oxide (MOX) chemical sensors, mostly for combustible and toxic gas detection. However, since MOX sensors are required to be properly heated, they are usually power-consuming devices. The WSNs proposed in the literature attempt to solve this problem by exploiting energy harvesting and/or optimised heating strategies [7]-[10]. This last approach can result in many problems, since the operation of sensors with a low average temperature enhances the cross-sensitivity to environmental conditions, such as humidity, and discontinuous heating can start very long transients [10]. On the other hand, electrochemical gas sensors are low-power devices and are surely more suitable for the development of WSNs. Nevertheless, few works have presented solutions based on this technology. An example of a WSN for the detection of CO and CH4 based on Radio Frequency (RF) energy harvesting is presented in [11]. In [12], a portable Bluetooth device was proposed for the crowd- based detection of CO, S2O, and NO2. Therefore, it is not specifically tailored for industrial applications. Regarding the Internet of things (IoT) domain and the development of monitoring structures to make data remotely available by means of the Internet, some interesting examples of infrastructures can be found concerning environmental monitoring. A large number of studies deal with ZigBee-based networking architectures, according to which local WSNs are integrated over the Internet through either a wireless [13] or wired connection [14]. Some solutions based on other microwave (2.45 GHz) [15] or sub-GHz [16] radio technologies can also be found. WiFi and Bluetooth have also been exploited to set up environmental monitoring architectures based on the IoT paradigm [17]. With the emergence of so-called low-power wide area network (LPWAN) technologies, several solutions have been presented using LoRa technology in particular for environmental monitoring. Most of these systems focus on smart cities [18]- [20], with applications measuring parameters like temperature, humidity, or pollutant concentrations. Nevertheless, all these solutions use low-quality, off-the-shelf devices, mainly focusing on the single data acquisition platform rather than on the overall network architecture. Very few solutions deal with IoT applied to the monitoring of gas emissions. Moreover, all of the relevant studies approach the problem by focusing on the design of the single sensor node rather than on the whole monitoring infrastructure [21], [22]. In this article, we propose a monitoring infrastructure that allows for wide-area Internet-based data transmission, focusing on the monitoring of combustion by-products mainly in industrial plants, which is based on low-power electrochemical sensors and does not need any energy harvesting system. In fact, by accurately designing the whole network node electronics comprising the front end, a node powered with off-the-shelf 1.5 V AA batteries was developed, which can work for the whole sensor life. The proposed system has been designed with a modular structure that enables it to embed different low-power sensor systems based on a simplified version of a measurement device that is developed and tested as a standalone instrument [23]. The sensor node is low power and manages an array of electrochemical gas sensors of carbon monoxide (CO), nitrogen oxide (NOx), and oxygen (O2), and it exploits some processing algorithms designed ad hoc to mitigate the sensor drift and dependence of the sensor response on temperature and humidity. The sensor node has been studied not only to measure the required parameters but also to remotely transfer, in real time, the collected data, based on previously developed pervasive environmental monitoring architectures [24], [27]. In particular, different architectures have been studied for the communication module of the node, ranging from local area (ZigBee) to wide area (LoRa) and global connectivity (the Internet). While all these solutions have proved to be employable, suggesting their use for a modular, multilayer network topology, the final sensor node prototype has been provided with LoRa connectivity. Indeed, the LoRa technology has proven to be the most flexible one, allowing for the deployment of both local- and city-scale networks [28], [29]. In the context of industrial monitoring, this approach allows for the deployment of wireless monitoring infrastructures for both small- and large-scale industrial plants as well as multi-plant networks. Similarly, in the context of smart cities, such connectivity allows for the deployment of a large quantity of sensor nodes while keeping the structure of the acquisition network relatively simple and flexible. By deploying a very small number of gateway nodes (according to the dimensions of the city), it is possible to provide connectivity to a relatively large urban area, managing data collection from a large number of public and private end-users. 2. IOT FRAMEWORK ARCHITECTURE As explained in the previous section, an ad hoc multilayer IoT network architecture has been studied and designed to fit different scenarios according to different levels of capillarity. The overall network architecture is based on a cluster-tree topology, where each level of the tree corresponds to a different communication technology. The three communication layers of the proposed architecture are shown in Table 1, while the network topology can be seen in Figure 1. The three communication technologies present different technical features that make them suitable for employment for different functions within the network infrastructure. ZigBee is a network protocol based on the IEEE 802.15.4 protocol [30] and designed for the realisation of local-area mesh WSNs, adopting multi-hop as a strategy to improve network efficiency and lifetime. ZigBee nodes are generally provided with short-range data transmission. In general, they can transmit data Table 1. Communication technology layers. Layer Communication technology Transmission range Bottom Layer ZigBee < 100 m Middle Layer LoRa 100 m … 3 km Upper Layer Ethernet-GPRS/UMTS > 3 km ACTA IMEKO | www.imeko.org June 2019 | Volume 8 | Number 2 | 55 at a distance of 100 m in line of sight, even if this value can drop down to a few metres in indoor environments, especially in the presence of large walls [31], [32]. This means that in this context, ZigBee networks can be employed for the monitoring of a single room rather than a whole building. LoRa, an acronym of long range, is a physical-level proprietary protocol patented by Semtech [33], which belongs to LPWAN technologies. Such systems have been designed to provide long-range data transmission (in the order of some kms) and very low-power data transmission according to the two most significant system requirements for IoT infrastructures. LoRa systems operate in the unlicenced Industrial, Scientific and Medical (ISM) bands of 868 MHz in Europe, 433 MHz in Asia, and 915 MHz in the US. They are based on star network topologies, according to which a large number of LoRa nodes are able to transmit data to one or more LoRa gateways that are responsible for forwarding data to any kind of data management system. The performance levels of LoRa devices can vary, both in terms of bitrate and data transmission range according to the values of a set of parameters. In any case, LoRa systems generally feature low bitrates, and they can achieve 20 km distance in line of sight and a 3-4 km distance in urban areas. Moreover, they can also be employed to monitor large buildings due to their efficiency, as will be shown in Section 4. It must be underlined that LoRa technology has a legal requirement for a mandatory 1 % duty-cycle (in Europe for EU 868 end devices [34]). This means that the number of packets transmitted by the networks is quite low in any case. Finally, the last layer comprises Internet-connected technologies, which are generally characterised by high power consumption. Their purpose is mainly the transmission of data collected by the whole network to a remote data collection centre or cloud infrastructure. According to the three layers, three sensor nodes and three cross-layer gateway typologies have been designed. In order to test the functionalities of the monitoring infrastructure, one sensor node and one cross-layer gateway have been fully developed. The lower level of the network structure comprises the clusters of ZigBee-connected nodes arranged in mesh sub- networks. Due to the limited communication range, these networks are expected to be employed for the monitoring of single rooms or for the deployment of sensor arrays positioned at limited distances. Each node integrates a ZigBee radio module that can collect data from one or more sensors. The ZigBee nodes represent the lower level of the network architecture, acting either as ZigBee end devices or ZigBee routers according to their function in the mesh network. They are designed to be as simple as possible, optimised in terms of power consumption by enabling duty-cycling and characterised by a low data rate, since only the numerical values acquired by the sensors need to be transmitted. The ZigBee nodes interface with the upper levels through two different cross-layer gateways: the ZigBee-Internet gateway and the ZigBee-LoRa gateway. The ZigBee-Internet gateways can be based on both wired and wireless connections. The first ones are designed for integration on a single microcontroller-driven board of a ZigBee radio module, acting as a ZigBee coordinator, and an Ethernet module. Meanwhile, the second ones can be based on either a WiFi module or a SIM- based GPRS/UMTS connection. The ZigBee-LoRa gateways are based on a multi-protocol board that re-routes the ZigBee data packets to the middle layer. Since these nodes present an ad hoc microcontroller for the packet management, they can also be responsible for data filtering. Indeed, a first check, based on threshold values (for example), can be performed directly on the gateways through ad hoc data check protocols. This practice leads to the discarding of the unnecessary packets and the forwarding to the LoRa network only a subset thereof, with a notable reduction in the overall network traffic. The middle layer of the IoT framework is represented by the LoRa infrastructure. This is basically a tree network that can be employed to cover larger areas than the ZigBee one. In particular, with adequate positioning of the LoRa gateway nodes, transmission ranges of up to 20 km can be achieved. Since the main task of the LoRa nodes is to collect the sensor data and transmit it, their structure (and that of the ZigBee nodes) is very simple, integrating the microcontroller unit responsible for data acquisition and transmission; the sensors; and the LoRa radio module. Since LoRa modules are developed to minimise power consumption and the LoRa protocol is more energy efficient than the ZigBee one due to the lack of routing algorithms required to implement multi-hop, these nodes are expected to be the most energy efficient, even if they are less fault tolerant due to their intrinsic network architecture. The middle layer is provided with two cross-layer gateways: the abovementioned ZigBee-LoRa gateway and the LoRa-Internet gateway. This second gateway is similar to the ZigBee-Internet one even if due to the larger transmission ranges, the ideal configuration is the wired one. In many cases, Ethernet connectivity will surely be available. The wired connection is intrinsically more fault tolerant than the wireless one, and the gateway could be powered by power-over-ethernet technology. The upper level is represented by the Internet backbone. In this context, Internet-connected nodes have been designed, allowing for the collection of sensor data and forwarding thereof directly to the Internet through a wired (Ethernet) or wireless (GPRS/UMTS or WiFi) connection. These nodes are obviously more complex and power hungry than the previous ones due to the need to implement the TCP-IP protocol stack, and the advantages that are achievable in terms of data rate and efficiency are not fully exploited due to the limited amount of data for transference. This suggests their use only in the presence of a power source, otherwise other solutions should be preferred. The cross-layer gateways interfacing with this layer are those described earlier i.e. the ZigBee-Internet and the LoRa-Internet ones. Figure 1. Multi-layer network architecture. ACTA IMEKO | www.imeko.org June 2019 | Volume 8 | Number 2 | 56 This architecture fits well within the proposed monitoring context (monitoring chemical emissions in industrial complexes or cities) thanks to the unique features of each technology. In particular, the lower layer can be used to monitor small closed environments (single rooms or very small buildings). This layer is especially important since it can operate data filtering. In particular, the ZigBee gateway can act as a filter, choosing the packets for forwarding to the upper layers according to a set of rules that can lead to discard the majority of data packets, transmitting only the relevant ones. In large monitoring infrastructures, this can be crucial so as to avoid a network overload. The LoRa layer is expected to be used within two different contexts: when the area to be monitored is so large that it cannot be covered by a ZigBee network and when data cannot be forwarded directly by the ZigBee clusters to the Internet. In particular, in the first case, LoRa networks can be used to monitor wide outdoor environments (up to some kms) as well as large buildings [35]. In this last context, while ZigBee has proven unable to interconnect two devices placed even in two adjoining rooms [31], [32], in Section 4, we show that LoRa is able to cross a large number of walls and rooms, providing connection to a whole large building with a single gateway node. The Internet layer is in charge only of forwarding a sub-set of data packets to a remote data collection centre or to a cloud infrastructure. In the proposed scenario, the Internet Gateways simply transfer the packets to a remote server through an HTTP POST. A Java Web Application deployed on a Glassfish server provides a Web Service in charge of receiving the packet, extracting the data and storing them into a MySQL database. Data are then made available through an ad-hoc web page that allows to retrieve and analyse them. While the whole infrastructure could be set up in case of large and articulate monitoring architectures, the minimal sufficient subset is represented by a sensor node and an Internet-enabled gateway. The modules developed as a proof-of-concept in this research satisfy this requirement being them a LoRa node and a LoRa-Internet gateway. Even if in this paper we used LoRa technology for data transmission, it is well known that LoRa Alliance has also created an ad-hoc protocol at Medium Access Control (MAC) and application layer, called LoRaWAN [36]. This protocol is expected to be adopted for the proposed scenario when designing the overall monitoring infrastructure, since its benefits are clearly visible mainly when large dimension networks have to be deployed. Indeed, the adoption or LoRaWAN protocol can add a wide range of features to the overall system that can make it more reliable and efficient. In particular, LoRaWAN protocol adds anti-collision features that notably reduce the risk for packet losses in presence of large quantities of sensor nodes. It foresees the use of two layers of security, one for the network and one for the application, based on Advanced Encryption Standard (AES) encryption. Another key feature of LoRaWAN when designing large network architectures is the independence of the sensor nodes from the single Gateway: in LoRAWAN networks, any packet transmitted by the nodes is received by multiple gateways which forward it to a standardised backend in charge of managing them. The standardised backend is composed of two different servers: the Network Server, which manages the reception and transmission of packets from the nodes, and the Application Server, which is the final destination for the data contained in the payload of the packets. In order to adapt the proposed architecture to the LoRaWAN protocol, few changes have to be done. In particular, LoRa nodes are expected to be turned in Class A LoRaWAN devices, while LoRa-Internet Gateways are simply replaced by LoRaWAN Gateways that are provided themselves with Internet connectivity. For what concerns the ZigBee-LoRa gateways, their structure can be based too on Class A LoRaWAN devices since they are expected to receive very few downlink messages, with a large number of uplink transmissions. This means that the overall structure of the ZigBee-LoRaWAN Gateways is expected to be very similar to the ZigBee-LoRa ones. 3. SENSOR NODE ARCHITECTURE Each node within the proposed IoT architecture consists of a communication module and a micro-module based on a low- power STM32L432 microcontroller, connected to a series of different sensor units. A MOSFET-based switch is used to set up a duty-cycling for the radio module, thus turning it off when no data transmission is required. A sensor unit contains one of the electrochemical sensors listed in Table 2 or a humidity sensor coupled with a sensor for the measurement of the local temperature [37]. 3.1. Sensor node Each sensor unit contains an electrochemical (or humidity) sensor and a temperature sensor, plus the dedicated front-end electronics (whose architecture for the case of the electrochemical sensors is shown in Figure 2): its outputs are then the analogue measurement signals of the local temperature Figure 2. Sensor node architecture. Table 2. Sensors used in the proposed system. Electrochemical sensors Humidity sensor Temperature sensor Alphasense CO−A4 Alphasense NO2 −A43F Alphasense NO−A4 Alphasesne O2 −A1 Honeywell HIH4000 National Semiconductors LM32 ACTA IMEKO | www.imeko.org June 2019 | Volume 8 | Number 2 | 57 and of the target gas concentration (or humidity value). The selected humidity and temperature sensors require a very simple and conventional low-power front-end electronics that will not be discussed in this paper. On the other hand, the electrochemical sensors need ad-hoc electronics, specifically designed to grant high accuracy and very low-power consumption. The front-end electronics has the structure shown in Figure 3 where, as an example, the CO sensor is considered. As shown in the figure, the front end consists of an I-V converter and of a biasing circuit. The I-V converter is used to convert the current flowing through the sensor across the Working Electrode (WE) and the Counter Electrode (CE) into an analogue voltage, which is then fed to the A/D converter in the micro-module. This current is caused by the electrochemical reaction and is theoretically proportional to the target gas concentration. The biasing circuit assures a constant voltage across the WE- electrolyte interface, irrespective from the current flowing through the sensor, by a feedback loop that sets the CE voltage on the basis of the comparison of the Reference Electrode (RE) voltage with the voltage Vbias. Being the reaction at the WE highly influenced by the voltage at the WE-electrolyte interface, this control circuit highly improves the sensor output stability. The design of the sensor node circuit is similar to the one presented in [38] but with significant improvements in terms of power consumption reduction. To this purpose, nano-power ST TSU10x operational amplifiers have been used. These devices are particularly suitable for the low-power I-V converters, since they are characterized by a sub-micro ampere current consumption (580 nA per channel at 25 °C at VCC=1.8 V), by a very low supply voltage in the range (1.5 V - 5.5 V), by rail-to-rail input and output operations, and by a very low input bias current (5 pA max at 25 °C). A special attention in terms of power consumption is also required for the voltage reference circuits. A band gap reference voltage (LT1379), combined with the operational amplifier previously described (Figure 3) is used to generate an adjustable reference for both the biasing voltage (Vbias) and the reference voltage (Vref) of the circuit. The front-end power consumption was determined by Spice simulations (Figure 4b), considering the components previously described and the standard electrical model used for the electrochemical sensors (Figure 4a). From simulations, the overall current consumption of the analogue front end is approximately 7 µA with a 3 V supply voltage. This very low- power consumption allows for maintaining the front end active also when the microprocessor is in sleep mode and the communication module power supply is turned off. This solution is advantageous in terms of accuracy and measurement speed: indeed, when turning off and on the biasing of the electrochemical sensors (especially the NO sensor which requires a Vbias = 0.3 V), long chemical transients are started and long settling time (hours) is required before reaching the final accuracy. 3.2. A/D conversion by Micro-module and measurement management The measurement signals from the front-end circuits are A/D converted by the STM32L432 low-power microcontroller. This microcontroller sinks only few μA in standby mode whereas in Run Mode the current consumption depends on the clock frequency and is approximately 84 μA/MHz of CPU clock. The microcontroller is equipped with a 12 bits A/D converter with maximum sampling frequency of 5 MSps. Exploiting oversampling the resolution can be enhanced and an equivalent 16-bits resolution can be obtained with a current consumption of 200 µA/MSps. For the current application, the sampling frequency is not a critical issue, since electrochemical sensors are slow devices, with a response time constant τ in the order of few seconds. On the contrary, accuracy is required, hence a high AD conversion resolution is important. In particular, since the sensor noise floor is 20 equivalent ppb, with a full scale up to 500 ppm Figure 3. Sensor node structure in case of electrochemical gas sensors. (a) (b) Figure 4. Front end: a) electronic front-end structure. b) Spice Model used for the simulations and the evaluation of the power consumption. Analog Front End WE CE RE I-V Converter E0 CO CO2 2 H + H2O 1/2 O2 2 e - 2 e - i0 i0 i 0 V bias Microcontroller STM32L4 V Sens SPI A D C V Ref V bias Biasing Circuit AE Voltage References Switch 3V Battery Electronic Front End 1Electrochemical Sensor 1 Radio Analog Front End WE CE RE I-V Converter E0 CO CO2 2 H + H2O 1/2 O2 2 e - 2 e - i0 i0 i 0 V bias V Sens V Ref V bias Biasing Circuit AE Voltage References Electronic Front End 2Electrochemical Sensor 2 3V 3V WE RE CE AE 3V 3V 3V Vbias Vref Vref Vwe Vaux 3V Vref Electrochemical Sensor Rgain Rgain Road Road LT1389- 1.25 Vbias 3V LT1389- 1.25 I_V Converters Biasing Circuit Voltage References ACTA IMEKO | www.imeko.org June 2019 | Volume 8 | Number 2 | 58 for the CO sensor, to preserve the measurement resolution an AD converter with an effective number of bits larger than 14.6 is required. A solution can easily be found using averaging. In fact, it is well known that considering a white quantisation noise when averaging N n-bit samples of a constant analogue voltage, the mean value can be represented with a neq-bit sample, such that 𝑛𝑒𝑞 = 𝑛 + 10 log10 𝑁 6.02 𝑑𝐵 = 𝑛 + 𝑛 (1) where ∆n represents the resolution increment. Using the 12 bits Analog to Digital Converter (ADC) (n = 12) of the microprocessor, to obtain a 16-bit resolution (neq = 16), a resolution increment ∆n, equal to 4, is needed. Hence, N = 256 is the required number of samples for the average or, alternatively, the oversampling ratio. Considering the output of the electrochemical sensors constant in time intervals much shorter than their time constants, we can sample the sensor output during a period Tm = 0.5 s (≈ τ/5), that means that the needed sampling frequency of the ADC is 512 Hz. In these conditions, the expected ADC current consumption during the sampling period is around 100 nA that is a negligible value with respect to CPU current consumption. The CPU is turned on only for the time required to sample the signal and transmit it over the radio link. The radio module is a Libelium 868 MHz, SX1272 LoRa module, whose current consumption is approximately 𝐼𝐿𝑜𝑅𝑎 =28 mA in transmission. Overall current consumption of the node during the wake-up period will be 𝐼𝑂𝑁 = 𝐼𝐿𝑜𝑅𝑎 + 𝐼𝜇𝑈 + 𝐼𝑆𝑈 , (2) where 𝐼𝜇𝑈 is the current absorption of the Micro-Module and 𝐼𝑆𝑈 is the current absorption of the Sensor Unit. Assuming the previously discussed values for these parameters, the overall current absorption of the sensor node when on is calculated as follows: 𝐼𝑂𝑁 ≅ 28.00 𝑚𝐴 + 0.84 𝑚𝐴 + 0.01𝑚𝐴 ≅ 28.85 𝑚𝐴 . (3) Since in its simplest configuration the sensor node is expected to be battery-powered, in order to estimate its life time, it is possible to analyse the power consumption in terms of battery capacity dissipation, measured in mAh. In order to wake up and transmit three packets, the module requires around 5 seconds. If assuming an hourly sampling rate (and then an activity period of 5 seconds each hour), the average hourly current absorption of the node can be calculated as follows: 𝐼ℎ𝑡𝑜𝑡 = 𝐼𝑂𝑁 ∙ 𝑡𝑂𝑁 + 𝐼𝑂𝐹𝐹 ∙ 𝑡𝑂𝐹𝐹 1 ℎ𝑜𝑢𝑟 , (4) where 𝐼𝑂𝐹𝐹 is the current absorbed when the sensor node is sleeping and 𝑡𝑂𝐹𝐹 is the sleeping period. This value is calculated as follows: 𝐼ℎ𝑡𝑜𝑡 = 28.85 𝑚𝐴 ∙ 5 𝑠 + 0.007 𝑚𝐴 ∙ 3595 𝑠 3600 𝑠 = 0.047 𝑚𝐴 . Using two 1.5 V AA lithium batteries, whose nominal capacity is 𝐶𝑏 = 3000 mAh, the average life time 𝑡𝑙𝑖𝑓𝑒 of the node is: 𝑡𝑙𝑖𝑓𝑒 = 𝐶𝑏 𝐼ℎ𝑡𝑜𝑡 = 3000 𝑚𝐴ℎ 0.047 𝑚𝐴 ≅ 63830 ℎ ≅ 2660 𝑑𝑎𝑦𝑠 . This means that the sensor node can theoretically operate for more than 7 years. If taking into account the impact of environmental conditions, the non-ideal behaviour of the batteries and the discharge rate of the batteries that does not allow to fully exploit their capacity, and halving this value, the life time of the node is still larger than the one of the sensors. The node is then able to satisfy the initial requirements. The LoRa-Internet gateway receives all the packets transmitted by the node and through an ad-hoc API transfers them to the cloud infrastructure in charge of storing them into a MySQL database. The prototype of the gateway has been realised exploiting an Arduino MKR1000 WiFi board connected to a Libelium 868 MHz, SX1272 LoRa module. While this prototype is based on WiFi connection, alternative solutions could have been set up by using either wired Ethernet connection or Wireless GPRS/UMTS connection, by simply using dedicate transmission modules. In case of the gateway, no energy consumption analysis has been performed since this kind of device is expected to be always on to receive the packets from the single sensor nodes. In this case, it must be mandatorily connected to a continuous source of energy such as the electricity grid or some kind of reliable energy harvester as for example solar cells. 4. TESTS AND VALIDATION The tests on the operation of the sensor node have focused on both data acquisition by the sensor unit and data transmission reliability by the communication module. The sensor unit was characterised in laboratory, in terms of response to the target gases: CO, NO, NO2 and O2. Cross-sensitivity was tested and found to be negligible as declared by the producer. Moreover, the influence of environment temperature and humidity was assessed. These measurements are obtained by analysing test gases and by means of a characterisation system, which allows for generating reference mixtures of air and target gases, with (a) (b) Figure 5. Tests of the sensor nodes. a) Laboratory measurements on reference gas mixtures. NO and CO mixtures in air (RH = 50 %, flow rate 200 mL/min). The ‘true’ concentrations of the two gases are indicated with green and black lines. b) Test of Sensor Unit in field (industrial exhaust gases). ACTA IMEKO | www.imeko.org June 2019 | Volume 8 | Number 2 | 59 known compositions, starting from reference gas cylinders and using mass-flow controllers Bronkhorst (accuracy 1 % of the full scale). The total flow during a measurement is constant (in the results reported in this paper equal to 200 mL/min), whereas its composition can change dynamically during a measurement. The gas humidity is set by means of a bubbler containing ultrapure water, kept at known temperature in which the dry air is saturated; the desired Relative Humidity (RH) value is obtained by mixing the flow from the bubbler with a dry gas. The data shown in Figure 5a, concern an example of calibration measurements obtained using a mixture of oxygen, nitrogen, CO and NO, simulating possible operating conditions. The oxygen in the test had a fixed concentration equal to 16 % (volume/volume) whereas the concentrations of both CO and NO were varied during the measurement, following the theoretical profiles represented in the figure by the black and the green line respectively. The magenta and the blue lines represent the measured CO and NO concentrations: this test allows for assessing the very low cross-sensitivity of the CO and NO sensor. The electrochemical sensors exhibit in general a linear dependence of the output current on the gas concentration, and the measurements can be effectively corrected for the effect of temperature. In Figure 5b an example of data coming from an in-field test of the monitoring system concerning the emission of a combustion process is shown. Note that in the test phase the sample rate used for measuring gas concentrations is higher than the one that will be used in the final deployment. After the tests on the sensor unit, the overall sensor node architecture has been tested, focusing on the reliability of the LoRa minimal communication infrastructure described in section 2. The data transmission was validated with indoor tests, performed in the main building of the Department of Information Engineering and Mathematical Sciences of the University of Siena (See Figure 6). This structure has been identified as suitable for the tests due to its size and features that make it similar to a real deployment scenario. Indeed, the building has 80 m × 100 m rectangular shape, with a total surface of around 7.000 m2. The long sides are roughly oriented north- south, while the short ones are oriented east-west. It is structured on five floors divided into a large number of rooms separated by large concrete walls that in some cases reach a 1 m width. The rooms host scientific laboratories where electromagnetic instrumentation is used: moreover, the whole structure is covered with WiFi connection. The level of electromagnetic noise is therefore very high. In order to test the reliability of the communication channel, the sensor sampling rate was set at six samples per minute, i.e.1 sample each 10 s. Table 3 shows the radio settings for the LoRa modules, chosen to maximise the reading range according to the networking guide [39]. The packet loss rate was calculated by counting the number of packet losses across four min time span. The gateway node was placed inside a room positioned in the south-western corner of the third floor of the building, in order to test the functioning in a worst-case scenario: indeed, in a real deployment the ideal positioning would have been in the centre of the building. The data loss rate was checked across all the five floors, by checking the received packet rate in ten different spots: four at the corners of the building, four in the intermediate points of the long sides and two in the intermediate points of the short sides. Figure 7 shows the spots where packet reception was tested on the map of the building, marked with yellow dots, while the star marks the position of the gateway. Figure 7. Building map with the positions of the reception spots (marked by the yellow dots) and the gateway (marked by the star). Table 3. Current absorption of the sensor node sub-systems. Current absorption for one measurement cycle (1 hour) Phase Device Absorption (A) Total (A) Period (sec) Measurement (ION) Microcontroller Unit (U) 840 28847 5 Sensor Unit (SU) 7 Radio Module (LoRa) 28000 Standby (IOFF) Microcontroller Unit (U) 0 7 3595 Sensor Unit (SU) 7 Radio Module (LoRa) 0 Average cycle current absorption 47.06 A Figure 6. Aerial view of the main building of the Department of Information Engineering and Mathematical Sciences of the University of Siena, acting as a test site for the LoRa network. ACTA IMEKO | www.imeko.org June 2019 | Volume 8 | Number 2 | 60 A 0 % data loss rate was achieved on all the floors for the tests achieved in eight out of ten spots: the only two points where data losses occurred were the north-eastern corner (the farthest from the gateway) and the adjacent point on the northern side. The data loss rates for the two spots are shown in Table 4. 5. CONCLUSIONS The aim of this paper was to propose and test an IoT infrastructure to be employed for the monitoring of chemical emissions in different contexts, from industrial plants to Smart Cities scenarios. The two main requirements to be accomplished were the low-power consumption of the sensor nodes and their modularity. The first requirement has been satisfied by using low-power components and adopting duty-cycling policies to switch off the more energy-hungry parts of the node (i.e., the radio module). Calculations show that the architecture described in this paper allows to achieve a life time for the node as long as the life time of the sensors, that need to be changed every 24 months. The modularity requirement has been satisfied adopting an architecture for data transfer from the sensors to the micro- module that allows the transparent addition of a new sensing device. The architecture described in this paper is then expected to be seen as a general-purpose framework to be shaped on different scenarios, ranging from small dimension industrial plants to large urban areas. Tests were performed to demonstrate the effectiveness of the proposed solution: while they were focused on a sub-set of the proposed infrastructure, it is expected that the results can easily be extended to a larger scale scenario. Indeed, these tests have demonstrated the effectiveness of the proposed approach to setup pervasive infrastructures for the monitoring of chemical emissions. REFERENCES [1] I. Linnerud, P. Kaspersen, T. Jaeger, “Gas monitoring in the process industry using diode laser spectroscopy”. Appl. Phy.s B: Lasers O., 1998, 67(3), pp. 297-305. [2] A. Fort, S. Rocchi, M.B. Serrano-Santos, R. Spinicci, N. Ulivieri, V. Vignoli, “Electronic noses based on metal oxide gas sensors: The problem of selectivity enhancement”, IEEE Instrumentation and Measurement Technology Conference, 2004, 1, pp. 599-604. [3] A. Fort, M. Mugnaini, I. Pasquini, S. Rocchi, V. Vignoli, “Modeling of the influence of H2O on metal oxide sensor responses to CO”, Sensor Actuat. B: Chem., 2011, 159 (1), pp. 82- 91. [4] T. Addabbo, F. Bertocci, A. Fort, M. Gregorkiewitz, M. Mugnaini, R. Spinicci, V. Vignoli, “Gas sensing properties and modeling of YCoO3 based perovskite materials”, Sensor Actuat. B: Chem., 2015, 221, pp. 1137-1155. [5] N. Docquier, S. Candel, “Combustion control and sensors: a review”. Prog. energ. combust., 2002, 28(2), pp. 107-150. [6] P. Kassal, M.D. Steinberg, I. Murković Steinberg, “Wireless chemical sensors and biosensors: A review”, Sensor Actuat. B: Chem., 2018, 266, pp. 228-245. [7] F. Aliyu, T. Sheltami, “Development of an energy-harvesting toxic and combustible gas sensor for oil and gas industries”, Sensor Actuat. B: Chem., 2016, 231, pp. 265-275. [8] A. Somov, A. Baranov, A. Savkin, D. Spirjakin,A. Spirjakin, R. Passerone, “Development of wireless sensor network for combustible gas monitoring”, Sensor Actuat. A: Phys.l, 2011, 171(2), pp, 398-405. [9] D. Spirjakin, A.M. Baranov, A. Somov, V. Sleptsov, “Investigation of heating profiles and optimization of power consumption of gas sensors for wireless sensor networks”, Sensor Actuat A: Phys, 2016, 247, pp. 247-253. [10] M. Macías Macías, C.J. García Orellana, H.M. González Velasco, A. García Manso, J.E. Agudo Garzón, H. Sánchez Santamaría, “Gas sensor measurements during the initial action period of duty- cycling for power saving”, Sensor Actuats B: Chem, 2017, 239, pp. 1003-1009, 2017. [11] A.M. Baranov, S. Akbari, D. Spirjakin, A. Bragar, A. Karelin, “Feasibility of RF energy harvesting for wireless gas sensor nodes”, Sensor Actuat. A: Phys., 2018, 275, pp. 37-43. [12] D. Oletic, V. Bilas, “Design of sensor node for air quality crowdsensing”, in 2015 IEEE Sensors Applications Symposium, Proceedings, SAS 2015, 2015. [13] S.D.T. Kelly, N.K. Suryadevara, S.C. Mukhopadhyay, “Towards the implementation of IoT for environmental condition monitoring in homes”, IEEE Sens. J, 2013, 13(10), pp. 3846-3853. [14] A.R. Jaladi, K. Khithani, P. Pawar, K. Malvi, G. Sahoo, G. “Environmental monitoring using wireless sensor networks (WSN) based on IOT”. Int. Res. J. Eng. Technol, 2017, 4(1). [15] J. Shah, B. Mishra, B. “IoT enabled environmental monitoring system for smart cities”, In International Conference on Internet of Things and Applications (IOTA), 2016 pp. 383-388. [16] M.T. Lazarescu, “Design of a WSN platform for long-term environmental monitoring for IoT applications”, IEEE J. Em. Sel. Top. C. 2013, 3(1), pp. 45-54. [17] G. Mois, S. Folea, T. Sanislav, “Analysis of three IoT-based wireless sensors for environmental monitoring”. IEEE T. Instrum. Meas. 2017, 66(8), pp. 2056-2064. [18] K. Tzortzakis, K. Papafotis, P.P. Sotiriadis, “Wireless self powered environmental monitoring system for smart cities based on LoRa”. In 2017 Panhellenic Conference on Electronics and Telecommunications (PACET), 2017, pp. 1-4. [19] H. Rahim, C. Ghazel, L.A. Saidane, “An Alternative Data Gathering of the Air Pollutants in the Urban Environment using LoRa and LoRaWAN”. In 2018 14th International Wireless Communications & Mobile Computing Conference (IWCMC), 2018, pp. 1237-1242. [20] R. Almeida, R. Oliveira, D. Sousa, M. Luis, C. Senna, S.A. Sargento, “Multi-Technology Opportunistic Platform for Environmental Data Gathering on Smart Cities”. In 2017 IEEE Globecom Workshops (GC Wkshps), 2017, pp. 1-7. [21] S. Dong, S. Duan, Q. Yang, J. Zhang, G. Li R. “MEMS-Based Smart Gas Metering for Internet of Things”, in IEEE Internet Things, 2017, 4(5), pp. 1296-1303. [22] N.P.G. Bhavani, K. Sujatha, R.S. Ponmagal, T.K. Reddy, “Monitoring of SO2 emissions in power plants using Internet of Things”, 2017 International Conference on Energy, Communication, Data Analytics and Soft Computing (ICECDS), 2017, pp. 1064-1067. [23] T. Addabbo, B. Bardi, S. Cioncolini, A. Fort, M. Mugnaini, L., Parri, V. Vignoli “Multi-sensors exhaust gas emission monitoring system for industrial applications”, to be published in Lecture Notes in Computer Science, Springer. [24] A. Pozzebon, AICappelli, A. Mecocci, D. Bertoni, G. Sarti, F. Alquini, “A Wireless Sensor Network for the Real-Time Remote Measurement of Aeolian Sand Transport on Sandy Beaches and Dunes”, Sensors, 2018, 18(3), 820. [25] A. Pozzebon, A. Andreadis, D. Bertoni, C. “A Wireless Sensor Network Framework for Real-Time Monitoring of Height and Volume Variations on Sandy Beaches and Dunes” ISPRS Int. J. Geo-Inf., 2018, 7(4), 141. Table 4. Data loss rates for the test points. Test Point 1-8 9 (North side) 10 (North-East corner) First Floor 0.0 % 25.0 % Not achievable Second Floor 0.0 % 12.5 % 87.5 % Third Floor 0.0 % 12.5 % 41.7 % Fourth Floor 0.0% 29.8 % 50.0 % Fifth Floor 0.0 % 50.0 % 100.0 % ACTA IMEKO | www.imeko.org June 2019 | Volume 8 | Number 2 | 61 [26] A. Pozzebon, “Integrating RFID transponders as data loggers in wireless sensor nodes for outdoor remote monitoring operations”, International Journal of Wireless Information Networks, 2015, 22(4), pp. 399-406. [27] A. Mecocci, G. Peruzzi, A. Pozzebon, P. Vaccarella, “Architecture of a hydroelectrically powered wireless sensor node for underground environmental monitoring”, IET Wireless Sensor Systems, 2017, 7(5), pp. 123-129. [28] A. Augustin J. Yi T. Clausen, W.M. Townsley “A study of LoRa: Long range & low power networks for the internet of things”, Sensors. 2016, 16:1466. [29] M. Cerchecci, F. Luti, A. Mecocci, S. Parrino, G. Peruzzi, A. Pozzebon, “A Low Power IoT Sensor Node Architecture for Waste Management Within Smart Cities Context”, Sensors, 2018, 18(4). [30] ZigBee Alliance, ZigBee Specification, 2012. [31] M. Tabassum, K. Zen, “Performance evaluation of ZigBee in indoor and outdoor environment”, In 2015 9th International Conference on IT in Asia (CITA), 2015, pp. 1-7. [32] I. Kuzminykh, A. Snihurov, A. Carlsson, “Testing of communication range in ZigBee technology”, In Experience of Designing and Application of CAD Systems in Microelectronics (CADSM), 2017 14th International Conference, 2017, pp. 133-136. [33] Semtech, SX1272/73 - 860 MHz to 1020 MHz Low Power Long Range Transceiver Datasheet, 2017. [34] F. Adelantado, X. Vilajosana, P. Tuset-Peiro, B. Martinez, J. Melia- Segui, T. Watteyne, “Understanding the limits of LoRaWAN”, IEEE Commun. Mag., 2017, 55(9), pp. 34-40. [35] J. Haxhibeqiri, A. Karaagac, F. Van den Abeele, W. Joseph, I. Moerman, J. Hoebeke, “LoRa indoor coverage and performance in an industrial environment: Case study”, In 2017 22nd IEEE International Conference on Emerging Technologies and Factory Automation (ETFA), 2017, pp. 1-8. [36] LoRa Alliance, A Technical Overview of LoRa and LoRaWAN, 2015. [37] T. Addabbo, A. Fort, M. Mugnaini, E. Panzardi, A. Pozzebon, M. Tani, V. Vignoli, “A low cost distributed measurement system based on Hall effect sensors for structural crack monitoring in monumental architecture”, Measurement, 2018, 116, pp. 652-657. [38] T. Addabbo, A. Fort, M. Mugnaini, L. Parri, S. Parrino, A. Pozzebon, V. Vignoli, “An IoT framework for the pervasive monitoring ofchemical emissions in industrial plant”, Proc. Of IEEE International Workshop on Metrology for Industry 4.0 and IoT, 2018, pp. 269-273. [39] Libelium, Waspmote LoRa 868 MHz-915 MHz SX1272 Networking.