# Set the Gain of an Opamp Accurately Using a Potentiometer

I want to set the gain of an opamp accurately using an potentiometer, with low thermal drift and good long-term stability. From what I've read, there are three basic ways of doing it, but none of them performs really well.

## Configuration 1

The first way is simply using a potentiometer as a variable resistor. Unfortunately, it means the uncertainty and drift of the potentiometer's end-to-end resistance is fully incorporated into the gain equation.

## Configuration 2

The second way is using the potentiometer as a real potentiometer (divider).

In this configuration, as it's only a voltage divider, only the relative position of the wiper matters, the absolute end-to-end resistance of the potentiometer is not important, thus a much higher accuracy is possible. Thus, it's recommended that a potentiometer should be always used as a potentiometer if possible.

Unfortunately, because how the potentiometer is connected here, the gain of the amplifier's adjustment is highly nonlinear, and probably unsuitable for most applications but audio.

## Configuration 3

Source: Analog SEEKrets, by Leslie Green, fair use.

It's possible to linearize the gain in Configuration 2 using two additional resistors. However, the gain is, again, depends on the absolute magnitude of the end-to-end resistance of the potentiometer, making it less useful.

# Question

Are there better ways to make use of a potentiometer, without purchasing a more expensive one with better tolerance?

• What range of gain are you looking for? A=1-10? A=20-22? etc. The solutions can vary greatly based upon this. Commented Dec 16, 2019 at 16:59
• have you tried doing the math for Configuration 2, but with a logarithmic potentiometer? Commented Dec 16, 2019 at 17:06
• @比尔盖子 are you opposed to a bit of cheap digital logic? Commented Dec 16, 2019 at 17:18
• Do you need gain adjustment rather than just setting it to a precise known value? Also, the comments in the picture about “the track” were unclear to me. Commented Dec 16, 2019 at 17:25
• I would never use "potentiometer" and "good long-term stability" in the same sentence. Commented Dec 16, 2019 at 23:41

## 1 Answer

1. Limit the range of the pot to the minimum acceptable (but take tolerances into account. Use precision resistors for the external resistances.
2. If you use the pot as a potentiometer with series resistors on one or both sides, consider shunting the element with a precision resistor. Pot elements have very poor tolerance and a lot of temperature drift.
3. Use a value of pot where the CRV of the wiper will not greatly affect the gain. Temperature drift specification is not typically something you can hang your hat on. They guarantee the element resistance change with temperature, but generally not the variation of the resistance from end to wiper.
4. Use a pot with a long circular or helical element if precision is important. Linear elements are more prone to relative CTE of the materials. The number of turns is not a good indication of the stability, only the easy of setting for a sloppy technician.

The optimum circuit really depends on the range of adjustment and the accuracy required. Don't forget you can use analog switches to select different ranges as well, and adjust within the range.

• if you have the logic in place to control analog switches, you might as well also use PGAs (programmable gain amplifiers), or a multiplying DAC. Commented Dec 16, 2019 at 20:49
• @MarcusMüller Sure, if you can get the accuracy that way. I don't see any numbers from OP yet. I've built PGAs with 0.2ppm/°C resistor arrays which is \$ but no other way that I could think of. Commented Dec 16, 2019 at 21:19
• OK, in these regions of accuracy you win :) Alternatively, sounds like something where you want an temperature-stabilized reference voltage, and a closed loop system. Or, really, said reference for two good ADCs, and a sufficient DAC, and doing the multiplication in digital domain, oversampling and dithering if necessary. (The DAC is the hard part. And boils down to analog switches on speed.) Commented Dec 16, 2019 at 21:43
• @MarcusMüller Yes, LTZ1000A ovenized references. Which ties back into the original question because the tolerance is extremely wide (+/-3 or 4%) for a precision reference but they're very stable (0.05ppm/°C) so you either have to come up with a stable adjustment or do it later digitally (and deal with digital calibration of spares etc as well as some loss of dynamic range). Commented Dec 17, 2019 at 5:41