The WATERMARK Soil Moisture Sensor measures electrical resistance inside of a granular matrix to determine soil water tension. Originally developed in the 1980's, many different methods and devices have been used to read the sensor both by IRROMETER as well as others.
To measure resistance inside the sensor, typically a voltage divider circuit is used. The circuit uses a known input voltage, output voltage, and series resistor value to calculate the value of another resistor (the sensor). Figure 1 is a simple example using a digital pin for power (PWM) and a pair of analog pins (A0,A1) to read and measure the resistance of the sensor (WM1).
Once the resistance is known, the value is calibrated to soil water tension via a series of equations or referencing look-up tables.
The WATERMARK sensor can be read by analog to digital devices such as Arduino/ Raspberry Pi etc., provided some guidelines are maintained with the reading circuitry and program.
AC is the preferred excitation for reading WATERMARK sensors, as the alternating polarity prevents building a charge which both offsets the reading and degrades the electrodes over time. In cases where it is impractical to supply AC excitation, there are two options:
1. Pseudo-AC Short Pulse (preferred)
A "pseudo AC" created by alternating the current direction of a brief DC excitation for equal amounts of time. Output pins are alternated and isolated, with the second reading reversing the charge of the previous. This leaves the sensor with no accumulated potential, immediately ready for subsequent readings. As with the short pulse method, excitation should not exceed 50ms total and the measurement should be taken within 100us.
2. DC Short Pulse
If DC current is applied without alternating the polarities, excitation should not exceed 50ms and the reading should be taken 100us after the excitation is applied. Delaying the reading beyond 100us with a DC source will build a charge offset on the sensor, changing the measured resistance and reducing the life of the electrodes. After reading, the leads should be shorted together or the powered side shorted to ground for 30 seconds to remove any accumulated DC potential in the sensor.
Devices reading WATERMARK sensors must isolate the sensor reading circuit from any earth ground. Mains powered devices will need transformer isolation to prevent a loop to ground through nearby equipment, and any communication line intended to be permanently connected to another grounded device will require optical isolation. If a ground loop exists, the readings will be wrong and current leakage may quickly destroy the sensor electrodes. Battery powered devices are more isolated by nature, but grounds for lightning protection etc. can cause the same problem.
In addition to general device isolation from ground, when reading multiple sensors the circuit must be designed to accommodate isolating sensors from each other. The wet soil in which sensors are installed creates a common conductive path between sensors. In effect, without isolation a device can be reading partially or fully between electrodes in different sensors rather than between electrodes inside each sensor.
Sensors must be powered individually, and the ground must be isolated from sensor to sensor. Even if powered individually, an open ground path to another un-powered sensor can't be allowed. This is best accomplished using multiplexers to open and close the appropriate channels.
Caution: Since WATERMARK sensors provide a direct path from earth to any device, protection via Zener or TVS diodes should be included on all sensor lines. In the interest of simplicity these are not included in any of examples to follow, but are highly recommended. Any such components will influence the measured readings and will have to be factored in to the reading program.
Figure 2 shows a sample schematic reading two WATERMARK sensors via the DC Short Pulse method using two 74HC4051 multiplexers, one to switch the power side and the other to isolate the ground. Four PWM outputs are used to control the multiplexers (PWM2,3,4,6) and one (PWM5) is used to provide excitation for the sensor. Only two sensors are shown, but six more could be accommodated by the same design.
The Rx value is based on the amount of moisture inside of the sensor, but an additional calibration is necessary to relate the resistance to soil water tension. The most commonly used calibration equation is the one developed by Dr. Clinton Shock in 1998:
where R is resistance in kOhms and T is temp centigrade. This calibration covers the range of 10 to 100 kPa. Typically linear extrapolations are used below 10 and above 100 kPa. Note that a fully wet sensor measures 550 Ohms.
The measured resistance in the sensor is affected by temperature. A default temperature of 24 C can be used in the absence of temperature data, but a temperature sensor input can be used for increased accuracy.
The calibration used in IRROMETER devices is based on this equation, and a table can be downloaded at the end of this document for reference. The sample program provided for the example below also contains an example calibration method.
This example is Arduino MEGA based and capable of reading up to eight resistive sensors, in this case two WATERMARK sensors, one temperature sensor, and one 10K reference resistor. The reference resistor is used to measure any offset in the reading circuit, which can then be removed in the device code for optimal accuracy. This example employs the recommended pseudo-AC reading method.
The MEGA has sufficient analog and digital IO, but does not include the multiplexer capability required. Breakout MUX boards are available for an off the shelf solution.
Ten PWM pins will be used to supply excitation to the sensors and to control the multiplexers. Two analog pins will be used for sensor measurements. Four 74HC4051 multiplexers are used to provide adequate isolation of both power and ground, a pair for each direction in which the current will be applied. The sensors will be read through one set of multiplexers in one direction, then through the other set in the opposite. The even number of iterations ensures that the sensor is left in an un-polarized state after reading. The readings will be averaged and then be converted to soil water tension using the measured soil temperature via our calibration equation.
For the sake of illustration and flexibility in the design, all of the sensors are read with the same isolation, though in practice the temperature sensor would not require the same isolation as it is an encapsulated thermistor with no soil Contact Tech Support: .
Figure 3. Same basic scheme as figure 2, but duplicated to allow for reversing the current flow path.
1. PWM 6 set LOW to enable MUX 0 and 1
2. PWM 11 is set HIGH to disable MUX 2 and 3
3. PWM 2,3, and 4 are set LOW, HIGH, and LOW to set the MUX path to WM1 sensor
4. PWM 5 is set HIGH for sensor excitation
5. A0 and A1 are read to measure resistance
6. PWM 5 is set LOW to end the reading
1. PWM 11 set LOW to enable MUX 2 and 3
2. PWM 6 is set HIGH to disable MUX 0 and 1
3. PWM 7,8, and 9 are set LOW, HIGH, and LOW to set the MUX path to WM1 sensor
4. PWM 10 is set HIGH for sensor excitation
5. A2 and A3 are read to measure resistance
6. PWM 10 is set LOW to end the reading
The same steps are repeated for each sensor, with the states of PWM 2,3,4 and 7,8,9 set as appropriate via the MUX truth tables to select the sensor to be measured.
The resistance can be calculated for each channel by reading the two analog pins, averaging the two readings, and solving for the unknown resistance using the known resistance (7.87K):