Use a capacitive soil sensor, or power a resistive probe only during a reading.
What the message means
A resistive probe passes current through the soil, which eats the metal. Readings then drift week by week.
Fix it in this order
- Replace the resistive probe with a capacitive one if you can.
- If you keep it, power the probe from a pin and switch it on only to read.
- Calibrate with dry air and a glass of water to get the two end values.
- Seal the electronics, and keep the connector above the soil.
- Average readings and read a few times a day, not constantly.
- Check the sensor output range against your ADC.
Why it happens
A resistive soil probe passes current through the soil. That current corrodes the metal over time, so the readings drift and the probe fails within weeks or months. A capacitive probe has no exposed metal in contact with the soil and lasts much longer.
Use a capacitive sensor, seal the electronics, and if you keep a resistive one, power it only while taking a reading, for example from a GPIO pin or a transistor.
If you see this, do this
| You see | Do this |
|---|---|
| Reading changes over weeks | Corrosion. |
| Reads the same wet and dry | Wrong calibration or broken probe. |
Related
ADC noise, analog sensor basics.
Last reviewed: November 2026. These are the usual causes and the order that finds them fastest. Test on your own board; clones and cables differ.
Why this happens
A resistive probe has two exposed metal prongs. A small direct current flows between them through the wet soil, and that current drives electrolysis that slowly eats the metal. Salts from fertiliser speed it up. As the metal changes, the contact resistance changes, so the same moisture gives a different reading as weeks pass.
A capacitive probe measures how the soil changes the capacitance between traces covered by a coating. Water has a much higher dielectric constant than dry soil or air, so wetter soil gives a different reading. There is no current through the soil, so there is little corrosion. The coating still needs sealing at the edges, because water entering the board damages it.
How to confirm the cause
- Look at a resistive probe. Green or black deposits and thinned prongs show corrosion.
- Take the reading with the probe in dry air and again in a glass of water up to the marked line. Write both numbers down. Repeat a week later with the same probe in the same water; a changing number means drift.
- Measure the sensor output with a multimeter and compare with the value your ADC reports.
- Check the supply voltage at the sensor. A changing supply changes the output on many modules.
- Keep the probe in one place and log readings over a day. Slow steady movement is drying soil; jumps point to wiring.
Worked example
Convert a reading to a relative percentage using two calibration values. The numbers are an example; use your own.
dry (air) = 520
wet (water) = 260
raw = 390
percent = (dry - raw) * 100 / (dry - wet)
= (520 - 390) * 100 / 260 = 50 %
int pct = map(raw, 520, 260, 0, 100);
pct = constrain(pct, 0, 100);Common mistakes
- Calibrating with water only and no dry value.
- Pushing the probe in past the marked line, so the electronics get wet.
- Leaving a resistive probe powered all the time.
- Treating the percentage as a real soil water content. It is a relative number for that probe and that soil.
- Assuming every capacitive module reads lower when wetter. Many do, but check yours.
If this did not fix it
- Noise on the ADC. Average readings and check the reference.
- On an ESP32, using an ADC2 pin while Wi-Fi is running. Move the sensor to an ADC1 pin.
- Air gaps around the probe or compacted soil, which change readings between insertions.