Skip to content

ESP32 ADC Resolution Too Low

DodaTech Updated 2026-06-26 1 min read

In this tutorial, you'll learn about ESP32 ADC Resolution Too Low. We cover key concepts, practical examples, and best practices.

The Problem

ESP32 analogRead() returns only 0-1023 (10-bit) instead of 0-4095 (12-bit).

Quick Fix

Wrong

int val = analogRead(34);
// Returns 0-1023 (default 10-bit on some cores)
ADC max value is 1023 (10-bit). Voltage resolution is 3.2mV per step.
analogReadResolution(12);
int val = analogRead(34);
// Returns 0-4095 (12-bit)
float voltage = val * 3.3 / 4095.0;
Serial.printf("12-bit: %d, Voltage: %.3fV\n", val, voltage);
12-bit: 2710, Voltage: 2.180V
(12-bit = 0.8mV per step resolution)

Prevention

Call analogReadResolution(12) in setup for 12-bit mode. Lower resolution (10-bit) is faster but less precise. Use 12-bit for sensors, 10-bit for high-speed sampling. Check your framework default resolution.

DodaTech engineers apply these same patterns across Doda Browser, DodaZIP, and Durga Antivirus Pro for production IoT reliability.

FAQ

### What ADC resolutions does ESP32 support?

ESP32 supports 9-bit (0-511), 10-bit (0-1023), 11-bit (0-2047), and 12-bit (0-4095). Default is 12-bit.

Does higher resolution reduce speed?

Yes. 12-bit conversion takes ~42 us vs ~32 us for 10-bit. For high-speed audio sampling, use 10-bit.

Can I change resolution per read?

Resolution is set globally for all ADC pins. Set it once in setup(). Changing it frequently causes inconsistent readings.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro