A Simple Way of Measuring Soil Moisture and pH with Temperature Compensation

A Simple Way of Measuring Soil Moisture and pH with Temperature Compensation

Author's Contact Information

Thomas Brand

Thomas Brand

This article explains how you can measure soil moisture and pH measurement, and how to use it, for example, to achieve effective plant growth.

The circuit shown in Figure 1 is a single-supply, low power, high precision complete solution for soil moisture and pH measurements, including temperature compensation. The measured values of each of the analog sensors from the three independent measurement sections are fed to an analog-to-digital converter (ADC), which then forwards them in digital form to a microcontroller for further signal processing. A good example of a suitable ADC is the 24-bit Σ-Δ ADC AD7124 from Analog Devices, Inc. (ADI), a fully integrated, low noise analog front end for high precision measurement applications. Its inputs can be configured as differential or single-ended/pseudo-differential inputs. In addition, the AD7124 has a programmable amplifier stage to ensure that signals of small amplitude can be interfaced directly.

Figure 1. Simplified circuit for soil moisture, pH, and temperature measurement.

Measurement of pH

Because a pH sensor usually has a high impedance output (approximately 1 GΩ) and thus cannot drive the ADC inputs, a high precision operational amplifier is also needed to buffer the sensor output. Due to the sensor’s high output impedance, a low op amp input bias current is important for minimizing offset errors. In this circuit design, the ADA4661-2 rail-to-rail op amp is used. The output from the pH sensor is bipolar and delivers a maximum signal of ±414 mV. The internal offset generator of the AD7124 can be used to set the common–mode voltage of its inputs to AVDD/2, thereby yielding AVDD/2 ± 414 mV at the sensor output.

The noise behavior of the components also has an effect on the resolution of the measuring system. The effective noise of the AD7124 (full power mode, gain = 1, output data rate = 25 SPS) is VNOISE, EFF = 570 nV, which results in a peak-to-peak value of VNOISE, PP = 3.76 µV (6.6 × VNOISE, EFF). The ADA4661-2’s noise component, VNOISE, PP = 3 µV, is added to that, yielding total noise of VNOISE, PP, TOTAL = 4.8 µV. For the ADC’s maximum input voltage range of 6.6 V this results in a noise-free resolution of:


Measurement of Soil Moisture

Soil moisture sensors commonly used today are often capacitive and measure the water content via the dielectric constant. Because water has a much higher dielectric constant than other elements in the soil, a change in water content can be detected by the sensor via a capacitance change. The circuit shown in Figure 1 uses a 3-wire sensor (supply, ground, and voltage output). For minimized power consumption, the sensor is in sleep mode most of the time and only activated via VSENSOR if a measurement is required.

Regarding the noise behavior, a somewhat higher noise-free resolution is yielded compared to the pH measurement because the sensor is directly connected to the ADC:


Temperature Measurement

Due to the electrode coating and aging processes, the behavior of a pH sensor changes with time. To maintain a maximum accuracy, regular calibration is essential. For this, known liquids are often measured and compared with the pH values given in the NIST reference tables for the corresponding temperatures, which should be included in the software. The temperature measurement is performed with a 3-wire resistance temperature detector (RTD), as shown in Figure 2. Due to the programmable excitation current source of the AD7124, the RTD can be connected directly to the ADC (IOUT1, IOUT2).

Figure 2. The RTD temperature measurement circuit.


With the circuits shown, soil moisture and pH can be measured relatively easily. Due to the strong temperature dependence of the pH sensor, temperature compensation via an additional temperature measurement is required.