AN-1169: Linearized Gain Setting Mode: Detailed Description

Author: Miguel Usach

Digital potentiometers are commonly used to digitally program the gain of amplifiers or set the output voltage of voltage regulators, as shown in Figure 1 and Figure 2.

Introduction

In both cases, the transfer function depends on two different variables, R₁ and R₂, as shown in the LDO formula (1) and the non-inverting amplifier formula (2).

Formula 1 (LDO): VOUT = 0.5 × (1 + R₁/R₂)

Formula 2 (Non-inverting Amplifier): VOUT = VIN × (1 + R₁/R₂)

In these transfer functions, using a digital potentiometer in potentiometer mode is not straightforward because the two resistor strings, RAW and RWB, are complementary. That is, RAW = RAB - RWB, as shown in Figure 3.

Figure 3. Potentiometer Resistance

Diagram showing a potentiometer with terminals A, W, and B, and the resistance strings RAW and RWB, where RAB = RAW + RWB.

If resistors R₁ and R₂ are directly replaced by digital potentiometers, the transfer function becomes logarithmic. Figure 4 shows an example of an LDO.

Figure 4. Logarithmic Transfer Function of an LDO

Graph showing Output Voltage (V) versus Code. The curve shows a non-linear, logarithmic relationship.

This logarithmic transfer function may be suitable for some applications, such as audio control, because the human body is not a linear receiver of these stimuli. However, for many electronic applications, a linear transfer function is preferred.

Linearizing the Output

There are three different methods to achieve a linear output that is proportional to the code loaded into the digital potentiometer. These three methods are detailed in the following sections.

Using a Digital Potentiometer in Rheostat Mode

A digital potentiometer can be used in rheostat mode, utilizing only two terminals, as shown in Figure 5.

Figure 5. Rheostat Mode

Diagram showing a digital potentiometer used as a variable resistor with terminals A and W connected.

This configuration requires combining discrete resistors with a digital potentiometer. An example of a non-inverting amplifier is shown in Figure 6.

Figure 6. Non-inverting Amplifier with Variable Resistor Control

Circuit diagram showing a non-inverting amplifier (AD8515) where the feedback resistor R₂ is replaced by a digital potentiometer in rheostat mode (RWB) in parallel with a resistor RHEOSTAT.

The main advantages of this solution are circuit simplicity, a wide output range, and fast settling times. The disadvantage is that due to typical tolerance errors in digital potentiometers, which can be as high as ±20%, the overall output error can be quite high. Since R₁ is fixed, this can lead to resistor mismatch.

Analog Devices offers digital potentiometers with ±8% and ±1% resistor tolerance errors to improve performance in these configurations, as shown in their selection guides.

Additionally, for LDOs, connecting a resistor in series with the digital potentiometer can reduce output error, as shown in Figure 7.

Figure 7. Reducing Tolerance Error with a Series Resistor

Circuit diagram showing an LDO (ADP123) where the feedback resistor R₂ is replaced by a digital potentiometer (RWB) in series with a resistor R₂.

In this case, assuming a 20% tolerance error is negligible, R₂ >> RWB. In other words, by reducing the adjustable output gain and increasing the settling time, the output error can be improved. The final resistance is determined by Formula 3.

Formula 3: RWB' = R₂ + RWB

A second method to reduce error is to place a resistor in parallel with the digital potentiometer, as shown in Figure 8.

Figure 8. Reducing Tolerance Error with a Parallel Resistor

Circuit diagram showing an LDO (ADP123) where the feedback resistor R₂ is replaced by a digital potentiometer (RWB) in parallel with a resistor R₂.

In this case, the condition is R₂ << RWB, as the nominal end-to-end resistance values are 10 kΩ, 50 kΩ, and 100 kΩ.

The result is similar to the previous method, meaning the adjustable output gain is reduced. However, in this case, the settling time is shortened due to the smaller parallel resistance, as shown in Formula 4.

Formula 4: RWB = (R₂ × RWB) / (R₂ + RWB)

