Page 1 of 1

ESP32 and multiple Capacitive Soil Moisture Sensors

Posted: 29 Apr 2021, 21:38
by ciscomike
Hi everyone,

I am using an ESP Wroom 32 dev board, flashed with the latest ESPEasy release.
I am trying to add 5-6 Capacitive Soil Moisture Sensors on different analog pins of this board but I'm getting results from only one pin (36).
What I am doing wrong?

Thank you in advance,

Mike

Re: ESP32 and multiple Capacitive Soil Moisture Sensors

Posted: 30 Apr 2021, 00:04
by TD-er
For the ESP32 you really have to make sure which ADC the pin is connected to.
A number of pins is connected to ADC1 and others to ADC2.
See also the documentation: https://espeasy.readthedocs.io/en/lates ... ty-and-adc

Pins connected to ADC2 will not work when you also use WiFi, since that ADC is also used by the WiFi circuit, which has higher priority.

Re: ESP32 and multiple Capacitive Soil Moisture Sensors

Posted: 30 Apr 2021, 10:37
by ciscomike
Thank you for your reply,
Even using the ch1 pins doesn't give me any measurements, only if I use ch1 pin 36.
I know that using ch2 pins might be unstable due to wifi bus.
Any ideas why rest of ch1 analog pins wont work with any analog input?

Re: ESP32 and multiple Capacitive Soil Moisture Sensors

Posted: 30 Apr 2021, 12:38
by TD-er
What voltage do you apply to the pins?
And just to be sure.. this voltage is relative to the GND of the ESP, right?
You don't have 'calibration' enabled I assume, so you should get values between 0...4095

See also: https://randomnerdtutorials.com/esp32-a ... duino-ide/

Re: ESP32 and multiple Capacitive Soil Moisture Sensors

Posted: 17 Jun 2021, 17:39
by easy-mrmomba
Hey,

please check with a Multimeter the Voltage on the Capa-Sensors.
Don't! Using the 5V Output pin
The Current is to weak / low.
Capacitive-Sensors are the same as an condensator. And the sensors have to "charge".
If you try this with the output-pin, you may have not enough Power to load them and your measurments are .... wrong.

=> Information:
If you try to communicate over a "long distanze" you may have to use a line-driver. because cables work as an condensator too - and the internal "driver" is to weak for a clear High-Low-Signal.

Next steps:
---
Measure supply Voltage - near the sensors
Measure the Voltage after the sensor / signal line
---
Drive the sensors directly without the output-pin from ESP

Re: ESP32 and multiple Capacitive Soil Moisture Sensors

Posted: 31 Jul 2021, 14:23
by Haldi_2
i'd really recoomend using an external ADS1115 ADC.
The internal one will give streched values when battery voltage drops to 3.5V and lower!