capacitive soil moisture sensor v1.2 again
Moderators: grovkillen, Stuntteam, TD-er
capacitive soil moisture sensor v1.2 again
I tried to get this device working on an esp8266 and an esp32 (preferable) but did not had any sucees in it. I use the ESPEasy_binaries27042022 and connected the soil moister sensor to the 5v, Gnd and an Analog port (in my case on the esp32 pen nr 25 (ADC2-ch8). Also put the sensor in some soil. No messurement are visible. I did not activate the oversampling or the calibration. I tries to put an formula in it ((%value%-350)/(800-350)*100) as mentioned in an old post but also no result. Any suggestions to give this project a push?
Re: capacitive soil moisture sensor v1.2 again
First, see: https://espeasy.readthedocs.io/en/lates ... ty-and-adc
Do not use an analog input connected to ADC2 when you also use WiFi.
Second, what resistors do you use to get the measured voltage between 0 and 3V3?
See: https://randomnerdtutorials.com/esp32-a ... duino-ide/
Do not use an analog input connected to ADC2 when you also use WiFi.
Second, what resistors do you use to get the measured voltage between 0 and 3V3?
See: https://randomnerdtutorials.com/esp32-a ... duino-ide/
Re: capacitive soil moisture sensor v1.2 again
I switched to the esp8266 because it is more convinient for me to test the sensor. I use A0 port and connected a 10k potmeter to 3.3vplus, to the GND and in the middle to A0. Als paralel to the potmeter I connected the Sensor. Turning the Potmeter I see a change in messurments but putting the sensor in the wet soil, no difference is messured. Any idea?
Re: capacitive soil moisture sensor v1.2 again
I assume it is similar to this one:

Are you sure about the connected pins?
Can you measure a voltage over the analog output pin on the sensor when keeping it dry and putting it in wet soil (or a wet paper towel wrapped around the sensor)

Are you sure about the connected pins?
Can you measure a voltage over the analog output pin on the sensor when keeping it dry and putting it in wet soil (or a wet paper towel wrapped around the sensor)
Re: capacitive soil moisture sensor v1.2 again
it is like tris one
Re: capacitive soil moisture sensor v1.2 again
@Dick60,
In your message of 17:02, I read
It should be:
either potmeter,
or sensor, like in your latest message.
In your message of 17:02, I read
Don't parallel connect, because then you only see the potmeter which probably is 'more powerful' than the sensor-output!Als paralel to the potmeter I connected the Sensor. Turning the Potmeter I see a change in messurments but putting the sensor in the wet soil, no difference is messured.
It should be:
either potmeter,
or sensor, like in your latest message.
Re: capacitive soil moisture sensor v1.2 again
I tested like my last picture, with ONLY the Sensor. In that case I see no difference between the messurements in the wet soil and the dry soil. It is a nem sensor and tested also a second sensor withthe sam result. I think it isnt working with the ESPeasy firmware.
Re: capacitive soil moisture sensor v1.2 again
Your first statement proves that your second statement is incorrect.
I'd have a good look at that sensor again, and use a multi-meter to see if the output voltage actually changes between wet and dry measurement.
/Ton
Re: capacitive soil moisture sensor v1.2 again
I did some mesurements on the sensor and the spare sensor. I used my multimeter and connected the senser to 5v and mut my multimeter on the data line of the sensor and the plus (later the gnd) but there is no difference between wet soil and dry soil. No voltage change discovered during these mesurements.
Re: capacitive soil moisture sensor v1.2 again
What voltage do you measure (between out and GND) ?
Maybe it improves when you add a small resistor over the output and GND?
Not sure how the internal circuit does work, but typically they charge a capacitor. But if it doesn't get discharged it will slowly increase to the charge voltage (e.g. 5V) without any significant change in voltage due to soil humidity changes.
Maybe it improves when you add a small resistor over the output and GND?
Not sure how the internal circuit does work, but typically they charge a capacitor. But if it doesn't get discharged it will slowly increase to the charge voltage (e.g. 5V) without any significant change in voltage due to soil humidity changes.
Re: capacitive soil moisture sensor v1.2 again
unfortunately no better news, also with a small resister, no change between the two messurments. I will try an external power source instead of the 5v of my ESP8266.
Re: capacitive soil moisture sensor v1.2 again
I got this to work, hardware is straightforward.
But I am struggling with the formula....
My upper value (dry) is 419.
Lower value (immersed in water) is 53.
Meaured value is somewhere in between.
I have been breaking my head on how to map the measured value into a moisture percentage..... any ideas?
But I am struggling with the formula....
My upper value (dry) is 419.
Lower value (immersed in water) is 53.
Meaured value is somewhere in between.
I have been breaking my head on how to map the measured value into a moisture percentage..... any ideas?
Re: capacitive soil moisture sensor v1.2 again
I think I found the formulamanjh wrote: ↑04 Jul 2022, 18:39 I got this to work, hardware is straightforward.
But I am struggling with the formula....
My upper value (dry) is 419.
Lower value (immersed in water) is 53.
Meaured value is somewhere in between.
I have been breaking my head on how to map the measured value into a moisture percentage..... any ideas?

(419-%value%)/(419-53)*100
Where 419 is the upper value (dry) and 53 the lower (immersed).
Re: capacitive soil moisture sensor v1.2 again
I don't think it is a linear relation between voltage and what you're measuring.
The formula suggested in the post before yours can be entered in the formula field at the bottom of the task.
The formula suggested in the post before yours can be entered in the formula field at the bottom of the task.
Who is online
Users browsing this forum: No registered users and 0 guests