Development and Application of an IoT-Based System for Soil Water Status Monitoring in a Soil Profile

Soil water content (θ), matric potential (h) and hydraulic conductivity (K) are key parameters for hydrological and environmental processes. Several sensors have been developed for measuring soil θ–h–K relationships. The cost of such commercially available sensors may vary over several orders of magnitude. In recent years, some sensors have been designed in the framework of Internet of Things (i.e., IoT) systems to make remote real-time soil data acquisition more straightforward, enabling low-cost field-scale monitoring at high spatio-temporal scales. In this paper, we introduce a new multi-parameter sensor designed for the simultaneous estimation of θ and h at different soil depths and, due to the sensor’s specific layout, the soil hydraulic conductivity function via the instantaneous profile method (IPM). Our findings indicate that a second-order polynomial function is the most suitable model (R2 = 0.99) for capturing the behavior of the capacitive-based sensor in estimating θ in the examined soil, which has a silty-loam texture. The effectiveness of low-cost capacitive sensors, coupled with the IPM method, was confirmed as a viable alternative to time domain reflectometry (TDR) probes. Notably, the layout of the sensor makes the IPM method less labor-intensive to implement. The proposed monitoring system consistently demonstrated robust performance throughout extended periods of data acquisition and is highly suitable for ongoing monitoring of soil water status.


