# Two potentiometers to control the range limits of a voltage source

I would like to control the range of an input voltage source using two potentiometers to establish the limits of the signal. First pot determines limit 1 and second pot determines limit 2.

Lets say, when I have the first pot at 0% and the second pot at 100%, the input signal of 5 volts remains 5v at the output, input signal of 2.5v remains 2.5v and input signal of 0v remains 0v. When the first pot is at 0% and the second pot at 50%, the signal of 5v becomes 2.5v and the input signal of 2.5v becomes 1.25v and the input signal of 0v stays at 0v. If the first pot is at 100% and the second at 0%, the input signal is now inverted, the input of 5v becomes 0v, input signal of 0v becomes 5v, input of 4v becomes 1v and 1v becomes 4v.

I’m trying to control the output voltage range of a synthesizer’s control voltage signal that goes from 5v to 0v. I have a signal that goes linearly and continuously from 5v to 0v in any given span of time, and I would like to change the range of it, to go, from say, 0v to 3.5v or 4.1v to 1.5, etc., by changing the position of the pots relatively to their start and end positions. First pot determines the starting position of the signal, and second pot the end of it. So for example, if first pot is at 75% and second pot at 25%, the 5v to 0v signal sweep would go from 3.75v to 1.25v, since 3.75v is 75% of 5v and 25% is 1.25 of 5v.

What approach should I take to solve this problem?

Thanks in advance for any help you are able to provide.

• Are there only these 3 distinct states? Or do you want to interpolate all the intermediate cases as well?
– Jim
Commented Nov 14, 2018 at 18:48
• I would like to interpolate all the intermediate cases as well. Commented Nov 14, 2018 at 18:54
• Pot1 can only be 0 or 100 right? So it's basically a switch?
– Jim
Commented Nov 14, 2018 at 19:41
• Pot 1 and pot 2 should be able to go from 0% to 100%. Commented Nov 14, 2018 at 19:43
• @Irene: Why don't you explain what problem you're really trying to solve? Hit the edit link under your question. Commented Nov 14, 2018 at 20:25

I think I've understood what you are asking for. My interpretation is that you wish to specify maximum and minimum voltages, $$\V_{MAX}\$$ and $$\V_{MIN}\$$ that the output should conform to ("fit" within), and the output is to be a copy of some input, which varies between 0V and +5V inclusive.

Also, if $$\V_{MAX} < V_{MIN}\$$, then the output should be an inverted version of the input, still lying between those limits.

I believe this does the trick:

simulate this circuit – Schematic created using CircuitLab

Let me explain how I derived this.

From my functional description above, I realised that the amplitude of the output will be the difference $$\V_{MAX} - V_{MIN}\$$, and that it should sit atop $$\V_{MIN}\$$.

Also, I should scale $$\V_{MAX} - V_{MIN}\$$ to adopt a range between 0 and 1, such that it represents some gain to be applied to the input. Since a gain of 1 would occur when the $$\V_{MAX} - V_{MIN} = 5V\$$, that scaling factor should be $$\\frac{1}{5}\$$:

$$V_{OUT} = V_{IN} (\frac{V_{MAX}-V_{MIN}}{5}) + V_{MIN}$$

Initially it seems that $$\V_{MAX}\$$ and $$\V_{MIN}\$$ are variables, which multiply $$\V_{IN}\$$ and seem to require some kind of voltage multiplier. But I am also aware that these values are actually constants, set by potentiometers.

If I can arrange this relationship in a way that factors out those constants, such that they represent gain, instead of voltages, then there's hope. It can be done:

\begin{aligned} V_{OUT} &= V_{IN} \frac{V_{MAX}}{5} - V_{IN} \frac{V_{MIN}}{5} + V_{MIN} \\ \\ &= \overbrace{\frac{V_{MAX}}{5}}^{\text{gain}}V_{IN} + \overbrace{\frac{V_{MIN}}{5}}^{\text{gain}} (5 - V_{IN}) \end{aligned}

