A capacitive soil moisture sensor is the cheap probe you actually want in the ground. For a dollar or two it reads how wet the root zone is, and unlike the near-identical resistive sensors it has no exposed metal, so it does not corrode and it lasts for years. It puts out a simple analog voltage that any microcontroller can read.
What it is.
The probe measures the soil’s capacitance, which rises with water content, through a sealed surface with no bare electrodes. That sealed design is the whole point: the cheaper resistive probes pass current between two metal prongs and corrode away in weeks, while a capacitive probe lasts for years. It is not a precise, calibrated instrument, but as a low-cost way to see the trend, drying out, just watered, holding steady, and to trigger irrigation, it is exactly right.
Key facts.
Wiring and calibration.
Three pins: VCC, GND, and AOUT (the analog output) to an analog-capable GPIO on your board. An ESP32 reads it on one of its ADC pins. In ESPHome it is read with the ADC sensor component, mapped to a percentage with a calibration filter. Calibrate once: note the reading in dry air and the reading in a glass of water, then map between them. For an actual water-content number you would calibrate against your own soil, but for triggering irrigation the air-to-water range is enough.
Where it fits, and where it doesn’t.
Where it fits
- Cheap, lasting root-zone readings in pots and beds.
- Triggering irrigation from a reading, not a timer.
- Several probes across a zone for the trend.
- Reading with an ESP32 and ESPHome.
Where it doesn’t
- An exact water-content percentage without calibration.
- Research accuracy; that is a pro probe.
- Irrigation by tension; that is a tensiometer.
- Burying the electronics; only the sealed lower part goes in.
Resources & where to buy.
ESPHome: ADC sensor DFRobot capacitive sensor Where to buy Soil moisture overview
Frequently asked questions.
What is a capacitive soil moisture sensor?
A cheap probe that reads how wet soil is by measuring capacitance through a sealed surface, with no exposed metal. Because nothing corrodes, it lasts for years, unlike the resistive sensors it resembles. It outputs an analog voltage that a microcontroller reads.
Why is capacitive better than a resistive soil sensor?
Resistive probes pass current between two bare metal prongs, which corrode and drift within days to weeks. A capacitive probe reads through a sealed surface with no exposed metal, so it does not corrode and lasts for years. It costs only a little more and is the one to buy.
How do I calibrate a capacitive soil sensor?
Read it in dry air and again in a glass of water to set the dry and wet ends, then map readings between them to a percentage. For a true water-content number, calibrate against your own soil, but the air-to-water range is enough to trigger irrigation.
How do I read a capacitive soil sensor with an ESP32?
Connect its analog output to an ADC pin and read the voltage. In ESPHome, use the ADC sensor component with a calibration filter to turn the voltage into a moisture percentage. Any microcontroller with an analog input can read it.