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
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 = Reference Voltage / 2n, where n is the number of bits. For Arduino Uno (10-bit, 5V): Step size = 5V / 1024 = 0.00488V = 4.88mV. This is the smallest voltage change the ADC can detect. For ESP32 (12-bit, 3.3V): Step size = 3.3V / 4096 = 0.000805V = 0.805mV.
What is the difference between resolution and accuracy?
Resolution is the number of discrete values the ADC can produce (determined by bit depth). Accuracy is how close the measured value is to the true value (affected by errors, noise, calibration). A 12-bit ADC has better resolution than 10-bit, but if poorly designed, it may have worse accuracy. High resolution doesn't guarantee high accuracy without proper design and calibration.
How do I convert ADC reading to voltage in Arduino?
Use formula: Voltage = (ADC_Reading / 1023) × Reference_Voltage. For Arduino Uno with 5V reference: Voltage = (analogRead(pin) / 1023.0) × 5.0. If reading is 512, voltage = (512 / 1023) × 5 = 2.5V. Note: Use 1023 (not 1024) because ADC values range from 0-1023. For 3.3V systems, replace 5.0 with 3.3.
Why is my ADC reading noisy?
Common causes: poor power supply filtering, high-impedance source, electromagnetic interference (EMI), ground loops, inadequate decoupling capacitors, or digital noise coupling into analog circuits. Solutions: add 0.1µF capacitor at ADC input, use twisted pair wiring, separate analog/digital grounds, average multiple readings, use shielded cables for long connections, or add RC low-pass filter.
Can I measure voltages higher than the reference voltage?
No, input voltage must not exceed reference voltage (or VCC, whichever is lower). Exceeding this can damage the ADC or microcontroller. To measure higher voltages, use a voltage divider. For example, to measure 0-12V with 5V ADC: use 10kΩ and 5kΩ resistors (divides by 3), then multiply reading by 3. Always add protection diodes for safety in critical applications.
What is the effective number of bits (ENOB)?
ENOB is the actual usable resolution considering noise and distortion. A 12-bit ADC might have only 10-11 ENOB due to noise, non-linearity, and other imperfections. ENOB is always less than or equal to the nominal bit depth. It's a more realistic measure of ADC performance than just bit count. Check datasheet for ENOB specifications in precision applications.
How do I increase ADC resolution beyond hardware limits?
Use oversampling: Take multiple samples and average them. To gain n extra bits, take 4nsamples. For 1 extra bit: 4 samples, 2 bits: 16 samples, 3 bits: 64 samples. This reduces noise and increases effective resolution. Trade-off: slower sampling rate. Arduino 10-bit can achieve ~13-bit effective resolution with 64× oversampling. Works best when noise is present (adds dithering effect).
💡 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.