3 ms·
The ESP32 usually uses a 1.1V reference, however (unlike the ESP8266), it has a variable attenuation setting that allows you to measure voltages higher than Vre
by gh02t 3y ago
The ESP32 usually uses a 1.1V reference, however (unlike the ESP8266), it has a variable attenuation setting that allows you to measure voltages higher than Vref.
https://docs.espressif.com/projects/esp-idf/en/v4.4/esp32/api-reference/peripherals/adc.html https://docs.espressif.com/projects/esp-idf/en/v4.4/esp32/ap...
The Micropython code the post has at the bottom initializes the ADC to the default, which I think 0 DB attenuation setting, which gives you a range of roughly 0.1-0.95 V. It'll be fine physically if you hook it up to 3.3 V, but the readings will saturate unless you use the higher attenuation setting. There's not much advantage to enabling the attenuator for this test regardless, it just adds more noise.