Assessing Effects of Salinity on the Performance of a Low-Cost Wireless Soil Water Sensor

Low-cost, accurate soil water sensors combined with wireless communication in an internet of things (IoT) framework can be harnessed to enhance the benefits of precision irrigation. However, the accuracy of low-cost sensors (e.g., based on resistivity or capacitance) can be affected by many factors, including salinity, temperature, and soil structure. Recent developments in wireless sensor networks offer new possibilities for field-scale monitoring of soil water content (SWC) at high spatiotemporal scales, but to install many sensors in the network, the cost of the sensors must be low, and the mechanism of operation needs to be robust, simple, and consume low energy for the technology to be practically relevant. This study evaluated the performance of a resistivity–capacitance-based wireless sensor (Sensoterra BV, 1018LE Amsterdam, Netherlands) under different salinity levels, temperature, and soil types in a laboratory. The sensors were evaluated in glass beads, Oso Flaco sand, Columbia loam, and Yolo clay loam soils. A nonlinear relationship was exhibited between the sensor measured resistance (Ω) and volumetric soil water content (θ). The Ω–θ relationship differed by soil type and was affected by soil solution salinity. The sensor was extremely sensitive at higher water contents with high uncertainty, and insensitive at low soil water content accompanied by low uncertainty. The soil solution salinity effects on the Ω–θ relationship were found to be reduced from sand to sandy loam to clay loam. In clay soils, surface electrical conductivity (ECs) of soil particles had a more dominant effect on sensor performance compared to the effect of solution electrical conductivity (ECw). The effect of temperature on sensor performance was minimal, but sensor-to-sensor variability was substantial. The relationship between bulk electrical conductivity (ECb) and volumetric soil water content was also characterized in this study. The results of this study reveal that if the sensor is properly calibrated, this low-cost wireless soil water sensor has the potential of improving soil water monitoring for precision irrigation and other applications at high spatiotemporal scales, due to the ease of integration into IoT frameworks.

According to Ohm's law and definition of capacitance, Equation (1) can be written as: where R is the resistance in the circuit, Q is a charge, and C is the capacitance. Sensoterra B.V. has recently developed a robust, easy-to-use, and fully wireless sensor for measuring soil moisture [25] in different soil types. These sensors measure SWC based on the principle of resistance-capacitance (RC oscillator) [25]. The electronic circuit (Figure 1b) allows the current to flow through the ground during the sensing process. Due to direct current (DC), the circuit does not require high-frequency converters, and the installation in hard ground, or at relatively deeper depths, is simple [25]. By enabling the loop between the power source and DC current, the DC source can be charged for a predetermined time period (e.g., 10 ms), with the current flowing from the source through the charging resistor [25]. Assuming that the resistance is known, this results in a predetermined charging at the initial level, which can be expressed mathematically as Equation (3): where I(t) is the current, R is the resistance of the resister, q(t) is charge on the capacitor, and C is the capacitance of the capacitor. For continuously varying charge, the current I(t) is defined by a derivative dq dt , and by using the expression in Equation (2), Equation (3) can be rewritten as: Assuming the charge to be zero at the start, Equation (4) can be solved as: For a long duration (t >> RC), the second term in the above Equation can be neglected, and thus the charge (q) would become VC. The power sources are no longer present while discharging the capacitor. Hence, Equation (4) can be written as: Assuming that the impedance is mainly resistive, for discharging the capacitor from a fully charged state through the current path, the solution for the above equation can be written as: where R soil is the ground impedance resistance component. Consequently, the only unknown entity in Equation (7) is resistance, when the time required to discharge the capacitor from the initial level to the predetermined level is measured. Hence, by using the capacitance from two electrodes in the circuit, the measured time with a timer, the known charging time, and battery voltage allow R soil to be determined.
Sensors 2020, 20, x FOR PEER REVIEW 3 of 14 from the source through the charging resistor [25]. Assuming that the resistance is known, this results in a predetermined charging at the initial level, which can be expressed mathematically as Equation (3): where ( ) is the current, is the resistance of the resister, ( ) is charge on the capacitor, and is the capacitance of the capacitor. For continuously varying charge, the current ( ) is defined by a derivative , and by using the expression in Equation (2), Equation (3) can be rewritten as: Assuming the charge to be zero at the start, Equation (4) can be solved as: For a long duration (t >> RC), the second term in the above Equation can be neglected, and thus the charge ( ) would become . The power sources are no longer present while discharging the capacitor. Hence, Equation (4) can be written as: Assuming that the impedance is mainly resistive, for discharging the capacitor from a fully charged state through the current path, the solution for the above equation can be written as: where is the ground impedance resistance component. Consequently, the only unknown entity in Equation (7) is resistance, when the time required to discharge the capacitor from the initial level to the predetermined level is measured. Hence, by using the capacitance from two electrodes in the circuit, the measured time with a timer, the known charging time, and battery voltage allow to be determined. The objectives of this research were (i) to assess sensor-to-sensor variability in measured resistance, (ii) to determine the temperature effects on sensor measurements at different salinity levels, and (iii) to evaluate the performance of the sensor under a wide range of soil water content and soil solution electrical conductivity for different soils in laboratory. The objectives of this research were (i) to assess sensor-to-sensor variability in measured resistance, (ii) to determine the temperature effects on sensor measurements at different salinity levels, and (iii) to evaluate the performance of the sensor under a wide range of soil water content and soil solution electrical conductivity for different soils in laboratory.

