ADC Resolution Calculator Formula

Understand the math behind the adc resolution calculator. Each variable explained with a worked example.

Formulas Used

Digital Output Code

digital_code = floor(input_voltage / step_v)

Step Size (1 LSB)

step_mv = step_v * 1000

Reconstructed Voltage

reconstructed_v = floor(input_voltage / step_v) * step_v

Quantization Error

quant_error_mv = abs(input_voltage - floor(input_voltage / step_v) * step_v) * 1000

Total Levels

total_levels = pow(2, adc_bits)

Variables

VariableDescriptionDefault
adc_bitsADC Resolution (bits)10
v_refReference Voltage(V)3.3
input_voltageInput Voltage(V)1.65
max_codeDerived value= pow(2, adc_bits) - 1calculated
step_vDerived value= v_ref / pow(2, adc_bits)calculated

How It Works

ADC Resolution and Digital Conversion

An ADC maps a continuous voltage range to discrete digital codes. The resolution determines the smallest detectable voltage change.

Formulas

Step Size = V_ref / 2^N

Digital Code = floor(V_input / Step Size)

Quantization Error = V_input - Code x Step Size

The maximum quantization error is +/- 0.5 LSB.

Worked Example

10-bit ADC with 3.3 V reference, input 1.65 V.

adc_bits = 10v_ref = 3.3input_voltage = 1.65
  1. 01Step size: 3.3 / 1024 = 3.223 mV
  2. 02Digital code: floor(1.65 / 0.003223) = 512
  3. 03Reconstructed: 512 x 0.003223 = 1.6504 V
  4. 04Error: |1.65 - 1.6504| = 0.4 mV

Frequently Asked Questions

How do I choose the right ADC resolution?

Match the ADC resolution to your signal dynamic range plus margin. For temperature sensing, 10-12 bits is often sufficient. For audio, 16-24 bits.

Does the reference voltage affect accuracy?

Absolutely. The reference voltage determines the measurement range and step size. Use a stable, low-noise reference for best results.

What is the difference between ADC and DAC?

ADC converts analog to digital (measurement). DAC converts digital to analog (output). They are complementary functions.

Ready to run the numbers?

Open ADC Resolution Calculator