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 * 1000Reconstructed Voltage
reconstructed_v = floor(input_voltage / step_v) * step_vQuantization Error
quant_error_mv = abs(input_voltage - floor(input_voltage / step_v) * step_v) * 1000Total Levels
total_levels = pow(2, adc_bits)Variables
| Variable | Description | Default |
|---|---|---|
adc_bits | ADC Resolution (bits) | 10 |
v_ref | Reference Voltage(V) | 3.3 |
input_voltage | Input Voltage(V) | 1.65 |
max_code | Derived value= pow(2, adc_bits) - 1 | calculated |
step_v | Derived 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.
- 01Step size: 3.3 / 1024 = 3.223 mV
- 02Digital code: floor(1.65 / 0.003223) = 512
- 03Reconstructed: 512 x 0.003223 = 1.6504 V
- 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