# 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

• @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