ADC Resolution Calculator
Calculate ADC step size, quantization levels, and digital output values instantly. Essential for microcontroller projects, data acquisition systems, and embedded electronics design.
ADC Resolution Calculator
Calculate ADC step size, quantization levels, and digital output values. Essential for microcontroller projects and data acquisition systems.
Actions
ADC Parameters
Enter analog input voltage to calculate digital output value
Common ADC Configurations
Related tools
What is ADC Resolution?
ADC (Analog-to-Digital Converter) resolution refers to the number of discrete digital values an ADC can produce from a continuous analog input signal. It is typically expressed in bits. An n-bit ADC can represent 2n different voltage levels. For example, a 10-bit ADC has 1024 (210) quantization levels, while a 12-bit ADC has 4096 levels. Higher resolution means finer voltage discrimination and more accurate digital representation of analog signals. ADC resolution is crucial in sensor interfaces, data acquisition systems, audio processing, and measurement instruments.
ADC Calculation Formulas
Quantization Levels
Levels = 2n
Where n is the number of bits. An 8-bit ADC has 256 levels, 10-bit has 1024 levels, 12-bit has 4096 levels, and 16-bit has 65536 levels. More levels mean finer resolution and better accuracy.
Step Size (Resolution)
Step Size = Vref / 2n
Step size is the smallest voltage change the ADC can detect. For a 10-bit ADC with 5V reference, step size = 5V / 1024 = 4.88mV. This means the ADC cannot distinguish voltage changes smaller than 4.88mV. Lower step size means higher precision.
Digital Output Value
Digital Value = floor(Vin / Step Size)
Converts analog input voltage to digital value. For 10-bit ADC with 5V reference and 2.5V input: Digital Value = floor(2.5V / 0.00488V) = 512. The floor function rounds down to the nearest integer, representing quantization.
Complete Example
Given: Vref = 3.3V, n = 12 bits, Vin = 1.65V
Step 1: Levels = 212 = 4096
Step 2: Step Size = 3.3V / 4096 = 0.000805V = 0.805mV
Step 3: Digital Value = floor(1.65V / 0.000805V) = 2048
Result: 1.65V input produces digital value 2048 (exactly 50% of range)
Common Microcontroller ADCs
| Platform | Resolution | Vref | Step Size | Channels |
|---|---|---|---|---|
| Arduino Uno (ATmega328) | 10-bit | 5V | 4.88 mV | 6 |
| Arduino Mega (ATmega2560) | 10-bit | 5V | 4.88 mV | 16 |
| ESP32 | 12-bit | 3.3V | 0.805 mV | 18 |
| Raspberry Pi Pico (RP2040) | 12-bit | 3.3V | 0.805 mV | 4 |
| STM32F103 (Blue Pill) | 12-bit | 3.3V | 0.805 mV | 10 |
| STM32F4 Series | 12-bit | 3.3V | 0.805 mV | 16-24 |
| Teensy 4.0 | 10-bit | 3.3V | 3.22 mV | 14 |
Understanding Quantization Error
What is Quantization Error?
Quantization error is the difference between the actual analog input voltage and the voltage represented by the digital output. It occurs because the ADC can only represent discrete voltage levels. The maximum quantization error is ±0.5 LSB (Least Significant Bit), which equals ±(Step Size / 2). For a 10-bit ADC with 5V reference, maximum error is ±2.44mV. This error is inherent and cannot be eliminated, only reduced by using higher resolution ADCs.
ADC Reference Voltage Selection
ADC Sampling Rate and Conversion Time
| Platform | Max Sample Rate | Conversion Time | Notes |
|---|---|---|---|
| Arduino Uno | 9.6 kSPS | ~100 µs | Can be increased to 77 kSPS |
| ESP32 | 200 kSPS | ~5 µs | Two SAR ADCs |
| STM32F4 | 2.4 MSPS | ~0.4 µs | Fast for audio/signal processing |
| Raspberry Pi Pico | 500 kSPS | ~2 µs | Good for data acquisition |
kSPS = kilo Samples Per Second, MSPS = Mega Samples Per Second
Sampling rate determines how fast the ADC can read changing signals. For audio (20 kHz max frequency), you need at least 40 kSPS (Nyquist theorem: sample rate ≥ 2× signal frequency). For DC or slow-changing signals (temperature, pressure), low sample rates are sufficient. Higher sample rates enable capturing fast transients and high-frequency signals.
Improving ADC Accuracy
Choosing the Right ADC Resolution
Frequently Asked Questions
How do I calculate ADC step size?
Step size (1 LSB) = Vref ÷ 2ⁿ. A 10-bit ADC at 5 V has 1,024 levels and steps of 4.88 mV; a 12-bit ADC at 3.3 V steps 0.806 mV.
How do I convert an ADC reading to voltage?
Voltage = reading × Vref ÷ 2ⁿ. On an Arduino Uno, a reading of 512 is 512 × 5 ÷ 1,024 = 2.5 V. Many sketches divide by 1,023 instead; the difference is under one step.
What code will a given voltage produce?
Code = floor(Vin ÷ step size), limited to 0 … 2ⁿ − 1. 1.65 V on a 12-bit, 3.3 V ADC gives 2,048.
Is resolution the same as accuracy?
No. Resolution is the step size; accuracy also depends on offset, gain error, nonlinearity, noise and the reference. The ESP32's ADC, for example, is noticeably nonlinear near its ends.
How do I measure voltages above Vref?
Use a voltage divider so the highest input stays below Vref, then multiply the result by the divider ratio. Never exceed the pin's absolute maximum voltage.
💡 Pro Tip
When designing ADC circuits, always match your reference voltage to your expected signal range for maximum resolution. If measuring 0-3.3V signals, use 3.3V reference instead of 5V to utilize the full ADC range. Add a 0.1µF ceramic capacitor directly at the ADC input pin to filter high-frequency noise. For precision measurements, take multiple readings and use median or average filtering to reduce noise. Always allow settling time after switching ADC channels (typically 10-100µs) before reading. Use external precision voltage references (like REF3033 or LM4040) for applications requiring better than 1% accuracy.
How to Use the ADC Resolution Calculator
- 1Enter the reference voltage: Type Vref, for example 5 V for an Arduino Uno or 3.3 V for an ESP32 or Raspberry Pi Pico.
- 2Choose the resolution: Select the ADC's number of bits, such as 8, 10, 12, 16 or 24, or pick a microcontroller preset.
- 3Enter an input voltage: Optionally type a voltage to see the code the ADC returns.
- 4Read the results: See the number of levels, the step size in mV or µV, the maximum voltage and the digital output.
Related Tools
PWM Duty Cycle Calculator
Calculate PWM duty cycle.
DAC Output Calculator
Compute analog output from digital input.
Logic Gate Calculator
Evaluate digital logic outputs.
Clock Frequency Calculator
Calculate clock frequency.
Data Rate Calculator
Compute data transmission rate.
Antenna Length Calculator
Determine antenna length for frequency.
RF Power Calculator
Calculate RF signal power.
Lightning Protection Calculator
Estimate protection requirements.
Power Loss Calculator
Calculate losses in electrical systems.
UPS Load Calculator
Calculate required UPS capacity for your devices.
UPS Backup Calculator
Calculate how long your UPS will run.
Current Divider Calculator
Calculate current distribution.