Sensor Description
The sensor (Sensoterra B.V.) is shown in Figure 1a; it has two prongs with different measurement depths (i.e., 15, 60, 30, and 90 cm), a battery, resistor, and IoT framework in the sensor overmold. The resistance is measured as a function of charge/discharge time duration with an oscillator supplying a square wave signal at a frequency of 70 MHz. This sensor has a maximum sampling volume of 6.2 cm 3 , with a resolution of approximately 0.1% across the sensor in the soil. The operational temperature range of this sensor is between −20 • C to +60 • C. The sensor uses the LoRaWAN communication protocol. LoRaWAN is low-power, wide-area networking protocol designed to wirelessly connect battery operated "things", e.g., the Sensoterra sensor, to the internet. LoRaWAN network architecture is basically deployed in a star topology for a local area network (LAN), in which all gateways or nodes are individually connected to a central network server via standard IP connections and act as a transport bridge. The wireless communication uses the very long-range attributes of the LoRaO physical layer, allowing a single-hop link between the end device and one or even many gateways. The gateway can be placed at a distance up to 2.5 km from the sensors. The gateway uploads the data to the cloud and can be connected to many wireless soil moisture sensors. The data can be transmitted hourly and is downloaded from a web browser or via a mobile app in the form of an Excel file.

Assessing Sensor-to-Sensor Variability
Experiments were initially conducted using glass beads [26] and Oso Flaco sand [27] to assess the sensor-to-sensor variability in the form of soil resistance. The predetermined water content of 0.2 m 3 m −3 and solution electrical conductivity of 1 dS/m were mixed with oven-dried soil. The soil was mixed by hand and immediately transferred to a plastic zip bag, kept in the darkroom, and occasionally shaken over 24 h to get evenly distributed water content. Later, the soil was packed in a calibration container (49 × 30 × 10 cm) layer-by-layer with careful compaction to ensure the soil was distributed evenly. The top of the container was covered with paraffin wax paper to minimize evaporation loss. Further, a total of 15 sensors were installed vertically into the soil in such a way that the sensor prongs were fully immersed into the soil. The sensors were installed carefully to avoid air gaps, and the sensor measurements were recorded for 24 h. Also, the room temperature was recorded every half-hour to evaluate the temperature effect on sensor readings. Statistical analysis was performed using the R statistical software version 3.6.2 [28] to assess the effect of sensor-to-sensor variability on sensors measurements.

