# An Autonomous Wireless Device for Real-Time Monitoring of Water Needs
## 3 Materials and Methods
### Hardware Description
#### 3.1.3 Sensor Node  
The node is the device in charge of collecting the necessary data in the field to later transmit to the gateway. Its two main characteristics must be low consumption and being able to establish communication at the greatest possible distance.  
Arduino boards (Smart Projects Srl, Scarmegno, Italy), such as Arduino UNO and Arduino Mega, are the most utilized nodes for the implementation of irrigation systems, and the most utilized controller is the ATmega328 (Atmel, San Jose, CA, USA) [4].  
The selection of the best node for an IoT irrigation system depends on the necessities and the characteristics. We opted for developing our own design for the nodes, with the aim of addressing our own particular requirements of low power consumption and autonomy.  
Our end-node includes a processor fully compatible with Arduino IDE. Moteino (LowPowerLab, LLC, Michigan, MI, USA) is ideal for IoT applications because of its very small size (\(1.3\times 0.9\) inch). The moteino used is a versatile low-cost and low-power Arduino based on the Atmel ATmega328P microcontroller. Moteino gives years of run time at a low transmission rate, with a 2000-2600 mAh  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Sensor Name** & **Parameters Captured** & **Company** \\ \hline \multirow{2}{*}{ECH2O} & Soil moisture, Soil temperature, & Meter Group, Inc, Pullman, WA, USA \\  & Electrical conductivity & Stevens Water Monitoring Systems, Inc, \\ HydraProbe & Soil moisture, Soil temperature, & Portland, OR, USA \\ HydraProbe & Electrical conductivity & ICT International, Armidale, Australia \\ \hline \hline \end{tabular}
\end{table}
Table 2: Popular wireless nodes used in the agriculture domain.  
battery. During sleep mode the radio power consumption is about 0.1 uA; during receive mode around 15 mA; and in transmit mode the power consumption is up to 130 mA.  
On the other hand, to establish LoRa communication with the gateway, the node has the RN2483 chip. This chip was also optimized to obtain the lowest possible consumption, in addition to being certified by the LoRa alliance. As small farmers cannot afford commercial solutions, we designed a shield for implementing the low-cost IoT irrigation system. This system can integrate numerous sensors that measure a large number of agricultural parameters, both soil and atmospheric (See Figure 1).  
A lithium-ion polymer (LiPo) battery with a nominal voltage of 3.7 V and a capacity of 2000 mAh, equipped with a protection circuit that prevents overcharging as well as deep discharging, was used to power the node. As an alternative, Li-Ion batteries with 3.7 V nominal voltage and a capacity of 2600 mAh can also be used, obtaining greater autonomy. LiPo batteries were chosen as they can achieve a high load density with a very small weight and size. Additionally, with the implementation of a small solar panel and the TP4056 module, the battery could be recharged continuously, increasing the device's autonomy and providing the discharge effect.  
In order to guarantee correct communication, the node was equipped with an omnidirectional antenna with SubMiniature version A (SMA) connector with an operating frequency of 868 MHz.  
Finally, all of the components were placed in a polyester enclosure (IP66) with a silicone lid seal, in which all of the necessary holes were drilled to mount the connections of the antenna and the sensors. To connect the (external) sensors to the (internal) electronics, we used cable glands (IP68) (Bopla Gehause Systeme GmbH, Bunde, Germany) for the BoXmote placed in the field test.  
In the following image (Figure 2), the completely assembled node (end-device for the lab test) is shown.  
Figure 1: Photograph of the wireless sensor node.