**3. Results and discussion**

The results obtained can determine the best cheap sensors for sensing if the micro-sprinklers applied water in the orchard, being a useful precise agriculture application. Transmission effects due to laser, BLE, and LoRa are all considered. UAV data were analyzed to obtain the NDVI index to determine if sprinkler application can be detected remotely.

#### **3.1 Sensor experimental comparison**

A general comparison of the sensors used within the plantation is shown in **Table 2**. The first two sensors (capacitive V1.2 and YL-69 probes) were tested in sixty trees studying their performance during the month of April (**Figure 10a** and **b**). When soil moisture increases, the conductivity of soil rises and the YL-69 values vary between 400 and 650 (**Figure 10b**). These values result from the 10-bit ADC (analog-digital conversion) carried out by the CC2541 microcontroller. The sensor analog output provides moisture levels that will be converted to a digital signal that varies between 0 and 1023.

Dry clay and loam soil monitored with YL-69 probes presented average ADC values of 503 and 640, respectively. Their standard deviations were 28 and 22,

*WSN System Warns Producer When Micro-Sprinklers Fail in Fruit Trees DOI: http://dx.doi.org/10.5772/intechopen.106023*


#### **Table 2.**

*Comparison of sensors for detecting micro sprinkler application.*

#### **Figure 10.**

*Measurements of (a) 60 capacitive 1.2 sensors, (b) 60 YL-69 sensors for dry and wet soils, and (c) both probes during a period of 6 months.*

respectively. After micro-sprinkler irrigation, soil moisture increased at least by 50%. YL-69 average measurements in clay and loam decreased to 307 and 276, respectively. Their standard deviations were 15.21 and 26.9, respectively. The variable resistance

YL-69 probe's maximum wet value for both soils was 338 and the minimum dry value was 449 in clay soil, being easy to discriminate.

A similar study carried out by Adla et al. [57] provided excellent results for monitoring soil moisture in all kinds of soils including those with sand. Soil resistivity is influenced by salt concentration in water [58] or by salts added as fertilizers. A sensor was left in the soil nearby the tree and it did not respond after 3 months (**Figure 10c**). YL-69 probes coated with nickel plating rusted after 4 days requiring replacement [59].

The capacitive 1.2 sensor is a cheaper version of the SM100 Soil Moisture sensor built by Spectrum Technologies [57]. In dry clay and loam soil, average moisture was similar being 442 and 455, respectively. Wet average soil clay and loam moisture values were 316 and 367, respectively. Their standard deviations were 16.4 and 17.3, respectively. Minimum dry clay soil measurement was 396, meanwhile maximum wet soil measurement in clay was 361. A 100% discrimination was obtained as noted by the blue and orange lines of **Figure 10a**. Dry and wet soil was also perfectly discriminated in loam soils (**Figure 10a**). Sensors made of a corrosion-resistant material monitored wet clay soil for 8 months, varying between 280 and 330 (**Figure 10c**). These sensors supplied by AC (alternating current) do not rust, resulting in longer operating life.

The solar cell sensor (**Table 2**) provides an extremely small current due to the short operation time and poor illumination intensity at dusk. The solar cell was substituted by a light-dependent resistance (LDR) that measures illumination. The selected LDR (mod. NORPS-12, Silonex, the UK) is encapsulated with a humidityresistant coating. The resistance of the LDR is 6 kΩ when it is illuminated by a LED and increases to 1 MΩ during dusk. A battery of 3.3 V supplies voltage to a serial divider formed by a 1 kΩ resistance and the LDR. As the sprinkler deposits water drops over the LDR surface, LED incoming radiation gets scattered within the water. A voltage of 2.83 V is obtained at the divider pin when the LED illuminates the dry LDR surface. With water drops over the LDR surface, the voltage increases to 3.29 V at the divider. The experiment was carried out with one hundred sensors, its efficiency being 83% and 35%, during calm and windy days, respectively. The wind does not allow the drops to stay over the LDR. On calm days, erroneous LDR measurements were found when the sensor slope increased as water drops fell to the soil.

Leaf wetness duration (LWD) sensors provide important information for the prediction of plant disease [60]. Capacitive leaf wetness sensors have been developed for IoT applications with Arduino but their cost is relatively high (48 US\$). When it operates at a frequency of 1 kHz, the sensor responds in 5 s [61]. Leaf wetness sensors (LWS) built, nowadays, on flexible substrates can detect whether the leaf canopy is dry or wet [61]. As water appears over the surface substrate, the dielectric increases.