Effect of Soil Type and Solution Electrical Conductivity on Sensor Performance
Soil-specific calibrations were performed using four types of soils viz. glass beads, Oso Flaco sand, Columbia loam, and Yolo clay loam. The physical properties of these four soil types are presented in Table 1. Twelve sensors were used for the soil-specific calibration with different water content and electrical conductivity solutions. Twelve sensors were used for calibration with glass beads, and these were reduced to six for the other three soil types. Undisturbed soil cores were collected for each soil type and processed to determine the bulk density and soil porosity, following standard procedures in [29]. The soil bulk density can be measured either by direct or indirect methods. Direct methods measure the mass and volume of oven-dried known volume of soil samples from sampling core, while indirect methods use the radiation or regression techniques to determine soil bulk density. In this study, we followed the direct method (core method) to measure the bulk densities of the soils used for sensor calibration [29]. Soil porosity can be easily obtained by using the relation between soil bulk density and particle density [30]. Required soil samples were air-dried for 24 h, and any unwanted materials, such as gravel and plant roots, were removed before passing through a 2-mm sieve [31]. A clear acrylic container (30 × 15 × 5 cm) was assembled to install the sensors at a depth of 3.5 cm so that Sensors 2020, 20, 7041 5 of 14 the entire sensor measurement volume would be contained within the soil. The output of the sensor was the resistance (Ω) and average apparent volumetric water content collected at 30 min intervals. The air-dried soil of known quantity was taken, and each sample was mixed with a known volume of deionized water and prerequisite electrical conductivity solution (made using KCl) to bring it to actual water content and soil solution electrical conductivity of 0.10, 0.20, 0.35, and 0.45 m 3 m −3 , and 0.5, 1.0, 1.5, 2.0, 3.0, 4.0, 5.0, and 10 dS/m, respectively. The soil was mixed thoroughly by hand to create a homogeneous mixture with designated actual water content. The mixture was then transferred to a calibration container in small increments while compressing the soil with a compaction hammer to compact the soil to the desired bulk density. After transferring the soil mixture into calibration containers, these were covered with paraffin wax paper to minimize the evaporation loss during the experiment. A total of six sensors were inserted vertically, similar to the procedure followed in assessing the sensor-to-sensor variability. The soil packing was repeated to prepare the desired water content and electrical conductivity solutions for all four soil types. After completion of each calibration experiment, the sensors were removed from the container, and the soil cores with known volume (70.5 cm 3 ) were inserted into the soil centered around the sensor prongs. After weighing, the soil samples were dried for 24 h at 105 • C and then reweighed to determine the gravimetric water content. In total, four water contents and six electrical conductivity solutions for each soil type were used in this study, to observe a wide range of conditions.
A high precision TDR-315 sensor (Acclima) was used to assess the bulk electrical conductivity of each soil mixed with a known water solution. This was achieved by placing the Acclima sensor in the calibration container horizontally after sensor measurements. The measured bulk electrical conductivity (EC b ) was related to actual water content (θ) following [32], as follows: where c 1 -c 3 are the regression coefficients, c 1 and c 2 are related to the soil's tortuosity factors, and c 3 is related to the surface conductance of the soil particles [33].

Assessing Sensor Sensitivity to Variations in Temperature
To determine the temperature effect on sensor measurements, experiments were conducted using glass beads as a reference medium. The air-dried soil samples of glass beads were mixed with predetermined amounts of water to obtain soil water contents of 0.1 to 0.45 m 3 m −3 and about 0.5 and 1 dS/m electrical conductivity. These mixtures were then transferred into 1 L acrylic cylinders and covered with a paraffin wax paper to reduce the water content changes by evaporation before, and during, the temperature experiments. A constant temperature chamber (Forma Scientific, Marietta, OH, USA) was used in this experiment and was maintained at temperatures ranging from 5 to 45 • C, with an increase of 5 • C per hour during each experiment, as described in [23]. Temperature calibration was initiated by assuming the linear relation between apparent sensor resistance and temperature [31], which can be expressed as: dΩ dT = f (θ) (9) where Ω is sensor apparent resistance, θ is actual water content, T is system temperature ( • C), and f (θ) is a fitting function. Integration of Equation (9) yields: where Ω p,r represents the sensor read resistance at a reference temperature, and T r is room temperature.
To solve Equation (9) for Ω, first, empirical relations were developed between f (θ) and Ω p,r . Based on the coefficient of determination from different functions, i.e., linear, logarithmic, and exponential, we determined the best fit for the dΩ dT vs. θ data for the sensor to be a third-order polynomial equation, as follows: where a 0 to a 3 are fitting coefficients. The value of Ω p,r was approximated from the sensor, which provided default calibrated resistance values for sand instead of soil-specific calibration [34].

