DIYstompboxes.com

DIY Stompboxes => Digital & DSP => Topic started by: joakinrox on July 12, 2017, 02:13:25 PM

Title: Multiplexer as a Digital Pot HELP
Post by: joakinrox on July 12, 2017, 02:13:25 PM
Hi guys, I have a project in mind about digital control of my pedalboard. It involves saving effects presets in a microcontroller and switching between many presets without fiddling with any knobs. for this reason i need to "digitalize" my pots a little bit, and I'm planning to replace all of them with the following arrangement:


(https://s23.postimg.org/toa8j9v47/IDEA.png) (https://postimg.org/image/toa8j9v47/)

A rotary encoder as the control input of an analog multiplexer hooked up to a resistor array (as shown in the picture). But here I'm having some doubts:

-Will the signal that passes through the mux (the "middle" lug of my pot) suffer from frecuency losses? (I'm planning on using analog mux designed for audio)
-¿Can you recommend a good MUX for this application? (the only audio one i could find that worked over 5 volts was the MAX4508, but I'd  like a 16:1 mux to save me the trouble of using two 8:1 muxes)
-I don't care about power consumption as my pedalboard will be plugged in at all times (I'm a bedroom player)


NOTE: i though about using digital pots for this aplication, but i could not find one that worked over 5 volts, and their pass currents are extremely low (1mA compared the the MAX4508's 30mA) so I'm not sure these would work for stompboxes.


Any tips, comments, suggestions or corrections would be greatly appreciated!!!!

Title: Re: Multiplexer as a Digital Pot HELP
Post by: Digital Larry on July 12, 2017, 08:20:07 PM
I'm a little lost by your concept here.  If you are going to replace real pots in regular stompboxes with digital pots, then you'll need to have a digipot for each real pot you are replacing.  You can't mux a single pot to 8 different locations, unless your circuit is such that the other 7 things don't mind having an open circuit.  You could have a mux select one of 8 or however many pots to read its value. 

Perhaps you could explain a little more about how your microcontroller is going to interface to the circuit.  Also I don't understand what the "resistor array" is for.
Title: Re: Multiplexer as a Digital Pot HELP
Post by: joakinrox on July 13, 2017, 07:10:30 PM
Hi Larry, I'm sorry if I didn't explain myself very well, English is not my mother tongue. I know I have to replace each pot with a digital one, what I'm going for is something like what's on this image.

(https://s18.postimg.org/i9ss1m3n9/Image_b.png) (https://postimg.org/image/i9ss1m3n9/)

Essentialy the analog mux's output will act as my pot's wiper, but instead of having to turn a knob I could send a control signal to increase the resistance between A and W (by going from say.. muxing input 2 to muxing input 4) so it goes from 40k to 80k  hence making my circuit act as a potentiometer.

Edit: i know this would be changing the resistance in discrete steps, so my initial idea would be to have atleast 16 resistors in my "pot" so it can work less abruptly, and maybe making the values of the resistances different so my travel emulates a log pot, reverse log, etc.
Title: Re: Multiplexer as a Digital Pot HELP
Post by: Digital Larry on July 13, 2017, 10:10:19 PM
Ohhh... NOW I get it!   :D

Well, as you've mentioned, there will be a discrete jump when you switch between taps.  And you'll need to make sure that the voltages through the analog mux don't go outside of its Vss to Vdd, implying that you'd want to power that from a split (+/-) supply.  I haven't done it myself but it seems like it should work.
Title: Re: Multiplexer as a Digital Pot HELP
Post by: joakinrox on July 14, 2017, 04:54:38 AM
Hehe good! I'll order the partes to build a prototype then. Do you know of any mux besides the max 4508 forma this job? (The only oneE i could find above 5vdc supply voltages).


And do you think i could suffer from tone loss in this arrangement? All i saw in the datasheet was a series resistance in the mux.. But nothing on capacitances or inductances.... so i think there shouldn't be any changes in tone right?
Title: Re: Multiplexer as a Digital Pot HELP
Post by: potul on July 14, 2017, 06:19:33 AM
Have you considered usign a real digipot?
Title: Re: Multiplexer as a Digital Pot HELP
Post by: Digital Larry on July 14, 2017, 11:28:38 AM
This one says it works at 12 volts.  http://www.mouser.com/ProductDetail/Maxim-Integrated/MAX4508ESE+/?qs=LHmEVA8xxfad0IOXI5iwgg==

Then there's the old 4051.   http://www.ti.com/product/CD4051B  analog <= 20 volts p-p, should be good.

I'm pretty sure that these use FETs for the analog switching.  At audio frequencies, capacitance and inductance are negligible.
Title: Re: Multiplexer as a Digital Pot HELP
Post by: MetalGuy on July 14, 2017, 04:02:51 PM
There's a big choice of digipots that work at higher voltages than found in a pedal so it doesn't make sense to make things so complicated.
Title: Re: Multiplexer as a Digital Pot HELP
Post by: ElectricDruid on July 14, 2017, 07:22:25 PM
I agree that you should probably just be looking for digipots that will do the job directly, rather than building your own from discrete parts.

But...if you were trying to build your own, there's a bug in that schematic. The resistors ned to be connected in a chain, not to a single common point, and the multiplexer connections (x0 to x7) need to go the junctions of the resistors.

This might be good:

http://www.analog.com/media/en/news-marketing-collateral/product-selection-guide/Choosing_the_Correct_Digipot.pdf (http://www.analog.com/media/en/news-marketing-collateral/product-selection-guide/Choosing_the_Correct_Digipot.pdf)

Tom
Title: Re: Multiplexer as a Digital Pot HELP
Post by: potul on July 15, 2017, 02:00:24 PM
BTW, you can get some digital pots for free from sample programs... I think I got some from Microchip. (or was it analog devices? I don't remember)
Title: Re: Multiplexer as a Digital Pot HELP
Post by: MetalGuy on July 15, 2017, 03:54:44 PM
There's a downside with those Analog digipos though. Most high voltage types are in a TSSOP package which is TINY! If you don't have or you have limited SMD soldering experience maybe it would be a good idea to stay away from it. However there are many digipots from other companies.
Title: Re: Multiplexer as a Digital Pot HELP
Post by: ElectricDruid on July 17, 2017, 06:30:49 PM
I agree that TSSOP is not where you want to start learning SMD soldering. SOIC would be a much better place to start, for example. And finding the chip you want in the package you need is becoming increasingly difficult in many cases...

Tom
Title: Re: Multiplexer as a Digital Pot HELP
Post by: joakinrox on July 19, 2017, 10:49:14 AM
Thanks for all the replies guys. I've been looking into some digipots and i think I have most resistance values covered. But in the event that I couldnt find a particular value and need to build the schematic i posted:

would I need to use dc decoupling caps on the pot's terminals? Does dc get injected in the mux's inputs/outputs?

And how about a digipot's inputs/outputs? Would i have to use decoupling caps on its terminals?

In the event that i did have to use such caps, would a 22uf cap be high enough as to not mess with audio frecuencies?
Title: Re: Multiplexer as a Digital Pot HELP
Post by: ElectricDruid on July 20, 2017, 07:15:15 AM
Whether you need DC decoupling caps would depend how the signal you're sending in is biased.

Assume the digipot chip (or digipot replacement circuit) is running off 0-9V. If you've got a audio signal which is already biased to a 4.5V midpoint voltage, then there's no problem, feed it straight in. If the audio is referenced to ground and hasn't got any bias applied, then you need to bias the input of the digipot and feed the signal in via a cap like you suggest.

22uF is almost certainly enough, but you should really think about what impedance you're feeding and work out a value based on that rather than just throw a huge cap at the problem. Many times 100nF is enough. I mostly aim to keep decoupling caps at 470nF or below since those values are easy to find in film cap ranges and that saves me putting electrolytics in the signal path and having to worry about polarity. 470nF gives a roll-off well below 5Hz with only 100K input impedance. At that, even 10K or less input impedance is possible (rolloff at mains hum frequencies).

HTH,
Tom
Title: Re: Multiplexer as a Digital Pot HELP
Post by: Beo on July 21, 2017, 12:30:14 AM
When I was looking at using the Hi-V Digipots for a microprocessor controlled preset application, I found most of them only went up to about 100K. Many of the pedal designs we work with have 1M pots. There are tssop to dip adapter boards which are useful for working with these small devices, but the lack of Mohm digipots was a roadblock.
Title: Re: Multiplexer as a Digital Pot HELP
Post by: MR COFFEE on July 29, 2017, 04:15:46 PM
You can scale most circuits to suit the pot value you need to use. And lower noise and noise pickup at the same time.
mr coffee