Hardware · Soil sensor

The resistive soil sensor.

What it is
The cheap two-prong soil moisture sensor
The catch
Its bare electrodes corrode within weeks
Buy instead
A capacitive sensor, for years of service

The resistive soil moisture sensor is the cheap two-prong board you see in every starter kit, and it is the one to walk past. It works by measuring how well the soil conducts electricity between two metal prongs, which is a fair proxy for moisture, but those bare prongs sit in wet soil carrying current, and they corrode. Within weeks the readings drift, and within a season the sensor is dead. The honest advice is simple: understand it, then buy a capacitive one instead.

A resistive soil moisture sensor
Image: dfrobot.com

What it is.

Two metal electrodes, often a forked board, that you push into the soil. The sensor passes a small current between them and measures the resistance: wet soil conducts better and reads lower, dry soil conducts worse and reads higher. A little comparator board turns that into an analog voltage any microcontroller can read. It is genuinely cheap, often a dollar or two, which is the whole reason it is everywhere.

Why it corrodes.

Here is the flaw that sinks it. The bare metal electrodes are in direct contact with moist, often salty soil, and they carry current, which drives electrolysis: the metal oxidizes and wears away. You can watch it happen, the prongs discolor and pit within weeks. As they degrade, the resistance they measure changes for reasons that have nothing to do with moisture, so the readings drift and then become meaningless. It is not a quality problem you can buy your way out of; it is how the design works.

Why capacitive won.

A capacitive sensor solves the corrosion problem by never exposing metal to the soil. Its probe is coated, and it measures capacitance (which changes with the soil’s water content) rather than passing current through the dirt. No exposed electrodes means no electrolysis, so a capacitive sensor lasts for years where a resistive one lasts weeks. They cost only a little more, and for any deployment you actually rely on, that is the one to buy. This page exists mostly so you recognize the cheap one and skip it.

Slowing the corrosion.

If you already have a resistive sensor and want to squeeze some use from it, two tricks help. Only power it while you read: switch it on for the moment of measurement and off the rest of the time, so current flows for seconds a day instead of constantly, which slows the electrolysis a lot. And electrodes plated with gold or made of graphite resist corrosion better than bare tin. Neither makes it a long-term sensor, but both stretch a bench experiment from days into a few weeks.

Key facts.

Where it fits, and where it doesn’t.

Where it fits

  • Learning how a soil sensor reads, on a bench.
  • A throwaway short-term test of a few days.
  • Understanding what to avoid before you buy.
  • A spare part you already own, powered only on read.

Where it doesn’t

  • Any real deployment; use a capacitive sensor.
  • Long-term outdoor monitoring; it corrodes away.
  • Accurate or repeatable readings; it drifts.
  • An irrigation decision you trust; it will mislead you.

Resources & where to buy.

Capacitive sensor (buy this) DFRobot resistive sensor Soil moisture overview Trust Your Gauge

Frequently asked questions.

Why do resistive soil moisture sensors corrode?

Because their bare metal electrodes sit in moist, often salty soil and carry current, which drives electrolysis: the metal oxidizes and wears away. You can see the prongs pit and discolor within weeks. As they degrade, the resistance they measure changes for reasons unrelated to moisture, so the readings drift and become meaningless. It is how the design works, not a defect you can buy around.

Should I use a resistive or capacitive soil sensor?

Capacitive, for anything real. A capacitive sensor has a coated probe with no exposed metal, so it does not corrode and lasts for years, while a resistive one lasts weeks. Capacitive costs only a little more. Use a resistive sensor only to learn on a bench or for a throwaway test of a few days.

Can I make a resistive soil sensor last longer?

A little. Power it only while you take a reading, so current flows for seconds a day instead of constantly, which slows the electrolysis. Gold-plated or graphite electrodes also resist corrosion better than bare tin. Neither makes it a long-term sensor, but both can stretch a bench experiment from days into a few weeks.

What does a resistive soil sensor actually measure?

The electrical resistance of the soil between two electrodes, which falls as the soil gets wetter and rises as it dries. That is a rough proxy for moisture, but it is also affected by the soil’s salts and by the electrodes’ condition, so it is qualitative at best and drifts as the sensor corrodes. A capacitive sensor gives a far more stable reading.