ESP32C6 ADC not working properly
Posted: Wed Apr 05, 2023 11:02 pm
Sorry in advance in case this post is repeated.
I'm trying to read voltages using the ESP ADC, but something weird happens.
I'm using the one shot example from ESP-IDF.
When the pin with the used channel is connected to 3.3V it returns a raw reading of 4081, giving me a V = 4081 * 3V3 / 4095 = 2.28 V which is pretty good. However, when I connect the pin to GND, the raw value is 2144, which gives me something like 1.7V.
I'm using the new C6, and I know its calibration is still not available, but shouldn't the method I'm using work? Considering it works for 3V3?
(The code is the one bellow, with an addition of a printf that prints the voltage using the formula above).
Code: https://github.com/espressif/esp-idf/bl ... ead_main.c
I'm trying to read voltages using the ESP ADC, but something weird happens.
I'm using the one shot example from ESP-IDF.
When the pin with the used channel is connected to 3.3V it returns a raw reading of 4081, giving me a V = 4081 * 3V3 / 4095 = 2.28 V which is pretty good. However, when I connect the pin to GND, the raw value is 2144, which gives me something like 1.7V.
I'm using the new C6, and I know its calibration is still not available, but shouldn't the method I'm using work? Considering it works for 3V3?
(The code is the one bellow, with an addition of a printf that prints the voltage using the formula above).
Code: https://github.com/espressif/esp-idf/bl ... ead_main.c