## 5 Electronics
for their volcano surveillance applications, emitting the information up to 8.5 and 1.7 km, respectively [20; 21]. Figure 7 details the complete solution provided by LoRa. Thus, the data acquired by the sensors is sent to a gateway located on a place with internet connection. For this purpose, it is necessary to install a transceiver and an antenna both at the node and at the gateway. In this paper, Adafruit RFM95W LoRa Radio Transceiver Breakout boards in conjunction with Yagi antennas have been used [64; 65]. In the case of the gateway, a Raspberry Pi 3 B+ has been used as microcontroller, so that the received data is stored in an Influx database and synchronized with a server by means of MQTT protocol, so that the data can be represented with Grafana. The power consumption in the node will depend on the frequency of emission, the distance, the size of the measured data, and the used sensors, transceiver, and micro \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Technology** & **Frequency Band** & **Maximum Data Rate** & **Range** & **Power Usage** \\ \hline SigFox & Sub-GHz ISM & 600 bbps & 10 km (urban), 50 km (rural) & Low \\ LoRaWAN & Sub-GHz ISM & 50 kbps & 5 km (urban), 15 km (rural) & Low \\ Wi-SUN & Sub-Ghz ISM \& 2.4 GHz & 300 kbps & 5 km & Low \\ LTE-M & Cellular Bands & 1 Mbps & Several km & Medium \\ NB-IoT & Cellular Bands & 100 kbps & Several km & Medium \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Comparison of some Low-Power Wide-Area Network (LPWAN) technologies [58; 59; 60; 61; 62; 63]. Figure 7: Schematics of a communication system implemented with LoRa. in order to have an approximation of the power requirement of such a system, a simplified experiment has been performed in this paper. Hence, a node composed of an Arduino Nano as microcontroller took, every 4 min, six temperature measurements with MAX31855 boards and two power measurements with Adafruit INA219s. The measured data was sent to a gateway located 13 km away by means of the mentioned Adafruit RFM95W board and Yagi antenna. As a result, the power demand in the node was 0.11 W on average, reaching peaks of 0.246 W during the emission. Therefore, LoRa is definitely chosen as the communication system in this paper, since it is able to emit wirelessly the measured data over a considerable distance while presenting a minimal energy consumption, thus facilitating thermoelectric generation as the power supplier. The emission of data from the prototype node to the gateway has been programmed to be bi-directional and encrypted. Thus, the prototype emits, every four minutes, the measured data and waits for the confirmation of reception of the message. This process is performed with an initial spreading factor of nine. If the confirmation is not received after 60 s, a second attempt starts. In case neither confirmation is received, a third and last attempt is performed with a spreading factor of 10, so that the range is increased. If the confirmation from the gateway is received, the prototype node sends a new message to the gateway and both nodes update their encrypted key. Finally, similarly to the prototype, and due to the harsh volcanic environmental conditions, it is necessary to protect the electronics to stand severe conditions. Figure 8 depicts the protection measures that have been taken. Thus, the PCB with all the electronics has been introduced in an IP67 plastic box and covered with Raytech magic power gel [66]. This box has been closed and introduced in another IP67 plastic box. Since the different cables need to be taken out of the boxes, cable glands have been installed with a Nylon conduit contractor, and the connections have been protected with self-amalgamating tape and polyurethane foam. Figure 8: Detail of the protection boxes to avoid corrosion in the PCB.