Chapter 4. Software framework
4.4 Peripherals
4.4.1 Analog-to-Digital Converter (ADC)
What is the resolution of ESP8266 ADC?
• The 10-bit ESP8266 ADC has a theoretical resolution of 2
10
= 1024.
• After connected to a router, the ESP8266 will enter Modem-sleep mode from STA mode, causing the change
of the reference value inside the chip. Therefore, the ADC could measure the data change.
• If you expect an accurate result, please read the ADC value using function system_adc_fast_read after
turning o Wi-Fi.
How to get the Bitmap information of the ADC register?
Since the ADC of ESP8266 is highly integrated with the internal RF circuit, the Bitmap and register
information is not opened. Please contact sales@espressif.com if you have any special needs.
How many channels does ESP32 ADC have? What is the sampling rate and signicant digit?
• The ESP32 ADC has 18 channels.
• If you stop Wi-Fi and use ADC DMA, the sampling rate does not exceed 2 MHz theoretically. However, we
recommend you to use a smaller sampling rate in practice.
• Its sampling rate can reach 1000 times per second with Wi-Fi.
• The internal signicant digit of ADC is 12 bits.
When calling the API adc_read_fast() with ESP8266, will it cause a Wi-Fi disconnection?
• Please turn o Wi-Fi and interrupts rst before calling adc_read_fast(). Please refer to the Specication
of this API.
• Since the API adc_read_fast() performs continuous acquisition and the ADC is partially coupled
internally with Wi-Fi RF, so it is not possible to call this function with Wi-Fi turned on.
• Please use adc_read() for ADC acquisition when Wi-Fi is on. To ensure data stability, you need to use
function esp_wifi_set_ps(WIFI_PS_NONE) to turn o Wi-Fi Modem-sleep mode.
Note: ADC sampling rate: can reach 100000 times per second with Wi-Fi turned o, and 1000 times per second
with Wi-Fi turned on.
Espressif Systems 62
Submit Document Feedback
Release master