ESP32 and multiple Capacitive Soil Moisture Sensors

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
ciscomike
Normal user
Posts: 28
Joined: 20 Jan 2021, 10:07

ESP32 and multiple Capacitive Soil Moisture Sensors

#1 Post by ciscomike » 29 Apr 2021, 21:38

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

TD-er
Core team member
Posts: 9265
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP32 and multiple Capacitive Soil Moisture Sensors

#2 Post by TD-er » 30 Apr 2021, 00:04

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.

ciscomike
Normal user
Posts: 28
Joined: 20 Jan 2021, 10:07

Re: ESP32 and multiple Capacitive Soil Moisture Sensors

#3 Post by ciscomike » 30 Apr 2021, 10:37

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?

TD-er
Core team member
Posts: 9265
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP32 and multiple Capacitive Soil Moisture Sensors

#4 Post by TD-er » 30 Apr 2021, 12:38

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/

easy-mrmomba
Normal user
Posts: 13
Joined: 24 Mar 2021, 16:53
Location: germany

Re: ESP32 and multiple Capacitive Soil Moisture Sensors

#5 Post by easy-mrmomba » 17 Jun 2021, 17:39

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

Haldi_2
Normal user
Posts: 53
Joined: 24 Aug 2020, 18:10

Re: ESP32 and multiple Capacitive Soil Moisture Sensors

#6 Post by Haldi_2 » 31 Jul 2021, 14:23

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!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest