Using a Digipot as a pan control
« on: September 10, 2019, 04:55:44 PM »
I'm trying to design a circuit that will allow MCU control of signal panning.

I have 8 x MONO output jacks, that when unplugged, are normalled onto the wipers of the AD5204 50K linear Digipots.
Either sides of the pot would then go into left and right summing amps.

However, I've been advised that panning law is going to be against me with the signal being to weak when in the middle, than when it is  panned.

It's left me scratching my head as to how to get around it.

One thought I had was that since we'd be under digital control, and the audio signals are coming from a codec, then if we know the pot is in the middle then we could perhaps pre attenuate the signal by some amount.







Re: Using a Digipot as a pan control
« Reply #1 on: September 10, 2019, 06:05:33 PM »
Panning law usually follows a sine/cosine arrangement. 
Unless you're actively panning during a mix, it shouldn't really matter as you can adjust level accordingly.
Back when it used to be important to have mono compatability for AM radio and such, 6dB down @ centre was needed.
But constant power calls for 3dB down @ centre in an acoustic environment and so 4.5dB was the compromise @ the BBC. 
Given that there are multiple reflections in a typical listening room, it can almost not matter unless you're panning the grand piano from hard left to right. 
Anyway 👍

Edited for clarity.
« Last Edit: September 10, 2019, 06:14:49 PM by Winston O'Boogie »

JohnRoberts

Re: Using a Digipot as a pan control
« Reply #2 on: September 10, 2019, 07:07:56 PM »
with DPOTs you can program in any pan law that you can imagine.... Just command left and right to be whatever you want...

JR
Visit https://circularscience.com to hear what properly "cleared" drums sound like.

squarewave

Re: Using a Digipot as a pan control
« Reply #3 on: September 10, 2019, 07:32:17 PM »
Yeah but with only 256 steps resolution could get a little coarse in certain positions. It might be worthwhile using a law bending resistor in concert with a table lookup.

Also that's only a 5V part so headroom could be an issue. And the usual concerns of wiper resistance and flatness apply so it needs to be buffered in / out. I think AD and Maxim have high voltage dpots that would be better.

Re: Using a Digipot as a pan control
« Reply #4 on: September 10, 2019, 08:46:01 PM »
Also that's only a 5V part so headroom could be an issue. And the usual concerns of wiper resistance and flatness apply so it needs to be buffered in / out. I think AD and Maxim have high voltage dpots that would be better.

when dealing with a line level signal? VAA of the codec is 5V

The digipot max says 5.5V

squarewave

Re: Using a Digipot as a pan control
« Reply #5 on: September 10, 2019, 09:48:41 PM »
I didn't see the part about the signal coming from a codec. If that's the case then 5.5V is fine.

Although if there's a codec then you might consider using a chip with a codec paired with some mix capabilities and then you don't need dpots at all. If you're already at 5V, digi-mixing is always going to be best (near flawless).

Re: Using a Digipot as a pan control
« Reply #6 on: September 10, 2019, 09:52:28 PM »
I didn't see the part about the signal coming from a codec. If that's the case then 5.5V is fine.

Although if there's a codec then you might consider using a chip with a codec paired with some mix capabilities and then you don't need dpots at all. If you're already at 5V, digi-mixing is always going to be best (near flawless).

That would be ideal, but there are some hardware preset analogue filters that can be switched in and out of circuit and the panning needs to occur after that.. :(

Re: Using a Digipot as a pan control
« Reply #7 on: September 10, 2019, 10:02:21 PM »
Apparently the schematic I drew in the original post, wouldn't work for panning, and the wiper should instead be to ground.

Would this be a better solution?

thanks for looking!

JohnRoberts

Re: Using a Digipot as a pan control
« Reply #8 on: September 11, 2019, 12:27:52 PM »
OK this is getting closer... for that value DPOT the 10k resistors need to be more like 130k to deliver reasonable (-3dB) pan law, and feedback resistor on the post gain stage will need to restore the insertion loss (-10dB?). I am too lazy to do the math but close to 400k.  (I typically used 5k pan pots in similar circuits).

JR
Visit https://circularscience.com to hear what properly "cleared" drums sound like.

Re: Using a Digipot as a pan control
« Reply #9 on: September 11, 2019, 12:30:10 PM »
Thanks John,
Actually those Digipots are 10k, and not 50k as the part number suggests.
So 5k to each side.


JohnRoberts

Re: Using a Digipot as a pan control
« Reply #10 on: September 11, 2019, 12:54:48 PM »
Thanks John,
Actually those Digipots are 10k, and not 50k as the part number suggests.
So 5k to each side.

you can do the math... you typically want both sides down -3dB when pot is centered, and 0dB or fully off when full L or full R. Since there is insertion loss from this network the make up gain stage needs about +10dB or so...

Check my sketchy memory but for 10k pan pot something 4x 13k resistors in series with something like 39k feedback in the make up gain stage... those values should give you unity for hard left or hard right, with both sides -3dB when pan pot centered. But check because I haven't designed a pan circuit for several decades.

JR
Visit https://circularscience.com to hear what properly "cleared" drums sound like.

squarewave

Re: Using a Digipot as a pan control
« Reply #11 on: September 11, 2019, 01:47:20 PM »
Are you also mixing? If yes, then a completely different strategy would be to just use two dpots on each channel into each bus. Meaning no pan-pot. Just use separate dpots to control the level of signal delivered to each bus. Because you can control both dpots independently you can adjust the pair together for mix and differentially for pan. So it uses two dpots per channel but you eliminate the ones you would need for mixing. And impedances go down which improves performance issues associated with dpots such as not being able to completely turn off because of Ron, distortion because of Ron flatness and resolution because you're exercising much more of the dpot steps.

Just thinking out loud.

Re: Using a Digipot as a pan control
« Reply #12 on: September 11, 2019, 02:02:25 PM »
Are you also mixing? If yes, then a completely different strategy would be to just use two dpots on each channel into each bus. Meaning no pan-pot. Just use separate dpots to control the level of signal delivered to each bus. Because you can control both dpots independently you can adjust the pair together for mix and differentially for pan. So it uses two dpots per channel but you eliminate the ones you would need for mixing. And impedances go down which improves performance issues associated with dpots such as not being able to completely turn off because of Ron, distortion because of Ron flatness and resolution because you're exercising much more of the dpot steps.

Just thinking out loud.

+1.  And even if you can't afford to use two dpots, eliminating pull-up R's and just living with 6dB down @ centre and compensating with gain will get rid of some of the issues.

JohnRoberts

Re: Using a Digipot as a pan control
« Reply #13 on: September 11, 2019, 02:44:46 PM »
Are you also mixing? If yes, then a completely different strategy would be to just use two dpots on each channel into each bus. Meaning no pan-pot. Just use separate dpots to control the level of signal delivered to each bus. Because you can control both dpots independently you can adjust the pair together for mix and differentially for pan. So it uses two dpots per channel but you eliminate the ones you would need for mixing. And impedances go down which improves performance issues associated with dpots such as not being able to completely turn off because of Ron, distortion because of Ron flatness and resolution because you're exercising much more of the dpot steps.

Just thinking out loud.
My first answer ASSumed use of two pots per channel...  apparently he is trying to use a single DPOT for pan...

Using two DPOTs gives him pan and fader....  so not that inefficient... not to mention without the noise gain, and drama of pan circuit make up gain.  DPOTs could directly feed the buses eliminating the make up gain stages too...

But that is not what the OP asked for...  ;D

JR

Visit https://circularscience.com to hear what properly "cleared" drums sound like.

Re: Using a Digipot as a pan control
« Reply #14 on: September 11, 2019, 03:04:45 PM »
For clarity, the application is an 8 mono output dac, in a drum machine.
I want to create a stereo mix buss, output level is already being controlled by the dac.

those outputs end up at mono jacks, which, if nothing is plugged into them, will be normalled into those digipots for placement into the stereo mix out.


Re: Using a Digipot as a pan control
« Reply #15 on: September 11, 2019, 03:27:33 PM »
For clarity, the application is an 8 mono output dac, in a drum machine.
I want to create a stereo mix buss, output level is already being controlled by the dac.

those outputs end up at mono jacks, which, if nothing is plugged into them, will be normalled into those digipots for placement into the stereo mix out.

Any potentiometer that has its taper modified to approximate sine/cosine for -3dB @ centre  will have compromises, the use of a single pot having more compromises than two parallel pots. 
Again, if you can raise the level at the DAC for the more centrally panned sounds, including for any that are dynamically panned, then -6dB down (as it was in your initial idea)at centre is fine (Edit: IMHO of course)
« Last Edit: September 11, 2019, 03:33:06 PM by Winston O'Boogie »

JohnRoberts

Re: Using a Digipot as a pan control
« Reply #16 on: September 11, 2019, 03:45:50 PM »
Since you apparently have it sorted all I can add is that the proper spelling is "bus".

JR
Visit https://circularscience.com to hear what properly "cleared" drums sound like.

Re: Using a Digipot as a pan control
« Reply #17 on: September 11, 2019, 03:54:52 PM »
Since you apparently have it sorted all I can add is that the proper spelling is "bus".

JR

Indeed.  But not nearly as annoying as "summing mixer" which will only make sense in my world when there are "un-summing mixers".
Does he have it sorted though?

PRR

Re: Using a Digipot as a pan control
« Reply #18 on: September 11, 2019, 04:52:45 PM »
> annoying as "summing mixer"

There are multiplying mixers, used in radio.

And cake-batter mixers.

Re: Using a Digipot as a pan control
« Reply #19 on: September 11, 2019, 07:19:24 PM »

And cake-batter mixers.

Well them's just a whole 'nother kettle of wax.




 

Related Topics

  Subject / Started by Replies Last post
3 Replies
1609 Views
Last post March 18, 2007, 04:46:10 AM
by mg73
4 Replies
2413 Views
Last post December 20, 2008, 01:13:14 PM
by bitman
8 Replies
3683 Views
Last post May 04, 2009, 12:33:45 PM
by skal1
0 Replies
264 Views
Last post March 15, 2019, 06:00:32 AM
by adamasnan