The Phytos 31 LWS (4 × 6 cm) produces a variable linear voltage according to the surface covered by the water. The sensor was tested around the plantation in different trees to study its efficiency for detecting sprinkler spraying. With the dry sensor, the CC2541 should acquire a value beneath 0.4 mV and when 40% of the LWS area is humid, the voltage provided by the sensor should be over 0.48 mV. Each tree having an LWS was sensed fifteen times during the irrigation period and the average value was saved. After 15 min, the probability to get more drops over the sensor was higher. The efficiency for detecting sprinkler operation was 78%, being dependent on wind, sensor slope, and proper positioning of the irrigation sprinkler. Grasshoppers and spiders were also attracted by the Phytos 31 LWS.

The most innovative system to detect water leaving the sprinkler is to use a C-shaped emitter/detector module. Coupled with a washer fixed to the sprinkler, *WSN System Warns Producer When Micro-Sprinklers Fail in Fruit Trees DOI: http://dx.doi.org/10.5772/intechopen.106023*

it translates rotary movement into a digital output. This was achieved with a HEDS-973X circuit from Avago Technologies. When water is supplied, the sprinkler turns the washer that has a small orifice in it. As light from the emitter diode passes through the orifice, it generates a pulse. The pulse interrupts the CC2541, and after 10 interruptions it will recognize that water was applied. This system worked with 100% accuracy and was not dependent on environmental conditions.

DHT 11 showed extreme variations during the first day of analysis and most sensors got damaged after getting wet for 3 days with saturated water. They were substituted in some trees by the DHT 22 that theoretically withstands 100% RH but also failed after 1 week. The DTH40 (Sensirion, Switzerland) can measure from 0 to 100% RH and it can do it every 8 s. Its energy consumption is 28 μA and its cost is 2.87 US\$, but still has to be tested in the field.

#### **3.2 Best sensors and current consumption**

Section 3.1 compared each sensor and only the capacitance V1.2 moisture sensor and the C-emitter/detector adapted to the sprinkler passed the requirements for great extensions due to their reduced cost and efficiency. These sensors work properly under natural environmental conditions and present high detection accuracy. Sensor current consumption depends on current demand and time of operation per day. For the capacitance sensor, it will take 5 s to measure the soil moisture content. In this interval, several samples are obtained and averaged, consuming 25 mAs per day. The sensor adapted to the sprinkler takes only 1 s to measure. Once this time is multiplied by the 5 mA current used (**Table 3**), it provides the current consumption per day (5 mAs). The costs per hectare for both type of detectors change, needing 400 sensors each. With 400 capacitive V1.2 probes connected to 100-CC2541 controllers, the cost will be 1760 US\$ per hectare. Four hundred sprinkler-encoder sensors connected to one hundred CC2541 microcontrollers inside 1 ha will become more expensive: 4000 US\$.

#### **3.3 WSN transmission**

Energy consumption of nodes within the BLE (A) and BLE-laser WSN systems are compared in **Table 3**. Current consumption by each node (tree) depends on the sensor used, CC2541 acquisition and processing, and finally transmission current. The CC2541 microcontroller employs 3 and 18.2 mA for each acquisition and transmission/reception, respectively. For the BLE WSN (A) with the soil capacitor sensor V1.2, it will consume (25 + 3 + 18.2 = 46.2) mA per day. In the case of the laser WSN, each laser needs 20 mA per second. The CC2541 of trees E and C (**Figure 7a**) turn on the laser 3 times


#### **Table 3.**

*Comparison of sensor nodes for detecting micro sprinkler application.*

(1.5 s pulses) when no water is applied by the micro-sprinklers. If 20 mA is supplied to the laser, it will consume 90 mA per day in 4.5 s. All the other trees will consume 30 mA per day during laser communication if water fails. The sprinkler sensor provides pulses to interrupt the CC2541, so lower power consumption of 1.5 mA is required. The node that performs better from an energy point of view is the one having the sprinkler sensor and transmits the data through CC2541 BLE controller (**Table 3**); it only employs 24.7 mA per day. The phototransistors charge the capacitors in two seconds, so the energy employed was relatively low and was not included in **Table 3**.
