Author Topic: Cleanest Transistor for Audio ON/OFF Switching  (Read 13619 times)

bartimaeus

Cleanest Transistor for Audio ON/OFF Switching
« on: September 19, 2017, 01:19:43 PM »
Hello!

I'm designing a circuit in which I use a transistor to remotely pass/mute an audio signal by sending a voltage to it. I want the cleanest possible version of the signal when it's passed. I can't use a relay because I will be switching very frequently: think square-wave tremolo.

I'm currently thinking of using a 2N4123, because it sounded best out of the transistors that I have, but I'm sure there's something better?

Thanks for the help!

digi2t

  • Awesome!
  • ****
  • Posts: 4668
  • Total likes: 1378
  • "Digital? Any idiot can count to 1!" - Bob Widlar
Re: Cleanest Transistor for Audio ON/OFF Switching
« Reply #1 on: September 19, 2017, 01:32:16 PM »
Maybe if you post the circuit the gurus here may have some excellent suggestions.

Personally, when I think tremolo, my mind goes to vactrols.
  • SUPPORTER
Dead End FX
http://www.deadendfx.com/

Asian Icemen rise again...
http://www.soundclick.com/bands/default.cfm?bandID=903467

"gigantically smaller."  - pinkjimiphoton

"The more "slam" you can get, the better." - anotherjim

Kipper4

Re: Cleanest Transistor for Audio ON/OFF Switching
« Reply #2 on: September 19, 2017, 01:46:07 PM »
^ yes please.

I'm thinking ea tremolo.
Square wave in an ea trem might not go so well .

I have an idea though.
"Duck_Arse
otherwise, you might end-up with SOIC or gullwings, for surface mounts."


Smoke me a Kipper. I'll be back for breakfast.

Grey Paper.
http://www.aronnelson.com/DIYFiles/up/

Fancy Lime

Re: Cleanest Transistor for Audio ON/OFF Switching
« Reply #3 on: September 19, 2017, 02:07:12 PM »
Hi Rich,

are you thinking about the EA Tremolo but with the FET as on-off switch in the audio path instead of controlling the gain? I had that on the breadboard once, sounds great! Highly recommended. I think I used a J201 or 1N5457.

Cheers,
Andy
My dry, sweaty foot had become the source of one of the most disturbing cases of chemical-based crime within my home country.

bartimaeus

Re: Cleanest Transistor for Audio ON/OFF Switching
« Reply #4 on: September 19, 2017, 02:14:08 PM »
Thanks for the replies! It's not a muting effect, so perhaps square wave tremolo was a bad comparison. A lot of tremolo gets a better throbbing sound by changing the tone of the signal, but I don't want that. I just want to be able to abruptly mute an audio signal on command. Nothing gradual – a vactrol would be much too slow.

My circuit already does this fine with the transistor that I use, but I was wondering if anyone could recommend a transistor that might sound cleaner and more transparent than the 2N4123. There's no point sharing the circuit, as it's as basic as these things get: audio-in on the collector, audio-out on the emitter, and the controlling voltage to the base (through a resistor). I'm also fine tweaking the circuit for a PNP or other transistor if it has a cleaner sound.
« Last Edit: September 19, 2017, 02:22:19 PM by bartimaeus »

Fancy Lime

Re: Cleanest Transistor for Audio ON/OFF Switching
« Reply #5 on: September 19, 2017, 02:49:45 PM »
So if its just a pure voltage controlled on/off switch you are looking for, have a look at the bypass switching of Boss or Ibanez/Maxon pedals. I think they mostly use the 2SK30A for this role, but some others have also been used over the years. I've also seen the J112 used for similar jobs, which may be easier to find. When used correctly, a JFET in such a position should not introduce any audible sound coloration.

EDIT: And as always, there is an excellent source for this type of thing from one of the usual suspects, R.G.'s Geofex:
http://www.geofex.com/article_folders/tstech/tsxtech.htm

Also tells me that the 2SK118 is also used. Whereas electrosmash lists a 2SK44SP:
https://www.electrosmash.com/tube-screamer-analysis

Plenty of choices.

Andy
« Last Edit: September 19, 2017, 03:04:31 PM by Fancy Lime »
My dry, sweaty foot had become the source of one of the most disturbing cases of chemical-based crime within my home country.

Transmogrifox

Re: Cleanest Transistor for Audio ON/OFF Switching
« Reply #6 on: September 19, 2017, 08:14:26 PM »
Quote
it's as basic as these things get: audio-in on the collector, audio-out on the emitter, and the controlling voltage to the base (through a resistor).
The success of such a circuit depends strongly on what is driving it and where it's driving from.  Basically you will get blatty distortion when it is supposed to be turned off (failure to mute) when you get signal levels above ~0.6V.  When turned on, the resistor to base shows up as load impedance to ground.  Furthermore you introduce DC bias into the signal path through the base/gate resistor in the case of a JFET or BJT.  A MOSFET would be the best bet for what you are doing, but you still have the body diode that will turn on.  It might work ok if you do back-to-back MOSFETs (like 2N7000).  Still depends on 0 DC bias on each side, and its effectiveness and amount of distortion depends on load impedance.

As a bare minimum a JFET could be used with the reverse diode in the gate (similar to the typical bypass switches) provided your control voltage can go negative, to maybe -3V or -4V when off, and to +3V to +4V when on.  DC blocking and buffering is preferred since you can control input and output impedances.

I think buffered active bypass circuits as suggested by others will be the best design.

The JFET is a tried-and-true way to do this.  When working against >1M load impedance the nonlinear effects of current through the effective <100 ohm pass-impedance will result in distortion far below what any amp or recording console can achieve.

Put in 1 BJT emitter follower stage and you have introduced 100x as much distortion as the pass-FET, just to get an idea how unimportant the transistor part selection is.

As implied by responses from others on this thread, the way you are using the transistor is far more important that the specific transistor.

+1 on suggestions for active buffered bypass.  If you are really looking for clean pass-through sound use op amp buffers.
trans·mog·ri·fy
tr.v. trans·mog·ri·fied, trans·mog·ri·fy·ing, trans·mog·ri·fies To change into a different shape or form, especially one that is fantastic or bizarre.

PRR

Re: Cleanest Transistor for Audio ON/OFF Switching
« Reply #7 on: September 19, 2017, 11:46:59 PM »
> There's no point sharing the circuit, as it's as basic as these things get: audio-in on the collector, audio-out on the emitter, and the controlling voltage to the base (through a resistor).

Bad attitude. ALL the details matter.

{As Transmogrifox says} "Audio-in on the collector" ignores the impedance of whatever is driving it, a very important factor. Also how big the audio is, which matters less until you get break-through. So DO sketch-up ALL the details.

That transistor has no special magic. "Same" transistors are produced in one pot and sold under hundreds of part-numbers. To my eye it is a lowish-spec 2N2222. Are you really getting different results with different small BJTs?
  • SUPPORTER

digi2t

  • Awesome!
  • ****
  • Posts: 4668
  • Total likes: 1378
  • "Digital? Any idiot can count to 1!" - Bob Widlar
Re: Cleanest Transistor for Audio ON/OFF Switching
« Reply #8 on: September 20, 2017, 10:53:04 AM »
Digitech uses 2N4125's in the XP series units, with J113 jfets for audio switching duties. This is the PNP complementary to the 2N4123. The transistor handles the voltage switching, while the jfet handles the audio path. This is along the lines of what Transmo and Fancy described.



I just want to be able to abruptly mute an audio signal on command. Nothing gradual – a vactrol would be much too slow.

Granted, a vactrol in some cases may be slow (depending on the vactrol model and the application), but in the case of an opto such as an H11F1, 45us on/off time is pretty damn fast. Not quite as fast as me getting out of doing yard work, but unless your ears can blink faster...  :icon_wink:

  • SUPPORTER
Dead End FX
http://www.deadendfx.com/

Asian Icemen rise again...
http://www.soundclick.com/bands/default.cfm?bandID=903467

"gigantically smaller."  - pinkjimiphoton

"The more "slam" you can get, the better." - anotherjim

