Blog Discrete Signals

Analog-to-digital converter (ADC) accuracy in simple terms

The previous blog discussed how makers can select an A/D converter by understanding the application and how manufacturers optimize a part for that role. Now, what happens when an A/D fires up—how accurate are those readings? Getting good input data is critical to any project. Several factors impact A/D converter accuracy, including resolution and quantization, offset and gain errors, non-linearity, and system noise.

How many bits do we get?

Resolution relates to measurement precision. An 8-bit converter plus a temperature sensor in a weather station might provide temperature readings to the nearest degree, while a 12-bit converter in the same setup could deliver readings to a tenth of a degree.

Riddle me this: when is a 12-bit A/D converter not a 12-bit A/D converter? More often than one might think in a real-world circuit, the effective number of bits (ENOB) usually turns out to be less than the stated bit resolution. The higher the resolution, the bigger the chance there is some uncertainty in the least significant bits (LSBs) of a reading.

Even if there were zero system noise, there is quantization error built into any A/D converter. No digital conversion is perfect. An A/D has to decide whether the LSB is a 1 or a 0, based on the closest available value. Simple example: a 12-bit converter with 4,096 possible values samples a 10-V wide signal, setting a 2.44-mV step width and up to ±1.22-mV quantization error on each sample.

What else causes errors?

Besides quantization error, there are several other sources of static errors. First is offset error, often called zero-scale error because a zero analog input voltage should result in a digital zero output. Offset error affects every reading by the same value.

Gain error looks at the other end. After correcting offset error, full-scale digital output should match the full-scale analog input voltage. Gain error affects every reading as a percentage, with the error value increasing at higher analog input levels.

The A/D offset and gain errors are a major source of static inaccuracies. Source: Analog Devices Inc.

Non-linearity error shows up two ways. First is differential non-linearity, where step widths aren’t exactly 1 LSB. If the differential linearity is off, it’s possible the A/D will have missing codes; as a result, digital values that are skipped as the analog input voltages ramp up. Integral non-linearity is a measure of how well conversion keeps straight-line performance against the analog input.

Most A/D converters are trimmed for offset and gain errors at the factory and are designed to limit non-linearity. Keep in mind that the sensor being read may have offset, gain, and non-linearity issues as well. For example, pressure sensors display significant non-linearities as temperature varies, and compensation is best done in software.

Getting into the noise

For many applications, 16-bit, 24-bit, or even 32-bit A/D converters are common today. Careful analog layout techniques help. Still, system noise can be higher than the theoretical best signal-to-noise ratio (SNR) of these higher resolution converters. How are accurate readings with these A/Ds in dynamic, noisy environments possible?

The minimum sample rate of an A/D converter should be twice the frequency of signals of interest, the Nyquist rate. Low-pass filtering applied at the A/D input can reject harmonics beyond that range, leaving signals and noise spanning from near DC up to the sample rate. If it’s white noise, evenly distributed and not in a spike inside the sample rate range, statistics can be put to work.

Oversampling the A/D and averaging the results into a single reading use the randomness of white noise to lower its intensity versus the desired signal. Here’s a table from the Bosch BMP390 datasheet, showing how oversampling can increase ENOB, pulling more bits of resolution out of a conversion.

Readings in a pressure sensor show how oversampling can increase ENOB. Source: Bosch

Oversampling isn’t always feasible. Driving an A/D at multiples of the desired sample rate, plus processing needed to average results, can severely increase power consumption. Also, it only works at moderate sample rates; giga sample per second A/D converters are already stretched to operational limits. And, if there are spikes or bands of noise in the desired range, other mitigation steps may be needed.

How MCUs improve maker projects

Coupling a microcontroller with an A/D converter can take care of offset, gain, and some non-linearity issues, leaving quantization error as the main A/D accuracy concern for most applications. However, increased resolution, whether through a higher resolution A/D converter or by oversampling and averaging, isn’t free.

The driving factors should be getting the A/D step width correct to see the changes in measured values, and then getting accurate readings. Oversampling and averaging may help if they don’t break the power budget and system noise is truly random.

After spending a decade in missile guidance systems at General Dynamics, Don Dingee became an evangelist for VMEbus and single-board computer technology at Motorola. He writes about sensors, ADCs/DACs, and signal processing for Planet Analog.

Related Content

0 comments on “Analog-to-digital converter (ADC) accuracy in simple terms

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.