I am trying to use a moisture sensor to identify the moisture value of my plants. (As every one does.)

The sensor was connected to VCC all the time and my battery goes empty after a short time. So I decided to connect power only at the time I read from the sensor (on the arduino with digitalWrite(moisture_vcc, HIGH).

To problem is that the values were too high.

So I'm wondering if these kind of sensors need a "warm-up time"? And If so, how long is it?

Any experience with it?


1 Answer 1


Photograph of the YL-69 Sensor :

enter image description here

Most of this content was generated by : Conner Wolf

Basically, that sensor works by measuring the resistance between the two "pins" of the PCB stake. It does this by applying a voltage across the pins, and measuring the current flow. So, the intention is that more water means less resistance, means less voltage, and a fall in the voltage sent to the ADC of the processor.

However, this is also going to lead to the metal from one of the pins being eaten away by galvanic action (electrolysis).

The other pin is likely to have accumulation of materials rather than being eaten away.

This electrolysis and coating of the pins results in a change in surface area of the pins and causes resistance measured to change (for the same given moisture content).

If you want to squeeze as much life out of the thing as possible, there are a few things you can do.

  1. DO NOT leave the sensor powered. When you want to take a reading, power the sensor for maybe a few seconds, and take your readings. Then power it off again. Don't take readings too often.
  2. Periodically reverse the pins of the electrical connection between the readout board and the "stake" board. Since only one terminal will be eaten away at a time, this should spread the decay out a bit.
  3. Be aware that ANY mechanical disturbance of the "stake" board will probably cause a large shift in readout value. Your "jiggling the wires" causing a shift in values probably came from the mechanical force transmitted to the PCB through the wiring.

An improved version for this sort of thing use a AC bias on the sensor, which minimizes galvanic corrosion. AC bias reverses the voltage applied to the sensor, attempting to eliminate electrolysis on the sensor.

Higher Quality soil moisture sensors use capacitive sensor, and therefore make the sensor immune to the corrosion issue, but are much more complex and expensive.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.