Audio Routing: Optocoupler VS relay

Started by burningman, March 10, 2009, 11:19:38 PM

Previous topic - Next topic

burningman

I know that some professional audio switchers use optocouplers as opposed to relays. I was wondering if anyone could draw out the differences, pros cons etc. Thanks.

R.G.

Quote from: burningman on March 10, 2009, 11:19:38 PM
I know that some professional audio switchers use optocouplers as opposed to relays. I was wondering if anyone could draw out the differences, pros cons etc. Thanks.
The quality of a switch consists of how well it does a number of things. Among those are
on/off ratio of impedance
switching speed
distortion, or lack of it
frequency response
control feedthrough
contact bounce, or lack of it
control power required

Optocouplers have  much poorer on/off ratio than relays. An opto may go from perhaps 1K on resistance to 1M off resistance, a change of 60db. A relay is many orders of magnitude better than that. On resistance will be milliohms, and off resistance is indeterminably large. Leakage can be a problem with optocoupler switches, so many times a single switch will be built up of two series and one shunt optocoupler to get more attenuation of the off signal.

Relays have a longer latency (time to close or open after the control is activated) but open or close almost instantly when they finally get there. Optos drift in over a period of maybe 20mS to 100mS, depending on the LDR recipe in that one. This can be a good thing because unless you get a really slow one, optos are fast enough, and the slow turn on/off fades audio in/out clicklessly over a fraction of a second. Relays can also bounce, and take special care to ensure that the DC voltages in the open and closed states are equal to avoid clicks.

Optos can distort. Relays in general do not, no matter what the hifi tweakos say about metallic contacts.

Relays and optos both have good enough frequency response to make this not an issue in the vast majority of audio apps.

Neither relays nor optos have much in the way of control feedthrough issues, excepting that you can get a bit of a ...clik... from the sudden application or removal of voltage to the coil. This is generally only a high impedance worry, and simple circuits slow down the voltage change so it's not an issue. Now, bipolars used as switches have major control feedthrough issues. JFETs and MOSFETs have intermediate ones.

Only mechanical switches bounce. They may bounce a few times for 5-50mS after closing.

JFETs and MOSFETs need the least control power, almost negligible; bipolars next because base current has to flow; next are optos because you have to power an LED, and highest is relays, at about 100mW on up depending on size.

IzzaT enough pros and cons?
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.

km-r

Quote from: R.G. on March 11, 2009, 12:17:14 AM
The quality of a switch consists of how well it does a number of things. Among those are
on/off ratio of impedance
switching speed
distortion, or lack of it
frequency response
control feedthrough
contact bounce, or lack of it
control power required

Optocouplers have  much poorer on/off ratio than relays. An opto may go from perhaps 1K on resistance to 1M off resistance, a change of 60db. A relay is many orders of magnitude better than that. On resistance will be milliohms, and off resistance is indeterminably large. Leakage can be a problem with optocoupler switches, so many times a single switch will be built up of two series and one shunt optocoupler to get more attenuation of the off signal.

Relays have a longer latency (time to close or open after the control is activated) but open or close almost instantly when they finally get there. Optos drift in over a period of maybe 20mS to 100mS, depending on the LDR recipe in that one. This can be a good thing because unless you get a really slow one, optos are fast enough, and the slow turn on/off fades audio in/out clicklessly over a fraction of a second. Relays can also bounce, and take special care to ensure that the DC voltages in the open and closed states are equal to avoid clicks.

Optos can distort. Relays in general do not, no matter what the hifi tweakos say about metallic contacts.

Relays and optos both have good enough frequency response to make this not an issue in the vast majority of audio apps.

Neither relays nor optos have much in the way of control feedthrough issues, excepting that you can get a bit of a ...clik... from the sudden application or removal of voltage to the coil. This is generally only a high impedance worry, and simple circuits slow down the voltage change so it's not an issue. Now, bipolars used as switches have major control feedthrough issues. JFETs and MOSFETs have intermediate ones.

Only mechanical switches bounce. They may bounce a few times for 5-50mS after closing.

JFETs and MOSFETs need the least control power, almost negligible; bipolars next because base current has to flow; next are optos because you have to power an LED, and highest is relays, at about 100mW on up depending on size.

IzzaT enough pros and cons?

wonder how great it would feel to be mr RG... spreading all the love and knowledge!
very well said mr RG!  ;D  ;D

i use relays in some of my stompboxes.

geofex has a simple recipe for minimizing relay induction kicks [pops].
Look at it this way- everyone rags on air guitar here because everyone can play guitar.  If we were on a lawn mower forum, air guitar would be okay and they would ridicule air mowing.

