# Soil moisture sensor readings drift and the probe corrodes: use a capacitive type

> Fix soil sensing: resistive probes corrode when powered all the time, so switch to a capacitive sensor or power the probe only while reading.

Canonical: https://roboticsengineering.in/fix/soil-moisture-sensor-corrodes-readings-drift-capacitive/ | Published: 2026-11-03 | Updated: 2026-11-03

**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

1. Replace the resistive probe with a capacitive one if you can.
2. If you keep it, power the probe from a pin and switch it on only to read.
3. Calibrate with dry air and a glass of water to get the two end values.
4. Seal the electronics, and keep the connector above the soil.
5. Average readings and read a few times a day, not constantly.
6. 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](https://roboticsengineering.in/fix/esp32-adc-readings-noisy-or-nonlinear/), [analog sensor basics](https://roboticsengineering.in/fix/ldr-analog-readings-voltage-divider/).

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.
