Skip to content
MCUs

ADC Resolution Calculator

Calculate ADC voltage resolution (LSB size), the number of steps, and the voltage at any digital reading. Covers Arduino Uno (10-bit), ESP32 (12-bit), STM32 (12-bit), and Raspberry Pi ADC hats.

ADC Resolution & Voltage Conversion

An ADC (Analog-to-Digital Converter) converts continuous voltages into discrete digital steps. Resolution (in bits) determines step size. A 12-bit ADC divides 0–3.3V into 4096 steps, each about 0.8 mV. Use this to convert raw ADC readings to voltage or understand precision limits on Arduino, ESP32, or STM32.

ADC QuantizationVt0VrefLSB

Analog signal (dashed) quantized into discrete steps. Each step = 1 LSB = Vref / 2^bits

Arduino Uno: 10-bit, ESP32: 12-bit, STM32: 12-bit

Usually 3.3V or 5V

Digital value from analogRead()

Voltage

1.650 V

Total steps
4,096
LSB size
0.81 mV

ADC resolution formula

An N-bit ADC splits its reference voltage into 2ᴺ steps. The size of one step (the LSB, least significant bit) is:

Step size = Vref ÷ 2ᴺ

To turn a raw reading back into volts: V = reading × Vref ÷ (2ᴺ − 1) (or ÷ 2ᴺ; the difference is one step and usually below the ADC's error anyway).

Step size for common boards

Board / ADCBitsVrefStepsVolts per step
Arduino Uno, Nano (ATmega328P)105 V10244.88 mV
Arduino Uno with 1.1 V internal ref101.1 V10241.07 mV
ESP3212~3.3 V (11 dB)40960.806 mV
ESP8266 (A0 on NodeMCU)10~3.2 V (board divider)1024~3.1 mV
Raspberry Pi Pico (RP2040)123.3 V40960.806 mV
ADS1115 external ADC16±4.096 V range65 536 (±32 768)0.125 mV

So the familiar 3.3 / 4096 = 0.000806 V: each count on an ESP32 or Pico is about 0.8 mV.

Resolution is not accuracy

More bits only help if the rest of the system is quiet and the reference is accurate. In practice:

  • The ESP32 ADC is non-linear, especially below about 0.15 V and above about 3.1 V, and its reference varies by roughly ±6 % between chips. Use analogReadMilliVolts(), which applies the factory calibration, or calibrate against a multimeter.
  • The Arduino Uno's 5 V reference is the USB supply, which can be anywhere from 4.6 V to 5.2 V. Measure it, or use the internal 1.1 V reference for small signals.
  • Noise of a few counts is normal. Average 16–64 samples to gain effective resolution.

Measuring higher voltages

Scale the signal into the ADC's range with a voltage divider, then multiply back in code. For voltages that must be measured precisely, use an external ADC such as the ADS1115 (16-bit) over I2C.

Formula, inputs and worked examples

Formula and method

LSB voltage = Vref / 2^N; voltage estimate = ADC_code × Vref / (2^N − 1) for endpoint-scaled converters; verify the target ADC convention.

Worked examples

ESP32 battery monitor

A 100 kΩ / 220 kΩ divider puts a 4.2 V Li-ion cell at 2.89 V on GPIO34. One 12-bit step is 0.806 mV at the pin, which is 2.75 mV at the battery after scaling by 320 ÷ 220.

Arduino Uno temperature sensor

A TMP36 outputs 10 mV per °C. With the 5 V reference each step is 4.88 mV, so resolution is about 0.5 °C. Switching to the 1.1 V internal reference gives 1.07 mV steps, about 0.1 °C, for temperatures below 60 °C.

ADS1115 for a load cell

At its ±0.256 V range the ADS1115 resolves 7.8 µV per count, enough for strain-gauge signals that the built-in ADC cannot see.

Inputs

  • ADC bit depth — Unit: bits
  • Reference/full-scale voltage — Unit: V
  • Digital ADC reading — Unit: counts

What the result means

  • Voltage per ADC step (LSB) — Unit: V/step
  • Estimated voltage for code — Unit: V

Practical tips and common mistakes

  • Average several readings: 16 samples roughly halves visible noise.
  • Keep high-impedance sources below about 10 kΩ, or add a 100 nF capacitor at the ADC pin.
  • On ESP32 use ADC1 pins (GPIO32–39); ADC2 does not work while Wi-Fi is on.
  • Measure the real reference voltage with a multimeter before trusting absolute readings.

Assumptions and limitations

  • Confirm ADC bit depth and reference/full-scale voltage for the selected board.
  • ADC attenuation, nonlinearity, noise, and calibration can affect ESP32 readings; nominal LSB size is not guaranteed accuracy.
  • Use the target hardware documentation before converting code values to volts.

Frequently asked questions

What is 3.3/4096?

It is the step size of a 12-bit ADC with a 3.3 V reference, such as the ESP32 or Raspberry Pi Pico: 3.3 ÷ 4096 = 0.000806 V, or about 0.8 mV per count.

How do I convert an Arduino analogRead value to voltage?

Multiply the reading by 5.0 and divide by 1023: voltage = analogRead(A0) × 5.0 / 1023.0. A reading of 512 is about 2.5 V.

Is a 12-bit ADC better than 10-bit?

It has four times finer steps (4096 vs 1024), but real accuracy depends on reference stability, noise and linearity. A good 10-bit ADC with a stable reference can outperform a noisy 12-bit one.

Why does my ESP32 read 4095 below 3.3 V?

With the default 11 dB attenuation the usable range ends around 3.1 V, and the top of the range is compressed. Keep signals below about 3.1 V or use a divider.

Learn more

More MCUs