Calibration of amplifiers and ADCs in SoCs

Publisher:温柔心绪Latest update time:2012-10-12 Source: 电子产品世界 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere


In today's world of mixed-signal systems, many applications require the measurement and processing of a large number of analog signals, including but not limited to voltage, current, temperature, pressure, acceleration, pH, flow, ECG, etc. The relevant application areas range from laboratories and medical equipment in controlled environments to industrial equipment operating under harsh working conditions. The range of analog signals that need to be measured is very large, including a few microvolts in ECG systems to thousands of volts in power stations.

Regardless of the application, environment, or signal quantity to be measured, the basic signal acquisition system consists of an analog front end that amplifies and conditions the signal and an analog-to-digital converter (ADC) that converts the analog signal to a digital value that is then processed by a microprocessor. The analog front end may be a simple amplifier or a complex system consisting of multiple amplifier stages and filters.

A block diagram of a basic signal conditioning circuit is shown below:

Amplifier Gain

Assuming the system is ideal, the ADC output is expressed by the following equation:

Here, VIN is the input voltage

A is the amplifier gain
VFS is the range of the ADC
N is the resolution of the ADC

The microprocessor calculates the input voltage in terms of ADC counts according to the following equation:

Unfortunately, in the real world, there is no such thing as an “ideal” situation, and systems must deal with errors that are introduced into the system and affect the ADC output. The most important errors are the ones we will discuss in this article – offset error and gain error.

Offset Error

Figure 2 shows a schematic diagram of an 8-bit ADC with a range of +2.5V. The X-axis is the input voltage and the Y-axis is the ADC counts. The blue line is the ideal ADC output. The red line is the actual ADC output. Note that the actual output is different from the ideal state, and this difference is called offset error.

All op amps have a finite offset voltage at their inputs. The offset voltage is added to the input signal, which is then amplified by the amplifier gain and appears at the output. In addition to the amplifier stage, the ADC has its own offset voltage that also adds to the system error. Offset error is an additive error that can be easily removed from the system.

Gain Error

Figure 3 shows an 8-bit ADC with the same range of +2.5V. Note that the slope of the actual output is different from the slope of the ideal output. This difference is called gain error.

Gain error is primarily due to the tolerance of the gain-setting resistors in the amplifier and the tolerance of the reference voltage in the ADC. Gain error is a scaling error and can also be easily removed from the system.

Mathematical equations that represent real systems

The ideal acquisition system can be expressed with the help of a simple mathematical equation, such as Equation 3:

Here, y is the system output or ADC count

mi is the ideal gain of the system
x is the input voltage

Introducing offset error and gain error into the equation, we have:

Here, ma is the gain with error in the actual system

C is the offset error

Figure 4 shows a system with offset error and gain error:

System on chip (SoC) is a mixed signal controller that integrates analog and digital peripherals and a microprocessor on a single chip. It not only integrates all the components required for the analog front end, such as amplifiers, filters, ADCs, etc., in the same device, but also provides flexible routing options. Using these flexible resources, we can accurately solve the offset error and gain error problems.

Let's discuss some widely used calibration methods to remove offset and gain errors. Each method has its own advantages and disadvantages. Depending on the application, we can use one method or a combination of methods to achieve the highest accuracy.

Two-point calibration

This calibration method can solve both the offset error and the gain error. In Equation 4, if the actual gain ma and offset C are known, the actual input can be calculated using Equation 5:

The parameters ma and C can both be determined through a two-point calibration process:

1. Apply 0V to the analog front end input, measure the ADC output, and record it as Offset (C).
2. Apply a known reference voltage to the input and measure the ADC output. For best performance, the reference voltage should be greater than 90% of the full-scale value.
3. Calculate the count/voltage (mA) or voltage/count (1/mA) gain.

4. Store the offset and gain values ​​in non-volatile memory and use the values ​​in the actual measurement.

Once the offset and gain values ​​are stored, we can measure the input signal using the following method:

1. Measure the input ADC counts.
2. Calculate the input voltage using the offset and gain values.

Depending on the application, the trigger for performing an offset or scale calibration can be implemented as a switch or by receiving a command via a communication interface.