The parallel resistance value is smaller, so the resistor noise is lower than in the series resistor method. As a precaution, remember that digital potentiometers have internal leakage current. If the selected parallel resistor R₂ is small enough that the current through the digital potentiometer is not large enough, the linearity errors RINL and RDNL may be much higher than specified in the datasheet.

Linearizing the Potentiometer

When a digital potentiometer is configured as a wiper DAC (as shown in Figure 9), the voltages at terminals A and B are limited by the position of the series resistors RAB and RWB.

Figure 9. Wiper DAC

Diagram showing a digital potentiometer configured as a voltage divider, with input voltage applied to terminals A and B, and the output taken from the wiper (W).

The idea behind this method is to reduce the output range, thereby producing a more linear output for two different configurations, as shown in Figure 10.

Figure 10. LDO Voltage with Wiper DAC

Graph showing Output Voltage (V) versus Code for two different configurations of R₁ and R₂. The graphs show a more linear relationship compared to the logarithmic curve.

This configuration provides lower linearity error than using a digital potentiometer in rheostat mode, and it also results in a lower temperature coefficient.

The final resistance between the terminals is defined by Formulas 5 and 6.

Formula 5: R₁' = R₁ + RAW

Formula 6: R₂' = R₂ + RWB

Enabling Linear Gain Setting Mode

In the linear gain setting mode, the internal resistor strings RAW and RWB are related. This patented architecture, implemented in the AD5144, AD5142, AD5124A, and AD5141, provides increased flexibility, allowing independent programming of the values of each resistor string (RAW and RWB), as shown in Figure 13.

Figure 13. Linear Gain Setting Mode

Diagram showing a digital potentiometer (RDAC) with internal resistor strings RAW and RWB, and associated registers.

When this mode is enabled, the output voltage can be linear. By fixing one resistor string's value (e.g., RWB) and programming the other resistor string's value (e.g., RAW), this mode functions similarly to combining a digital potentiometer with discrete resistors in rheostat mode. However, in this case, the overall tolerance error is less than 1%, and no external parallel or series resistors are required.

This is because the gain is determined by the resistor ratio, and the overall resistor tolerance error is common to both resistor string arrays but can be ignored.

Figure 14 shows an example of an RAW sweep from zero to full scale, where RWB is fixed at the midpoint for a 10 kΩ digital potentiometer. A closer look at the graph reveals that at lower codes, where RAW or RWB are smaller, the mismatch becomes greater than ±1%. This is due to the non-negligible effect of the internal CMOS switch resistance.

Figure 14. 10 kΩ Resistor Mismatch Error

Graph showing Mismatch Error (%) versus Raw Decimal Code for a 10 kΩ digital potentiometer.

The switch resistance effect can be eliminated by selecting a code higher than 1/4 of the full scale.

When enabling the linear setting mode, the maximum resistance between terminals A and B can be set to twice the nominal digital potentiometer resistance. In other words, if the RAB resistance is 10 kΩ in potentiometer mode, then in linear setting mode, RAB = 20 kΩ when programming both resistor strings to full scale.

Using a dual-channel digital potentiometer can achieve similar performance, but this solution increases cost and size, and extends settling time.

Another benefit of this configuration is the lower temperature coefficient, as shown in Figure 15.

Figure 15. 10 kΩ Resistor Temperature Coefficient

Graph showing Temperature Coefficient (ppm/°C) versus Code for RAW and RWB.

In this case, the focus is not on the absolute temperature coefficient of each resistor string but on the difference in temperature coefficients for a specific code that defines the ratio.

The RWB at code 250 is -2 ppm/°C.

The gain error due to RWB is:

Formula: ErrorRWB = 0.04%

Therefore, the total error is defined as:

Formula: GAIN ERROR = ErrorRAW + ErrorRWB = 0.17%

Similar to resistor matching errors, at lower codes, the temperature coefficient of the switch resistance dominates, but this effect is significantly reduced at higher codes.

If a smaller temperature effect on the error is required, larger end-to-end resistors should be used, as shown in Figure 17, with a resistance of 100 kΩ. In this particular case, the temperature coefficient is flatter over the entire code range, so the expected error should also be smaller.

