Analog-to-digital conversion
How a voltage becomes a number: resolution, reference voltage, sampling rate and the Nyquist limit.
Read firstWhat a sensor actually is
Key points
- An N-bit ADC divides its reference voltage into 2^N steps, so one step (1 LSB) is Vref / 2^N: about 0.8 mV for a 12-bit converter with a 3.3 V reference.1
- To capture a signal without aliasing, it must be sampled at more than twice its highest frequency component (the Nyquist–Shannon criterion).23
- Effective number of bits (ENOB) expresses real-world performance including noise and distortion, and is lower than the nominal resolution.4
- The ADCs built into microcontrollers are typically SAR (successive-approximation) converters; delta-sigma converters trade speed for high resolution and suit slow, precise signals such as weighing and temperature.5167
Common mistakes
- Using a noisy power rail as the ADC reference, then blaming the sensor for the noise.
Where to go next
- See the adc in the end-to-end diagram
- Uncalibrated bench characterisation of low-cost turbidity, TDS, pH and level sensors on Arduino Uno R4 WiFi a whitepaper from our lab
- Accuracy, precision and resolution builds on this
- Signal conditioning builds on this
- The common sensor families builds on this
Spotted a mistake, or found this useful?
Tell usSources
- A Basic Guide to Bridge Measurements (SBAA532A) · Texas Instruments · Reference
- Communication in the Presence of Noise (Shannon, Proc. IRE, 1949) · IEEE · Reference
- TI Precision Labs: Aliasing and Anti-aliasing Filters (TIPL 4304) slides · Texas Instruments · Reference
- Oversampling the ADC12 for Higher Resolution (SLAA323A) · Texas Instruments · Reference
- TI Precision Labs: SAR and Delta-Sigma ADCs, Understanding Basic Operation (TIPL 4010) slides · Texas Instruments · Reference
- RP2350 datasheet · Raspberry Pi · Datasheet
- ESP-IDF: Analog to Digital Converter (ADC) · Espressif Systems · Project docs