Skip to main content

ESP32 ADC Speed

I couldn’t find any usable info about the sampling speed of Espressif’s ESP32 onboard ADC.

The benchmark was performed on the following Hardware:

Platform: Espressif 32 -> NodeMCU-32S
System: ESP32 240MHz 320KB RAM (4MB Flash)

The firmware for the benchmark was build using PlatformIO with the Arduino framework. To get a fast access to the hardware, the Espressif IoT Development Framework was used for all ADC specific function calls.

The results are showing that the ADC is capable of doing 27.2 ksps (27173 samples per second). This does not change when reducing the resolution to 10 or even 9 bits.

Resolution (bit) Speed (ksps)
ADC_WIDTH_BIT_9 27.1739
ADC_WIDTH_BIT_10 27.1739
ADC_WIDTH_BIT_11 27.1739
ADC_WIDTH_BIT_12 27.1739

For me this results were unexpected, since a lower resolution should decrease the sample time.


In the Espressif datasheet (topic 4.1.2), the ADC characteristics shows the following maximum sampling rates.

Description Sampling rate (max)
RTC controller 200 ksps
DIG controller 2 Msps

First question: what is a DIG controller and why has the RTC/DIG controller impact on the sampling speed? Assuming the numbers in the datasheet are valid, the measured speed differ massively from this rates. The implementation of adc1_get_raw is quite complex and does a lot of hardware initialization/locking around adc_convert().

So, the hardware might be capable to provide the claimed speeds but definitely not when using Espressif’s IDF as described in their documentation.

4 thoughts to “ESP32 ADC Speed”

  1. quite low speed. I.E with stm32f0 you can reach 1Msps with 12bit and even higher with 10/8/6 bit options.

  2. Hi,
    I am trying to use your awesome library about the MCP3208.
    Everything is fine if I set the SPI around 1,6MHz. But, if I set the SPI at 25MHz (on an ESP32) I can’t read the raw values properly. I think that I need to use adc.calibrate() before, but I can’t use this function, it doesn’t work.

    Can you help me?
    Many thanks!

  3. Dear all,

    With regards to the dig controller adc, i dont know how it works, but on this site there is some interesting looking source code for achieving Msps:
    At the bottom you can download a file.
    Let me know if you succeed in making it work.

Leave a Reply

Your email address will not be published. Required fields are marked *