Sensor-to-Sensor Variability
The results of the sensor-to-sensor variability for 15 sensors, using glass beads and Oso Flaco sand, are shown in Figure 2. The statistical evaluation of sensor measurements using the coefficient of variation (CV) and ANOVA are presented in Tables 2 and 3. A slight increase in resistance (Ω) with time was noticed, indicating either a change in temperature or a slight drying of the sandy soil with time. However, knowing that the temperature might have an impact on the sensor readings, the room temperature was found to vary between 23-23.5 • C over the duration of 24 h of the experiment. To quantify the variation among the sensors' resistance (Ω) measurements during the soil-specific calibration, the CV was determined, which was defined as the standard deviation and mean ratio for each water content and solution salinity. It was observed that the variations in sensor resistance ranged from 1 to 30, 1 to 7, 2 to 10, and 1 to 8% for glass beads, Oso Flaco sand, Columbia loam, and Yolo clay loam, respectively ( Table 2). The highest variation in glass beads was expected for lower water content and salinity ranges, as the resistance values were maximum in these ranges, and mostly nonlinear (Figure 3a). Integration of Equation (9) yields: where , represents the sensor read resistance at a reference temperature, and is room temperature.
To solve Equation (9) for , first, empirical relations were developed between ( ) and , . Based on the coefficient of determination from different functions, i.e., linear, logarithmic, and exponential, we determined the best fit for the vs. θ data for the sensor to be a third-order polynomial equation, as follows: where to are fitting coefficients. The value of , was approximated from the sensor, which provided default calibrated resistance values for sand instead of soil-specific calibration [34].

Sensor-To-Sensor Variability
The results of the sensor-to-sensor variability for 15 sensors, using glass beads and Oso Flaco sand, are shown in Figure 2. The statistical evaluation of sensor measurements using the coefficient of variation (CV) and ANOVA are presented in Tables 2 and 3. A slight increase in resistance ( ) with time was noticed, indicating either a change in temperature or a slight drying of the sandy soil with time. However, knowing that the temperature might have an impact on the sensor readings, the room temperature was found to vary between 23-23.5 °C over the duration of 24 h of the experiment. To quantify the variation among the sensors' resistance ( ) measurements during the soil-specific calibration, the CV was determined, which was defined as the standard deviation and mean ratio for each water content and solution salinity. It was observed that the variations in sensor resistance ranged from 1 to 30, 1 to 7, 2 to 10, and 1 to 8% for glass beads, Oso Flaco sand, Columbia loam, and Yolo clay loam, respectively ( Table 2). The highest variation in glass beads was expected for lower water content and salinity ranges, as the resistance values were maximum in these ranges, and mostly nonlinear (Figure 3a).   more reduced in Yolo clay loam (Figure 3) than the other three soil types. It was observed that, going from sand to sandy loam to clay loam, the ECs (surface conductivity of soil particles) became more prominent, thus reducing the effect of solution electrical conductivity (ECw). A regression analysis between the apparent water content measured by sensors and the actual water content is presented in Figure 4 for four soil types, which ranged from 0.5 to 10 dS/m solution salinity (ECw). It was observed that the data were highly scattered for glass beads when put together with all the water contents and salinity solutions, with an R 2 of 0.25 and RMSE of 0.12. Similarly, the other three soil types had a correlation between observed and measured water contents of R 2 ≥ 0.65 and RMSE, ranging from 0.05 to 0.09 (Table 4). However, the individual fitting for each electrical The ANOVA test was carried out, wherein the total variance was divided into the variance between the sensors (sensor-to-sensor variability). The null hypothesis that all sensors have the same mean sensor response was verified by the F test [35]. The F value was higher than the critical F value of 1.71 (Table 3), which means the rejected null hypothesis indicated that at least one sensor had a significantly different mean sensor response. A high F value also indicates that the sensor-to-sensor variability is the dominant source of variation in the sensor response measurements. The variability of the 15 sensors was considerably higher. Therefore, the ANOVA test indicated that the mean sensor response was significantly different for at least one sensor (F value = 128 for glass beads and 600 for Oso Flaco in Table 3), indicating substantial sensor-to-sensor variability [35].

