I'm trying to replace an analog pot with a digital one for the volume control in a guitar amp. I have a digital pot - MCP4141 put instead of the analog one. However, checking on the oscilloscope seems like "zero level" is in the middle of the signal, so everything below this level gets cut off. How could I "move up" whole wave above the ground level? Does have to be a resistor put between "B" and ground? Or something else?
3 Answers
None of the 'pot' pins can be allowed to go (much) beyond the power supply voltages.
If you have a digital pot with 0/5V supply you need to keep the voltages within that range. Since you are dealing with audio signals, they are AC, and you could bias the input at 2.5V with a couple of resistors and your coupling capacitor, so that the analog input (and output) sit at +2.5V (thump on start-up). Or use +/-2.5V supplies. And make sure you never get too much input amplitude or you could destroy the chip.
It's often not that easy to replace a pot with a digital pot in an existing circuit- you end up redesigning.
There are some digital pots (eg. AD7376) that will work with relatively high and bipolar supply voltages, while retaining digital inputs referenced to ground but they tend to be relatively expensive. Depending on the function, you might also do much better with a log taper digital pot in an audio application.
-
\$\begingroup\$ So you cannot actually "move" whole signal above that zero level? \$\endgroup\$ Commented Feb 12, 2017 at 16:08
-
\$\begingroup\$ As I wrote above, a voltage divider (two equal value resistors) between +5/0 on the input with a coupling capacitor will do that.. input must be less than +/-2.5V peak. Side effects- thump on power-on and noise from the 5V supply. \$\endgroup\$ Commented Feb 12, 2017 at 16:11
-
\$\begingroup\$ Thanks for that. However, I don't know how, but I have plugged in the jack cable from the laptop to the amp, used online signal generator to send the signal of the freq. that I know of. Checked the wave on the jack before amp input - ideal sine wave. Then I have checked the signal at the very end - speaker output, and same thing... Is that even possible to get exactly same wave, whereas in theory the digital pot doesn't operate below "zero"? \$\endgroup\$ Commented Feb 12, 2017 at 17:43
-
\$\begingroup\$ it has to do with grounding and what is common with what. The protection diodes will cause a self-biasing of the coupling capacitor similar to the resistors I spoke of, but there will be distortion briefly under some conditions (increasing signal amplitude). The 1uF charges to something in between 0 and 5V depending on signal, and the pot element will discharge the cap, so you will get some distortion regularly. Maybe that doesn't matter too much with a guitar amp. \$\endgroup\$ Commented Feb 12, 2017 at 18:33
You can see from the absolute maximum ratings that the pot terminals are unipolar, so it doesn't look like it will support negative input voltages. Adding a series resistor won't help because the input voltage is going negative regardless. You would probably need to find a bipolar pot. I think this might be a candidate: https://www.maximintegrated.com/en/products/analog/data-converters/digital-potentiometers/DS1808.html
This might also be useful: http://www.diyaudio.com/forums/solid-state/87408-digital-potentiometer-bipolar-signal-question.html
according to the device data sheet, the potential to any input pin A or B will be between VSS to VDD i.e 0 to 5V, so you need to level shift the voltage applied to A input and DC couple the signal at wiper output to use the full voltage range
Refer to solution for using the level shifter answer