I am very confused about how to go about using my digital potentiometer to control an audio signal. I have a MCP4231 digital pot and I would like to use it as a MCU controlled variable resistor for gain control of a headphone amplifier. I know there are much better ways of doing this (such as special op-amps) but I would like to try this using the digital potentiometer.

So here is my quesiton. Why in this video there is no mention of biasing the input signal, where as over here it is necessary?

Additionally, the answer to this question about DC biasing of audio signal says that the method mentioned here should not be used due to noise from the input signal!

So basically, I am VERY confused. Do I need a DC bias for the chip I am using? Why can the YouTube lady get away with no biasing? Should I use the method in the first link of the second one? THEN finally, once I choose a method, how do I choose my resistor values?

By the way, this is the circuit I am trying to control. The analog potentiometer that I want to replace is circled in red.

enter image description here

  • \$\begingroup\$ The DC component is already being removed by C2 after the analog pot. The digital pot will not withstand negative voltage like the analog pot will, so you will need to decouple it first and add an offset. \$\endgroup\$ – Jon Feb 23 '15 at 22:21
  • \$\begingroup\$ That's what I have been reading, but then why does the YouTube lady not mention anything about DC offset? Also, when adding the offset, how can I avoid the introduction of noise from the power source? Is this a bad method: electronics.stackexchange.com/questions/134159/… \$\endgroup\$ – John August Feb 23 '15 at 22:29
  • \$\begingroup\$ Included response in answer. Notice the last schematic in that answer is very similar to mine. The speaker is not biased to GND, it is biased to "speaker ground", which may happen to be 0V. \$\endgroup\$ – Jon Feb 23 '15 at 23:37
  • \$\begingroup\$ Can you please include the schematic in the question? \$\endgroup\$ – Dmitry Grigoryev May 13 '19 at 10:54

This is not 100.00% complete:


simulate this circuit – Schematic created using CircuitLab

Re: comments
The YouTube lady cut this out of a larger circuit to demonstrate the potentiometer's function, not necessarily how to use them correctly for audio applications. We aren't shown the input or output stages. The pot should be grounded at or below the lowest voltage expected on the input. As per the comments, her diagram also shows input and output swapped. Her setup was "good-enough" to demonstrate the pot doing work.

Take all internet advice with a grain of datasheet-salt.

See figures 13 and 14 in this selection guide.
Figure 13 is referenced to 0V and is decoupled after the pot.
Figure 14 is referenced to -15V and is decoupled immediately.

  • \$\begingroup\$ "Take all internet advice with a grain of datasheet-salt" - agreed! I'm getting to the point where I am about to implement your response into my circuit. It is starting to make sense, especially now that I know the YouTube lady didn't show the whole circuit. Also, that guide you posted is very helpful. Thank you for the answer! \$\endgroup\$ – John August Feb 23 '15 at 23:53

As long as your incoming signal does not exceed ±5.5v, you can use a digital pot like the ISL22414 that tolerates negative voltages. To drive that, you will need a negative supply, but that can be provided easily by a low-cost voltage converter like the ICL7660 (which I have used in a product, and works fine).

Something like this:

enter image description here

If your signal does exceed ±5.5v, you could add a voltage divider in front of the pot.

  • \$\begingroup\$ Generating a negative rail for the digipot, when the signal is immediately AC coupled afterwards, seems a bit pointless. \$\endgroup\$ – Nick Johnson Feb 24 '15 at 11:10
  • \$\begingroup\$ @NickJohnson I was trying to fit the digital pot in as an exact replacement for the pot shown in his schematic without changing anything else. \$\endgroup\$ – tcrosley Feb 24 '15 at 13:50

If the pot in the vid goes negative at the terminals, it is being used out of spec, though not necessarily outside of absolute maximums. I suspect the output is distorted to some degree. Even if it's crystal clear, it's still lousy engineering practice, and should be avoided. As tcrosley points out, there are digital pots that can do what you want to do.


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.