trixdropd


Quotegeofex has a simple recipe for minimizing relay induction kicks [pops].


Link please? I was searching for just that last night to no avail.

burningman

Thank you for providing your knowledge on the subject. I was wondering what difference, if at all, gold contacts on relays/jacks make in a switcher?


R.G.

Quote from: burningman on March 11, 2009, 10:11:37 PM
Thank you for providing your knowledge on the subject. I was wondering what difference, if at all, gold contacts on relays/jacks make in a switcher?
None whatsoever except for long life. Gold contacts do not corrode. Neither do palladium, rhodium, a few others including contacts made of WE-1, a silver alloy developed by Western Electric back when telephone companies could afford research labs. The sound is no better, the contacts just last longer before getting grungy and erratic.

Of course, the best gold contacts eventually wear out. Semiconductor switches as a practical matter never do. 

Quote from: trixdropd on March 11, 2009, 04:23:27 PM
Quotegeofex has a simple recipe for minimizing relay induction kicks [pops].
Link please? I was searching for just that last night to no avail.
Look here: http://geofex.com/FX_images/ltchrly.gif The circuits connected to the relay coils do it. The transistor drivers have a feedback cap from collector to base, and a resistor at the input. The capacitor slows down the voltage transition at the collector.  This particular circuit shows two of them, one on each of the two latching coils. A non-latching relay needs only one.
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.

oldschoolcharlie

#6
The Perkin-Elmer vactrol VTL5C9 has about a 1ms response time, and 112dB range.  It's better than a relay, by far.

http://www.datasheetcatalog.org/datasheet/perkinelmer/VT500.pdf

It takes almost exactly 1ms for a blue CIC stomp switch to go between contacts.  I can't imagine that a relay could possibly be faster.

I've measured modern VTL5C9s and found their turn-on time to be on the order of 1ms and turn-off (to 1Mohm) to be on the order of 10 to 40 ms.

trixdropd

Quote from: R.G. on March 12, 2009, 01:48:55 AM
Quote from: trixdropd on March 11, 2009, 04:23:27 PM
Quotegeofex has a simple recipe for minimizing relay induction kicks [pops].
Link please? I was searching for just that last night to no avail.
Look here: http://geofex.com/FX_images/ltchrly.gif The circuits connected to the relay coils do it. The transistor drivers have a feedback cap from collector to base, and a resistor at the input. The capacitor slows down the voltage transition at the collector.  This particular circuit shows two of them, one on each of the two latching coils. A non-latching relay needs only one.
Thanks again R.G.. You rock!

R.G.

It's easy to pick out counter examples to any general set of guidelines; to wit:
Quote from: oldschoolcharlie on March 12, 2009, 03:45:55 AM
The Perkin-Elmer vactrol VTL5C9 has about a 1ms response time, and 112dB range.  It's better than a relay, by far.
And it's easy to find LRDs that  take 100mS to change by 99%, and only go over a 60db range. It has been well established that humans can run a mile in significantly less than four minutes, pole vault over 17 feet (probably 18 by now), and bench press 500 pounds. But if you are trying to design office equipment and ask "how much can a human lift unassisted?" any answer over 30 pounds is wrong. The peak of performance for any class of objects may be very much different than the average or median.

Then there's that "better by far" thing. It always has to be qualified. A 112db range of open to closed resistance can't possibly be better than 0.05 ohms to a few giga-ohms, which is typical of precious metal contacts and a few mm of dry air. Taking the "giga" as the top end of the ratio, that's on the order of 180db. So the range thing isn't better.
1ms response time is good, because a relay has some latency time, the time for the armature to start moving and close the gap. Signal relays can be very good with this and instrumentation relays can be in the units of mS range. However, that's just the latency time, the time after you say "go" until the resistance starts changing. Once the resistance starts changing the relay change from non-conducting is frightfully short - so small it's near instantaneous.

Then one might be interested in other issues. For instance, substantially any relay will conduct an ampere of current. That's an interesting thing to watch an LDR do.  :icon_biggrin:  So "better by far" needs some conditions stated.

QuoteIt takes almost exactly 1ms for a blue CIC stomp switch to go between contacts.  I can't imagine that a relay could possibly be faster.
I can. Especially if I'm allowed to drive it from an actuator which can apply 200lb of force to the moving parts. The blue CIC stomp switch is only half of the whole switch mechanism. The other half is a largish mass of human driving it to the other state. Relays have been designed into as good a compromise for fast switching AND low drive power at the same time as is reasonably possible. If you relax the constraints on the design to allow massive new power drivers, I suspect you could speed them up a bit.

