still searching for quiet switching -check this design out

Started by tempus, April 12, 2009, 02:15:02 PM

Previous topic - Next topic

tempus

Hey all;

I'd like to say thanks to those who've replied to my posts. Unfortunately, I don't always have time to actively follow them, but I am reading everything! I'm lucky to be fairly busy with music, so I only have time to work on the design side of my rig from time to time. Anyway, I got a chance to try out another switching design yesterday:



I've been able to switch my guitar in and out almost totally silently (pretty much like the JFET design in http://www.diystompboxes.com/smfforum/index.php?topic=75467.0.

Notice the absence of any biasing of the signal to 1/2 V+. I pulled out the bias resistors, and found no difference in the sound, which is great news. But why? I was expecting the sound to be pretty distorted as the signal tried to swing below 0v, but it's not. Can anyone offer some explanation for this? Also, when the MOSFET is switched off, there is some leakage (horribly distorted guitar tone when I strum really hard). Can anyone offer any ideas as to how to fix that?

Now, going back to the bias issue. If I bias the in and out at 4.5v, it seems that it will be impossible to turn the switch on using a uController, unless I can find a J or MOSFET that has a 0.5v Vgs. How can you control JFET switching with a uController?

Thanks


R.G.

Quote from: tempus on April 12, 2009, 02:15:02 PM
Notice the absence of any biasing of the signal to 1/2 V+. I pulled out the bias resistors, and found no difference in the sound, which is great news. But why?
Active devices can be of two types: (1) enhancement mode, where the device doesn't conduct at all until you force it to by applying some kind of signal and (2) depletion mode, where the device normally conducts all it can and you throttle it back by applying some kind of signal.

JFETs are depletion mode devices. If you place a voltage across the channel of a JFET, it tries to conduct Idss. You turn JFETs off by forcing the gate-channel junction to be reverse biased. For N channel devices, this means pulling the gate below the channel voltage. With a single 9V power supply, this means propping the drain/source up a few volts positive (more than Vgsoff) so that when you pull the gate all the way to ground, it forces the JFET to turn off.

MOSFETs may be made as depletion mode or enhancement mode devices. All of the common ones, and the BS170 in particular, are enhancement mode devices. That means that until the gate is more positive than the channel by some Vthreshold, nothing happens. For the BS170, Vthreshold is 0.5 to about 3.0V, so you can turn it off by just leaving the gate open, or any voltage less positive than about 0.5V. If you hold the gate above 4-5V, it's fully enhanced and the channel conducts all it can. So yes, the BS170 works fine with its source and drain at any voltage up to about 4-5V, and it gate being swung from ground (off) to +9V (0n).

There is a quirk of the MOSFET you have not yet found. The inherent way MOSFETs work forces a reverse biased substrate diode to be connected from the drain to the source. So an N-channel MOSFET looks like there is a diode with its cathode to the drain and its anode to the source, and there's nothing you can do to disconnect it. Signals which make the source more positive than the drain by 0.5V conduct through this diode. Your diode test worked because the signal levels are smaller than a diode drop. But humbucker pickups or the output of another pedal with boosted level will cause conduction through the substrate diode.

Some MOSFETs are set up with the substrate brought out to a separate lead, so you could tie the cathode of an N-channel to the most positive supply  and prevent it from turning on. This leaves a problem with big signals modulating the channel resistance near the power supply. That can be solved by using a P-channel device in parallel with the N-channel device, with its parasitic diode tied to V-, and the opposite control signal applied to its gate. This way, the pair of MOSFETs, one N and one P, can conduct or block any signal between the two power supplies. This circuit is so useful that... yep, that's a CMOS analog switch. They come four and more to a package. That's whats inside the CMOS switch chips.

QuoteI was expecting the sound to be pretty distorted as the signal tried to swing below 0v, but it's not. Can anyone offer some explanation for this?
Un boosted single coil guitar signal is only about 100mV. Bigger signals will distort.

QuoteAlso, when the MOSFET is switched off, there is some leakage (horribly distorted guitar tone when I strum really hard). Can anyone offer any ideas as to how to fix that?
There's that substrate diode. The fix is four-lead MOSFETs with N and P types making a complementary switch; that is, a CMOS switch.

QuoteNow, going back to the bias issue. If I bias the in and out at 4.5v, it seems that it will be impossible to turn the switch on using a uController, unless I can find a J or MOSFET that has a 0.5v Vgs. How can you control JFET switching with a uController?
Congratulations. You have discovered the logic level translation problem.  :icon_biggrin:  You feed the uC into a booster/amplifier that does the actual switching. There are CMOS level shifter chips to do exactly this, or you can use something like a BS 170 MOSFET fed from the uC pin to run the drain voltage from +9 to ground. There are darlington arrays (uA200x family) that do this as well. You can have the uC pin drive a 4.7K resistor into the base of an NPN like a 2N5088. All kinds of ways.

R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

tempus

Wow...

So basically, we're back to JFETs or CMOS switches. I thought there must be something about that diode I saw on the data sheet, but I didn't put 2 and 2 together to see that it was conducting. This must make MOSFETs (with the exceptions you've noted here) more or less useless for switching audio then. They should still be OK for things like amp channel switching though right? And all this logic level conversion stuff... Arrghh. I figured I'd have way less parts count and board space with a PIC, but now I'm back up in both areas again. Unless of course I just use some CD4066s, which could be driven by 5v.

Thanks by the way for taking the time to explain all this stuff RG. It goes a long way towards understanding how everything works and relieving frustration when things inexplicably don't work the way it seems they should.

R.G.

Quote from: tempus on April 13, 2009, 10:23:33 AM
This must make MOSFETs (with the exceptions you've noted here) more or less useless for switching audio then.
No, not useless. CMOS **IS** MOSFETs, just hidden inside a chip. You can get at the MOSFETs in a CD4007 if you're careful and use your own drivers. Many have.

QuoteThey should still be OK for things like amp channel switching though right?
They're great for any DC switching. Like using in the cathodes of power tubes for a standby switch. You'd be interested in "The MOSFET Follies" at GEO, I think, if you haven't read it allready.

QuoteAnd all this logic level conversion stuff... Arrghh. I figured I'd have way less parts count and board space with a PIC, but now I'm back up in both areas again
Actually, the CD4049 and CD4050 are logic level converters as well as inverter/buffers. You put 3 to 15V on pin 1 to power it, and the input distinguishes between ground and about 3V as logic levels. So you can drive them from 5V logic as in a uC, and the output swings between ground and the power supply on pin 1. No other conversion needed.
Quote
Thanks by the way for taking the time to explain all this stuff RG. It goes a long way towards understanding how everything works and relieving frustration when things inexplicably don't work the way it seems they should.
The devil is always in the details. I spend a lot of my life learning details.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

tempus

Here's an interesting thing RG. I tried the shunt switch setup you suggested using the BS170s and the distorted clipping that was coming through when the switch was off is now gone (which isn't surprising I suppose). Still a fair amount of bleed though, which I was surprised by.

Otherwise, there's a cheap 6 ohm Rds(on) switch.