ESP32 D1 Mini and 2pcs. ADC?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Oetsch
Normal user
Posts: 195
Joined: 13 Jul 2020, 12:10

ESP32 D1 Mini and 2pcs. ADC?

#1 Post by Oetsch » 27 Dec 2022, 18:50

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!

User avatar
Ath
Normal user
Posts: 3494
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESP32 D1 Mini and 2pcs. ADC?

#2 Post by Ath » 27 Dec 2022, 20:24

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 2350 times
So you should better not use GPIO-26 :o
/Ton (PayPal.me)

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

Re: ESP32 D1 Mini and 2pcs. ADC?

#3 Post by TD-er » 27 Dec 2022, 21:58

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

Oetsch
Normal user
Posts: 195
Joined: 13 Jul 2020, 12:10

Re: ESP32 D1 Mini and 2pcs. ADC?

#4 Post by Oetsch » 27 Dec 2022, 22:00

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 72 guests