Reading variable resistor in a voltage divider crashes ESP32

Hi, I am trying to understand why a voltage divider circuit I built crashes the ESP32 used to read the analogue value. If I connect the circuit as shown in the image, the ESP crashes. However, if I connect additional resistors at the red marked positions between 3.3V and the variable resistors, it doesn't.
Why does this happen?

I'm sure I'm missing something very basic here, but couldn't figure it out from my knowledge on voltage dividers and research online.

Can your unseen code do a divide by zero?

I suspect the potentiometer you are using as a voltage divider is too small a resistance and therefore is drawing too much current from your power supply. This causes the power supply voltage to drop below what the esp32 requires.

I'm using a 47 kOhm potentiometer, so this shouldn't be the case right?

1 Like

Isn’t vref on an esp32 1.1V

https://docs.espressif.com/projects/esp-idf/en/v4.4.6/esp32/api-reference/peripherals/adc.html

that's a good point and the solution I believe. I falsely assumed the vref would be equal to the logic level. thank you very much! learned once more to always double check datasheets :slight_smile:

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