Capacitive Soil Sensor v2.0 Issues

Hi there, I’m trying to set up a capacitive soil sensor (this one) with a D1 Mini Pro.

Problem is that I can’t get the sensor in ESPHome to pull the right result. Here is my current sensor code:

- platform: adc
     pin: A0
     unit_of_measurement: "v"
     update_interval: 10s
     name: "Garden 1 Soil Moisture Level"

and the results I’m getting look like this:

[D][adc:056]: 'Garden 1 Soil Moisture Level': Got voltage=0.70Ve
[D][sensor:092]: 'Garden 1 Soil Moisture Level': Sending state 0.84340 v with 2 decimals of accuracye

The problem is that the state shouldn’t be what’s measured, as it’s the voltage that changes (0.7V is dry, 0.26V is submersed in water), but any filters I input are looking at the state.

See: Soil Moisture sensor output as a Percentage - #3 by Holdestmade

And the following posts. Your numbers are different but the idea is the same.

Yes, I’ve followed them, and the problem is that it still reads the state instead of the voltage.

Maybe you can show the full yaml file. I’m not sure what your problem is.

I have been running these capacitive sensor for more than a year continuously connected to wemos d1.
/Mattias

1 Like

Yeah without this we can’t help much.