0

Can anyone suggest a good DigiPot for audio?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Can anyone suggest a good DigiPot for audio?

by maxhirez on Thu Jun 13, 2019 11:42 am

I've been futzing with MCP4131/41100/42100 pots on Arduino but running an audio signal through any of them always results in popping. I also tried a DS1803 on the understanding that it waited for a Zero crossing to let a change to the wiper position through but I can't seem to get any of the available tutorial circuits/sketches to even run a simple LED fade. Does AF have any supported digital potentiometers that would be appropriate for audio?

maxhirez
 
Posts: 16
Joined: Sat Jun 30, 2012 11:36 pm

Re: Can anyone suggest a good DigiPot for audio?

by adafruit_support_mike on Sat Jun 15, 2019 7:13 pm

The pop will be the result of sudden changes in the output. Are you changing the pot's setting from one value to another immediately, or ramping through the values in small steps?

adafruit_support_mike
 
Posts: 58480
Joined: Thu Feb 11, 2010 2:51 pm

Re: Can anyone suggest a good DigiPot for audio?

by maxhirez on Sat Jun 15, 2019 11:29 pm

Ramping. I'm trying to build a panner and eventually a quadraphonic spatial sequencer/mixer for eurorack style synths, so a LFO/other control signal would be read by an analog input in the first case and in the second I have (planned) an ILI9341 setting 8 separate digipots based on a 16 step sequence drawn on the screen or a selected program per channel.

maxhirez
 
Posts: 16
Joined: Sat Jun 30, 2012 11:36 pm

Re: Can anyone suggest a good DigiPot for audio?

by adafruit_support_mike on Mon Jun 17, 2019 12:01 am

Hmm.. in that case, I'd guess the pop is a break-before-make connection in the pot's switching array.

The two solutions I can think of would be to add an output filter, or to put a couple of pots in parallel.

The output filter would be fairly simple if you're connecting the signal to the high-impedance input of a speaker amp. If you're using a 10k digital pot, connect a 33k resistor to the output, then connect a 220pF capacitor between the free end of the resistor and GND. That will roll off frequencies at about 20kHz across much of the pot's range, dropping to about 16kHz when you have the whole 10k resistance in series with the output. If the pot completely disconnects the output while switching from one value to the next, the filter should keep any popping from happening.

To use pots in parallel, put a 1k-1k voltage divider between the outputs, connect the center of the divider to the power amp, then change the pot values one at a time. When pot A releases its output, pot B will hold the power amp's input at a known voltage. Then when pot B releases its output, pot A will hold the power amp's input at its new voltage. You only want one step of difference between the outputs at any time, so the voltage divider won't put much load on the pots.

A side benefit is that you'll double the resolution of the system. For pot settings that follow the sequence 44-44, 44-45, 45-45, the power amp will see input voltages of 44, 44.5, amd 45. In theory you can extend the idea to get much higher resolution.. with a 900R-100R divider, you can get the values 44.1, 44.2, ... 44.9 from the settings 45-44, 46-44, ... 53-44, with the setting 54-44 producing the same output as the setting 45-45.. but doing so would probably bring back the popping. Pot A would have to release its output between each of its steps, so you can't alternate changing A and B and land on a stable output voltage every time.

adafruit_support_mike
 
Posts: 58480
Joined: Thu Feb 11, 2010 2:51 pm

Re: Can anyone suggest a good DigiPot for audio?

by maxhirez on Mon Jun 17, 2019 12:30 am

Interesting! The filter would impact the spectrum of the signal a little at least a little, I take it? The parallel resistor idea is fascinating. It bumps up the part count and line use if it’s not an i2c configuration but sounds really rather elegant. Thanks! The TFT screen is surprisingly easy to work with and learn BTW.

maxhirez
 
Posts: 16
Joined: Sat Jun 30, 2012 11:36 pm

Re: Can anyone suggest a good DigiPot for audio?

by adafruit_support_mike on Mon Jun 17, 2019 1:01 am

maxhirez wrote:Interesting! The filter would impact the spectrum of the signal a little at least a little, I take it?

You'd lose some fo the highest-end output at the lowest volume levels, yes. You can adjust the component values to move the frequency where attenuation begins anywhere you want though. Increasing the product of R and C lowers the corner frequency, lowering the product increases the frequency.

The main tradeoff will be having enough of a filter to eliminate the pop, but not enough to make the output muddy.

maxhirez wrote:The parallel resistor idea is fascinating. It bumps up the part count and line use if it’s not an i2c configuration but sounds really rather elegant.

It's an old trick for getting more resolution out of simpler DACs. With the correct resistor values, you can make one DAC's whole output range span 1 LSB of another's, making it possible to build a 16-bit DAC from two 8-bit ones.

adafruit_support_mike
 
Posts: 58480
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.