Capacitive Soil Moisture Sensor V1.2

Moderator: leecollings

Post Reply
supermarcie
Posts: 3
Joined: Thursday 07 May 2020 22:26
Target OS: Linux
Domoticz version:
Contact:

Capacitive Soil Moisture Sensor V1.2

Post 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?
supermarcie
Posts: 3
Joined: Thursday 07 May 2020 22:26
Target OS: Linux
Domoticz version:
Contact:

Re: Capacitive Soil Moisture Sensor V1.2

Post by supermarcie »

hi

nobody that uses the Capacitive Soil Moisture sensors within domoticz?
Toulon7559
Posts: 858
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Re: Capacitive Soil Moisture Sensor V1.2

Post by Toulon7559 »

Hum_probe_capacitive
Hum_probe_capacitive
humgrondprobe_cap [320x200].png (106.81 KiB) Viewed 2955 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 ......
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest