Electrical – How to make a digital audio panning controlled by a microcontroller

audiodigital potentiometerpotentiometerresistance

I've been trying to pan an audio signal between 2 speakers, in a way that I could program it to create an autopan effect.

It seems an easy thing to do, but I have been struggling a lot with it and some help would be appreciated. Here is what I've tried to do:

1: Using Arduino with digital pot:

I tried to use the MCP4141 (100K) digital pot with an Arduino through SPI communication. It did work, but the resistance is not enough as in its highest resistance the sound is still audible. I even tried to use 2 pots in parallel to double the resistance, still, 200K was not enough and I realised I needed a much higher value. I tried to use a 1000K pot, the AD5241BRZ1M, which is the only one that seems to be available at 1000K (1M) resistance. However, not much information is available about it and I could not make it work with an Arduino. After many tries I had to give up.

Now I'm considering using a Teensy, but it seems to expensive for my project (teensy + audio board) and I don't know if it would work.

Is there any other solution?? Are there other types of potentiometers I'm missing?


Below is my attempt of using it with MCP4141 (with only 1 pot and 1 speaker, as if I make this work I can add the other later).


simulate this circuit – Schematic created using CircuitLab

MCP4141 datasheet:

Best Answer

How can I make a digital audio panning controlled by a microcontroller?

Try using this circuit: -

enter image description here

But scale up the resistors to suit your pot. The down side of using a digital pot is the wiper resistance. For the MCP4141 (100K) you used, it has a wiper resistance of up to 300 ohms, so there will be a small amount of leak through on the "muted" channel. I estimate it will be about 0.3/164 kohm if the 8k2 is scaled up to 162 kohm. In log terms that's about -55 dB. Is this enough? Only you can say.