Fancy Lime

Re: Cleanest Transistor for Audio ON/OFF Switching
« Reply #9 on: September 20, 2017, 11:10:01 AM »
> There's no point sharing the circuit, as it's as basic as these things get: audio-in on the collector, audio-out on the emitter, and the controlling voltage to the base (through a resistor).

Bad attitude. ALL the details matter.

"He had his immortality inadvertently thrust upon him by an unfortunate accident with an irrational particle accelerator, a liquid lunch, and a pair of rubber bands. The precise details are not important because no one has ever managed to duplicate the exact circumstances under which it happened, and many people have ended up looking very silly, or dead, or both, trying."
Douglas Adams about Wowbagger the Infinitely Prolonged in The Hitchhiker's Guide to the Galaxy

My dry, sweaty foot had become the source of one of the most disturbing cases of chemical-based crime within my home country.

R.G.

Re: Cleanest Transistor for Audio ON/OFF Switching
« Reply #10 on: September 20, 2017, 12:56:28 PM »
The cleanest passed signal is going to be with some form of FET. FETs are inherently a bar of semiconductor doped to be a resistor, and then having that resistance decreased (for JFETs) or increased (most MOSFETs) by a voltage on the gate. That is, FETs are inherently most like nondistorting resistors if you can drive them properly.

Bipolars can and have been used as switches, but they are full of funny junction effects when not funny on or fully off, and have offset voltages and other complications. But if what you want is full on or full off, they can be used. They tend to work best as shunt switches, "shorting" signals to ground when paired with a series resistor. A great deal of Japanese stereo equipment up through the 90s and early 2000s use a lot of shunt switches.

Metal switches are hard to drive, bounce, and are slow. LDRs are slow and also have some built in distortion, although it's small.

A combination device is perhaps a good choice. The H11F1/2/3 is an LED+photoFET, and although there are issues with distortion on larger signals, the on and off are fast, and completely isolated as well as clean. I've always wanted to use power MOSFETs for speaker switching, but avoided them because of the funny drive requirements and some questions about actual linearity. That's probably over. Two series MOSFETs get around the issues with the body diodes conducting in one direction, and listening reports say that they don't distort in a noticeable way. One IC version of this is the TLP222G, being an LED and two MOSFETs on the output. They listen well, and are fast and easy to drive. I'm thinking about incorporating them in the next version of the boards that implement the complete replacement for the preamp in the Vox  Beatle amp.

I can make more specific recommendations if needed, but some of the JFETs already mentioned will work fine. A bit of caution: you have to drive the gate to a more negative (foir N-channel) voltage than Vgsoff plus the signal size to keep them turned off. Otherwise you get the signal modulating the gate-source partly off, and distortion.

A long channel, high Vgsoff device will make a better variable resistor, a short channel, low Vgsoff device an easier to drive switch.

The advice you got on switching times is good and ought to be heeded. If you use an instant switch, like metal contact or fast-driven FET or bipolar, you >> CAUSE << switching transient clicks as the switch causes a vertical part of the signal to instantly appear when the switch makes or breaks. Slowing this change down to few tens of milliseconds still sounds "instant" to the ear, but doesn't have these little clicks.
R.G.

Quick IQ Test: If anyone in a governmental position suspected that YOU had top-secret information on YOUR computer, how many minutes would you remain outside a jail cell?

Mark Hammer

Re: Cleanest Transistor for Audio ON/OFF Switching
« Reply #11 on: September 20, 2017, 01:11:05 PM »
So, in the phase-shifter world, there are adaptations intended to play off various properties against each other.  One of those is the use of a network around the FETs used as variable resistors, to reduce distortion.  You can find that in a Korg phaser and the venerable MXR Phase 45.

Can such a network (illustration 2 or 4) be used to diminish distortion when a FET is used for switching?

bartimaeus

Re: Cleanest Transistor for Audio ON/OFF Switching
« Reply #12 on: September 20, 2017, 01:54:12 PM »
Thank you very much for the replies, everyone!

I would like this circuit to be functional as a standalone mute box that I could plug a variety of sources into. It'd be nice to be able to use a eurorack gate signal, for example. I'm looking for this to work with both instrument and line-level signals, but instrument-level signals are the priority.




A JFET + reverse diode solution (as used in BOSS/Ibanez/Maxon bypass circuits) looks simple and useful, but it looks like they're non-compatible with a gate signal that only goes positive.
Also, if I have DC-bias on the output when using a JFET, can't I just stick a capacitor on the output to filter out the bias?

Bipolars can and have been used as switches, but they are full of funny junction effects when not funny on or fully off, and have offset voltages and other complications. But if what you want is full on or full off, they can be used. They tend to work best as shunt switches, "shorting" signals to ground when paired with a series resistor. A great deal of Japanese stereo equipment up through the 90s and early 2000s use a lot of shunt switches.

Using the transistor as a shunt switch rather than a series switch isn't something that I'd considered, but it seems a lot more sensible for this application. I'm going to mock one up on my breadboard to try it out. I do have one (amateur) question: if I mult the signal prior to the series resistor, will shunting this to ground also mute the other multed versions of the signal?


Granted, a vactrol in some cases may be slow (depending on the vactrol model and the application), but in the case of an opto such as an H11F1, 45us on/off time is pretty damn fast. Not quite as fast as me getting out of doing yard work, but unless your ears can blink faster...  :icon_wink:

I hadn't realized that opto's can go so fast! The H11F1 is now looking like a very good option. I'm familiar with Vactrols from eurorack modules, where they're often used to in VCA's to give a natural sounding decay of ~100 ms. Since instrument-levels are a priority, and I'd be willing to accept the potential for distortion when using line-level signals. The price of a H11F1 is not ideal, though, running at about $3 compared to $0.50 for a lot transistors.




By the way, I wasn't trying to say that the details were unimportant, but rather that there were no more details to give. Here's a Kicad mockup of my original idea:


jonnyeye

Re: Cleanest Transistor for Audio ON/OFF Switching
« Reply #13 on: September 20, 2017, 02:42:19 PM »
If low distortion is your primary goal, and you want a BJT as a switching element, here's a project that Rod Elliot has put together that should be able to be tweaked to work for you (note that it is operating as a shunt switch): http://sound.whsites.net/project147.htm Note that the specific transistor used is not that critical, given sufficient base current to really switch it on. There are transistors designed to be worked this way, but I only know of one model currently available (2SD2704K) and it is only available in surface mount.

In fact, he has a whole page on (shunt) muting circuits at http://sound.whsites.net/articles/muting.html. Since this is slanted towards power on/off muting use in amps and the like, much of it will not apply to you, and there are some other details he leaves out too, like that there are CMOS analog switches (DG201/411 etc.) available that can operate at voltages up to 44V. If you want options, there are options.

anotherjim

Re: Cleanest Transistor for Audio ON/OFF Switching
« Reply #14 on: September 20, 2017, 03:45:28 PM »
Transistor muting is done all over the place as Jonnyeye says above. Digital effects use it to mute while you change program and everything jumps to new settings which could cause all kinds of horrible noise. Hi-fi's do it to quieten un-selected sources.

In principle...
First, the input is AC coupled if necessary to make sure there is no DC voltage.
Then a series resistor, 1k usually enough followed by a larger pull down resistor to ground reference it.
Then the Collector of an NPN is connected to the signal.
The Emitter connects to ground.
The mute control drives the Base via a resistor.
The Collector is also connected to the output via another capacitor.
When mute control volts is high enough, the transistor turns on and clamps the signal out to ground.
As muting can happen anytime, it can click when the audio signal is not at or near 0v, causing a rapid voltage change to 0v. The mute control can be made a little more gentle with an RC time delay added to slow the switching speed.

In practice, x2 muting transistors, like this (note there's no coupling capacitors or pull-down as it assumes a ground referenced signal path)...


BTW, the reversed second muting transistor emitter/collector is not an error. I think it's for symmetry & protection against large signal swings.  By coincidence, I have an old Philips Hi-fi to repair that uses this 2 transistor scheme but does not bother reversing the 2nd transistor, instead they are different transistors! 1st is BC548B and 2nd is BC337-40!

« Last Edit: September 20, 2017, 05:27:04 PM by anotherjim »
Croeso i Diystompboxes.

amptramp

Re: Cleanest Transistor for Audio ON/OFF Switching
« Reply #15 on: September 20, 2017, 04:17:23 PM »
The MC14007 data sheet from ON Semiconductor shows a 2-input analog multiplexer in Figure 1 that can be used as an audio switch.  The nice thing about it is the control lines are not buffered so you can slow them down to minimize switch popping.

https://www.onsemi.com/pub/Collateral/MC14007UB-D.PDF

If you run the device from the 9 volts and bias an inverting op amp at 4.5 volts, you can feed the op amp without using up the voltage excursion limits because the switch is held at 4.5 volts.  Of course, it may pay to have some resistance in series with the inverting input for stability so the capacitance to ground of the MC14007 does not cause a feedback lag that would promote oscillation.

MetalGuy

Re: Cleanest Transistor for Audio ON/OFF Switching
« Reply #16 on: September 20, 2017, 04:25:42 PM »
An SSR also can be used as a mute part. Some time ago I was playing with some VO1400s and they do the job fine. Low capacitance, transparent, no change in sound, can handle up to 60V. If used in tube amps a zener clamp is recommended though.

Rob Strand

Re: Cleanest Transistor for Audio ON/OFF Switching
« Reply #17 on: September 20, 2017, 05:12:43 PM »
The state of the art would be the modern solid state switches.
I'd say the switching JFETS like J201 and the like would be best easy to get single component,
they also tend to be low resistance.
BJT's used like AnotherJim mentioned are OK but probably not as clean as JFETs.
Most component  MOSFETs have terribly high capacitance (and hence switching feed-through).

The internet:  answers without the need for understanding.

R.G.

Re: Cleanest Transistor for Audio ON/OFF Switching
« Reply #18 on: September 20, 2017, 08:01:12 PM »
A JFET + reverse diode solution (as used in BOSS/Ibanez/Maxon bypass circuits) looks simple and useful, but it looks like they're non-compatible with a gate signal that only goes positive.
Also, if I have DC-bias on the output when using a JFET, can't I just stick a capacitor on the output to filter out the bias?
Maybe. You're dealing with instrument level signals, on the order of 100mV peak. Any minor DC shifts that show up will be heard as clicks or thumps. A far better solution is to force the input side of the switch to a DC level with a capacitor and a resistor to a bias level, and do the same on the output. That guarantees that if some of the control signal happens to feed through the control pin to the switch itself, it is held in check by the DC level on the in and out pins. What would be best would be to make the "DC bias" be 0V by using a P-channel JFET, and use a 0V gate level for on, a higher voltage for turning it off. It is reverse logic, but then inverters are cheap.

Quote
if I mult the signal prior to the series resistor, will shunting this to ground also mute the other multed versions of the signal?
A BJT is only half of any shunt switch. A resistor is the other half. Each shunt switch will have a series resistor of its own and a shunt transistor. You also have to make the resistor value be much larger than the source impedance of the signal source so the signal source is not loaded down by the shunt switches (which is what I think you meant) but also much larger than the on resistance of the shunt switch. So if your transistors have an on resistance maybe 10 ohms, your series resistor can be anything  bigger than 10K for 40db muting. 60db muting takes 100K, just on the voltage divider rule. In this hypothetical situation, the source would have to have a source impedance lower than 10K in the 60 db case and lower than 1K in the 40db case. If there are multiple outputs, any number of which can be muted, that drives down the allowable source output impedance by the number of outputs. You may need a buffer or multiple stages of shunt muting.  Or both.

That seems like it makes series muting the better answer. Series muting - which works by making the path from the signal source to the next circuit go as open circuit/high resistance as possible, has its own set of flaws, not least of which is high thermal noise and easy introduction of control feedthrough.


Quote
The price of a H11F1 is not ideal, though, running at about $3 compared to $0.50 for a lot transistors.
This is only an issue if you're making lots of them. The box it goes in will likely be more than that. And you're overpaying for transistors. BJTs are available for US$0.07 to 0.10.

In principle...
First, the input is AC coupled if necessary to make sure there is no DC voltage.
Then a series resistor, 1k usually enough followed by a larger pull down resistor to ground reference it.
Then the Collector of an NPN is connected to the signal.
The Emitter connects to ground.
The mute control drives the Base via a resistor.
The Collector is also connected to the output via another capacitor.

BTW, the reversed second muting transistor emitter/collector is not an error. I think it's for symmetry & protection against large signal swings.  By coincidence, I have an old Philips Hi-fi to repair that uses this 2 transistor scheme but does not bother reversing the 2nd transistor, instead they are different transistors! 1st is BC548B and 2nd is BC337-40!
I think the circuit does several things. One is to use two series stages of muting to get a better "off" muting as I mentioned above. Another is that I think the reversed transistor is for two things. BJTs have an offset voltage on the collector caused by the forward voltage of the base-emitter. It's normal to put a BFC in series with the collector of BJTs used like this to isolate the offset voltage. And it's possible that there is some cancellation of any control voltage feedthrough this way. Maybe.

BJTs have a quirk that in general they can clamp to lower resistance when used backwards, using the 'alpha' of the transistor instead of the 'beta'. An NPN is still an NPN if you swap emitter and collector, but now the "collector" junction is heavily doped and low resistivity and as a side effect has low gain and low BVceo. The new base-"emitter" is now backwards to what gives high gain, high linearity, high frequency response, etc., but that doesn't hurt the collector-base resistance much.

The Japanese semiconductor industry used to and may still make specialized transistors for shunt muting.

The state of the art would be the modern solid state switches.
I'd say the switching JFETS like J201 and the like would be best easy to get single component,
they also tend to be low resistance.
BJT's used like AnotherJim mentioned are OK but probably not as clean as JFETs.
Most component  MOSFETs have terribly high capacitance (and hence switching feed-through).
It takes more design work to make a BJT squeaky clean, but as Japanes hifis  demonstrated, it can be done, with good results, if you use shunt switching.
Single component MOSFETs do have higher gate capacitances, but if you are slowing down the signal a bit anyway and perhaps doing shunt switching, that makes a great place to use the gate capacitor for the slowing. If you're using discrete MOSFETs for series switching, the connection that puts both sources in series and then floats the sources and gates with an isolated switching control introduces the same signal, but offsetting, on the setup, so you get first order cancellation.

As I mentioned, the integrated LED to dual MOSFET signal switches have become impressive, and frankly, this may be the OP's best choice. Except that they're US$2.50 to $3.00 each too.

Ah, well. Good, fast, cheap. Pick any two.
R.G.

Quick IQ Test: If anyone in a governmental position suspected that YOU had top-secret information on YOUR computer, how many minutes would you remain outside a jail cell?

Rob Strand

Re: Cleanest Transistor for Audio ON/OFF Switching
« Reply #19 on: September 21, 2017, 12:28:02 AM »
Quote
It takes more design work to make a BJT squeaky clean, but as Japanes hifis  demonstrated, it can be done, with good results, if you use shunt switching.
 
Yes it's good enough.  Even if a small tick got through no one would care as long as it's not the big *bang* at power-up you would get without them.
 
Quote
Single component MOSFETs do have higher gate capacitances, but if you are slowing down the signal a bit anyway and perhaps doing shunt switching, that makes a great place to use the gate capacitor for the slowing. If you're using discrete MOSFETs for series switching, the connection that puts both sources in series and then floats the sources and gates with an isolated switching control introduces the same signal, but offsetting, on the setup, so you get first order cancellation.
The capacitance tends to couple the switching into the signal path.   If you slow things down externally, like with the RC network that BOSS use, you might get away with it.    The capacitance is *much* higher than a JFET you are never going to match performance.    I pretty much avoid using (component) MOSFETs to switch signals.   It makes me cringe when I see it - their characteristics (because of their chip size) aren't set-up for that job.
The internet:  answers without the need for understanding.