I noticed that the terms $$\\frac{V_{MAX}}{5}\$$ and $$\\frac{V_{MIN}}{5}\$$ are really just values set by the potentiometers, gains between 0 and 1 corresponding to potentiometer position extremes. So now my goal is to use those potentiometers as gain controls in the feedback paths of opamp inverting amplifiers.

I'll replace those gain terms with simple variable names $$\A_{MAX}\$$ and $$\A_{MIN}\$$:

$$V_{OUT} = A_{MAX} \cdot V_{IN} + A_{MIN} (5 - V_{IN})$$

Now I'm looking for ways to implement this relationship using inverting amplifiers, and if necessary, difference amplifiers. Since the two gain stages will be inverting, I just change the gain signs being careful to keep consistency overall:

$$V_{OUT} = -[-A_{MAX} \cdot V_{IN}] - [-A_{MIN} (5 - V_{IN})]$$

Those negatives outside the square brackets are cumbersome, requiring more inverter stages, but we can rearrange further, to simplify the system to only three stages (note that I swapped the bracketed terms 5 and $$\V_{IN}\$$ to change sign):

$$V_{OUT} = \overbrace{\underbrace{[-A_{MIN} (V_{IN} - 5)]}_Y - \underbrace{[-A_{MAX} \cdot V_{IN}]}_X}^{Y - X}$$

That's all. My implementation of term X is inside the blue box in the schematic above, Y is in the orange box, and their difference is implemented inside the green box.

simulate this circuit – Schematic created using CircuitLab

Figure 1. Various gain characteristics as a function of potentiometer settings.

Based on $$\ y = mx + c \$$ this could be represented by

$$V_{out} = \frac {y_2 - y_1}{x_2 - x_1}V_{in} + c = (p_2 - p_1) V_{in} + p_1$$

where $$\p_1\$$ and $$\p_2\$$ are the pot settings which can vary between 0 and 1.

The addition and subtraction are easy to do with op-amps. Multiplication is not. You would need an analog multiplier. I'm only familiar with the AD633 which is ancient now so I'm sure there are better ones and, possibly, with single-rail supply operation. These work by converting each signal voltage to its logrithmic value, adding them, and then getting the anti-log.

Figure 2. AD633 block diagram.

I'm trying to convert the control voltage output of a synthesizer.

simulate this circuit

Figure 3. A possible simple solution using a voltage controlled pot.

I've never used a voltage-controlled pot but you have two options:

1. Use a servo-controlled pot driven by your 5 V - 0 V sawtooth waveform. This might wear out.
2. Use a voltage-controlled pot to sweep between the voltages on P1 and P2. See Maxim's APPLICATION NOTE 4051
Using an Analog Voltage to Control a Digital Potentiometer
for some ideas on this. (I only glanced at it.)
• Amazing. Thank you so much. I'm going to try out this method. Commented Nov 14, 2018 at 23:29
• You didn't respond to my request below your question regarding what you are actually trying to make. Can you add that information? Commented Nov 15, 2018 at 7:00
• Yes. I'm trying to convert the control voltage output of a synthesizer. Commented Nov 15, 2018 at 19:06
• See the update. Commented Nov 15, 2018 at 23:13

What approach should I take to solve this problem?

The potentiometers are to be wired as shown below.

simulate this circuit – Schematic created using CircuitLab

I'm going to make some assumptions. Input, output, p1, and p2 can all range from 0 - 1.

Seems to match point slope form of a line.

Output = p1 + input * (p2 - p1)
Output = p1 + input * p2 - input * p1
Output = p1 * (1 - input) + p2 * input


I believe this circuit will accomplish this.

• Brilliant. That is the formula. Thank you so much. Is there any literature that you would recommend on how to perform this kind of sum, multiplication and subtraction using op amps? Commented Nov 14, 2018 at 22:02
• @ugly: You might want to elaborate how you're going to do the multiplication with a buffer, an inverter and a summer. I think you'll need the autumn and winter too if you're restricted to those components! Commented Nov 14, 2018 at 22:32
• What is the voltage that goes into the V+ node? Commented Nov 15, 2018 at 19:41
• For your example, it would be 5V Commented Nov 15, 2018 at 19:54