In fact, there is a class of relays which are used in chip testing for switching wafer probe points on and off. I suspect they're pretty speedy, since the name of the game in chip testing is to get it done fast. I'll have to go look that one up.  :)

QuoteI've measured modern VTL5C9s and found their turn-on time to be on the order of 1ms and turn-off (to 1Mohm) to be on the order of 10 to 40 ms.
Cool. The LED/LDR guys are working on it.

It's in general impossible to support a statement that X is better than Y without saying what "better" means. Back a few posts ago, I proposed the idea that it would be hard to pick out which was better, a Ferrari or a truck. The Ferrari is better for some things than the truck, but then the truck has its own strong points - and some trucks cost more than Ferraris. The devil is always in the details.  :icon_lol:
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.

oldschoolcharlie

#9
Quote from: R.G. on March 12, 2009, 02:43:21 PM

<snip> Then one might be interested in other issues. For instance, substantially any relay will conduct an ampere of current. That's an interesting thing to watch an LDR do.  :icon_biggrin:  So "better by far" needs some conditions stated.

QuoteIt takes almost exactly 1ms for a blue CIC stomp switch to go between contacts.  I can't imagine that a relay could possibly be faster.
I can. Especially if I'm allowed to drive it from an actuator which can apply 200lb of force to the moving parts. The blue CIC stomp switch is only half of the whole switch mechanism. The other half is a largish mass of human driving it to the other state. Relays have been designed into as good a compromise for fast switching AND low drive power at the same time as is reasonably possible. If you relax the constraints on the design to allow massive new power drivers, I suspect you could speed them up a bit.

In fact, there is a class of relays which are used in chip testing for switching wafer probe points on and off. I suspect they're pretty speedy, since the name of the game in chip testing is to get it done fast. I'll have to go look that one up.  :)

This thread is about pedal switching, as far as I can ascertain, and I've yet to see an amp of current involved there.

Relays are unreliable in the long run.  They're electromechanical and subject to failure.

The mass of the human actuating a CIC blue switch has nothing to do with the amount of time it spends between contacts.  The "break-before-make" time is consistently 1ms, whether the switch is actuated slowiy with a finger or struck with a hammer.  The actuation is driven by a spring-loaded mechanism which is released when the plunger reaches a preset depth.  In a pedal switching system, which is what this thread is about, there will always be some kind of switch that needs to be actuated.  Any latency in that respect can never be removed from the system, but the added latency from slow response times within the switching system is what counts.  And VTL5C9 vactrols will turn on as fast as any relay, with the additional benefit of having no "click" and no contact noise or bounce. 

I've presented measured results.  I await your measured results on relays.

To be fair, I've consulted recently with Kevin Shields of My Bloody Valentine about his pedal switching system, and it's entirely optical, because in his words, he's never heard a relay-based pedal switching system that doesn't click or pop or introduce excess latency, and he's tried a lot of them.  So from an emprical standpoint, optical is better.

puretube

"Optical" (=LDR based) is more "analogue" (=smoothe),
while any on/off "mechanical" as well as "perfect solidstate" is more "digital" (=abrupt)  :icon_question: ??? :icon_razz:

R.G.

Quote from: oldschoolcharlie on March 12, 2009, 03:06:34 PM
This thread is about pedal switching, as far as I can ascertain, and I've yet to see an amp of current involved there.
It is indeed. But the statement was not that the PEs were better for switching pedals. You said, and I quote: "It's better than a relay, by far."
That set off my Absolutism Detector.  :icon_biggrin: The word better means nothing unless you more or less carefully restrict the circumstances for measurement.

If, for instance, you had said "I think that these here optos are better than relays for use in pedal switching." that would be fine, and I'd probably not even have noticed. There can be no disagreement about matters of taste, and if your taste runs to optos, fine. I might have asked in what way you thought they were better, but that's a different discussion entirely.

So I begged the question - how, exactly did you mean better, and surely not in every possible way as was a valid interpretation of your note as read from the archives by some novice doing a search about five years from now.
QuoteRelays are unreliable in the long run.  They're electromechanical and subject to failure.
Yep, sure are. No argument there. Of course, so are the footswitches we use to set off both relays and optos.  :icon_eek:  As a matter of fact, all domestic house cats are smaller than horses.  :icon_biggrin:

