# Proposed Fuzzy-NN Algorithm with LoRa Communication Protocol for Clustered Irrigation Systems
## 2 Proposed Irrigation System Architecture
Due to the long-range capabilities of the LoRa technology (see Table 1) the LoRa gateway can be installed into a location that provides both landline network connectivity and uninterruptible power, thus diminishing 3G provider costs. Figure 1: Proposed OWS (3G-UMTs) high-level system architecture. The authors are using a 3G UART transponder connected to the microcontroller software-serial interface. According to Figure 2, the RPi microprocessor gateway system collects and uploads sensory data to the AS and receives control commands from the AS, as well as irrigation decision commands. It also controls the operation of the actuator's microcontroller module by carrying forward the AS commands to the actuator's microcontroller. The RPi gateway system also controls and forwards commands to all nearby microcontroller modules that are registered to the gateway. Proposed FITRA application protocol and its encapsulation over Lora are described in Sections 3.2 and 3.3. The actuator of the OWS system also includes on its hose top a digital flow meter sensor, connected to the AtMega328 microcontroller and it is used for measuring daily water dispenses. Moreover, the system includes a 1-wire DS18B20 temperature sensor and/or a luminosity sensor (an LDR sensor taking out one of the soil moisture sensor analog ports or an i2c luminosity sensor such as Sparkfun TSL2561), for identifying solar outburst intervals. The microcontroller unit can adequately capture soil moisture, with the use of cheap analog sensors, provided by Sparkfun (Colorado, United States). The need of proper calibration is vital for each sensor prior to use. Each sensor is using electrodes, which can be lengthened up to 25 cm. Typical sensor measurements range from a value of 150 (slushy soil) to value of 1023 (very dry soil). Field clustered areas that can be adequately covered by one actuator controller and 8 sensors have been sized up to 100-500 square meters. The analog readings of the soil moisture sensors can be used to locally measure the volumetric water content of soil upon the perforce of manual calibration. Soil moisture sensor depth can also be adjusted by using depth plastic regulators attached parallel to the sensor's electrodes. Ideally the calculated values of soil sensors deployed into a cultivated field on the same monitoring depth are affected by the following parameters: electrode cable length from the soil moisture sensor controller, soil depth penetration, type of cultivated plants and soil chemical composition. Based on the authors' depth calibration measurements, the depth of electrodes may vary moisture sensor measurements with a variation of \(\pm\)3% per cm for a min-max depth of no greater than 10 cm. Soil consistency is a constant parameter for the specific location of cultivated land where measurements have been taken. Furthermore, another critical parameter that the authors took into consideration is the sensor's distance from the actuator. The sensors' cable resistance over its length affects soil moisture sensor accuracy with a sensor analog value reduction of 3-5% per m, for a multi-core 20 AWG sensor-electrode cable length above 3 m.  
Figure 2: Proposed OWS LoRa High level system architecture. Authors are using the RFM96 LoRa transponder connected to the SPI microcontroller bus [22].