CircuitNote

Quick electronics calculators for lab work and circuit design. Free, no sign-up, works in your browser.

Values accept SI prefixes. Examples: 4.7k 4k7 100n 10u 20mA 1M

ADC

ADC Value to Voltage Calculator

Convert an ADC reading, such as Arduino analogRead(), into volts, or see what reading a voltage will give.

Formula

V = (code × Vref)/(2N). A 10-bit ADC with a 5 V reference has steps (1 LSB) of about 4.88 mV. Signals larger than the reference must be scaled down first, for example with a voltage divider.

Try it: how an ADC sees a sine wave

A 0–5 V sine is sampled and rounded down to whole codes. Change the resolution and the sample count and watch the staircase follow.

Input and ADC reading over two periods

1 LSB (Vref ÷ 2N)
313 mV
Codes
16 (0–15)
Codes used by this sine
9
Largest error at the samples
284 mV
Quantization noise (rms)
90.2 mV
Ideal SNR, full-scale sine
25.8 dB

An N-bit ADC splits the range from 0 to Vref into 2N steps of 1 LSB and reports which step the input is in. Between samples it knows nothing, so the reading is a staircase: each sample is held until the next one. This page uses V = code × Vref ÷ 2N, so a reading sits up to 1 LSB below the true input.

1 LSB = (Vref)/(2N)
noiserms = (1 LSB)/(√12)
SNR ≈ 6.02·N + 1.76 dB

Every extra bit halves the step and adds about 6 dB of signal-to-noise ratio. More samples per period follow the shape better; at two or fewer per period the sine can no longer be rebuilt (the Nyquist limit), and the samples may even land on the same value every time.

Worked example: Arduino 10-bit ADC (5 V)

  1. 1 LSB (one step): (Vref)/(2^(10)) = (5 V)/(1024) = 4.88 mV
  2. If analogRead() returns 512, V = 512 × (5 V)/(1024) = 2.5 V
  3. 3.3 V reads as floor((3.3 V × 1024)/(5 V)) = 675.

One LSB by resolution

ResolutionMax code1 LSB (3.3 V)1 LSB (5 V)
8-bit25512.9 mV19.5 mV
10-bit1,0233.22 mV4.88 mV
12-bit4,095806 µV1.22 mV
16-bit65,53550.4 µV76.3 µV

An Arduino Uno has a 10-bit ADC on a 5 V reference; ESP32 and STM32 parts usually have 12 bits on 3.3 V. Bring larger signals down with a voltage divider first.

Using it in practice

Step by step

  1. Set the resolution (10 bits for an Arduino Uno) and the reference voltage.
  2. Enter an ADC reading to get the voltage, or a voltage to get the expected code.
  3. If the input comes through a divider, multiply the result by the divider ratio to get the real voltage.

Common mistakes

  • Assuming the reference is exactly 5 V. On USB power the Uno's 5 V rail is often 4.7 to 5.1 V, and every reading scales with it. Measure the actual reference, or use the internal reference for stable readings.
  • Exceeding the reference or the supply. Inputs above the reference read as full scale; inputs above the supply can damage the pin. Divide larger voltages down first.
  • Driving the input from a high resistance. The ADC's sampling capacitor needs a low-impedance source; the ATmega328P datasheet suggests 10 kΩ or less. Add a 100 nF capacitor at the pin if your source is weaker.

Getting steadier readings

One step on a 10-bit, 5 V converter is about 4.9 mV, so a reading that jitters by one or two counts is normal. Average 8 to 16 samples in software, keep analog wiring away from motor and LED switching, and read the same channel twice after switching channels, discarding the first value. For better than about 0.5% accuracy, use an external converter with its own precision reference.

Frequently asked questions

Should I divide by 1023 or 1024?

Most ADC datasheets define 1 LSB as (Vref)/(2N), which is 1024 for a 10-bit ADC. Many Arduino examples divide by 1023. The difference is at most one step (about 5 mV at 5 V), smaller than the ADC's own error.

How do I measure a voltage higher than Vref?

Scale it down with a voltage divider so the highest input stays below Vref, then multiply the reading back up by the divider ratio.