Page 1 of 1

ESP32 D1 Mini and 2pcs. ADC?

Posted: 27 Dec 2022, 18:50
by Oetsch
Hi
sorry maybe stupid question but I´m using my first ESP32 D1 Mini Board and struggeling a lot....
So maybe you can confirm or just disagree that this is ok or what I´m trying

I just want to detect 2pcs. LED with 2pcs. LDR and connect this to 2 ADC of an ESP32. If LED is on or not I have to configure by Rule based on the given input voltage.

So I used a ESP32 D1 Mini from az-delivery looking like this:

Image

Connected the LDR (10kOhm - 26kOhm) to GPIO36 and GPIO26. Each of them has a 10kOhm resistor to GND as voltage devider.

I configured Analog Input dB11 (factory calibration). GPIO 36 seems to work fine but GPIO 26 is always minimum = 0V

Is there sth. special to configure to use this GPIO or do I have carefully to check my wiring?

Thank you very much!

Re: ESP32 D1 Mini and 2pcs. ADC?

Posted: 27 Dec 2022, 20:24
by Ath
This page on ESP32 Analog inputs has a specific warning about the ADC2 pins when using WiFi (that's always enabled in ESPEasy)
Screenshot - 27-12-2022 , 20_23_32.png
Screenshot - 27-12-2022 , 20_23_32.png (15.88 KiB) Viewed 2694 times
So you should better not use GPIO-26 :o

Re: ESP32 D1 Mini and 2pcs. ADC?

Posted: 27 Dec 2022, 21:58
by TD-er
See also https://espeasy.readthedocs.io/en/lates ... e-on-esp32
Here is also easy to spot which pin is connected to ADC1 and which one to ADC2

Re: ESP32 D1 Mini and 2pcs. ADC?

Posted: 27 Dec 2022, 22:00
by Oetsch
Big Thx.
Now I can understand as clear NoGo.
Information within ESPEasy Documention https://espeasy.readthedocs.io/en/lates ... /P002.html
was missunderstood by me because I don´t know exactly what is handeled by "esp_wifi_start() and esp_wifi_stop()"; but now it´s clear and simply ESP32 does not have 20 Pins to be used as Analog Inputs -> in practical usage this is limited to 10 (ADC1) because of Wifi Usage.