ESP32 interference

Hello

I am using ESP32 to perform both analog and digital reads.
I perform analog read on ADC1 (8 channels, attached to GPIOs 32 - 39).
If I read from pin 39 and none of the other pins are used, the read is fine.
But if I use any of the other pins (for instance 34) to read a digital signal, as soon as this signal is HIGH, then the analog read on pin 39 is returning wrong values.

Is it forbidden to use ADC1 for both analog and digital reads? Are there any guidelines to work around this issue?
Thanks
Greg

Schematic pictures code?

Where are ADC1 and pin 39 in the following signal signatures of ESP32 (Fig-1: the one I own)?


Figure-1:

This would be pins 9 to 14.
The SAR to which ADC is attached is not shown, but the documentation provides following information:

The ESP32 integrates two 12-bit SAR (Successive Approximation Register) ADCs, supporting a total of 18 measurement channels (analog enabled pins).

The ADC driver API supports ADC1 (8 channels, attached to GPIOs 32 - 39), and ADC2 (10 channels, attached to GPIOs 0, 2, 4, 12 - 15 and 25 - 27).

See: Analog to Digital Converter - ESP32 - — ESP-IDF Programming Guide v4.2 documentation

I strongly believe that I should start programming/learning the ESP32 based on the signal signatures what have been shown in Fig-1 of post #3. For advanced learners, the approach could be different.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.