# LoRaWAN Network for Fire Monitoring in Rural Environments
## 4 System Description
### Sensors  
To collect data from the environment, it is required to add as many sensors as parameters are required to measure. This LoRa node is able to measure temperature, relative humidity, wind speed, and CO\({}_{2}\) concentration.  
Firstly, to measure temperature and relative humidity, the system includes a DHT11 sensor [41]. This sensor offers a digital output due to a small 8-bit microcontroller which is already calibrated by the factory. The DHT11 sensor is able to measure temperature in the range of 0 \({}^{\circ}\)C to 50 \({}^{\circ}\)C with an error of \(\pm\) 2 \({}^{\circ}\)C and relative humidity in the range of 20% to 90% with an error of \(\pm\) 5%.  
Figure 8: LoRa Node components.  
Figure 7: Block Diagram of node components.  
To collect the data of the CO2 concentration in air, an MQ135 sensor is added [41]. It also includes a small microcontroller that generates the output values in both digital and analog formats. The sensor can detect NOx, NH3, different alcohols, benzene, smoke, and CO2. The manufacturer recommends the load resistance to range between 10 k\(\Omega\) and 47 k\(\Omega\). Its operation depends on a chemical reaction that takes place inside the sensor through a resistance that heats up. The measured parameter is related to the resistive value of this heated resistance which is measured at the output of the circuit after driving through the load resistance. Finally, this sensor requires a pre-heating phase of 24 h.  
Therefore, following the recommendations of the manufacturer to correctly calibrate the sensor, the sensor has to keep running for 24 h. After that, the output resistance should be determined by using the library \"RZero\" of Arduino. R\({}_{\text{Zero}}\) or R\({}_{0}\) is the internal resistance of the MQ135 and it is required to know the concentration of gas because this value is obtained as the relationship between the internal resistance of the sensor R\({}_{\text{Zero}}\) and the measured resistance Rs [42]. Figure 9 shows the process of reading the value of this resistance. The process takes around half an hour before reaching a stable value (75.27 \(\Omega\)). After calibrating the sensor, it will need approximately 20 s to heat and give accurate measures [43].  
Finally, to measure the wind speed, a DC motor is used as a dynamo with a set of blades to capture wind and activate the motor. The blades have been designed as three linked hemispheres forming an equilateral triangle. The final result of our device is shown in Figure 10.  
Figure 10: Node with the anemometer.  
Figure 9: Measurement of R zero obtained after 45 min.  
To measure the wind speed, a DC motor as a generator was used. The first step is to calibrate our device. To perform this task, a commercial anemometer is used and the output voltage of our DC motor is compared. Figure 11 shows the result of our calibration as well as the mathematical expression that models its behavior.  
Our purpose to determine if there is fire risk is to know when the wind speed is higher than 30 km/h. Because we also want to monitor the exact value of wind speed, the sensor was calibrated along with the entire measurement range.