Effect of Soil Type and Solution Electrical Conductivity on Sensor Performance
Out of the 15 sensors used in the sensor-to-sensor variability experiments, only 12 sensors were selected to ease the experimental procedure to carry out soil-specific calibrations. Changes in sensor output resistance (Ω) were observed for all the sensors for four soil types having varying actual water content and electrical conductivity solutions, as shown through Figure 3a-d. For glass beads, the wide salinity range between 0 to 10 dS/m was used to detect the effect of salinity on the sensor resistance measurements, but the manufacturer indicated that the optimal working range of the sensor could be from 0.5 to 5 dS/m. For the other three soil types, the study was further conducted with salinity ranging from 0.5 to 4 dS/m [36]. The nonlinearity in the Ω-θ relationship varied with different soil types ( Figure 3). The high nonlinearity of these calibration curves signifies that (i) with high water content, the sensor is highly sensitive but highly uncertain, and (ii) with low water content, the sensor is very insensitive with low uncertainty. This can be explained by the fact that water content has a strong impact on both the capacitive and conductive behaviors of soil, whereas salinity mainly affects the conductive behavior alone [37]. The salinity effect was more pronounced in sandy soils, such as glass beads and Oso Flaco, and was quite less in Columbia loam, and even more reduced in Yolo clay loam (Figure 3) than the other three soil types. It was observed that, going from sand to sandy loam to clay loam, the EC s (surface conductivity of soil particles) became more prominent, thus reducing the effect of solution electrical conductivity (EC w ).
A regression analysis between the apparent water content measured by sensors and the actual water content is presented in Figure 4 for four soil types, which ranged from 0.5 to 10 dS/m solution salinity (EC w ). It was observed that the data were highly scattered for glass beads when put together with all the water contents and salinity solutions, with an R 2 of 0.25 and RMSE of 0.12. Similarly, the other three soil types had a correlation between observed and measured water contents of R 2 ≥ 0.65 and RMSE, ranging from 0.05 to 0.09 (Table 4). However, the individual fitting for each electrical conductivity solution had a correlation above 0.95, which implied that using the calibration equation depends on each salinity level, instead of a single composite equation for all salinity levels [38]. Thus, we can conclude that soil-specific calibration is necessary for low-cost soil moisture sensors at each salinity level.
Soil bulk EC was measured for four soil types, and the data fitted to the Rhoades model [32] presented for the glass beads (Figure 5a), Oso Flaco sand (Figure 5b), Columbia loam (Figure 5c), and Yolo clay loam (Figure 5d). The regression coefficients are presented in Table 5. All the data points fitted well with the calibration model of Equation (6), with an R 2 ≥ 0.90 and RMSE ranging from 0.051 to 0.121 dS/m for the four soil types indicating the variability between the sensor readings. Soil bulk EC was found to increase with actual water content and EC w , and regulated by the geometry of the surface conductivity of pores and soil particles. This was also revealed by the fitting functions presented through Figure 5a-d, with increasing values of c 3 , i.e., 0.0, 0.13, and 0.22 for Oso Falco sand, Columbia loam, and Yolo clay loam, respectively. Therefore, calibrations for sensor measurements in different solution salinity would be soil-specific [23].    Table 5, , and are optimized parameters for the Rhoades equation [32]). Note that for both glass beads and sand, ECs can be assumed to be zero.   Table 5, c 1 , c 2 and c 3 are optimized parameters for the Rhoades equation [32]). Note that for both glass beads and sand, EC s can be assumed to be zero.

