# LoRaWAN Network for Fire Monitoring in Rural Environments
## 6 Test Bench and Results
### Data from Sensors  
To be sure of the correct operation of the node, the values measured by the sensors of a single node were checked for 20 h. The system was configured to take a measurement every 28 min. Figure 20 shows the values of temperature measured during the test. We can see that the maximum temperature (23 \({}^{\circ}\)C) was registered at 22:40 approximately. This value decreases up to 25 \({}^{\circ}\)C at 4:15 a.m.  
Figure 19: Results of SNR as a function of the distance. Figure 20: Temperature. The relative humidity (see Figure 21) changes at daytime, i.e., the humidity increases from midnight due to the dew and air condensation that occurs in early mornings. It can be observed that the relative humidity is around 30% from 3:30 a.m. After the sunrise, in this case, the relative humidity remains with the same value. This is because the node being placed in a shady area. Regarding wind speed (see Figure 22), we registered the maximum values from the evening to very early in the morning. Considering these values, one can determine that this is one of the worst scenarios when a fire is ongoing because emergency services cannot work at night. Finally, Figure 23 shows the CO\({}_{2}\) concentration values recorded by the node. Since we could not generate a real fire, we emulated the presence of CO\({}_{2}\). To generate the smoke, we used a kitchen smoke pipe. As can be seen, the sensor was able to detect the presence of this gas which is the main gas that appears when a fire is detected. Figure 21: Relative Humidity. Figure 22: Wind speed. Finally, we combine the data collected by this node to see how the alarms are generated (see Figure 24). In this case, we apply the algorithm shown in Figure 12. As we can see, the red line implements the 30-30-30 rule while the blue one detects the presence of CO\({}_{2}\). If the captured value of CO\({}_{2}\) surpasses the threshold of 620 ppm., the system will consider that there is a fire. These alarms will be translated into the correct symbol to be represented over the map and to generate the emerging message. To finalize the test of our system, we estimate the power consumption of each node. The system is based on an Arduino mode that does not present the lowest value of energy consumption. However, it is possible to apply efficient programming to use sleep routines while no significant variations in the sensors are detected. Additionally, the RF transceiver can be maintained in this state for a long time and wake it up only to transmit a summary of the data or alarms. Alternative power sources such as solar energy can be used to power the node for several months. The time our node can be powered by a battery can be estimated considering the consumptions of the devices specified by the datasheets. Firstly, we define three operating states for the wireless node to characterize each operation mode and to estimate the current consumed in each of these modes. The node will cyclically go through these three stages in the order that defines them. Subsequently, a schedule is defined to identify how much time the node will spend in each state. * Stage 0. Preheating phase of MQ135: In this mode, the microcontroller is active and generates a call to the MQ135 sensor to start heating it. This process takes 20 s.  
Figure 23: CO\({}_{2}\) Concentration. Figure 24: Alarms generated from the data collected by the node. * Stage 1. Measurement of the sensors: In this mode, the microcontroller is active and generates a call to the sensors to obtain the parameters. In this mode, the microcontroller and communication peripherals are active, as well as the integrated circuits of the sensors. * Stage 2. LoRa Transmission: The data is wirelessly transmitted by the node using the LoRa modulation. The microcontroller and the LoRa transceiver are transmitting at maximum power. * Stage 3. Sleep mode: This will be the main stage of the node in which it will spend most of the time. In this stage, all modules are inactive using their sleep modes.