Abstract
A cost-effective capacitive sensor system, SEN0193, was ruggedised, calibrated, and evaluated in both laboratory and field settings to assess sensor-to-sensor variability resulting from sensor placement in the soil. Experimental data underwent regression analysis to develop a model for predicting soil moisture levels using the output voltage of the capacitive sensor, as recorded at the Analog-to-Digital Converter (ADC) of the microcontroller. The accuracy of the developed low-cost sensor system was demonstrated through the evaluation of Mean Absolute Error, Root Mean Square Error, and Relative Absolute Error, yielding values of 1.56%, 0.36, and 0.65, respectively. A comparison was conducted between the field-calibrated soil sensing system and a commercial SM150T sensor to measure Volumetric Water Content (VMC) in a sugarcane field. The Spearman rank correlation coefficient for Volumetric Water Content (VMC) prediction using the new low-cost sensor and the commercial SM150T sensor exceeded 0.98, indicating a strong and positive correlation between the two sensors’ readings. Throughout the entire field testing period, the low-cost capacitive soil moisture sensor system exhibited consistent and reliable performance, with no practical issues reported. After soil-specific calibration, the low-cost capacitive sensors in the group demonstrated performance on par with commercially available sensors. This finding suggests that these sensors can be efficiently employed for irrigation management, with minimal impact on irrigation efficiency.
Similar content being viewed by others
Introduction
The rapid increase in the world’s population has led to a subsequent rise in water consumption, emphasizing the urgent need for proper and effective water resource management1. By 2025, more than one-third of the global population is projected to face severe water shortages as water availability becomes increasingly scarce2,3. Precision water-management technologies, such as micro-irrigation (including sprinkler, surface drip, and subsurface drip), offer opportunities for farmers to conserve precious water resources4.Among these, the subsurface drip irrigation (SDI) system stands out, providing remarkable water savings of 35–65% compared to flood irrigation systems5,6 .India has seen a substantial adoption of micro-irrigation, with drip irrigation systems accounting for 44% of the total acreage under such practices, and this trend has been on a significant rise during 2012–20157. The preference for SDI over surface drip irrigation is due to its ability to reduce labor costs during the cropping season, prolong the lifespan of laterals, and minimize water loss from the soil surface due to evaporation5,6. Moreover, the SDI system complements conservation agriculture (CA) systems, as it contributes to improved irrigation efficiency by concurrently reducing evaporation and runoff while enhancing soil properties that aid in better water retention and storage in the soil profile8. The integration of SDI with CA practices demonstrates a promising approach towards sustainable water management and agricultural productivity.
Soil moisture sensors are useful in supporting farmers’ decisions for irrigation scheduling, which can help in preventing plants from drought stress and over application of irrigation9. An automated irrigation system and wireless network to control irrigation could save 38% of water have been reported by many researchers10,11. Real-time estimation of soil moisture is a valuable tool for scheduling the irrigation12,13 and getting exact information of soil moisture. Irrigation scheduling determines the time of the next irrigation event and the amount of water to apply. The gravimetric method of measuring soil moisture is a simple and high-level precision method but it is time-consuming, laborious, offline and destructive. The indirect methods like Frequency domain reflectometer, Time domain reflectometer measure soil-water potential without much disturbing the soil14 Soil moisture can be measured using electromagnetic methods, such as time-domain reflectometry (TDR)15 and capacitance sensors16, or using electrical resistance blocks17, neutron probes18, or tensiometers19. Among the range of different soil water sensing methods, capacitance-type soil moisture sensors20,21 are the most popular because of their cost, reasonable robustness and precision, low power consumption, and low maintenance requirements22,23,24,25. The capacitance-type soil moisture sensors can be connected to IOT device having ability to communicate to transfer and exchange data between other devices. The soil moisture sensors are commercially available for soil moisture measurement, and they could generally be used for manual or integrated with automatic irrigation control systems through an IOT system26,27,28. Many network protocols are available according to their use, such as ZigBee, Hypertext Transfer Protocol (HTTP), Wi-fi, Bluetooth, and Long-Range Wide Area Network (LoRaWAN) for automation.
The characterization of capacitance-type soil moisture sensors in laboratory conditions has produced highly repetitive readings25,29. Bogena et al.21 reported that the laboratory experiment can be used to define field experiment with certain correction. Nevertheless, in field conditions, significant differences in sensor measurements have been reported by many authors30,31,32,33 possibly due to the influence of unwanted parasitic capacitances and leads capacitance introduce measurement error unless these are not cared well.
The study conducted by34 revealed significant sensor-to-sensor differences, even when the sensors were placed at the same location relative to the emitter in a drip irrigation system. It was observed that certain sensor positions in the soil exhibited higher sensitivity to irrigation cycles. Any factor affecting hydration or water uptake at these locations would substantially impact sensor measurements. Capacitance-type soil moisture sensors, although providing good accuracy in laboratory conditions21,23,35, are not widely favoured by farmers due to their large sensor-to-sensor variability under field conditions. This variability can be attributed to these sensors detecting moisture from only a small volume of soil (approximately 1 dm3), making them susceptible to local variations in factors such as gravel content, bulk density, soil salinity, the presence of macropores and shrinkage cracks, and the proximity of plant roots36,37. Additionally, other factors like soil temperature38 and soil electrical conductivity39 also influence sensor-to-sensor variability. The complex interactions between soil properties and sensor response highlight the importance of considering such factors when deploying capacitance-type soil moisture sensors in field applications. Addressing these issues and improving sensor performance under real-world conditions would be beneficial in enhancing the adoption and reliability of these sensors for irrigation management and efficient water use in agriculture.
Bogena et al.21 devised a calibration method for capacitance-type soil moisture sensors, using various dielectric mediums for laboratory calibration. They successfully calibrated EC-5 sensors and SMT100 during 2007 and 2017, respectively. The SMT100 appears to be a ruggedized version of the capacitive sensor SEN0193, which was used in the study to develop a low-cost soil moisture sensor module. Domínguez-Niño et al.29 also conducted calibration of the 10HS sensor from the METER group in the laboratory using a dielectric method. However, in their subsequent study in 202034, they concluded the following; (1) Capacitance-type soil moisture sensors exhibit high accuracy in laboratory conditions. However, their usage in actual drip-irrigated orchards is complicated by their low repeatability and their sensitivity to their location in the soil; (2) Sensor performance in laboratory conditions suggests that the lack of repeatability in the field is not a fault of the sensors but rather a consequence of the complexity of the soil environment in drip-irrigated orchards; (3) The main source of uncertainty in these measurements is the precise positioning of the sensor within the actual wet bulbs, which vary in size, shape, and alignment with respect to the dripper, possibly explaining the observed sensor-to-sensor differences and (4) The uncertainty resulting from sensor calibration accounts for only a fraction of the observed variability in data collected by the sensors. These findings highlight the challenges of using capacitance-type soil moisture sensors in real-world field applications and emphasize the need for careful consideration of factors that may impact their performance in agricultural settings. Addressing these challenges and understanding the complexities of the soil environment will contribute to the development of more reliable and accurate soil moisture sensing technologies for irrigation management in agricultural systems.
This indicates that achieving increased accuracy in Soil Moisture Content (SMC) measurements is less relevant when compared to the variability associated with the wetting pattern in actual field conditions. Therefore, the sensor-specific calibration curves derived in the laboratory have limited scope for improving the accuracy of Soil Moisture Content (SMC) measurements in real-world field applications. The in-situ approach, while suitable for validating low-cost sensors, requires calibration/validation with discrete samples using the gravimetric method. A more effective approach for characterizing soil moisture’s spatiotemporal variability and improving irrigation management is to use a dense network of combined capacitive sensors. This combination of low- and very-low-cost soil moisture sensors has not been attempted previously38. Additionally, addressing the variability caused by sensor positioning relative to the irrigation source or plant can be achieved through in-situ calibration in the field.
In light of these considerations, the study aimed to achieve the following objectives; to develop a microcontroller-based module for recording soil moisture sensor data on the cloud; 2) field calibrate a low-cost open-source capacitive soil moisture sensor module and 3) validate the Volumetric Water Content (VMC) content of the field-calibrated sensor against the commercially available SM150T sensor.
Materials and methods
Capacitance based soil moisture sensor
A capacitance-based soil moisture sensor utilizes the dielectric properties of the medium to measure soil moisture content. The dielectric properties of the medium have a direct effect on the capacitance of the capacitor and, consequently, on the operating frequency of the RC generator which is the main part of the described probes. Dry soil, composed of various materials, typically exhibits a relative dielectric permittivity range of 2–6, whereas air and water have dielectric constants of 1 and 80, respectively. The charge-storing capacity of the soil is measured by a dielectric sensor water and air are the only things that change significantly by volume in a soil sample while wetting and drying. Therefore, changes in charge-storing capacity of a soil sample can be related to changes in volumetric water content of sample. The soil moisture sensor probe consists of two copper traces, large enough to induce parasitic capacitance in the soil. The environment around the capacitor alters its capacitance, and consequently, affects its charging time. When the soil is dry, the capacitor has a smaller capacitance and therefore charges up quickly and the output voltage of capacitance sensor is high (around 3 V). Conversely, when the soil is wet, the capacitor has a larger capacitance and therefore charges up slowly and output voltage of capacitance sensor is low (around 1.5 V). The output voltage of the sensor is transformed into a digital value through a 10 bit analog-to-digital converter of ESP8266 microcontroller. To determine the moisture content at a particular voltage output, the voltage value can be calibrated using the gravimetric method. In summary, capacitance-based soil moisture sensors leverage capacitance and dielectric constant principles to measure soil moisture content, providing valuable data for effective irrigation management.
Development of low-cost sensor system
There are many commercial sensors for measuring soil moisture content which could either use a data logger or company cloud to store the data. Still, real-time data access to the raw voltage values is not available in commercial sensors. To overcome these limitations, a cost-effective sensor system was developed using readily available soil moisture sensors, a microcontroller, a buck-boost converter, a solar panel, charging and discharging modules, a battery, and connecting wires (Table 1). The sensor features three pins for analog signal output, GND, and VCC, along with a built-in voltage regulator chip that supports 3.3–5.5 V DC. The sensor’s output voltage ranges from 0 to 3.0 volts and is inversely proportional to the soil’s volumetric moisture content.
To address the variability of soil moisture and ensure better contact with the smaller wet bulb area of the sensor, a module consisting of four capacitive sensors and one microcontroller was developed. The module was powered by a 6 W output solar panel (Sunfuel Technologies model), which charged two LiFePO4 batteries connected in parallel (32650 and 6000mAh) providing an output voltage ranging from 3.2 to 2.7 volts. These batteries served as the power source for the system. To manage the power supply efficiently, a TP 4056 charging-discharging module was utilized to charge the batteries using solar energy from the panel. A buck-boost converter was employed to supply power to the system, ensuring a stable voltage output from the batteries, which may vary from 3.2 V when fully charged to 2.7 V during discharge. This DC-to-DC boost USB converter helped maintain a constant 5 V supply to the microcontroller, ensuring stable and reliable performance. By integrating these components, the module ensured consistent and reliable power supply to the capacitive sensors and microcontroller, facilitating accurate and continuous soil moisture monitoring. This setup proved to be a practical and cost-effective solution for real-time data collection, enabling efficient irrigation management practices and enhancing water conservation efforts in agricultural applications (Figure A1).
The code for measuring sensor voltage output corresponding to different soil moisture content was developed using the Arduino IDE for the ESP8266 microcontroller. The ESP8266 was programmed to efficiently manage power consumption by entering sleep mode using the ESPdeepsleep() query, allowing it to record observations at intervals of 30 min. To establish a connection and transmit data to the cloud server, a Wi-Fi protocol was implemented. On the AWS platform, Ubuntu 20.04 operating system was installed to create a cloud server capable of storing the MySQL database in the cloud. phpMyAdmin was utilized to manage the server, including tasks such as creating the MySQL database, executing queries, and adding user accounts. To transfer soil moisture sensor data from the ESP8266 to the MySQL database on the cloud, HTTPClient query was employed. A visual representation of the soil moisture sensing device and the setup for managing the database can be found in Figure A2. This combination of hardware and software components allowed for effective data collection, transmission, and storage in the cloud, facilitating real-time monitoring of soil moisture content. The prototype presented in Figure A3 demonstrated the practical implementation of the soil moisture sensor system, highlighting its potential for agricultural applications and efficient irrigation management.
Ruggedness of sensor
The low-cost capacitive soil moisture probe is composed of a soil moisture sensing probe and a circuit board responsible for power supply and signal output. The sensing probe has a length of 8.5 cm, limiting its soil moisture measurement depth to the same distance. To utilize this sensor effectively for field crops under SDI it needs to be positioned within the wet bulb of the dripper, which may vary in depth depending on the drip system’s configuration. To adapt the sensor for SDI applications, a 40 mm PVC pipe was used to enclose the capacitance sensor, with endcaps securely fitted on both sides. One of the endcaps was slotted to accommodate the soil moisture probe, allowing its sensing part to extend outside the endcap while keeping the circuit board enclosed within the cPVC pipe. To ensure water-resistance, epoxy resin was applied to fix the sensor firmly in the slotted endcap. Inside the cPVC pipe, silicone gel packs were placed to mitigate the impact of humidity changes on the soil moisture sensor’s output (Fig. 1). This modification enables the sensor to be effectively utilized for monitoring soil moisture in SDI systems, ensuring accurate measurements within the specific wet bulb zone for optimized irrigation management in agriculture. The cost-effective sensor system was created by acquiring all the necessary components, resulting in a total cost of approximately 44 USD. In comparison, the commercially available SM150T sensor costs around 440 USD.
Experimental settings
Laboratory calibration of soil moisture sensor probes
A laboratory experiment was conducted in the Department of Soil and Water Engineering, PAU, Ludhiana to measure the sensor output voltage and inter-sensor variability among eight randomly selected sensor probes subjected to four different soil moisture levels (9, 13.5, 18, 22.5 (cm3 cm− 3) (Fig. 2). The soil was sandy loam in texture (sand 71.6%, silt 12.4%, clay 12.4%), with field capacity of 18.5 cm3/cm3, wilting point 10.0 cm3/cm3and soil organic carbon organic matter 0.54%, respectively. To create the different soil moisture levels, one kilogram of ground soil with a particle size of less than 2 mm was placed into one-litre cylinders. Distilled water was then added in known quantities to achieve the desired volumetric moisture content (VMC) levels. The soil samples were allowed to rest for 24 h to ensure even water distribution throughout the entire sample. To prevent soil moisture loss through evaporation, the samples were covered with a plastic sheet.
In the laboratory experiment, each sensor was individually placed in separate soil containers to record voltage measurements. To ensure reliable and accurate data, three repeated measurements were taken for each sensor across eight cylinders. For each repetition, the sensor was removed from the soil and placed in another undisturbed point. This approach accounted for the soil’s natural heterogeneity, which unavoidably contributes to variability among measurements. To facilitate data recording, an ESP8266 microcontroller was utilized and programmed in the Arduino IDE. The microcontroller code was specifically designed to power the four sensors one by one and record the output voltage at the Analog-to-Digital Converter (ADC) of the controller(Table B1). A laboratory experiment was also conducted to examine the impact of soil electrical conductivity (EC) on the output voltage of soil moisture sensors. The sensors were tested across three soil samples with varying EC levels (0.27, 4.1, and 9.1 dS/m) and four different levels of soil moisture content (9%, 13.5%, 18% and 22.5%).
Field calibration of capacitive sensors
The four sensor probes were calibrated in sugarcane field at research farm of Department of soil and Water Engineering, PAU, Ludhiana (30° 54’ 39.9096”, 75° 49’ 0.966”). The sugarcane was planted in paired rows at 30 cm and trench at 90 cm. The sugarcane crop was irrigated using a subsurface drip irrigation system, where the main lines were spaced 120 cm apart, and the drippers were placed at intervals of 30 cm. To calculate the crop’s evapotranspiration rate, various environmental parameters were recorded, including maximum and minimum temperatures, maximum and minimum relative humidity, sunshine hours, and wind speed. During the cropping season of 2019–2020, the annual rainfall and evapotranspiration were measured to be 690 mm and 1580 mm, respectively. The experimental plots were irrigated, at one day interval, with an irrigation dose (ID) to meet crop water needs based on the FAO water balance40 .
During the cropping season, the irrigation schedule was determined based on the reference evapotranspiration (ETO) from the previous week, recorded by a weather station located on the same farm. The crop coefficient (Kc) was used in conjunction with ETO to optimize the irrigation water application. The experimental field’s soil was classified as sandy loam. Irrigation was typically carried out at 11:00 am, and the duration varied between 1.30 and 2.0 h depending on the evapotranspiration data. To monitor soil moisture content accurately, actual soil moisture (gravimetric) measurements were taken twice a day, at 10:30 am and 4:00 pm, at a depth of 15–30 cm. Soil samples were collected from various depths (for soil profile depth from 0 to 90 cm at interval of 15 cm) and analyzed for their texture, bulk density, field capacity, and organic matter content. Texture analysis was performed using the international pipette method, while bulk density measurements were taken using iron rings. The moisture content at 0.3 atm pressure was measured to determine field capacity, and at 15 atm pressure for the permanent wilting point using a pressure plate apparatus. The actual soil moisture content was estimated through the gravimetric method, which involved drying soil subsamples collected from the field in an oven at 110 °C until a constant weight was achieved. These gravimetric soil moisture values were then converted to volumetric moisture content (VMC) using the soil bulk density (Mg m− 3), obtained from unaltered soil samples collected using iron rings with dimensions of 5 cm internal diameter by 5 cm in height41. The VMC (\(\:{\theta\:}_{o}\)cm3cm−3) was estimated using the Eq. (2):
Where, \(\:{\rho\:}_{w}\:\)represents the water density (Mg m-3) taken as 1,
w is the volume of soil, and \(\:\rho\:\) is the bulk density.
The capacitive sensor probes were positioned 10 cm away from the subsurface drip line (Fig. 3). These probes, 8.5 cm in length, were installed in the sugarcane field with the sensor tip placed at a depth of 22 cm from the soil surface. A microcontroller was programmed to record the voltage of all four capacitive sensors at the ADC at two-hour intervals and publish the data on the AWS cloud. To calibrate the capacitive soil moisture sensors for local soil conditions, the sensor voltage (Model 1) at the ADC of the microcontroller was plotted against the actual soil moisture measured using the gravimetric method. The field experiment was conducted for a duration of 40 days, during which the timing and duration of all irrigation and rainfall events were recorded. The data obtained from the gravimetric soil moisture measurements and the corresponding sensor voltage on the ADC were then used to develop a calibration curve for the sensors. This calibration curve allowed the prediction of the Volumetric Moisture Content (VMC) of the soil by fitting a suitable predictive model based on the sensor voltage readings.
Comparative analysis of the low-cost sensors vis-à-vis commercial sensor
The low-cost capacitive soil moisture sensor, comprising four 8.5 cm long probes, was compared with the SM150T, a frequency domain reflectometry (FDR)-type sensor (Delta T make, USA), which is 10 cm long. Both sensors were programmed to calculate the volumetric soil water content every 15 min. The SM150T stored the values in the data loggers DT (Campbell Scientific Inc., Logan, UT, USA), whereas the low-cost capacitive sensor transmitted the data to the AWS cloud. In the sugarcane field, both sensors were installed, and irrigation was applied when the soil moisture content dropped below 10%. The SM150T provided measurements for volumetric soil moisture content, while the low-cost capacitive sensor provided voltage values as output, which were then converted to soil moisture using the field calibration curve. To assess the performance of the low-cost capacitive sensor compared to the commercial soil moisture sensor, volumetric moisture content (VMC) predictions from both sensors were compared based on various metrics: mean absolute error (MAE), relative absolute error (RAE), root mean square error (RMSE), and mean absolute percentage error (MAPE). The calculation methods for these metrics are detailed in Table 2.
Statistical analysis
The regression analysis was performed on individual capacitance values of the four sensors separately, and their combined average capacitance value was used to calculate the coefficient of determination (R-squared, R2). This allowed us to formulate a local calibration curve for the soil moisture sensors using standard statistical procedures (see Table 2). Three measures were employed to quantify the accuracy of the soil moisture sensors: MAE, RMSE and RAE. These metrics are crucial in evaluating the performance and effectiveness of the calibration curve for accurate soil moisture prediction (Fig. 4).
Results
Laboratory calibration of capacitive soil moisture sensors
The output voltage at ADC of ESP8266 was plotted for all eight sensors for different soil moisture contents and air. All the sensors show a trend that the sensor voltage drops with an increase in the soil moisture content in the sample (Fig. 5). The corresponding values of 8 sensors were significantly different at 5% level of significance for different soil moisture contents. Interestingly, repeated measurements of a single sensor demonstrated high precision, showing very low standard errors consistently below 2.1 mV. However, when comparing measurements between two different sensors, significant differences were observed, aligning with findings by44. This sensor-to-sensor variation could be attributed to several factors, including potential inbuilt manufacturing defects in sensor probes, variations in soil moisture distribution within the soil profile, and differences in compaction levels between the soil and the sensor. Considering these factors, it is crucial to account for sensor-to-sensor variability during calibration to ensure reliable measurements of soil moisture content. Such considerations are vital in developing a robust and precise low-cost capacitive soil moisture sensor system for agricultural applications.
It was observed that for a soil moisture content of 18%, the sensor output voltage decreased from 290 mV to 275 mV as the soil’s EC increased from 0.27 to 9.1 dS/m (Fig. 4). Similar decreased in voltage was observed when the volumetric moisture was above field capacity (22%). The output voltage decreased for soil moisture contents of 14% and 10% with increase in soil EC (0.27 to 9.1 dS/m). However, the sensor readings exhibited variation in response to changes in soil moisture content across different EC levels. The sensor probe shows deviations in output voltage due to the presence of salts in the soil. Therefore, a universal calibration curve based on laboratory calibration may not be ideal for estimating soil moisture content, as it can be affected by sensor-to-sensor variations and other soil parameters like soil compaction and soil electrical conductivity.
Field calibration of soil moisture sensor based on experimental data
The field capacity, bulk density and EC of soil was 18.5%, 1.58 Mg m− 3 and 0.14 dS/m respectively. The raw sensor voltage recorded on the Analog-to-Digital Converter (ADC) of the ESP8266 microcontroller was measured and stored on the AWS cloud during 13.5.2021 to 31.5.2021. The resulting plot of soil moisture prediction by soil moisture sensors versus irrigation application showed a gradual trend with respect to soil moisture (Fig. 6). Notably, the estimated soil moisture remained relatively constant during the night and exhibited a variation during the daytime, corresponding to water uptake by the crop. This observation indicated that the rate of soil moisture depletion was minimum at night and higher during the daytime. The plot displayed a clear correlation between sensor based soil moisture and soil moisture depletion from the soil. In general, the irrigation application based on evapotranspiration was carried out at soil moisture content of 10% and to increase the moisture beyond field capacity. Throughout the complete duration of the field experiment, the trend in all sensor probes consistently remained stable which was in consistent with commercially available sensor SMT100. To address the issue of variability in sensor output and ensure the reliable use of capacitive soil moisture sensors for irrigation scheduling, the approach of averaging sensor output voltage at the ADC was employed by averaging the sensor voltage at the ADC. The temporal averaging of the soil moisture sensor reduce the errors reading due to site-specific factors such as soil texture, sensor placement, emitter location, and root biomass were effectively reduced. In the analysis, a new series of rainfall events was plotted on the secondary axis alongside the volume of irrigation water application. The graph depicted four irrigation events and five rainfall events in the first fortnight of June (Figure A4). With each rainfall and irrigation event, the ADC value of the soil moisture sensors exhibited a drop, indicating the response of the sensors to changing moisture levels in the soil. This consistent trend in sensor voltage was observed across all 42 irrigation cycles during the field calibration of the soil moisture sensors.
Overall, the data demonstrated the capability of the capacitive soil moisture sensors to reflect soil moisture changes in response to rainfall and irrigation events.
A simple exponential regression used to predict the moisture content of soil based on sensor voltage (Table 3). The results of the regression indicated that the model was significant and explained 52.7, 58.6, 64.1, 65.1 and 67.9% of the variance for sensor-1, sensor-2, sensor-3, sensor-4, and sensor average, respectively. The results of regression analysis indicated that the model was a significant predictor of sensor 1, F (1, 87) = 98.03, p < .00001. Similar trend was observed for all other sensors for both methods. The results indicated that the model was a significant predictor of sensors’ average was (F (1, 87) = 185.16, p < .00001.
The exponential calibration curve used in the analysis shows, the sensor sensitivity increases with corresponding increase in volumetric moisture content (VMC). This behaviour is particularly relevant as the sensors typically operate above the wilting point soil moisture and their sensitivity decreases only when VMC drops below 10% in present soil conditions. Further, the sensor’s functionality ceases when the volumetric content exceeds the soil’s field capacity level (Fig. 4).
The regression model also showed that average capacitance of sensors explained maximum variance. The highest R-square was found using the predication based on the average sensor voltage compared to all sensor ADC values (Fig. 7). The regression models for predicting soil moisture content based on sensor voltage were significant for each of the four sensors individually, as well as for their average. It was observed that the soil moisture prediction model based on the average of all four sensors explained the maximum variance. Therefore, based on the adjusted R-square value, it can be concluded that the prediction results of the model using the average of all four sensors are superior to those of the regression models developed using individual sensors. This is because a single sensor only averages over time, while using all four sensors together allows for averaging both temporally and spatially.
The averaging approach proved valuable in mitigating potential sensor output errors caused by various site-specific factors, ensuring reliable and consistent performance of the sensors for irrigation scheduling.
The accuracy of the soil moisture sensors was evaluated using various metrics, including Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), Relative Absolute Error (RAE), and Mean Absolute Percentage Error (MAPE) (Table 4). The results indicated that the mean error ranged from approximately 1.56–2.02% of soil moisture content for all four sensors and their combined average. These accuracy measures demonstrated that the low-cost capacitive sensors performed comparably to previously reported findings on low-cost capacitive sensors in terms of MAE, RAE, and RMSE38,45,46. The study’s findings suggest that field calibrated, the low-cost sensors exhibited accuracy performance at par with standard sensors. The accuracy of soil moisture measurements is critical for the efficiency of soil moisture-based irrigation scheduling systems. Small errors in soil moisture sensors can have significant impacts on irrigation efficiency, with even 3% errors possibly leading to detrimental effects47. Considering the low-cost capacitance sensors’ errors were approximately 2% over the commercial soil moisture sensor. The study validates the potential use of these low-cost sensors for efficient irrigation scheduling, promoting sustainable water management in agricultural practices, for soil below EC (0.14dS/m).
MAE mean absolute error, REA- relative absolute error, RMSE- root mean square error, MAPE- mean absolute percentage error.
Calibration of soil moisture sensors based on empirical method
The soil-specific field calibration curve of low-cost capacitive sensors is time consuming and labor intensive. A two-point algebraic method was used calibrate the soil moisture sensors in field conditions. The two-point form of a line is used for finding the equation of a line given two points (x1, y1) and (x2, y2) on it. The two-point form of a line passing through these two points is calculated using Eq. 3:
Based on the two-point equation the calibration equation of the soil moisture sensor equation could be modified as;
In Eq. 4, \(\:\theta\:\) = volumetric soil moisture content (VMC) at any instant of time corresponding to sensor voltage (mv), \(\:{\theta\:}_{dry}\) = VMC of dry soil, \(\:{\theta\:}_{sat}\) = VMC of saturated soil, ADC is the voltage output of the sensor corresponding to\(\theta,\) ADCsat and ADCdry are the sensor output voltage (mv) of saturated and dry soil samples respectively.
At dry condition, \(\:{\theta\:}_{dry}\) = 0, so the Eq. (4) can be simplified as given in Eq. (5).
Sensor-specific and soil specific ADCdry and ADCsat counts can be readily measured in most cases whereas the coefficients in the conventional linear and exponential relationship can be determined using a large number of data points. In other words, for each sensor, ADCdry, ADCsat, VMC at saturation and VMC at dry conditions be obtained using a soil sample that is collected from the location where the sensor is to be installed30. also proposed a similar empirical model to calibrate ECH20 sensor. This two-point model (model 2) was also used to predict the VMC in actual field conditions along with the exponential curve fitting model (model 1) developed earlier for field calibration of sensors.
Comparative analysis of field calibration and empirical models against SM150 sensor
To assess the strength of the relationship between soil moisture measured using the low-cost sensor with both the Field calibration model (FCM) and Empirical model (EM) against the SM150T sensor, Spearman’s rank correlation coefficient was employed (Table 5). Spearman’s rank correlation was chosen due to its nonparametric nature, enabling the measurement of the strength of a monotonic relationship between paired data without making assumptions about data distribution or the nature of the relationship between them. The Spearman’s rank correlation coefficient for both models was found to be greater than 0.987, indicating a strong and positive correlation between the low-cost sensor outputs and the SM150T sensor readings (Table 5; Fig. 8).
Furthermore, the correlation was statistically significant at the 5% level for both models. While comparing the performance of the two models in predicting soil moisture content, Model 1 (FCM) exhibited lower Mean Absolute Error (MAE), Relative Absolute Error (RAE), Root Mean Square Error (RMSE), and Mean Absolute Percentage Error (MAPE) compared to Model 2 (EM). Even for Model 2, the Mean Absolute Error (MAE) compared to the SMT150 sensor was only 1.59%. This indicates that the soil moisture estimation of low-cost soil moisture sensors, using both field-calibrated and empirical models (with a group of four sensor probes at one location), is comparable to the accuracy of the SMT150 commercial soil moisture sensor. This suggests that both the Field Calibration Model and the Empirical Model can be effectively utilized to predict soil moisture content using the modified capacitive sensor module.
Summary and conclusions
This study has successfully explored on-field calibration strategies and implemented a practical path to integrate a low-cost microcontroller-based soil moisture sensor into subsurface drip-irrigation (SDI) scheduling. Extensive on-field calibration has demonstrated the sensor’s reliability in real-world agricultural conditions, enabling precise and real-time soil moisture data for informed irrigation decisions at various crop growth stages. Key findings and contributions of the study are as follows;
-
(1)
A cost-effective standalone system, comprising the SEN0193 sensor, microcontroller, and solar chargeable battery, was ruggedized, and field-calibrated for efficient subsurface drip irrigation in sugarcane cultivation.
-
(2)
The ruggedized sensor probes, buried in the soil under subsurface drip irrigation (SDI), effectively performed under real field conditions throughout the entire sugarcane growth period, show casing consistent and reliable functionality.
-
(3)
The study provides an open-source code for a microcontroller-based soil sensor system, offering researchers in the irrigation field a valuable resource to customize or expand upon the code for soil-specific calibration of low-cost sensors.
-
(4)
Utilizing multiple capacitive sensors proved to be more effective in estimating soil moisture and characterizing its variability around the emitter periphery compared to a single capacitive sensor. The in-situ field-calibrated soil moisture sensing system, comprising four sensor probes, demonstrated soil moisture predictions comparable to commercially available SM150T sensors. The error metrics, including Mean Absolute Error (MAE), were below 2% when compared to measurements from the commercial sensor.
-
(5)
While the field calibration approach requires labor-intensive and time-consuming efforts, the empirical calibration method (two-point method) provides a quick and user-friendly alternative for end-users. The empirical method offers slightly lower precision compared to field calibration, but the error metrics in soil moisture estimation remain comparable. The authors have developed and validated field calibration and empirical models for estimating volumetric soil moisture using sensors for soils below EC (0.14 dS/m). Further investigations are needed to assess the suitability of low-cost soil moisture sensors in field conditions with high salt content or EC.
More investigations are needed to assess the applicability of the developed low-cost sensor system for irrigation scheduling across various crops in farmers’ fields. These studies will determine the system’s feasibility and potential benefits in real-world agricultural settings, encouraging its practical implementation and adoption by farmers.
Data availability
The data that support the findings of this study are available in the manuscript itself and supplement files.
References
Ashofteh, P. S., Bozorg-Haddad, O., Akbari-Alashti, H. & Mariño, M. A. Determination of Irrigation allocation policy under climate change by genetic programming. J. Irrig. Drain. Eng. 141, 04014059 (2015).
Kassam, A. H., Molden, D., Fereres, E. & Doorenbos, J. Water productivity: science andpractice—introduction. Irrig. Sci. 25, 185–188 (2007).
Rosegrant, M., Cai, X. & Cline, S. World Water and Food to 2025. Dealing with Scarcity 1–322 (International Food Policy Research Institute, 2002).
Madhavan, N. Profits trickle in, drip by drip. In: Handbook of Indian Agriculture 2020: Charting the Way out of the Farm Crisis (eds Vembu, V. & Madhavan, N.) 96–100 (The Hindu Business Line, 2020).
Jat, H. S. et al. Re-designing irrigated intensive cereal systems through bundling precision agronomic innovations for transitioning towards agricultural sustainability in north-west India. Sci. Reports-Nature. 9, 17929 (2019).
Sidhu, R. K. & Sidhu, H. S. Soil-sensors for real time irrigation to match crop water requirement in subsurface drip system, Mini review. J. Biosens. Renew. Sources. 1, 15–17 (2019).
Sidhu, R. K., Kumar, R., Rana, P. S. & Jat, M. L. Automation in drip irrigation for enhancing water use efficiency in cereal systems of South Asia: Status and prospects. Advances in Agronomy. 167, 247–300. (2021).
Camp, C. R., Bauer, P. J. & Hunt, P. G. Evaluation of no tillage crop production with surface drip irrigation on soils with compacted layers. Trans. ASAE. 42, 911–917 (1999).
Kayad, A., Paraforos, D. S., Marinello, F. & Fountas, S. Latest advances in sensor applications in agriculture. Agriculture 10, 362. https://doi.org/10.3390/agriculture10080362 (2020).
Al-Ghobari, H. M., Mohammad, F. S., El Marazky, M. S. A. & Dewidar, A. Z. Automated irrigation systems for wheat and tomato crops in arid regions. Water SA. 43, 354–364. https://doi.org/10.4314/wsa.v43i2.18 (2017).
Bowlekar, A. P. et al. Performance evaluation of real time automatic irrigation system on the yield of cabbage (Brassica oleracea L). Int. J. Pure Appl. Bioscience. 7, 160–165. https://doi.org/10.18782/2320-7051.7433 (2019).
Nolz, R. & Loiskandl, W. Evaluating soil water content data monitored at different locations in a vineyard with regard to irrigation control. Soil. Water Res. 12, 152–160 (2017).
Soulis, K. X. & Elmaloglou, S. Optimum soil water content sensors placement for surface drip irrigation scheduling in layered soils. Comput. Electron. Agric. 152, 1–8 (2018).
Petropoulos, G. P., Ireland, G. & Barrett, B. Surface soil moisture retrievals from remote sensing: Current status, products & future trends. Phys. Chem. Earth Parts- A/B/C. 83, 36–56. https://doi.org/10.1016/j.pce.2015.02.009 (2015).
Ledieu, J., De Ridder, P., De Clerck, P. & Dautrebande, S. A method of measuring soil moisture by time-domain reflectometry. J. Hydrol. 88, 319–328 (1986).
Zotarelli, L., Dukes, M. D., Scholberg, J. M. S., Femminella, K. & Munoz-Carpena, R. Irrigation scheduling for green bell peppers using capacitance soil moisture sensors. J. Irrig. Drain. Eng. 137, 73–81 (2011).
Cummings, R. W. & Chandler, R. F. A field comparison of the electrothermal and gypsum block electrical resistance methods with the tensiometer method for estimating soil moisture in situ. Soil. Sci. Soc. Am. J. 5, 80–85 (1941).
Chanasyk, D. S. & Naeth, M. A. Field measurement of soil moisture using neutron probes. Can. J. Soil Sci. 76, 317–323 (1996).
Munoz-Carpena, R., Li., Y., Klassen, W. & Dukes, M. D. Field comparison of tensiometer and granular matrix sensor automatic drip irrigation on tomato. Hortic. Technol. 15, 584–590 (2005).
Kojima, Y. et al. Low-cost soil moisture profile probe using thin-film capacitors and a capacitive touch sensor. Sensors 16, 1292 (2016).
Bogena, H. R., Huisman, J. A., Schilling, B., Weuthen, A. & Vereecken, H. Effective calibration of low-cost soil water content sensors. Sensors 17, 208 (2017).
Jones, S. B., Blonquist, J. M., Robinson, D. A., Rasmussen, V. P. & Or, D. Standardizing characterization of Electromagnetic Water Content sensors: Part 1. Methodology. Vadose Zone J. 4, 1048–1058 (2005).
Spelman, D., Kinzli, K. D. & Kunberger, T. Calibration of the 10HS soil moisture sensor for Southwest Florida Agricultural Soils. J. Irrig. Drain. Eng. 139, 965–971 (2013).
Visconti, F., De Paz, J. M., Martínez, D. & Molina, M. J. Laboratory and field assessment of the capacitance sensors Decagon 10HS and 5TE for estimating the water content of irrigated soils. Agric. Water Manage. 132, 111–119 (2014).
Rosenbaum, U., Huisman, J. A., Vrba, J., Vereecken, H. & Bogena, H. R. Correction of temperature and electrical conductivity effects on dielectric permittivity measurements with ECH2O sensors. Vadose Zone J. 10, 582–593 (2011).
Millán, S., Casadesús, J., Campillo, C., Moñino, M. J. & Prieto, M. H. Using soil moisture sensors for automated irrigation scheduling in a plum crop. Water 11, 2061. https://doi.org/10.3390/w11102061 (2019).
Hardie, M. Review of novel and emerging proximal soil moisture sensors for use in agriculture. Sensors 20, 6934. https://doi.org/10.3390/s20236934 (2020).
Vera, J., Conejero, W., Mira-García, A. B., Conesa, M. R. & Ruiz-Sánchez, M. C. Towards irrigation automation based on dielectric soil sensors. J. Hortic. Sci. Biotechnol. 96(6), 1–12. (2021).
Domínguez-Niño, J. M., Bogena, H. R., Huisman, J. A., Schilling, B. & Casadesús, J. On the accuracy of factory-calibrated low-cost soil water content sensors. Sensors 19, 3101 (2019).
Sakaki, T., Limsuwat, A., Smits, K. M. & Illangasekare, T. H. Empirical two-point α -mixing model for calibrating the ECH2O EC-5 soil moisture sensor in sands. Water Resour. Res. 44, 44 (2008).
Kizito, F. et al. Frequency, electrical conductivity, and temperature analysis of a low-cost capacitance soil moisture sensor. J. Hydrol. 352, 367–378 (2008).
Bogena, H. R. et al. Potential of wireless sensor networks for measuring soil water content variability. Vadose Zone J. 9, 1002–1013 (2010).
Nagahage, E. A. A. D., Nagahage, I. & Fujino, T. Calibration and validation of a low-cost capacitive moisture sensor to integrate the automated soil moisture monitoring system. Agriculture 9 (141). https://doi.org/10.3390/agriculture9070141 (2019).
Domínguez-Niño, J. M., Oliver-Manera, J., Arbat, G., Girona, J. & Casadesús, J. Analysis of the variability in soil moisture measurements by capacitance sensors in a drip-irrigated orchard. Sensors 20, 5100. https://doi.org/10.3390/s20185100 (2020).
Rosenbaum, U., Huisman, J. A., Weuthen, A., Vereecken, H. & Bogena, H. R. Sensor-to-sensor variability of the ECH2O EC-5, TE, and 5TE sensors in dielectric liquids. Vadose Zone J. 9, 181–186 (2010).
Waugh, W. J., Baker, D. A., Kastens, M. K. & Abraham, J. A. Calibration precision of capacitance and neutron soil water content gauges in arid soils. Arid Soil Res. and Rehabilitation. 10, 391–401 (1996).
Dane, J. H. & Hopmans, J. W. Water retention and storage. In: Methods of Soil Analysis, Part 4, SSSA Book Series No. 5 (eds Dane, J. H. & Topp, G. C.) (Soil Science Society of America Journal, 2002).
Adla, S. et al. Laboratory calibration and performance evaluation of low-cost capacitive and very low-cost resistive soil moisture sensors. Sensors 20, 363. https://doi.org/10.3390/s20020363 (2020).
Scudiero, E., Berti, A., Teatini, P. & Morari, F. Simultaneous monitoring of soil water content and Salinity with a low-cost capacitance-resistance probe. Sensors 12, 17588–17607 (2012).
Allen, R. G., Pereira, L. S., Raes, D. & Smith, M. Crop Evapotranspiration-Guidelines for Computing Crop Water Requirements—FAO Irrigation and Drainage Paper 56 (FAO, 1998).
Serrano, D., Ávila, E., Barrios, M., Darghan, A. & Lobo, D. Surface soil moisture monitoring with near-ground sensors: Performance assessment of a matric potential-based method. Measurement 155 https://doi.org/10.1016/j.measurement.2020.107542 (2020).
Moriasi, D. N. et al. Model evaluation guidelines for systematic quantification of accuracy in watershed simulations. Trans. ASABE. 50, 885–900 (2007).
Witten, I. H., Frank, E. & Hall, M. A. Credibility: Evaluating what’s been learned. In Data Mining: Practical Machine Learning Tools and Techniques 3rd edn. 147 (Elsevier, 2011).
Placidi, P., Gasperini, L., Grassi, A., Cecconi, M. & Scorzoni, A. Characterization of low-cost capacitive soil moisture sensors for IoT networks. Sensors 20, 3585. https://doi.org/10.3390/s20123585 (2020).
González-Teruel, J. D. et al. Design and calibration of a low-cost SDI-12 soil moisture sensor. Sensors 19, 491. https://doi.org/10.3390/s19030491 (2019).
Kinzli, K. D., Manana, N. & Oad, R. Comparison of laboratory and field calibration of a soil-moisture capacitance probe for various soils. J. Irrig. Drain. Eng. 138, 310–321 (2012).
Soulis, K. X., Elmaloglou, S. & Dercas, N. Investigating the effects of soil moisture sensors positioning and accuracy on soil moisture based drip irrigation scheduling systems. Agric. Water Manage. 148, 258–268 (2015).
Acknowledgements
The authors are thankful to ICAR-CAAST-NAHEP (Centres for Advanced Agricultural Sciences and Technology- National Agricultural Higher Education Project) project for providing the financial assistance during the course of this study.
Author information
Authors and Affiliations
Contributions
AR developed the system and conducted the field studies, SD helped in field studies. RS and SG conceived the experiment, SK helped in writing the manuscript and OP edited the manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Additional information
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Electronic supplementary material
Below is the link to the electronic supplementary material.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
About this article
Cite this article
Raheja, A., Sharda, R., Garg, S. et al. Designing and field calibration of low-cost microcontroller-based soil moisture sensor for subsurface drip-irrigation system. Sci Rep 15, 35948 (2025). https://doi.org/10.1038/s41598-024-81288-z
Received:
Accepted:
Published:
Version of record:
DOI: https://doi.org/10.1038/s41598-024-81288-z










