Electronic – Soil moisture measurement

humiditymeasurement

Background

To kick-start my longstanding ambition of getting back into electronics, I decided to try and make a device that measures the soil moisture of potted plants to determine whether they need to be watered. The aim for the first incarnation is to have a led that shows the plant's current water level (add water is red!), but of course I have wild plans for self-watering plants down the road.

My first stab was based on the Garduino instructable, specifically this circuit here:

enter image description here

It is a simple voltage divider using a known resistor and two copper wire electrodes stuck in the soil as measuring device. The voltage measured at A0 using the ADC on my Teensy++ is proportional to the ratio of the resistances, and I can work back to the actual soil resistance.

However, in practice the soil resistance turned out to be subject to a very large drift. Almost immediately after turning on the device, the measured soil resistance started dropping. (This also happens if you stick a multimeter in the plant.) After a few days of measurement, I could find no usable connection between the measurements and the moisture level. Removing the probe and inspecting it revealed considerable tarnish on the anode. To me, this indicates that some sort of chemical reaction is taking place (electrolysis?). A multimeter measures a voltage differential of a few tens of millivolts: I have turned my plant into a battery!

Oxidized anode

To avoid this problem I moved to a probe constructed out of stainless steel screws. As they are considerably less reactive than copper, the oxidation should be less of a problem. Also, to avoid "charging" the soil, i have put the voltage divider between two digital output pins of the Teensy. The measurement happens as follows:

  • Both pins are kept low when no measurement is taking place.
  • I drive one pin high. I wait one millisecond and I measure the voltage at the center of the divider.
  • I invert the pin voltages (high<->low), wait one millisecond and measure again. I should now measure the complement of the first measurement.
  • Both pins are brought low again and the device sleeps until the next measurement.

This does reduce the oxidation problem, but the measured soil resistance still seems to start dropping as soon as I start measuring.

Question

  1. Can anyone recommend a robust method to measure soil moisture?
  2. Can anyone explain what is really going on here?

Best Answer

Brainstorming:

I've been reading about capacitive sensing recently. Capacitive-touch sensors have the great advantage that they can be completely hermetically sealed behind a thin layer of plastic, so there is no exposed metal to corrode. ("Electronics and Robotics: Sensing touch through a thick surface?")

Because you can't get DC current to flow through the plastic, such sensors must use AC, as Leon Heller suggested.

Alas, most of the discussion I've seen has been about how to respond only to intelligent finger-presses; what little discussion there is about water an moisture is about how to reduce the sensitivity of capacitive sensors to water splashes. ("Sparkfun forums: Capacitive sensors and waterproofing"). So clearly they are sensitive to water, so perhaps you could use this "flaw" and turn it into a feature.