Page 1 of 1

ESP32 ADC precision

Posted: Wed Dec 14, 2016 8:46 pm
by nassimk
Hi,

I'm testing the ESP32's ADC functionality on the SparkFun ESP32 Thing.
Here is my test code :

Code: Select all

ESP_ERROR_CHECK(adc1_config_width(ADC_WIDTH_12Bit));
ESP_ERROR_CHECK(adc1_config_channel_atten(ADC1_CHANNEL_7, ADC_ATTEN_0db));

while (true) {
	vTaskDelay(300 / portTICK_PERIOD_MS);
        printf("ADC value : %d\n", adc1_get_voltage(ADC1_CHANNEL_7));
}
What is the best precision i can normally reach ? Currently, my zero value is around 90mV...
The measure seems also very noisy, it constantly oscillates on the 4 first bits.

Thank you in advance for your help.

Re: ESP32 ADC precision

Posted: Sun Dec 18, 2016 4:13 pm
by johnlee
the ADC is 12-bit. but it could be affected by:
1. ground bounce due to power amplifier,
2. missing decoupling capacitors, and
3. insufficient settling time.