QuoteThe mass of the human actuating a CIC blue switch has nothing to do with the amount of time it spends between contacts.  The "break-before-make" time is consistently 1ms, whether the switch is actuated slowiy with a finger or struck with a hammer.  The actuation is driven by a spring-loaded mechanism which is released when the plunger reaches a preset depth.
I think I could construct a good rationale about larger actuating forces making it faster, but that's neither here nor there. We can just go with this topic. So what drives a CIC switch (which I've never seen, but can guess about) is a spring loaded plunger which stores up a goodly amount of mechanical energy before releasing it suddenly to move the switch actuation toggle, right?

Same reasoning. Relays are actually quite small in the amount of energy they use to actuate. I suspect that if I got to suddenly expend the energy stored in that spring/triphammer mechanism on a nice light relay motion, it would get fast too.  There are relays with much smaller moving mass than the toggle in what I suspect the innards of that switch looks like. For instance, how 'bout them reed relays? Really small moving mass, really short distance to move. How much energy do I get to make that move?   :icon_lol:

QuoteIn a pedal switching system, which is what this thread is about,
So we're restricted to only talking about whatever the last guy said?  :icon_lol:

Quotethere will always be some kind of switch that needs to be actuated.
I'm good with that. In fact, I said it. :icon_biggrin:

QuoteAny latency in that respect can never be removed from the system,
Sure, but we can make that small. like f'rinstance we make the "switches" be semiconductor accelerometers. Not much latency there. And we can use the accelerometer output to dump the cap containing the electrical equivalent of the spring-trip mechanism from the switch into the relay coil. It's something that can be worked on.  :icon_biggrin:
Quote
but the added latency from slow response times within the switching system is what counts. 
Well, it all depends on who's counting. You can certainly decide that is what you want to measure. But talk to one of the guys who think audio degrades every time it goes through something other than metal, a resistor, or a vacuum. And we should probably also mention that to many people the difference between 1mS and 50mS is lost entirely. So tell me the basis for your scoring on "what counts". And while we're at it, if all that counts is added latency, how's about the uncertainty latency in the differences between one press to the next in how fast the human is from the time the foot touches the button until the unknown-to-the-human time the plunger trips? That goes in the latency equation, too, yes?  :icon_biggrin:
QuoteAnd VTL5C9 vactrols will turn on as fast as any relay, with the additional benefit of having no "click" and no contact noise or bounce. 
... on speed is the only measurement you care about, of course.

QuoteI've presented measured results.  I await your measured results on relays.
(sniff. sniff) Hey, does it smell like someone threw down a glove in here?   :icon_lol:

QuoteTo be fair, I've consulted recently with Kevin Shields of My Bloody Valentine about his pedal switching system, and it's entirely optical, because in his words, he's never heard a relay-based pedal switching system that doesn't click or pop or introduce excess latency, and he's tried a lot of them.
To be fair, Kevin's opinion is worth a lot! Exactly the same as yours or mine, in fact. Or my neighbor's, the guy who shoes horses for a living.

I realize that with the level of this particular discourse, I should be fair and say that I prefer JFET and MOSFETs over both LDRs and relays, as a personal opinion. But personal opinions aren't what we're talking about. Oh, wait a minute! They are!  :icon_lol:

To reiterate:
It's in general impossible to support a statement that X is better than Y without saying what "better" means. Back a few posts ago, I proposed the idea that it would be hard to pick out which was better, a Ferrari or a truck. The Ferrari is better for some things than the truck, but then the truck has its own strong points - and some trucks cost more than Ferraris. The devil is always in the details.  icon_lol

QuoteSo from an emprical standpoint, optical is better.
In your opinion. In my opinion, FETs can do better than either one on my set of criteria. Oh, wait! We're both right!  :icon_lol:
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.

R.G.

Quote from: oldschoolcharlie on March 12, 2009, 03:06:34 PM
QuoteIn fact, there is a class of relays which are used in chip testing for switching wafer probe points on and off. I suspect they're pretty speedy, since the name of the game in chip testing is to get it done fast. I'll have to go look that one up.  :)

I've presented measured results.  I await your measured results on relays.
Dang. That's what I get for having a gadfly style mind. So I went out and looked at some relays. Remember me mentioning reed relays?
Check here:
Quotehttp://www.cotorelay.com/html/reed_relay_9200___9290_series.htm
for some reeds rated for switching time *including bounce* of 0.4mS (yep, 400uS) release time of 0.1mS (100uS), life expectancy of one billion operations on low level signals, off resistance of ten to the thirteenth power ohms, on resistance of 0.2 ohms, for an on/off ratio of 260db (!).

So I'm guessing that they'll be able to keep up, right?  :icon_lol:
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.

oldschoolcharlie

#13
Reed relays are useless for audio signals.  The coil is wrapped right around the audio conductor, sending the impulse directly into the signal path.

Your argument style relies on straw man, red herring, changing frames, unequal comparisons, and false choices.

I'll leave you to your opinions.  I hope the information I presented to the forum is useful to someone.

alanlan

If I was concerned about nothing but distortion, I would use a high quality gold plated contact relay.
If I was concerned about nothing but low power, I would probably use a CMOS analogue switch.

Anything else is probably inbetween these two extremes.

FWIW, simple CMOS 4053's are used extensively in the highest performance audio mixing consoles and so are relays (although less so).  The trick is to design any surrounding circuitry to get the best out of the device chosen.

trixdropd

I've never been able to source any gold plated relays. Can you guide me?


trixdropd

Quote from: alanlan on March 13, 2009, 08:41:02 PM
http://www.digchip.com/datasheets/parts/datasheet/000/V23042-B2203-B101.php
Thanks for the link. I still can't seem to find a place to buy these at my level. i jsu want like 10 of them or so... I shouldn't have said "source", but rather find a mouser or a digikey like company that will sell me these dirt cheap...  :)

R.G.

Quote from: oldschoolcharlie on March 13, 2009, 04:57:11 PM
Reed relays are useless for audio signals.  The coil is wrapped right around the audio conductor, sending the impulse directly into the signal path.
I think the guys who developed them for switching audio signals at Bell Labs way back when would be surprised to hear that.  :icon_biggrin:
Here's a reference for you:http://www.meder.fr/info-reed-switch2.html?&L=6
Quote
The Reed Switch was first invented by Bell Labs in the late 1930s. However, it was not until the 1940s when it began to find application widely as a sensor and a Reed Relay. Here it was used in an assortment of stepping/switching applications, early electronic equipment and test equipment. In the late 1940s Western Electric began using Reed Relays in their central office telephone switching stations, where they are still used in some areas today. The Reed Switch greatly contributed to the development of telecommunications technology.
So I think it's not exactly accurate to say that reed relays are useless for audio signals. Like all other kinds of parts, they have their good points and bad points. The skilled designer uses the good parts and minimizes the problems with the bad points. I think what you're telling me is that you don't know any way to keep the coil signal from coupling into the audio path.

All relays have the issue of capacitive feedthrough. Actually, optocouplers and all other electronically switched audio connections do too, and for the same reason: capacitive coupling of the control signal to the signal path. You cope with capacitive coupling by three methods: (1) decrease the capacitance coupling the unwanted signal. This can be done by physical distance or shielding; (2) slow down the transient speed of the control signal; this reduces the high frequency content of the control signal, which is a high pass network, and makes the capacitances higher impedances; and (3) lower the impedance of the signal wire being coupled to.

Just at a guess, I'd think that you once tried using reed relays to switch raw guitar signals, or signals going into tube grids. These are very high impedance signals, and so are very susceptible to even small capacitances feeding transients in. So to do a good job of keeping transients out, you need to go to the other two techniques - keep the transients far away and keep the slopes slow. Optos do have the advantage in many cases of keeping the transients further away physically. On the other hand, you can slow down the coil voltage to a relay and keep the coupling down that way. There's an article on relays in audio circuits at GEOFEX that goes over some of these issues. It's dated 12/2001.  :icon_biggrin:

Reed relays in particular are good for sensitive audio because you can do something with them you can't with other kinds of relays - shield the signal path. On a reed relay all you need to do is wrap the capsule in metal foil and ground the foil. Now the transients hit the shield first. There are commercially available shielded reed relays, but it can be done hand crafted with some kinds as well. This is the same reasoning that led to the insertion of screen and suppressor grids in vacuum tubes, by the way - added capacitive shields to shield the high impedance grid from the voltages on the plate, although it was for the purpose there of extending frequency response by eliminating capacitive feedback. Same principle.

QuoteYour argument style relies on straw man, red herring, changing frames, unequal comparisons, and false choices. I'll leave you to your opinions.  I hope the information I presented to the forum is useful to someone.
Wow. Where to start?
I think I was pretty clear that it was a discussion, not an argument. If it were an argument, I might be tempted to use ad hominem attacks (http://en.wikipedia.org/wiki/Ad_hominem) instead of going off and getting facts to back up my position, as you asked. ("I've presented measured results.  I await your measured results on relays.") But with some externally-referenced facts on the table, it's all of a sudden an argument?  :icon_eek:

My interest is in the facts. As I said, my opinion is that I prefer FETs to LED/LDR or relays, although I use whatever is right for the circuit.
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.