Analog inputs 4-7 when using WiFi

Im reading a lot of info lately and just need someone that is familiar with this hardware to set me straight…

-This board’s analog inputs 4 to 7 are useless as analog inputs when using WiFi/ IoT cloud as they are on adc_2 … correct? Real bummer if true but ill hopefully be able to use a breakout ADC chip for more analogs.

  • with so many analog channels on adc_1 (8 i believe) why didn”t Arduino use only adc_1?? Probably more to it than im aware but anyways…

Thanks

Hello @aubrey4485!

Correct, this is due to an ESP32-S3 limitation unfortunately.

There's certainly a tradeoff, but having dual independent ADCs allows other advanced functionalities, including simultaneous real-time sampling of two channels for differential measurements.

Of course you can (the quality of an external ADC will be better anyways!), but there's a secret - if you look at the Nano ESP32 pinout, the GPIOs associated with ADC1 (GPIO1 to GPIO10) are all exported on the Nano ESP32: they are A0 to A3 and then D2 to D7, in sequence. So even though they aren't explicitly labeled "analog", nobody stops you from using D2 to D7 as extra analog inputs (on ADC1!) :innocent: :wink:

Happy hacking! :hammer_and_wrench:

1 Like

The ESP32 ADC is a piece of ..
well its precise but not accurate or linear.
For any "proper" measurements I'd use an external ADC.

What signals do you WANT to measure?

@lburelli
Thank you for the candid response. You are absolutely right! They are right there .. I am new to this and sometimes the numbers and programming gets overwhelming in my head. Upon further investigation (im new to GitHub as well). Looks to me Arduino has thought of this and in the arduino-esp32/cores/esp32/esp32-hal-gpio.h , there is code as follows...

int8_t digitalPinToAnalogChannel(uint8_t pin); ... I'll just need to learn/try more and figure out how this all comes together.... before running to the forum for help. ThankS!

@johnerrington
You're response is very candid as well! LOL.... I agree whole heartedly. The esp32 ADC is a real bummer. Ive always conditioned signal input BUT with the esp32 I am really honing my skills as far as signal calibration and filtering/conditioning goes. Both hardware and software based.
In this project, I am measuring 6 temperature inputs, through 6 thermistor using voltage divider circuits. All thermistors are your standard 10Kohm, (@77F/25C), and all R2 divider resistors are around 10Kohm as well...
Thanks

Have you considered one of these?

I have not… the literature was a good read and it seems like a good chip.

The only thing is using it…have no idea how to use or integrate a raw chip like that, im not quite there in my electronics skills yet.

I usually buy ready made breakout chips and use the libraries associated with from adafruit/sparkfun and the like..

Thanks for the suggestions and help as usual. @lburelli , @johnerrington :pray:t3::+1:t3:

Given that the ESP32 nano offers enough inputs; and that thermistors arent very precise; and that with a 1:1 divider you are in the "sweet spot" of the ADC
I'd just give it a try.

Hey @johnerrington

You are absolutely right I am the sweet spot for this adc’s setup…

the little bit of conditioning/smoothing i put together in a hurry, looks like I am seeing jumping around +/- 0.15 to 0.25 degree F from the true temperature, taking a reading every 2seconds with the nanoESP32… :grimacing:

I will probably add in the temperature control function to check the temp only every 10-20seconds to smooth that out even more and call it a day… good enough for me and the application :+1:t3::face_exhaling::pray:t3: