Understanding the key parameters of an Analog-to-Digital Converter (ADC) is crucial for selecting the right one for your application and getting accurate results from it.
Here’s a breakdown of the key ADC parameters and a practical guide on how to select them.
Key ADC Parameters
1. Resolution
-
What it is: The number of discrete digital values the ADC can produce over its input range. It's expressed in bits.
-
What it means: It defines the smallest change in analog voltage that can be detected. A higher resolution means a finer, more precise measurement.
-
Calculation: The number of steps is
2^(number of bits)
. The voltage per step (LSB - Least Significant Bit) isV_ref / (2^bits)
.-
Example (Arduino Uno): 10-bit resolution, Vref = 5V.
-
Number of steps = 2¹⁰ = 1024 (values from 0 to 1023).
-
Voltage per step = 5V / 1024 ≈ 4.88 mV. Any change in input voltage smaller than ~5mV may not be detected.
-
-
2. Sampling Rate (Speed)
-
What it is: The number of samples (conversions) the ADC can take per second. Expressed in Samples per Second (SPS) or Hertz (Hz).
-
What it means: How fast you can capture a changing analog signal. To accurately reconstruct a signal, you must sample much faster than the highest frequency component in that signal (see Nyquist Theorem below).
3. Input Voltage Range
-
What it is: The minimum and maximum analog input voltages that the ADC can convert. Common ranges are 0 to 3.3V, 0 to 5V, ±2.5V, ±5V, etc.
-
What it means: You must ensure your sensor's signal is within this range. If not, you need a signal conditioner (e.g., voltage divider, op-amp circuit) to scale it.
4. Reference Voltage (Vref)
-
What it is: The voltage that the ADC uses as its full-scale reference. The digital output is a ratio of
(V_in / V_ref) * (2^bits)
. -
What it means: It directly defines the resolution and accuracy. A stable, clean, and noise-free Vref is essential for accurate conversions. Many microcontrollers (like Arduino) allow you to use the supply voltage (e.g., 5V) as Vref or an internal/external more precise reference.
5. Number of Channels
-
What it is: The number of separate analog input pins the ADC can measure.
-
What it means: Determines how many sensors you can connect directly. If you need more channels than available, you need an external analog multiplexer.
6. Interface
-
What it is: How the ADC communicates the digital result to the microcontroller (e.g., Arduino).
-
Common Types:
-
Parallel: Many data lines at once. Very fast, but uses many pins.
-
SPI / I2C (Serial): Common for external ADCs. Uses few pins, easier to route.
-
Built-in: The ADC is inside the microcontroller itself (like on an Arduino). Accessed simply by calling
analogRead()
.
-
7. Integral Non-Linearity (INL)
-
What it is: The maximum deviation of the ADC's transfer function from a straight line drawn from zero to full scale.
-
What it means: A measure of overall accuracy. A low INL means the ADC is accurate across its entire range.
8. Differential Non-Linearity (DNL)
-
What it is: The deviation of an actual code step width from the ideal step width of 1 LSB.
-
What it means: A DNL greater than 1 LSB can lead to missing codes—where the ADC skips a digital value entirely. You want |DNL| < 1 LSB.
How to Select an ADC: A Practical Guide
Follow this decision flow:
Step 1: Determine the Required Resolution
Ask: "How small of a voltage change do I need to see?"
-
Example 1 (Temperature Sensor): A thermistor changes slowly. A 10-bit ADC (like on an Arduino) is often more than sufficient.
-
Example 2 (Audio Signal): Capturing human voice (up to 4kHz) requires much more dynamic range. 12-bit or 16-bit is common.
-
Example 3 (High-Precision Instrumentation): Measuring millivolt changes in a strain gauge might require a 24-bit ADC.
Rule of Thumb: Choose a resolution where the voltage step (LSB) is smaller than the smallest change you care about.
Step 2: Determine the Required Sampling Rate
Ask: "How fast is my signal changing?"
This is governed by the Nyquist-Shannon Theorem, which states you must sample at a rate at least twice the highest frequency (bandwidth) in your signal. In practice, you sample 5-10 times faster than the highest frequency to capture the signal's shape accurately.
-
Example 1 (Temperature Sensor): Changes over seconds/minutes. A sampling rate of 1-10 SPS is plenty.
-
Example 2 (Audio Signal): Human hearing up to 20 kHz. CD quality samples at 44.1 kSPS (~2x Nyquist). For good quality, 8-16 kSPS is common for voice.
-
Example 3 (Vibration Sensor): Measuring a 1 kHz vibration requires a sampling rate of at least 2 kSPS, but better to use 10 kSPS.
Rule of Thumb: Your sampling rate should be > 2x your signal's bandwidth. Higher is better for fidelity.
Step 3: Define the Input Signal & Range
Ask: "What is the min and max voltage from my sensor?" and "Is it single-ended or differential?"
-
Single-Ended: The voltage is measured relative to a common ground (GND). Most common type.
-
Differential: The ADC measures the voltage difference between two pins (A+ and A-). Excellent for rejecting noise, used with strain gauges, thermocouples, etc.
If your sensor's output range (e.g., 0.5V to 4.5V) is smaller than the ADC's input range (0-5V), you are not using the ADC's full resolution. In this case, an ADC with a programmable gain amplifier (PGA) can be very useful to amplify the signal to fit the full range.
Step 4: Consider the Interface and Form Factor
-
Is there an ADC in your microcontroller? (e.g., Arduino's 10-bit ADC). Always use this first if it meets your needs from Steps 1-3. It's the simplest solution.
-
If you need higher performance: Do you need more resolution, speed, or channels? Then look for an external ADC with an SPI or I2C interface. They are easy to connect to any microcontroller.
Step 5: Don't Forget the Supporting Cast
-
Reference Voltage (Vref): For high-resolution ADCs (16-bit+), the stability and noise of the Vref are critical. An internal reference is convenient, but an external, precision voltage reference IC is often necessary for best performance.
-
Anti-Aliasing Filter: A mandatory low-pass filter on the analog input before the ADC. It removes any high-frequency noise above your Nyquist frequency that would otherwise distort your digital signal (a phenomenon called aliasing). A simple RC filter is often sufficient.
Practical Example: Selecting an ADC for an Arduino Project
-
Project: Data logging from a temperature sensor (LM35) and a microphone for basic sound level monitoring.
-
Analysis:
-
LM35: Changes slowly. Arduino's 10-bit resolution is fine. Needs ~1 SPS.
-
Microphone: Audio has frequencies up to ~5 kHz. To get its shape, we need to sample at ~10 kSPS. The Arduino's built-in ADC maxes out at ~10 kSPS, but that's its theoretical maximum. Using
analogRead()
and other code, you'll be lucky to get 5-7 kSPS. This is borderline. Furthermore, the 10-bit resolution might be low for analyzing dynamic range.
-
-
Selection:
-
For the LM35, the built-in ADC is perfect.
-
For the microphone, we should add an external ADC.
-
Choice: A 16-bit, 20 kSPS ADC (like the ADS1115) with an I2C interface. This provides:
-
Higher Resolution: 16 bits for better dynamic range.
-
Adequate Speed: 20 kSPS is perfect for 5 kHz audio.
-
Easy Interface: I2C uses only two pins on the Arduino.
-
Programmable Gain: The ADS1115 has a PGA, which is great for amplifying small microphone signals.
-
-