The scale can be a function of the actual units being measured. For example, if you are measuring the current of a voltage drop across a shunt, then instead of measuring the voltage and then deriving the current, you can simply apply a reference current to the shunt and calculate the scale in counts/amperes. This eliminates the problem of errors caused by the tolerance of the shunt resistor.

shortcoming:

There are two disadvantages to using this method of offset and gain compensation:

1. The offset of an op amp has its own temperature coefficient that varies with temperature. This can cause offset errors at temperatures other than the one at which calibration is performed.
2. A two-point calibration adds an extra step to the manufacturing process.

We can solve these two shortcomings through the following technical methods.

Correlated Double Sampling

Correlated Double Sampling (CDS) can be used to dynamically compensate for offset errors. The following is a method to implement CDS:

1. Connect the amplifier input to ground.
2. Measure the ADC output. Any non-zero value measured by the ADC is due to system offset error.
3. Store this value in the Offset variable.
4. Connect the amplifier input to the signal.
5. Measure the ADC output.
6. Subtract the Offset value measured in step 2. This gives you the offset compensated result.
7. Repeat steps 1 through 6 for each measurement.

Since every measurement involves an offset measurement, any drift in the offset voltage due to temperature can be automatically compensated for.

The disadvantage of this system is that since two measurements are made every cycle, the ADC throughput is reduced by a factor of 2. If the reduction in throughput is not desirable, the offset voltage can be measured less frequently, that is, instead of measuring the offset every measurement cycle, it can be measured once every 16 or 32 measurement cycles.

Gain Calibration with External Voltage Reference

The gain error can be compensated by using a high-precision external reference voltage with a very low temperature coefficient.

The steps to implement gain compensation using an external reference are given below:

1. Connect a known reference voltage, such as an AD1580B with a 1.225V reference voltage and a temperature drift of 50 ppm/°C, to the amplifier input.
2. Measure the ADC counts.
3. Calculate the gain using the known reference voltage and the ADC counts.
4. Connect the signal to the amplifier input.
5. Measure the ADC counts.
6. Calculate the ADC counts for the input signal and the gain calculated in step 3.

Now, by combining CDS for offset compensation and the external reference method for gain compensation, we can build a fully automated system. Figure 6 shows an implementation of such a system.

This method can provide a fully automatic high-precision error-free system, but its disadvantage is that the external high-precision voltage reference increases the cost.

Putting concepts to the test

We use the PSoC (Programmable System-on-Chip) mixed-signal controller from Cypress, which includes flexible analog and digital peripherals and an on-board microcontroller, to measure the above concepts such as CDS and two-point calibration. The device has general-purpose analog blocks that can build various analog peripherals such as programmable gain amplifiers, ADCs, DACs, filters, etc. In addition, the device also provides very flexible analog routing resources, including input multiplexers, analog output buffers, flexible inter-module connection functions, etc. Figure 8 shows the configuration of the analog resources in the device.

We use a 4:1 input multiplexer at the input of the programmable gain amplifier with a gain of 16 to switch the input signal and analog ground. The output of the PGA is provided to the 12-bit incremental ADC. The reference generator can be used to generate a 2.5V analog ground, which is then brought out to the pin using an analog buffer. The +60mV input signal is connected to the input pin with a 2.5V reference. Using this hardware setup, three different application codes can be written.

1. Applications without offset or gain compensation.
2. Applications with offset compensation using CDS.
3. Applications with offset and gain compensation using two-point calibration.

In all three applications, the measured input is displayed on the LCD display. The test results obtained for the three applications are shown below:

Input +60mV
Gain 16.00
Ref 1.3V (internal)

The full-scale error is around +11% for an uncalibrated system. Using CDS alone for offset compensation reduces the error to around +0.4%. And combined with a two-point calibration, the error is reduced to around +0.07%.

The following table lists the advantages and disadvantages of different techniques for eliminating offset and gain errors in signal acquisition systems:

According to the different requirements of system accuracy and cost, we can use one of the above technologies or combine multiple technologies to build a high-precision signal acquisition system.

Reference address:Calibration of amplifiers and ADCs in SoCs

Previous article:ADI's High Intermediate Frequency Sampling Receiver Front End with Integrated Bandpass Filter
Next article:Intelligent frequency characteristics tester system composition and application

Latest Analog Electronics Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号