ADC Basics: Understanding Analog to Digital Conversion
5 min read · Last updated: 2026-05-08
What is an ADC?
An Analog-to-Digital Converter (ADC) transforms a continuous analog voltage into a discrete digital number. It is essential whenever a microcontroller needs to read analog sensors such as temperature probes, microphones, or joysticks.
Key parameters
Bit depth (resolution)
The number of bits determines how many discrete steps the ADC can represent.
Number of steps = 2n (n = bit depth)
Voltage resolution = V_ref / (2n − 1)
| Bit depth | Steps | Resolution (V_ref = 3.3V) |
|---|---|---|
| 8-bit | 256 | ≈12.9 mV |
| 10-bit | 1,024 | ≈3.2 mV |
| 12-bit | 4,096 | ≈0.8 mV |
| 16-bit | 65,536 | ≈0.05 mV |
Sampling rate
How many times per second the ADC reads the analog input. Unit: SPS (Samples Per Second) or Hz.
Nyquist theorem: To accurately reconstruct a signal, the sampling rate must be at least twice the highest frequency in the signal.
f_s ≥ 2 × f_max
Example: reproducing audio up to 20 kHz requires a minimum 40 kHz sampling rate. CD quality uses 44.1 kHz.
Quantization error
When an analog value falls between two digital steps, the ADC rounds to the nearest step. This rounding error is at most ±0.5 LSB (least significant bit). More bits = smaller error.
Real-world ADC examples
| Application | Resolution | Sampling rate |
|---|---|---|
| Arduino UNO (ATmega328) | 10-bit | Up to 15 kSPS |
| ESP32 | 12-bit | Up to 2 MSPS |
| STM32F4 | 12-bit | Up to 2.4 MSPS |
| Audio DAC/ADC | 16–24-bit | 44.1–192 kHz |
| Medical ECG | 12–16-bit | 250 Hz – 1 kHz |
Key takeaways
- Resolution = V_ref / (2n − 1): more bits → finer measurement.
- Nyquist: sampling rate ≥ 2 × maximum signal frequency.
- Bit depth controls precision; sampling rate controls speed.