Introduction
The soil unsaturated zone (or the vadose zone) is the connection zone between the atmosphere and the groundwater and, from a hydrological point of view, plays a fundamental role in the partition of precipitation between surface water, soil water and groundwater [1][2][3][4].The amount of water that enters the soil is stored in the vadose zone and, from here, can be subjected to several hydrological processes that cause water to move within the soil profile.Estimation of water availability and water flux in the vadose zone provides fundamental information on the soil water balance, which depends on climatic variables and on soil physical and hydraulic properties [5,6].The availability of such information can have great importance in tackling hydrological, environmental and agricultural issues [7][8][9].
In irrigated areas, for example, in-depth knowledge of the soil hydraulic parameters is crucial for crop growth and productivity, as well as for limiting leaching of water, nutrients and other substances (e.g., pesticides) through the unsaturated zone [10][11][12][13][14][15].In this context, in recent decades, researchers have developed several techniques to estimate soil hydraulic properties, both in field and laboratory conditions.All of the above techniques require sensors for measuring either the water content or the pressure head or both.
With reference to soil water content measuring systems, most determine water content based on the change in some thermal or electrical properties of the soil [16][17][18][19].As for Sensors 2024, 24, 2725 2 of 19 sensors based on the measurement of electrical quantities, their operation can be based on the propagation of electromagnetic (EM) waves in a medium, which is called dielectric.Belonging to the latter category of sensors are those based on time domain reflectometry (TDR) and frequency domain reflectometry (FDR) techniques, as well as capacitive-based sensors [20,21].The latter are known to work at low frequencies, and measurements are affected by soil texture, temperature and salinity [22][23][24][25].Extensive research has demonstrated that such sensors are not so prone to temperature and salinity factors if working in the soil temperature range 15-30 • C and for soils where soil solution electrical conductivity EC w is less than 10 dS/m [26].However, as measurement frequency increases (around 50 MHz and above), this influence is reduced [27] (Meter Group, online technical note on soil moisture sensors).
Furthermore, capacitive sensors also exhibit varying responses when installed in sandy versus clayey soils due to the distinct porosity and water retention properties of the respective soils.In sandy soils, with their larger particle sizes and higher porosity, water tends to drain more rapidly, resulting in faster sensor response times but potentially lower accuracy in capturing subtle moisture changes.Conversely, in clayey soils with finer particles and greater water retention capacity, water movement is slower, leading to delayed sensor responses and possibly more stable readings over time.Logsdon and Laird [28] also highlighted that clay minerals demonstrate ongoing dispersion beyond frequencies of 100 MHz.This phenomenon significantly affects the determination of water content in clayey soils, as demonstrated by Robinson et al. [29].To mitigate this issue, manufacturers typically develop factory calibrations under controlled laboratory conditions using soil media with known physico-chemical and dielectric properties [30].
Soil matric potential is the second Kernel soil hydraulic property.It is an integral over the macroscopic interfacial tension of the pore scale menisci of all air-water-soil interfaces.Tensiometers have been used to measure this hydrological variable [31].However, for large-scale applications, extensive soil hydrologic characterizations are generally required due to their spatial and temporal variability [32], which may require monitoring water content and pressure head in several sites simultaneously.This commonly implies high monitoring costs, especially when sensors have to be connected in a network and the monitoring system includes automatic monitoring and telemetry, with data transmitted in real time using mobile communication technologies [6].This aspect may contribute to limiting adoption of such sensing technologies [23,33].
To overcome such problems, several low-cost monitoring systems have been developed for soil hydraulic characterization [34].Most of these devices are noninvasive, with a fast response, no radiation, flexibility in electrode design and, above all, are amenable for automation in the framework of IoT systems [29,[35][36][37][38][39][40].
In this context, the aim of this research was to design and implement a compact IoTbased platform for stand-alone soil water status monitoring, using several sensors which can be remotely controlled.Our IoT platform allows measurements of volumetric water content (θ) and soil matric potential (h) at different depths.Furthermore, the specific layout of the measuring system also allows the K(θ) or K(h) relationship to be estimated via the instantaneous profile method (IPM; [41]).

Conceptual Framework of the Monitoring System
The basic apparatus of the monitoring system (named Soil HYdraulic PROperties Meter: SHYPROM) consists of (i) a microcontroller board, (ii) three pairs of steel electrodes for soil moisture estimates, (iii) a pair of porous tensiometer cups connected to two electronic pressure transducers for soil water matric potential measurement, and (iv) a temperature sensor.
Raw data collected from sensors are managed by the microcontroller and wirelessly transferred to a Cloud Server (e.g., ThingSpeak, https://thingspeak.com/)at fixed time intervals.After sending on Cloud, stored data can then be displayed on an end device (e.g., laptop, mobile phone, etc.).To facilitate sensor data visualization on mobile devices, a customized Android-based application (named SHYPROM_APP) was also developed.Figure 1 shows the schematic diagram of the IoT-based device platform.
Sensors 2024, 24, x FOR PEER REVIEW 3 of 19 intervals.After sending on Cloud, stored data can then be displayed on an end device (e.g., laptop, mobile phone, etc.).To facilitate sensor data visualization on mobile devices, a customized Android-based application (named SHYPROM_APP) was also developed.
Figure 1 shows the schematic diagram of the IoT-based device platform.

Development of the IoT-Based Monitoring System
Nowadays, there is a wide range of commercially available microcontrollers.In the present project, we selected the ESP 32 SIM800L as a microcontroller mainly because of its multiple 12 bits Analogical-to-Digital Converter (ADC) inputs and the capability to generate Pulse Width Modulation (PWM) signals at higher frequencies than other microprocessors such as Arduino Uno.Furthermore, the microcontroller features an integrated nano SIM card slot, as well as WIFI and Bluetooth modules, facilitating remote sensor control.
The device comprises two plexiglass tubes (2 cm in diameter) serving as tensiometers.Each tensiometer is assembled with a porous ceramic cup with an air entry value equal to 150 kPa and an electronic pressure transducer (MPX5100DP model, Freescale Semiconductor, Austin, TX, USA).The pressure transducer includes integrated signal amplification and temperature compensation circuits, supporting a linear voltage output for an overall differential pressure range from 0 to 100 kPa.Each pressure transducer was glued onto a three-way valve, allowing the opening and closing of the tensiometer for water filling.The valve was installed onto a silicone stopper, closing the top side of the tensiometer.
The soil moisture sensing device is a self-made capacitance-based apparatus, consisting of three pairs of electrodes that operate as a capacitor.The electrodes have a tubular shape and are made of stainless steel 304 (a chromium (18%)-nickel (8%) austenitic alloy).These cylinders (3 cm high and 2 mm thin) were positioned at different heights on the two plexiglass tensiometer tubes, forming three pairs of electrodes.To prevent sensor deterioration, after installation, the electrodes were isolated by spraying with a water-based paint.Additionally, the part of the tube between two electrodes was covered with PLA cylinders (obtained via 3D printing) to protect the wires soldered to the electrodes.The center of the electrodes was located at 11.5 cm, 18.5 cm and 25.5 cm from the top of the plexiglass tubes, the distance between the center of the two tensiometers being set at 8.0 cm.The microcontroller has an integrated oscillator operating at 600 kHz, driving the three capacitors and generating outputs (i.e., the soil's voltage) proportional to the soil's dielectric constant (, see Appendix A for more details).Figure 2a,b illustrate the wiring diagram and the printed circuit board (PCB) for the proposed monitoring system.

Development of the IoT-Based Monitoring System
Nowadays, there is a wide range of commercially available microcontrollers.In the present project, we selected the ESP 32 SIM800L as a microcontroller mainly because of its multiple 12 bits Analogical-to-Digital Converter (ADC) inputs and the capability to generate Pulse Width Modulation (PWM) signals at higher frequencies than other microprocessors such as Arduino Uno.Furthermore, the microcontroller features an integrated nano SIM card slot, as well as WIFI and Bluetooth modules, facilitating remote sensor control.
The device comprises two plexiglass tubes (2 cm in diameter) serving as tensiometers.Each tensiometer is assembled with a porous ceramic cup with an air entry value equal to 150 kPa and an electronic pressure transducer (MPX5100DP model, Freescale Semiconductor, Austin, TX, USA).The pressure transducer includes integrated signal amplification and temperature compensation circuits, supporting a linear voltage output for an overall differential pressure range from 0 to 100 kPa.Each pressure transducer was glued onto a three-way valve, allowing the opening and closing of the tensiometer for water filling.The valve was installed onto a silicone stopper, closing the top side of the tensiometer.
The soil moisture sensing device is a self-made capacitance-based apparatus, consisting of three pairs of electrodes that operate as a capacitor.The electrodes have a tubular shape and are made of stainless steel 304 (a chromium (18%)-nickel (8%) austenitic alloy).These cylinders (3 cm high and 2 mm thin) were positioned at different heights on the two plexiglass tensiometer tubes, forming three pairs of electrodes.To prevent sensor deterioration, after installation, the electrodes were isolated by spraying with a water-based paint.Additionally, the part of the tube between two electrodes was covered with PLA cylinders (obtained via 3D printing) to protect the wires soldered to the electrodes.The center of the electrodes was located at 11.5 cm, 18.5 cm and 25.5 cm from the top of the plexiglass tubes, the distance between the center of the two tensiometers being set at 8.0 cm.The microcontroller has an integrated oscillator operating at 600 kHz, driving the three capacitors and generating outputs (i.e., the soil's voltage) proportional to the soil's dielectric constant (ε, see Appendix A for more details).Figure 2a,b illustrate the wiring diagram and the printed circuit board (PCB) for the proposed monitoring system.
Since capacitance measurements are influenced by soil temperature, the device includes a temperature sensor.Specifically, the DS18B20 (waterproof version, Dallas Semiconductor, Dallas, TX, USA) sensor was selected.The sensor operates in the temperature range of −55 • C to +125 • C (with ±0.5 • C accuracy from −10 • C to +85 • C).The device is also equipped with an external micro SD card slot to store raw data in the event of no connection with the Cloud Server.Figure 3a-d display the hardware components of the sensor.The prototype is powered by a Li-ion battery (3.7 V, 10,000 mAh), charged through a solar charger board connected to a waterproof 6 W solar panel.The printed circuit board (PCB) of Figure 3c was designed in Kicad software (https://www.kicad.org/),resulting in a board size of 95 mm × 100 mm.Table 1 presents a list of electronic components (also known as BOM: Bill Of Materials) required for assembling the IoT-based monitoring system (detailed information on the assembly of the monitoring system is reported in Appendix B).Since capacitance measurements are influenced by soil temperature, t cludes a temperature sensor.Specifically, the DS18B20 (waterproof version, conductor, Dallas, TX, USA) sensor was selected.The sensor operates in the range of −55 °C to +125 °C (with ±0.5 °C accuracy from −10 °C to +85 °C).The equipped with an external micro SD card slot to store raw data in the event tion with the Cloud Server.Figure 3a-d

display the hardware components
The prototype is powered by a Li-ion battery (3.7 V, 10,000 mAh), charged th charger board connected to a waterproof 6 W solar panel.The printed circuit of Figure 3c was designed in Kicad software (https://www.kicad.org/),resulti size of 95 mm × 100 mm.Table 1 presents a list of electronic components (a BOM: Bill Of Materials) required for assembling the IoT-based monitoring tailed information on the assembly of the monitoring system is reported in A

The Source Code Used to Program the Monitoring System
The source code which governs the hardware of the proposed monitoring system was written in C ++ using the Arduino Integrated Development Environment (IDE).The architecture of this monitoring system is illustrated in the flowchart of

The Source Code Used to Program the Monitoring System
The source code which governs the hardware of the proposed monitoring system was written in C ++ using the Arduino Integrated Development Environment (IDE).The architecture of this monitoring system is illustrated in the flowchart of Figure 4. Initially, the microcontroller initiates the general setup, which involves exiting sleep mode, initializing the SD card module and activating the internal modem.At this stage, the algorithm conducts a battery check before commencing the readings from various sensors: (i) soil temperature, (ii) soil voltage from the capacitive module at three distinct depths, and (iii) voltage output from tensiometers at two selected depths.Once obtained, the data are stored on the SD card and transmitted to the Cloud Server.Subsequently, the sensor enters sleep mode to minimize power consumption until the designated time slot concludes.stored on the SD card and transmitted to the Cloud Server.Subsequently, the sensor enters sleep mode to minimize power consumption until the designated time slot concludes.

Evaluating the Soil K(θ) Function through the Instantaneous Profile Method (IPM) Using SHYPROM
The IPM (also known as the internal drainage method) [41] is a widely recognized technique for in situ determination of the K(θ) function of subsurface layers during unsteady or transient processes [1].This method relies on simultaneous measurements over time of volumetric water content and the soil water matric potentials at different depths along the soil profile.The procedure involves the installation of various probes, such as time domain reflectometry (TDR) or capacitive probes and tensiometers, to measure the hydraulic properties of the investigated medium.The soil is wetted to achieve saturation, and then the K(θ) curves are determined during either a drainage or evaporation process [42][43][44][45].The obtained information is crucial in addressing environmental and agricultural challenges, particularly for estimating water drainage below the root zone and determining the soil water balance [46].
The IPM is based on the assumption that the amount of water stored, W, in a given soil profile and the water flux density, q, at any depth z and any time t, can be calculated as [1]: The IPM (also known as the internal drainage method) [41] is a widely recognized technique for in situ determination of the K(θ) function of subsurface layers during unsteady or transient processes [1].This method relies on simultaneous measurements over time of volumetric water content and the soil water matric potentials at different depths along the soil profile.The procedure involves the installation of various probes, such as time domain reflectometry (TDR) or capacitive probes and tensiometers, to measure the hydraulic properties of the investigated medium.The soil is wetted to achieve saturation, and then the K(θ) curves are determined during either a drainage or evaporation process [42][43][44][45].The obtained information is crucial in addressing environmental and agricultural challenges, particularly for estimating water drainage below the root zone and determining the soil water balance [46].
The IPM is based on the assumption that the amount of water stored, W, in a given soil profile and the water flux density, q, at any depth z and any time t, can be calculated as [1]: Sensors 2024, 24, 2725 7 of 19 Darcy's law for water flow, at any depth and any time, can be written as [45]: where H is the hydraulic head.Substituting Equation (2) into Equation (3) and solving for K(θ) z produces, at the reference plane z = z 4 (i.e., the reference depth at which K has to be calculated): The soil conductivity function, at the reference plane, can be estimated under the following hypothesis [47]: (i) the volumetric water content at soil surface (θ 0 ) was assumed to be equal to θ 1 ; (ii) at the reference plane (z 4 ), the volumetric water content (θ 4 ) was assumed to be equal to θ 3 .Figure 5 Darcy's law for water flow, at any depth and any time, can be written as [45]: where H is the hydraulic head.Substituting Equation (2) into Equation ( 3) and solving for ()  produces, at the reference plane z = z4 (i.e., the reference depth at which K has to be calculated): The soil conductivity function, at the reference plane, can be estimated under the following hypothesis [47]: (i) the volumetric water content at soil surface (θ0) was assumed to be equal to θ1; (ii) at the reference plane (z4), the volumetric water content (θ4) was assumed to be equal to θ3. Figure 5 illustrates the schematic layout of the SHYPROM system used in our laboratory experiments.

Soil Characterization
The soil used in our laboratory experiments was a silty-loam Anthrosol [48], with 15.7% sand, 11.6% clay and 72.7% silt.The soil had a bulk density (ρ b ) of 1.13 g/cm 3 , organic C content of 1.84%, electrical conductivity of the soil solution (EC w ) of 0.17 dS m −1 and a pH of 8.40.Soil texture, soil bulk density, organic content and pH were determined using the methods proposed by [49][50][51][52].EC w was obtained via a conductivity meter (Cyberscan model 500, Eutech Instruments, Singapore).

Laboratory Experiments
Two main sets of experiments, labelled as experiment #1 and experiment #2, were conducted.Experiment #1 focused on the calibration and validation of the sensors.The capacitive sensor underwent calibration and validation during an evaporation process from a bare soil sample.Regarding the MPX5100DP transducers, which measure soil water matric potential (h), these sensors come with their own factory calibration function.In this case, we only verified that the pressure transducers operated according to the calibration function provided by the manufacturer.
In experiment #2, the system was tested to measure θ and h at different depths, following again an evaporation process.During this stage, the IPM was used to obtain the K(θ) relationship.
For both experiments, the soil samples were preliminarily oven dried at 105 • C and then sieved at 2 mm. Figure 6 shows a schematic representation of the measurement system used in the laboratory experiments.

Laboratory Experiments
Two main sets of experiments, labelled as experiment #1 and experiment #2, were conducted.Experiment #1 focused on the calibration and validation of the sensors.The capacitive sensor underwent calibration and validation during an evaporation process from a bare soil sample.Regarding the MPX5100DP transducers, which measure soil water matric potential (h), these sensors come with their own factory calibration function.In this case, we only verified that the pressure transducers operated according to the calibration function provided by the manufacturer.
In experiment #2, the system was tested to measure θ and h at different depths, following again an evaporation process.During this stage, the IPM was used to obtain the K(θ) relationship.
For both experiments, the soil samples were preliminarily oven dried at 105 °C and then sieved at 2 mm. Figure 6 shows a schematic representation of the measurement system used in the laboratory experiments.

Experiment #1: Sensor Calibration and Validation
In this experiment, measurements were carried out on a repacked soil sample 90 mm in length and 70 mm in diameter using a capacitive sensor made of a single pair of electrodes.The bottom end of the soil sample was held with a nylon gauze (25 μm) to avoid soil losses.After packing, the electrodes of the capacitive sensor were inserted vertically into the soil column.At the beginning of the test, the soil sample was saturated with water from the bottom to prevent air bubbles being trapped in soil pores.For the calibration procedure, once saturated, the soil sample was placed into a thermostat box and water was allowed to evaporate from the top of the soil sample.Throughout the evaporation test, differences in voltage V and θ values (obtained via the thermo-gravimetric method; [53]) were monitored over time.The collected data were plotted on a Cartesian plane θ vs. 1/V and subsequently utilized to derive the sensor calibration function.

Experiment #1: Sensor Calibration and Validation
In this experiment, measurements were carried out on a repacked soil sample 90 mm in length and 70 mm in diameter using a capacitive sensor made of a single pair of electrodes.The bottom end of the soil sample was held with a nylon gauze (25 µm) to avoid soil losses.After packing, the electrodes of the capacitive sensor were inserted vertically into the soil column.At the beginning of the test, the soil sample was saturated with water from the bottom to prevent air bubbles being trapped in soil pores.For the calibration procedure, once saturated, the soil sample was placed into a thermostat box and water was allowed to evaporate from the top of the soil sample.Throughout the evaporation test, differences in voltage V and θ values (obtained via the thermo-gravimetric method; [53]) were monitored over time.The collected data were plotted on a Cartesian plane θ vs. 1/V and subsequently utilized to derive the sensor calibration function.
As stated above, capacitive sensors are influenced by soil temperature.Thus, tests were conducted at three different temperatures of 20 • C, 25 • C and 30 • C. For each selected temperature, three replicates were performed.Additionally, an independent dataset was prepared, using the same experimental protocol, for sensor validation.

Experiment #2: Laboratory Testing of the SHYPROM Monitoring System
Once the sensors had been calibrated and validated, the monitoring system was tested overall, using the same experimental setup and protocol as in experiment #1.In this final test, the sensor probes were placed in a soil sample 400 mm high and 250 mm in diameter.Three evaporation tests were conducted at the temperature of 25

Statistical Indices for Sensor Performance Evaluation
The performance of the calibration function was quantified by using different statistical indices: (i) the mean bias error (MBE), (ii) the mean absolute percentage error (MAE) and (iii) the model efficiency (EF), computed according to the following relations [54,55]: where E i is the prediction (model-simulated data) and O i is the true value (observed data), O is the mean of the observed data, and N is the number of observations.

Calibration and Validation of the Capacitive Sensor
The accuracy of capacitive-based sensors is influenced, amongst other things, by temperature fluctuations.The outcomes of experiment #1, illustrated in Figure 7, show this dependence with reference to the proposed monitoring system.The measured θ values are plotted against 1/V for the three chosen temperatures.For a fixed temperature, the dashed lines represent the regression functions selected to estimate the correlation between the sensor output and volumetric water content.It is worth noting that, for a fixed sensor voltage value, as soil temperature increases, the θ values decrease.Observable differences in θ values become less evident as the soil becomes dry, since the dielectric response of the sensor is more dependent on soil permittivity.A second-order polynomial equation was employed to fit the experimental values, and the computed coefficients (a, b and c) along with the coefficient of determination R 2 are detailed in Table 2. Notably, the volumetric water content and sensor output exhibit a strong correlation, as evident from the R 2 values approaching unity.A second-order polynomial equation was employed to fit the experimental values, and the computed coefficients (a, b and c) along with the coefficient of determination R 2 are detailed in Table 2. Notably, the volumetric water content and sensor output exhibit a strong correlation, as evident from the R 2 values approaching unity.In Figure 8, the θ values derived from regression functions are compared with the known θ values from an independently acquired dataset dedicated to model validation.The obtained values closely align with the 1:1 line, indicating the capacitive sensor's accurate performance in θ estimation from saturation to dry soil conditions.The sensor's accuracy is practically the same from saturation to dry soil conditions and among different temperatures.For comprehensive evaluation, Table 3 summarizes statistical indices, including MBE, MAE and EF, which assess the goodness of fit between calculated and measured θ values.Across different soil temperatures, these indices affirm the sensor's effectiveness in predicting volumetric water content within the temperature range of 20-30 °C.

SHYPROM Laboratory Testing
An overview of the outcome of the SHYPROM monitoring system is provided in Figure 9a,b.Figure 9a illustrates the relationships between volumetric water content and time  For comprehensive evaluation, Table 3 summarizes statistical indices, including MBE, MAE and EF, which assess the goodness of fit between calculated and measured θ values.Across different soil temperatures, these indices affirm the sensor's effectiveness in predicting volumetric water content within the temperature range of 20-30 • C.  C) and between 1.14% (at 25 • C) and 1.69% (at 30 • C).The EF exhibits a consistently high value, falling within the range of 0.85 to 0.89.

SHYPROM Laboratory Testing
An overview of the outcome of the SHYPROM monitoring system is provided in Figure 9a,b.Figure 9a illustrates the relationships between volumetric water content and time at different depths.The graphic also includes polynomial functions used to fit the raw data and the coefficient of determination R 2 for the regression functions, which range between 0.96 and 0.99.During the initial stages of the evaporation process, which last around 60 h, the regression functions overlap.As expected, as the process progresses to higher times, the moisture content decreases from the bottom to the top of the soil sample.It is evident that, at a given time, the variations in h values are minimal.This can be attributed to the relatively small distance between the tensiometers.Figure 10a,b illustrate the θ(h) and K(θ) relationship at the reference depth z4; K values were determined via the IPM method using Equation (4).The empirical retention model by van Genuchten [56] and van integrated with the Mualem [57] expression were used to predict, respectively, the experimental θ(h) and K(θ) functions.Figure 9b displays the measured soil matric potentials as a function of time.Experimental h data were fitted, at the selected depths z min and z max , using a second-order polynomial function with R 2 equal to 0.99 for both investigated depths.
It is evident that, at a given time, the variations in h values are minimal.This can be attributed to the relatively small distance between the tensiometers.
Figure 10a,b illustrate the θ(h) and K(θ) relationship at the reference depth z 4 ; K values were determined via the IPM method using Equation (4).The empirical retention model by van Genuchten [56] and van Genuchten integrated with the Mualem [57] expression were used to predict, respectively, the experimental θ(h) and K(θ) functions.The unknown parameters θs, θr, α, n, m and K0, listed in Table 4, were determined by means of the RETC optimization software package, version 6.0 [58], based on the least square method, which minimizes the deviations between the numerical solution of the one-dimensional transient evaporation process and the real response of the system during the laboratory tests.The high R 2 vG and R 2 M-vG values denoted that raw data estimated via The unknown parameters θ s , θ r , α, n, m and K 0 , listed in Table 4, were determined by means of the RETC optimization software package, version 6.0 [58], based on the least square method, which minimizes the deviations between the numerical solution of the one-dimensional transient evaporation process and the real response of the system during the laboratory tests.The high R 2 vG and R 2 M-vG values denoted that raw data estimated via the SHYPROM monitoring system are of good quality.The results presented in this section demonstrate that the proposed monitoring system, with its specific layout, accurately characterizes the temporal evolution of the water status in the selected soil.

Conclusions
Capacitive sensors have been demonstrated to offer precise monitoring of soil water status, serving both environmental and agronomic purposes.With a soil-specific calibration, this category of sensors can serve as a viable, low-cost alternative to the time domain reflectometry technique, which is widely employed for soil water content estimation.
The accuracy of capacitive-based sensors is influenced by various factors such as soil type, moisture levels, soil conductivity or salinity, and temperature fluctuations.These factors warrant further exploration, particularly under field-scale conditions, especially in arid and semi-arid regions with diverse irrigated soil landscapes.In such contexts, the deployment of soil water sensors becomes imperative for optimizing the utilization of limited water resources.
In this study, a low-cost multi-parameter sensor, designed in the framework of IoT systems, was developed and calibrated for measuring water status in a soil sample.The use and applicability of the sensors (a capacitive-based probe to estimate θ and an electronic tensiometer for h measurements) were investigated on a silty-loam soil.
Laboratory-scale tests were conducted to assess sensor performance.Specifically, for the capacitance-based module, calibration functions were established at different temperatures to ensure accurate θ measurements.The sensors showed a polynomial behavior, in the investigated domain, with acceptable validation statistics.The specific layout of the sensors allowed estimation of the K(θ) function via IPM.
Our results indicate that the monitoring system demonstrated acceptable accuracy from saturated to dry soil conditions.To properly evaluate the potential of the proposed monitoring system, future research will aim to investigate sensor response in soils with different textures and pedological characteristics, as well as the effects of soil salinity on the dielectric response of the capacitive module.Finally, in the upcoming phases, comprehensive field-scale tests will be carried out to evaluate sensor performance under real field conditions.

Author Contributions:
For implementing the electronic part of the SHYPROM monitoring system, two options are possible.The first option is to construct the board by yourself, following the electrical schematic in Figure 2. The estimated cost of fabricating one piece, including materials, is approximately USD 15-20 for the ESP32SIM800L board, USD 50-55 for two MPX5100DP pressure transducers, and around USD 2 for the other required components (listed in the BoM file as a reference).
For field applications, it is advisable to utilize a specialized electronics manufacturing service capable of producing low-cost printed circuit boards (PCBs).This option requires the Gerber and BoM files (refer to the Board Fabrication Files folder in the Supplementary Material).In this case, fabrication costs are around USD 30 for printing five PCBs, excluding shipping.
The SHYPROM monitoring system also requires materials for the two probes that serve as tensiometers and for installing the electrodes of the capacitive-based module.This part of the sensor can be constructed using (i) plexiglass tubes with an outer diameter of 20 mm and (ii) 3 cm long cylindrical tubes that act as electrodes (refer to local or online markets for sourcing these materials).To simplify the assembly of the capacitive module, consider 3D printing PLA cylindrical elements (see Probe Ring Bottom PLA.stl and Probe Ring PLA.stl files in the SHYPROM_RINGS folder).These PLA elements were designed for correctly wiring the electrical cables and securing the electrodes along the plexiglass tubes.
Once the SHYPROM monitoring system is assembled, the next step is to load the firmware file into the ESP32SIM800L control unit (refer to SHYPROM.ino file, available for download from the SHYPROM Firmware folder).Before loading the firmware, it is crucial to set your Cloud URL (row 30 of the SHYPROM.inofile) and your Write API Key value (row 34 of the SHYPROM.inofile); these parameters depend on the chosen Cloud platform.The Firmware SHYPROM.inofile can be managed using the Arduino IDE, version 2.3.2 (https://www.arduino.cc/en/software).
Finally, the SHYPROM available data can be also visualized on the SHYPROM Android app.To install the app on your device, you need the .apkfile, which can be generated from the SHYPROM_APP.aiafile (available for download from the SHYPROM Firmware folder).The latter file contains the source code and can be directly opened and modified on the MIT APP INVENTOR online IDE (https://appinventor.mit.edu/).The code must be rearranged for your specific requirements (i.e., it is necessary to modify the requested home URLs according to your Cloud specifications).Once modified, the MIT APP INVENTOR IDE creates the .apkfile, which is the source file required for installation on Android-based mobile devices.

Figure 1 .
Figure 1.Conceptual framework of the IoT-based sensor platform.

Figure 1 .
Figure 1.Conceptual framework of the IoT-based sensor platform.

Figure 2 .
Figure 2. (a) Electric circuit diagram of the prototype and (b) printed circuit board (P by Kicad software (version 7.0).

Figure 2 .
Figure 2. (a) Electric circuit diagram of the prototype and (b) printed circuit board (PCB) generated by Kicad software (version 7.0).

Figure 3 .
Figure 3. Multiparameter sensor hardware: (a) main components, (b) detail of the DIY board, (c) details of the printed circuit board (PCB), and (d) additional material.

Figure 3 .
Figure 3. Multiparameter sensor hardware: (a) main components, (b) detail of the DIY board, (c) details of the printed circuit board (PCB), and (d) additional material.

Figure 4 .
Figure 4. Flowchart of the IoT-based monitoring system.

Figure 5 .Figure 5 .
Figure 5. Schematic layout of the SHYPROM monitoring system employed for the laboratory experiments.

Figure 7 .
Figure 7. Relationship between volumetric water content θ and the inverse of voltage (1/V) for the soil investigated at the three selected soil temperatures T of 20 °C, 25 °C and 30 °C.

Table 2 .Figure 7 .
Figure 7. Relationship between volumetric water content θ and the inverse of voltage readings (1/V) for the soil investigated at the three selected soil temperatures T of 20 • C, 25 • C and 30 • C.

Figure 8 .
Figure 8. Correlation between the observed and measured values of volumetric water content θ at the temperatures T of 20 °C, 25 °C and 30 °C.

Figure 8 .
Figure 8. Correlation between the observed and measured values of volumetric water content θ at the temperatures T of 20 • C, 25 • C and 30 • C.

Figure 9 .
Figure 9. Experimental (data points) and calculated (lines) (a) volumetric water content θ at three depths, z 1 , z 2 and z 3 , and (b) matric potential h at depths z min and z max vs. time.

Sensors 2024 , 19 Figure 10 .
Figure 10.(a) Experimental soil retention curve and modelled by van Genuchten (vG) equation and (b) experimental soil hydraulic conductivity function and modelled by Mualem-van Genuchten (M-vG) formula at the reference plane z4.

Figure 10 .
Figure 10.(a) Experimental soil retention curve and modelled by van Genuchten (vG) equation and (b) experimental soil hydraulic conductivity function and modelled by Mualem-van Genuchten (M-vG) formula at the reference plane z 4 .
in Arduino IDE used to program the proposed monitoring system (SHYPROM.ino);(b) Source code for the SHYPROM_APP (only for Android-based operating systems devices).
external box (waterproof), .stlfiles for containing the monitoring system; (b) SHYPROM_RINGS Folder: .stlfiles for quick assembling capacitive electrodes on the plexiglass tensiometers; (c) How to assemble SHYPROM Sensor: Quick tutorial useful for realizing and assembling the SHYPROM monitoring system.

Table 1 .
List of main electronic components required for making the monitoring system.

Table 1 .
List of main electronic components required for making the monitoring system.

Table 2 .
Estimated regression coefficients a and b and coefficient of determination R 2 of the θ vs. 1/V experimental relationships for the three selected soil temperatures.

Table 3 .
Statistical indices mean bias error (MBE), mean absolute percentage error (MAE) and model efficiency (EF) referring to the measured and predicted volumetric water content θ for the three selected soil temperatures.

Table 3 .
Statistical indices mean bias error (MBE), mean absolute percentage error (MAE) and model efficiency (EF) referring to the measured and predicted volumetric water content θ for the three selected soil temperatures.MBE and MAE values, respectively, vary between −0.00014 (at 20 • C) and −0.00030 (at 30

Table 4 .
van Genuchten (vG) and Mualem-van Genuchten (M-vG) model parameters θ s , θ r α, n, m, K 0 and coefficient of determination R 2 vG and R 2 M-vG obtained from experimental retention and conductivity functions with reference to the selected soil.