Temperature Effect on Sensor Water Content Measurements
The sensitivity of sensor measurements to temperature variations in glass beads for 0.5 and 1 dS/m salinity and a range of actual water contents are presented in Figure 6. The results show that the resistance decreased with temperature (Figure 6a,b) for both salinity levels. Also, the temperature effect became more apparent as water content or salinity decreased, corresponding to increasing resistance values. The sensor measurement is a direct resistance and is related to bulk soil EC, verified by the unique relationship between soil bulk EC and sensor resistance (Figure 7). Thus, the temperature effect can be corrected using the relationship described in [39].
The dΩ/dT curve showed a bidirectional relationship with increasing θ with sensitivity values of resistance ranging from 20 to 2500 Ω (Figure 8). The fitting coefficients were 0.82 for 0.5 dS/m and 0.98 for 1 dS/m salinity levels. These trends for the sensor were consistent with those reported by [31,34] for EC-5 and 5TE sensors as bidirectional patterns for different soils used to relate the apparent water content with temperature. However, the shape of the curve and the number of regression coefficients of sensor output and actual water content varied from the sensor type, irrespective of the trend, as shown by Equation (9) [34]. Therefore, this method appears to be appropriate for this type of sensor in a consistent format, irrespective of the form of their output-θ functions, provided that the dependencies of the slopes on θ can be fitted by some form of an empirical equation, as shown in Figure 8.    The Ω⁄ curve showed a bidirectional relationship with increasing with sensitivity values of resistance ranging from 20 to 2500 ( Figure 8). The fitting coefficients were 0.82 for 0.5 dS/m and 0.98 for 1 dS/m salinity levels. These trends for the sensor were consistent with those reported by [31,34] for EC-5 and 5TE sensors as bidirectional patterns for different soils used to relate the apparent water content with temperature. However, the shape of the curve and the number of regression coefficients of sensor output and actual water content varied from the sensor type, irrespective of the trend, as shown by Equation (9) [34]. Therefore, this method appears to be appropriate for this type of sensor in a consistent format, irrespective of the form of their outputfunctions, provided that the dependencies of the slopes on can be fitted by some form of an empirical equation, as shown in Figure 8.

Conclusions
The performance of a low-cost wireless soil moisture sensor whose principle of operation is based on resistivity and capacitance was evaluated under four different soil types. Sensor-to-sensor variability experiments revealed significant variability between the sensors, expressed as coefficient variation (1 to 10%). The soil-specific calibration shows that the sensor exhibits nonlinearity in the -relationship, which differs by soil type, indicating that the sensor is highly sensitive at higher water contents with high uncertainty, and insensitive at low water content with low uncertainty. The effect of salinity on sensor performance in four soil types was reduced from sand to sandy loam to clay loam, and the effect of ECs (surface conductivity of soil particles) became more pronounced, thus lowering the effect of solution EC (ECw). This was also witnessed by fitting the polynomial function between soil bulk EC and actual water content with increasing values of the surface conductivity of soil particles, which were reduced from 0.0 (sand), 0.13 (Columbia), to 0.22 (Yolo). Overall, we conclude that this low-cost wireless soil moisture sensor, after soil-specific calibration, can produce accurate estimates of soil water content in soils commonly found in agricultural fields, e.g., Yolo clay loam. It is worth noting that soil solution electrical conductivity and temperature can affect the sensor readings but can be corrected for using calibration curves similar to those developed in this study using laboratory observations of soil type and salinity level. The low cost and simple wireless communication protocol make this sensor suitable for precision irrigation and hydrologic high spatiotemporal monitoring of soil moisture.

Conclusions
The performance of a low-cost wireless soil moisture sensor whose principle of operation is based on resistivity and capacitance was evaluated under four different soil types. Sensor-to-sensor variability experiments revealed significant variability between the sensors, expressed as coefficient variation (1 to 10%). The soil-specific calibration shows that the sensor exhibits nonlinearity in the Ω-θ relationship, which differs by soil type, indicating that the sensor is highly sensitive at higher water contents with high uncertainty, and insensitive at low water content with low uncertainty. The effect of salinity on sensor performance in four soil types was reduced from sand to sandy loam to clay loam, and the effect of EC s (surface conductivity of soil particles) became more pronounced, thus lowering the effect of solution EC (EC w ). This was also witnessed by fitting the polynomial function between soil bulk EC and actual water content with increasing values of the surface conductivity of soil particles, which were reduced from 0.0 (sand), 0.13 (Columbia), to 0.22 (Yolo). Overall, we conclude that this low-cost wireless soil moisture sensor, after soil-specific calibration, can produce accurate estimates of soil water content in soils commonly found in agricultural fields, e.g., Yolo clay loam. It is worth noting that soil solution electrical conductivity and temperature can affect the sensor readings but can be corrected for using calibration curves similar to those developed in this study using laboratory observations of soil type and salinity level. The low cost and simple wireless communication protocol make this sensor suitable for precision irrigation and hydrologic high spatiotemporal monitoring of soil moisture.