Page 1 of 1

Capacitive Soil Moisture Sensor V1.2

Posted: Friday 08 May 2020 8:43
by supermarcie
Hi,

I connected a Capacitive Soil Moisture sensor v1.2 to a ESP8266 with ESP Easy (mega-20191003).
I used the A0 pin.

As output I get values between 4 and 8

But it looks like the input of Domoticz needs other values?
What kind of values do I need to send to domoticz?

I already tried a virtual device "Leaf Wetness" and also "Soil Moisture"
But both don't like to work.

Can someone help me with this config?

Re: Capacitive Soil Moisture Sensor V1.2

Posted: Tuesday 12 May 2020 12:53
by supermarcie
hi

nobody that uses the Capacitive Soil Moisture sensors within domoticz?

Re: Capacitive Soil Moisture Sensor V1.2

Posted: Tuesday 12 May 2020 14:19
by Toulon7559
Hum_probe_capacitive
Hum_probe_capacitive
humgrondprobe_cap [320x200].png (106.81 KiB) Viewed 2957 times
Is your sensor package like this?
Then at the analogue output of the PCB you may expect any voltage between 0 and VCC, dependent on the capacity sensed by the pen.

Next is that you have to realise a kind of calibration, very coarse with following layout:
- pen bone dry = value A
- pen immersed in water (below markerline!) => value B
Then you have to scale the readings:
ESPEasy v2.x has a built-in 2-Point calibration function for the analogue input, which you could apply to translate the found values A and B to related output-signals to Domoticz. Left boxes to be filled with A and B, right boxes with 0 respectively 100 (for scaling 0 to 100 towards Domoticz), and then set Enabled.
ESPEasy (all versions) also has other facilities for 'tuning/calibration' by means of Rules:
see this thread in this forum

At the receiving end in Domoticz best (in my experience) is to make as Virtual Device a Custom Sensor:
then you are free to select for display the scale-unit etc..
If you do not use the calibration function of ESPEasy, then you have to implement such function at the Domoticz-side.

Be aware that the readings by means of this type of sensor are far from stable:
approaching or touching the pen with your finger may already cause a variation.
Reproduction of the scaling is a problem, and whether the resulting scale is linear is another debatable aspect!!!!
Therefore the application of a Custom Sensor is also handy:
do not scale in %, but as 'Units', because ;) that is always valid.

many ways to get there.
Another, similar implementation under this link: https://www.instructables.com/id/ESP826 ... -Domoticz/
If you want to use 'Leafwetness' or 'Moisture' as Virtual Device in Domoticz, you must calibrate the output from ESPEasy in such way that the output range suits the characteristics for that type of device.
Whether it makes sense, is another story ......