I have a circuit which controls the volume on a speaker by a wheel which is attached to a variable resistor - I want to reproduce this but instead of using a manually operated variable resistor, I want to use ...something else instead - Ideally something where you can apply a voltage to change the resistance from low to high.

I've done a little research but I think I'm being stumped by not knowing what I'm actually looking for.

  • 1
    \$\begingroup\$ The variable resistor is commonly called a "pot", which, in this case, controls the gain of the output stages of a power amplifier. \$\endgroup\$ – tyblu Dec 16 '11 at 18:10
  • \$\begingroup\$ What do you really want to do? What is the complete setup? \$\endgroup\$ – starblue Dec 16 '11 at 21:54

You can use a transistor to do this. Although less common that the other types, a JFET works much like a voltage controlled variable resistance. You'd have to apply an analog voltage to the gate to get a specific resistance. You'd have to be careful about the range of this voltage. The Drain and Source would act as the effective two terminal resistor. Even a mosfet has a linear resistive region so this is not your only option. There are many other options as well which I'm sure will be mentioned.


There are a few ways to do this, each with their own issues. There are such things as "digital potentiometers". These act like pots with a large number of fixed set points, and the particular set point to use is controlled by sending digital commands, like over SPI or IIC. These are fairly common and available.

Why do you think you want to control the volume from a voltage instead of from a microcontroller? Where will the desired volume information ultimately originate from?

One issue with digital pots is that they are linear, and volume controls need to be logarithmic to get apparent constant volume change. This can be emulated by using a pot with a large number of taps and converting to log digitally. In that case you would have a micro with a A/D receive the desired volume voltage signal, convert that to a logarithmic scale, then send the resulting value to a digi-pot.

A long time ago before microcontrollers were accessible, I did a voltage controlled volume once by having the voltage control two LEDs oppositely. Each LED was optically connected to a CdS photoresistor. The two photoresistors were used as a light-variable voltage divider. Of course the result is quite non-linear in rather unpredictable ways. I was using it in a feedback loop to adjust the signal size of a oscillator, which otherwise inherently depended on frequency. With the feedback, it became largely independent of frequency. This was the same purpose Bill Hewlett used a light bulb for in his famous oscillator design.

  • \$\begingroup\$ Do you have a schematic for the LED feedback circuit? Sounds kinda' neat. \$\endgroup\$ – tyblu Dec 17 '11 at 12:28
  • \$\begingroup\$ @Tyblu: As I said, the output is simply two CdS photoresistors wired as a voltage divider. The input is two LEDs wired opposite so that as the input voltage goes up, one gets brighter and the other dimmer. For the quick hack I did long ago, I used LED, resistor, resistor, and LED wired from supply to ground. The input voltage drove the node between the two resistors. One possibly nice feature of this is that you get very good isolation between the drive and output parts of the circuit. \$\endgroup\$ – Olin Lathrop Dec 17 '11 at 13:52

There are a number of approaches. The three workable approaches would be:

  1. Use a device called a "digital pot"; these behave electrically much like real pots, provided that all three terminals remain between the voltage rails. Note that many digital pots have fairly high wiper resistance, and fairly crummy resistance tolerance, but pretty good resistance matching; they are often used in cases where they are driven by low-impedance sources, and they are used to feed high-impedance inputs, so the exact resistance characteristics don't matter.
  2. Use a scaling digital-to-analog converter which can accept the analog signal as its reference. A scaling DAC behaves something like a digital pot which has one end tied to physical or virtual ground. The fact that one end is "tied to ground" may simplify the circuitry compared to a digital pot.
  3. Use an analog-to-digital converter to convert all incoming signals to digital form, then process them digitally (doing things like scaling them up and down by multiplying the numbers), and then output them all using a digital-to-analog converter.
  4. If the signal originates in digital form (as with a CD player), do processing including the volume adjustment digitally, as in #3 above, but skip the ADC since the signal starts in the digital domain anyhow.

All four approaches are used in various devices. Which is best for your application may depend upon many factors.


Another approach which may sometimes be useful is to filter the signal to be output to ensure it has no components above a certain frequency, pulse-width modulate it at a frequency at least twice as high as the highest frequency passed by the filter, and then filter it again to remove the PWM artifacts. The requirement for double filtering may limit the audio fidelity that may be achieved via this method, but it can be pretty simple to implement crudely.


If the frequencies you'll be using are relatively low, you can use an operational transconductance amplifier like the LM13700 as a current controlled resistor - see the applications section of the datasheet. It's then straightforward to build a linear voltage controlled current source, and the combination will give you your voltage controlled resistor. It's also possible to construct current sources that are exponential in their response to applied voltages, which can be useful if the application is going to be for an audio volume control.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.