Figure 16. Non-inverting Amplifier and AD5141 in Linear Gain Setting Mode

Circuit diagram showing a non-inverting amplifier with an AD5141 digital potentiometer configured for linear gain setting.

For the circuit in Figure 16, with a gain of 3, the code rate is determined by Formula 11.

Formula 11: Gain = 1 + RWB/RAW

With RWB code fixed at 250, the RAW code is 125. As a rough estimate, the overall error due to temperature coefficient over the entire temperature range is:

The RWB at code 125 is 20 ppm/°C.

The gain error due to RAW is:

Formula:

ErrorRAW = 0.13%

Thus, the total error is:

Formula: GAIN ERROR = ErrorRAW + ErrorRWB = 0.17%

Similar to resistor matching errors, at lower codes, the temperature coefficient of the switch resistance dominates, but this effect is significantly reduced at higher codes.

If a smaller temperature effect on the error is required, larger end-to-end resistors should be used, as shown in Figure 17, with a resistance of 100 kΩ. In this particular case, the temperature coefficient is flatter over the entire code range, so the expected error should also be smaller.

Figure 17. 100 kΩ Resistor Temperature Coefficient

Graph showing Temperature Coefficient (ppm/°C) versus Code for a 100 kΩ digital potentiometer.

Revision History

August 2013—Revision 0 to Revision A

Corrected Formula 2.

December 2012—Revision 0: Initial Version

PDF preview unavailable. Download the PDF instead.

AN-1169 cn

Related Documents

Preview AD4080 PCN Data Sheet Revision - Analog Devices
Product Change Notification (PCN) detailing revisions to the AD4080 data sheet, specifically changes in DC performance (Gain Error Drift) and digital input specifications (VIH min). Includes comparison tables from Rev. A (Old) to Rev. B (New).
Preview Analog Devices PCN 13_0223 Rev. C: Assembly and Test Transfer to STATS ChipPAC China
Product/Process Change Notice (PCN) from Analog Devices regarding the transfer of assembly and test for select LFCSP products to STATS ChipPAC China. Details include reasons, impact, affected models, and contact information.
Preview LTC2983: Sistema de Medición de Temperatura Digital de Alta Precisión para Múltiples Sensores
El LTC2983 es un sistema de medición de temperatura digital de alta precisión que puede medir múltiples sensores, incluyendo termopares, RTDs, termistores y diodos. Ofrece una precisión de 0.1°C y una resolución de 0.001°C, con compensación automática de unión fría y linealización para termopares. Admite configuraciones de RTD de dos, tres y cuatro hilos, y proporciona detección automática de fallos.
Preview Analog Devices Power Solutions for Precision High Voltage Signal Chains
Analog Devices offers power solutions for precision technology signal chains, focusing on high voltage and high common-mode current measurement. This document details system architectures, component specifications, and power requirements for optimized performance and size.
Preview AD9083: 16-Channel, 125 MHz, 2 GSPS JESD204B Analog-to-Digital Converter | Analog Devices
Datasheet for the Analog Devices AD9083, a 16-channel, 125 MHz bandwidth, 2 GSPS JESD204B compliant analog-to-digital converter. Features include integrated digital processing, flexible JESD204B configurations, and low power operation.
Preview EVAL-AD3530R Evaluation Board User Guide
User guide for the Analog Devices EVAL-AD3530R evaluation board, detailing the operation of the AD3530/AD3530R 16-bit, 8-channel, voltage output digital-to-analog converters.
Preview Analog Devices AD7245A/AD7248A 12-Bit LC2MOS DACPORT Datasheet
Datasheet for Analog Devices' AD7245A and AD7248A, 12-bit LC2MOS digital-to-analog converters (DACs) with output amplifier and voltage reference, detailing features, specifications, and applications.
Preview アナログ・デバイセズ 2024 ESGレポート:レジリエンスと責任
アナログ・デバイセズの2024年度ESGレポートは、環境、社会、ガバナンス(ESG)への取り組み、持続可能性へのコミットメント、およびレジリエンスと責任に焦点を当てています。2024年11月2日までの12ヶ月間の活動を網羅しています。