How can I make a low cost soil moisture sensor with steady readings?

Thread Starter

NerdyCrafter

Joined Aug 6, 2025
5
I'm trying to find the best way to design a low cost capacitive soil moisture sensor. I need to find a design that won't need to be fully tested and re-calibrated for every single different soil type. Perhaps the best way to achieve this would be taking the averages of several readings of the most common soil types, and making it as resistant to outside variables as possible(salinity, soil volume, soil types, etc.)
The end project will have a ESP32 connected to it.

The majority of cheap capacitive soil moisture sensor out there use a TLC555. It works but due to low frequency it is more effected by salinity in the soil, causing it to need very specific calibration from what I've found.
Screenshot 2025-08-08 111859.png

Another option I've seen is using the MCU to generate a higher frequency and PWM. Like the chirp sensor: https://github.com/Miceuz/i2c-moisture-sensor/blob/master/README.md Or: https://github.com/ChococookieOS/pwm-moisture-sensor

I do wonder how the high frequencies would effect the other components on a compact board design. And how much they drift over time.

Any help or advice is greatly appreciated! :)
 

Alec_t

Joined Sep 17, 2013
15,112
Your circuit doesn't look like a capacitive sensor type. Rather, the C3 voltage will depend on the soil probe resistance, which can vary wildly depending on the mineral content of the soil as well as moisture content. If you are going to use an ESP32 you could have user-selectable settings to allow for different soil types.
The presence of D1 means that the probe is energised with pulsed DC, which in the long term could cause problems due to electro-plating of probe material.
 

boostbuck

Joined Oct 5, 2017
1,037
We've looked at that circuit for you here.

After a quick look round, it seems all the 'capacitive' sensors out there are derivations of your circuit above and not a lot of success reported either. There's some pretty silly variations described too (the circuit you show above, with the probe in the wrong place, or someone trying to run the probe at 80Mhz, for examples).

Since you are feeding an MCU, the simplest design might be to use your capacitive probe as the frequency capacitor of the 555 and measure the output frequency change. My experiments with capacitive moisture detection (a water tank depth meter) had capacitance changes ranging to 400pf, so should be achievable, although that was in water so I suspect you will need a long probe for soil.

Most (all?) soil moisture meters are resistive, for good reasons, simplicity being one. The main criticism of resistive measurement is corrosion of the probes, and that is simply avoided by using stainless steel probes. Alternatively, a square wave probe feed can minimise the corrosion issues with resistive probes, as long as probe reversal is correctly implemented.
 
Top