Looking for Fast, Transparent Analog Switching

GroupDIY Audio Forum

Help Support GroupDIY Audio Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

skrasms

Well-known member
Joined
Jun 16, 2004
Messages
72
Location
Gary/Purdue-Lafayette
I am trying to work out a circuit for changing the capacitors of a filter automatically with some type of digital control (the control is the easy part, it isn't important here). The problem is that I would like the switch(es) to have as little effect on the frequency response as possible while also being as fast as possible.

Option 1: Manual Switches
This would be the most transparent, but since there is no way to control it automatically it isn't workable.

Option 2: Relay Network
This would be relatively transparent, and can be automated, but I do not know about speed and durability. I wouldn't expect a mechanical relay to last very long switching a hundred times per second. I am looking at solid-state relays but currently know nothing about them.

Option 3: Analog Switch
I looked at something like the CD4066, but it seems to be the least transparent method. The "ON" resistance is listed as 80 ohms for 15V operation. That seems like a lot of extra series resistance for capacitors to get. Are there equivalent chips with better specs?

Does anyone have experience doing something like this? I'm just tossing ideas around.
 
I do exactly this type of switching in the EQ-2NV, I use DG-408's.

There are some lower on resistance parts, the DG451 and 452, about 10 ohms, 40 volt rails. Sound fine.

Not super cheap, a couple of bucks each, but cheaper than good relays, and more reliable in the long run.
 
Douglas Self had two excellent articles about electronic analog switching in EW+WW (Jan & Feb 2004 IIRC). While not the lowest partcount, the 'concluding' circuit (using J112 JFETs) dealt with most/all issues I thought.

The articles are reproduced in his book: 'Self on Audio' (2nd ed).

Regards,

Peter
 
I don't remember the part number of the JFET switches which AP used in the System One oscillator but it had very low on resistance indeed (just a few ohms IIRC)--perhaps Peter could look it up?

I'm not sure what your application is, but if low distortion is a need then you want to look carefully at the switching topology--see the mentioned Self article.

Samuel
 
[quote author="Samuel Groner"]I don't remember the part number of the JFET switches which AP used in the System One oscillator but it had very low on resistance indeed (just a few ohms IIRC)--perhaps Peter could look it up?[/quote]
That must be PN5432, 5 Ohm max.

BTW, while browsing that binder I saw they use two DOAs that drive the output-TX. When I find the time I'll scan & post @ the GDIY-gmail-account.

you want to look carefully at the switching topology--see the mentioned Self article.
As we all will know the basic idea is to use inverting topology, as in Fig 9 b here:
http://www.dself.dsl.pipex.com/ampins/mixer/mixerdes.htm#7
so that the non-linear behaviour of the solid-state switching element is small-small-small w.r.t. the series resistor R (as on the right).

mixfig9.gif


Bye,

Peter
 
Thanks for all the replies, everyone! I am still trying to track down Self's articles. The book is $40 on Amazon, and I haven't had any luck finding the magazine.

[quote author="CJ"]What are we building?[/quote]

It's part of a filter for a synthesizer. I don't want to give out all the details because I'm afraid someone will just give me a solution and ruin much of the fun of coming up with my own. I can do a similar hypothetical situation, though.

Take an RC network where R is a linear digipot that can't be changed for any other part. It is a small value with 8-bit control. The C part of the circuit can be any capacitor and is open to be changed.

Since the digipot is linear, using it by itself to control cutoff frequency gives increasingly worse resolution at increasingly lower octaves (fewer points per octave). Changing C for a larger value increases the low-frequency resolution, but lowers the maximum cutoff frequency. By changing C in addition to the digipot value R, the cutoff can be controlled to spread more evenly across a wider musical range.

I want to swap out the capacitor in a way that:
1) Minimizes the change in transfer function compared to a pure capacitor swap alone.
2) Minimizes the artifacts of switching. It would be nice to keep voltage continuity going on the output. That will be tricky enough since whatever capacitor gets switched in ideally needs to be at the same potential as that which was just switched out (for the sake of smooth transitions in cutoff).

I hope that's clear.
 
[quote author="skrasms"]I am still trying to track down Self's articles. The book is $40 on Amazon, and I haven't had any luck finding the magazine. [/quote]
I don't know if EW+WW 'does' back issues* but since Douglas Self has his articles for sale in the form of his book I don't think it's fair to post those articles here. But don't feel bad about it, the basic idea is clear, he just makes it a bit nicer. More cheap parts added, making it nicer, but at somewhat diminishing returns.

Regards,

Peter


*: have you contacted them ? - note they've switched owners or publishers, so that may complicate things.
 
BTW, although I doubt they will be making very small geometry ones anytime soon, the webinar yesterday on new power semiconductors, mostly done by an International Rectifier guy on their GaN development efforts, brought out the fact that their GaN FETs are bidirectional. That is, there is no pesky body diode as you get with silicon DMOS structures. So they are bidirectionally blocking. With conventional DMOS you have to connect them back-to-back, and thus use twice as many.

This opens up some very interesting prospects.

The various webinars, which focused on power electronics and ran all day long, will be available for download/viewing on various of the Electronic Design magazine websites. I learned a lot. I watched the ones on ultracapacitors, magnetics, digital power, energy harvesting, and power semiconductors (the IR one). There was nothing specifically about audio but much that is applicable.
 
[quote author="clintrubber"]
As we all will know the basic idea is to use inverting topology, as in Fig 9 b here:
http://www.dself.dsl.pipex.com/ampins/mixer/mixerdes.htm#7
so that the non-linear behaviour of the solid-state switching element is small-small-small w.r.t. the series resistor R (as on the right).

mixfig9.gif


Bye,

Peter[/quote]

It seems like I've mentioned this before, but I did some electronic switching inside a recording console back in late '70s. early '80s. I used a variant on fig b where the feedback R was connected to the left of the transfer gate. The distortion was unmeasurable using the test equipment of the day.

Of course it needs some more parts for DC stability when off, quiet switching, etc,,, but I was able to get very good performance with inexpensive CMOS TG.

When using these switches, topology matters.

JR
 
[quote author="JohnRoberts"]It seems like I've mentioned this before...[/quote]
That was in this thread, I believe. There was another FET-switching thread, but that one is hard to find as it contained a lot of material from Wayne which was removed when he left.

JDB.
 
I have Self on Audio 2004 print but the mentioned article is not in it. Must be the later editions. However, I remembered a similar application in JL Hood's Audio Electronics, second edition, 2000, page 137. He uses 2N5459 JFet for input switching. Gate is pulled to -10V over 100K resitor to turn it off. Gate is also by-passed by 0.1uF cap to ground.

However, based on your below requirement ;

....whatever capacitor gets switched in ideally needs to be at the same potential as that which was just switched out (for the sake of smooth transitions in cutoff).

you will be pushed hard. No matter what you do, with solid state you are just going to have to take the on resistance into account in your cut-off frequency calculations if you are this fussy.

You mentioned 8 bit operation on the digipot, but you are not thinking of 256 selectable cut off frequencies are you? If not how many will you have?
 
That approach mentioned by JR is just about impeccable (switching independent networks into a summing node), IMO. The major drawback is that the given opamp as well as the source have to drive everything all the time. Impedances may need to be low to keep noise down. And with more than a couple of networks that are to be switched, the current demands can go up in a hurry. Thus you have to worry about output stage distortions, including crossover distortion.

You could compensate for these effects, but it gets elaborate :roll:

You also have parasitic capacitances injecting across the "off" switches, but for audio and if Z's are low this isn't too bad. If it were, two or three switches in series/shunt configurations can be used.
 
yup.. transfer gates have all kinds of parasitics and stray paths that need to be accounted for.

I was switching between two banks of line level sources so it worked fine for my needs. Noise didn't seem to be a problem but this was 25-30 years ago.

JR
 
[quote author="sahib"]
you will be pushed hard. No matter what you do, with solid state you are just going to have to take the on resistance into account in your cut-off frequency calculations if you are this fussy.

You mentioned 8 bit operation on the digipot, but you are not thinking of 256 selectable cut off frequencies are you? If not how many will you have?[/quote]

Thanks for the feedback. Right now I know some, but not everything, about the circuit I am interfacing with. It is a filter circuit contained inside an IC. The only external components are capacitors. The datasheet does not give the equivalent circuit, so all I have to work with are hi-res chip die photos and schematics other people have made from them.

The capacitors I am switching are actually integrating capacitors, that much is known for certain.

256 frequencies is pretty low resolution for a synth filter where cutoff frequency sweeps need to sound smooth. The goal is more like 1024 steps with a semi-logarithmic curve. Assuming I can change cap values "instantly" or unobtrusively, that will be relatively easy to setup in the software controlling the whole thing.
 
You don't fast-sweep a filter by switching caps.

Say you are on a 0.010u cap and at this instant the cap is holding a 1V charge. Now you want to switch to the 0.011u cap to lower the filter freq. The 0.011u cap may have bled to zero since the last time you used it, or may be hanging on to 2V from before. Plus or negative 'cuz audio swings both ways.

When you switch caps you get pops, and potentially as large as your signal. OK if you switch rarely for set-up. cone-slamming loud if you switch under big signal.

> The only external components are capacitors.

Then for small sweeps you vary the internal resistors. If they are fake, as in most sampled-cap canned filter chips, you vary the sampling rate. There are limits to this and you may not get a full octave. Dumb old Moog-type analog VCFs can be swept many octaves without glitch.

> pretty low resolution for a synth filter where cutoff frequency sweeps need to sound smooth.

"Cut-off" as in low-pass? A simple one-pole filter has such a gentle slope that half-octave steps are not large. Steeper filters really cut-off, meaning your ear peeks the highest partial in the pass-zone. Unless your sound is exceptionally rich, you only have a few partials per octave, and part-octave filters seem reasonably "continuous". 25 freqs per octave (256/10 octs) may be more than you need. (But 256 linearly-spaced freqs will be too many at the top and not enough in the bass.)

Get it working before you worry about "transparent". 4066 or 4051 -will- proof the concept -or- show that this approach needs further bug-whacking. When it "works good" except your 0.1%-5% THD from the low-volt CMOS switches, -then- go for the heavy-metal switch-chips with couple-ohm R(on).

Quite off-topic joke: Here is a relay with low R(on) but speed may be less than you need.
ff_1_sbl.JPG

http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=280001326001
Yes, that is an inch-ruler.
No, he does not have 256 of them.
 
[quote author="PRR"]You don't fast-sweep a filter by switching caps.
[/quote]

The goal is coming up with the best compromise of speed and smoothness. It might be a fruitless endeavor, and I might be very naive, but I think it's worth playing around with. I've always learned the most from situations like this that just start as a shot in the dark.

[quote author="PRR"]
Say you are on a 0.010u cap and at this instant the cap is holding a 1V charge. Now you want to switch to the 0.011u cap to lower the filter freq. The 0.011u cap may have bled to zero since the last time you used it, or may be hanging on to 2V from before. Plus or negative 'cuz audio swings both ways.

When you switch caps you get pops, and potentially as large as your signal. OK if you switch rarely for set-up. cone-slamming loud if you switch under big signal.
[/quote]

This is the biggest issue where I am struggling. It is the real design issue, while everything else is just simulating/testing/adjusting. I haven't built a circuit yet because I haven't come up with any good ideas to compensate for the jumps.

The chip I am using runs only on +9, +5, and ground, and I believe keeps the audio around a 4.5V DC bias (makes sense with the 0, +9 rails). Is there any way to get a capacitor that switches "in" to be near the same potential as the capacitor that is being switched "out"? I'm still working on even a poor solution here.

[quote author="PRR"]

"Cut-off" as in low-pass? A simple one-pole filter has such a gentle slope that half-octave steps are not large. Steeper filters really cut-off, meaning your ear peeks the highest partial in the pass-zone. Unless your sound is exceptionally rich, you only have a few partials per octave, and part-octave filters seem reasonably "continuous". 25 freqs per octave (256/10 octs) may be more than you need. (But 256 linearly-spaced freqs will be too many at the top and not enough in the bass.)

[/quote]

The filter is multimode with 12db/oct LP and HP modes, plus what looks like 6dB/oct BP. I'm used to calling -3dB LP and HP points cutoff frequency. The frequency resolution is important for high-resonance situations, which in testing make the steppy low-frequency response noticeable. By choosing cap values I can get the high-resolution areas where I want them and combined with the variable internal resistors get plenty of smooth control. It's just the matter of handling capacitor switching as elegantly as possible.


[quote author="PRR"]

Get it working before you worry about "transparent". 4066 or 4051 -will- proof the concept -or- show that this approach needs further bug-whacking. When it "works good" except your 0.1%-5% THD from the low-volt CMOS switches, -then- go for the heavy-metal switch-chips with couple-ohm R(on).

Quite off-topic joke: Here is a relay with low R(on) but speed may be less than you need.
ff_1_sbl.JPG

http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=280001326001
Yes, that is an inch-ruler.
No, he does not have 256 of them.
[/quote]

I can't imagine the kind of power that thing must be switching.
 

Latest posts

Back
Top