How to switch a speaker on and off? - Page 1
Forum section: electronics / projects

author: Starlord
author_rank: Frequent Contributor
timestamp: July 29, 2015, 09:16:25 pm
content: I have a 40W digital amplifier, in a mono BTL configuration (left and right channels both fed into a single output), powered by 12V and being fed into two 4 ohm speakers:http://www.ti.com/lit/ds/symlink/tpa3131d2.pdfI would like to add a third smaller 8 ohm speaker and be able to switch it on and off, without using a relay, and without hearing a pop when it's turned on and off.I'm not sure how to accomplish this though.I looked at some analog switches but didn't see anything that could handle anywhere near the amount of current required. Also I believe the push-pull nature of the BTL setup means the voltage has to be able to swing negative, and a lot of analog switches don't support that.I thought about sticking a couple nfets back to back like when you want to block current both ways, but I'm not sure if that will work with the negative voltage swings, and it probably won't do anything to avoid popping. I may be able to mute the audio when switching them however to avoid a pop.Another thing that concerns me and that I don't know how to deal with is that the speaker is an inductive load, and will cause a voltage spike when switched off, but unlike a motor I might drive in only one direction, I can't just stick a diode across it. I'm not sure how an h-bridge deals with this issue, but it's something that's probably going to be difficult to deal with.Any ideas?

author: Pjotr
author_rank: Frequent Contributor
timestamp: July 29, 2015, 09:34:18 pm
content: Look for an optical coupled MOS FET, i.e. NEC PS710B. It is bi-directional and can stand 60V (off) and 2.5A (on). There are many flavours of optical coupled MOS FETs with various withstanding voltages and carrying currents. If you are afraid of inductive voltages from the speaker, simply use catch diodes from speaker to rail and ground on both sides for a BTL amp. But if it's a small speaker the fets will probably catch the small turn off energy spike easily in avalanche.

author: BillW50
author_rank: Contributor
timestamp: July 29, 2015, 09:43:26 pm
content: My Marantz 4400 (a quad from the 70's) uses a relay to switch four speakers on and off and it doesn't have a pop. You can also add another four speakers (they call remote vs main) that is also on a relay. I do know the relay has a delay to allow the amplifiers to stabilize first. That might have something to do with this. But they probably have other circuits to avoid the pop too.

author: retrolefty
author_rank: Super Contributor
timestamp: July 29, 2015, 10:57:21 pm
content: Quote from: BillW50 on July 29, 2015, 09:43:26 pmI agree, most speaker pop comes at power on and power off which was handled by most of the great vintage hi-fi amps and receivers (70s) with a delay/speaker protection relay. Once stabilized one could switch to different speakers without artifacts. Many such amps had termination for two sets of speakers that could be switched between or all on with just a standard front panel switch or button(s). You just had to insure you don't switch in too low a total speaker impedence (<4 ohms) when driving parallel switched in speakers.

author: Starlord
author_rank: Frequent Contributor
timestamp: July 30, 2015, 08:28:24 am
content: Is it possible to do this in a solid-state manner? I looked at a few solid state relays but I can't seem to find any which look like they'd accept a negative voltage swing.

author: dom0
author_rank: Super Contributor
timestamp: July 30, 2015, 10:06:20 am
content: Triac-based SSRs are unsuitable since they won't conduct at less than 1.4 V (at which point they will turn off) and they triggering circuits are only designed for ~50 Hz, maybe 400 Hz (avionics) max.MOSFET ones might work ok.Mechanical relay will work ok, too.Either one will make a pop noise with a bad amplifier. Pop noises when connecting speakers are caused by excessive DC output of the amplifier (and sometimes "transient" instability).

author: Zero999
author_rank: Super Contributor
timestamp: July 30, 2015, 10:29:15 am
content: Quote from: Starlord on July 30, 2015, 08:28:24 amNo you didn't, according to your first post, you looked at analogue switches which are not the same as solid state relays.Quote from: Starlord on July 29, 2015, 09:16:25 pmAn analogue switch is just some MOSFETs controlled with digital logic to switch a signal. It does not provide any isolation and because the gate voltage can't exceed the power supply rails, the signal range also has to remain within the power supply rails. Analogue switches tend to only be rated for a couple of mA because they're designed for switching small signals, not power.A solid state relays isolated from the switching circuit. The most common type use TRIACs or SCRs which are unsuitable because the don't conduct at low voltages, as mentioned above.A MOSFET solid state relay would probably do. The difference between a MOSFET solid state relay an analogue switch is the MOSFET gates are driven from an isolated supply voltage so the signal being switched can exceed the supply rails of the control side. They're also rated for higher currents.A quick search led me to this:http://uk.farnell.com/panasonic-ew/aqv252g2s/relay-solid-state-spst-no-3a-10ma/dp/2302215

author: Pjotr
author_rank: Frequent Contributor
timestamp: July 30, 2015, 11:07:10 am
content: Quote from: Hero999 on July 30, 2015, 10:29:15 amThat one is in the same league as the one I posted in post 2 but is a lot more expensive. Many companies make this, Avago, IR, ON, Panasonic and so on. But is appears OP didn't even look up the part I mentioned. It is also available from Farnell and Mouser has similar. But imho OP is better off with a plain relay

author: Starlord
author_rank: Frequent Contributor
timestamp: July 30, 2015, 11:26:55 am
content: Quote from: Hero999 on July 30, 2015, 10:29:15 amI looked at both. And then I looked at solid state relays again after Pjotr suggested one.QuoteThat's a bit large for my needs. Here's a bunch I found on Digikey. I was able to narrow the search to 30 relays:http://www.digikey.com/short/tqrz85What do you think of this one?http://www.clare.com/home/pdfs.nsf/www/CPC1020N.pdf/$file/CPC1020N.pdfCheap-ish, small, rated for 1.2A, 250mOhm resistance.I would just stick that in the middle of one of the wires leading to the speaker and drive the internal LED with 3-5V and a resistor to limit the current to 0.5-2mA, right?The only difference I see is that the diagram doesn't show any diodes inside, but I'm assuming those are ESD protection or something. Should I have any external diodes to deal with the inductive spikes? I don't know how to connect those for an AC source if so, or how to rate them.

author: Starlord
author_rank: Frequent Contributor
timestamp: July 30, 2015, 11:29:28 am
content: Quote from: Pjotr on July 30, 2015, 11:07:10 amI did look up the part you mentioned. But I could not find it on Digikey and only found one old PDF for it.And I did not notice how much the part he suggested cost. Yeowch! The one I found is only $2.50 @ qty 25.

author: Pjotr
author_rank: Frequent Contributor
timestamp: July 30, 2015, 11:39:30 am
content: Have a look here at Farnell:http://nl.farnell.com/webapp/wcs/stores/servlet/Search?catalogId=15001&langId=31&storeId=10168&categoryId=700000006239&sort=P_PRICE&pageSize=25&beginIndex=1&showResults=true&aa=true&pf=110138163,110138169,110138436,110148996,110149016,110159486,110159515,110170154,110173911,110174063,110186377,110193617,110198830,110233446,110258018&min=110173911

author: RABeng224
author_rank: Contributor
timestamp: July 31, 2015, 01:12:13 am
content: I built a "speaker router" that takes a simple 2 channel receiver and routes it to different speaker zones. I used decent quality relays and I have no issues or popping when switching between speaker zones.

author: rs20
author_rank: Super Contributor
timestamp: July 31, 2015, 04:45:50 am
content: Maybe I'm overly idealistic, but I'm surprised that there's no way to just ease the amplifier in, rather than letting it have a mini-tantrum and just disconnecting it from the speakers while it does that. Like, inhibiting the upper half of the bridge and turning them on gradually so the output voltages just gently move into position.

author: BillW50
author_rank: Contributor
timestamp: July 31, 2015, 07:54:10 am
content: Sure it is possible.http://lmgtfy.com/?q=solid+state+audio+relay

author: Chris C
author_rank: Frequent Contributor
timestamp: July 31, 2015, 10:06:30 am
content: Quote from: Starlord on July 30, 2015, 11:29:28 amIt's an obsolete part. This got me thinking about vactrols, another old optoelectronic part no longer manufactured. In the few cases when one is needed nowadays, people build their own. And that it would be a similar process to build your own SSR.The PS710B internal diagram shows we need two N-MOSFETs, back to back. Pick MOSFETs that switch at a low gate voltage. MOSFETs intended for 3.3V operation are common.Next, we need an isolated source of sufficient voltage for each gate. We don't need much current at all, since the gate is a capacitor. So two of these SMD 4.0V solar cells would do nicely:https://www.sparkfun.com/products/9962Add a light to illuminate the solar cells. LED(s) are an obvious choice. But the slow turn-on/off of a small incandescent might make for a more pleasing switch. That solar cell has best sensitivity in infrared, which incandescents produce plenty of; the incandescent can be slightly underdriven and basically last forever.If the solar cells don't bleed off gate voltage fast enough when the light is turned off, we'll have to add two bleeder resistors to do that job.Finally, you might want to wrap the light and solar cells together; both to prevent external light from reaching it, and to maximize the amount of light absorbed by the cells. White electrical tape looks ghetto, but does the job fine; or substitute something more classy.There's currently an Ebay auction for two of those solar cells, US seller, $4.54 for both including shipping. The other parts you might already have on hand, or could be scavenged.It's just an option to consider. You could opt to buy something like a CPC1020N at Digikey for $3.12, and be done with it. Well, maybe. Consider that it and others like it are built for relatively fast switching times. It switches on and off in ~0.5ms. That will soften the pop for sure, but I don't know if the result will be entirely satisfactory. You might get a thump rather than a pop, especially if the amp has a large DC offset. If so, and you don't like it, you'll end up having to build something to fade the internal LED at an acceptable rate. Whereas if you build the SSR from scratch, especially using an incandescent, you can be certain it will be slow enough!

author: Starlord
author_rank: Frequent Contributor
timestamp: July 31, 2015, 10:23:40 am
content: Quote from: BillW50 on July 31, 2015, 07:54:10 amHuh, three of those links are already purple. I guess I must already have googled that before asking.

author: Starlord
author_rank: Frequent Contributor
timestamp: July 31, 2015, 11:11:38 am
content: Quote from: Chris C on July 31, 2015, 10:06:30 amNeat idea. And I didn't know tiny SMD solar cells like that existed. But this solution is too complicated and expensive, and incandescent are prone to failure.QuoteOh good, that's the one I linked to above.QuoteIf you look at the datasheet, there's a graph of turn-on time vs LED current on page 3:http://www.clare.com/home/pdfs.nsf/www/CPC1020N.pdf/It looks like if I limit it to 1mA it will take 1ms to turn on, and if I limit it to 0.5mA it will take 2ms.I don't know if that's enough to completely eliminate the pop, but if my calculations are correct it looks like a ramp up over 2ms would be equivalent to one quarter of a 250hz sine wave, and 45 samples at 22KHz, which seems sufficient to avoid a pop.Also in my specific usage case, a pop when the speaker is turned on would not be a show stopper. Also, I could mute or ramp the audio briefly, or wait until a zero crossing to make the switch, since my microcontroller will be processing all the audio.But I'd rather not make more work for myself, so hopefully the relay will just work with the 2ms transition time.Now the only thing I need to worry about is if I'm going to get an inductive spike when the speaker turns off. Any thoughts on that?

author: mikerj
author_rank: Super Contributor
timestamp: July 31, 2015, 11:24:33 am
content: What's the actual issue with using a normal relay? If you described that, maybe there's a way to work around this problem which would be easier than using a solid state switch.

author: Starlord
author_rank: Frequent Contributor
timestamp: July 31, 2015, 01:18:14 pm
content: Relays wear out and are large. The speaker will be turned on and off many times a day when in use. Since it won't be in use every day, it would probably last long enough... a few years... but if I can do the same job with a tiny chip that I never have to worry about wearing out, why not go that route?Relays also draw a lot of current for the coil, so I'd need to add a transistor as well if I want to drive the thing from a microcontroller pin. Also I think when looking for one and having narrowed down the selection to SMD relays they wanted at least 12V to activate. And that would require me to run a 12V supply to the relay.Contrast this with the SSR, which requires only half a mA from a single IO pin and a GND connection to trigger it. I could connect it with a servo cable, or two wires. The servo cable would be convenient since I already have servo outputs on my board. A 5V relay would also work, but I'd probably have to use a large through hole one. I'll have to take another look and see what's available.Another issue with relays is their specs are confusing - coil voltage, switching voltage min, max? and a panasonic relay lists "pick up" and "drop out" voltage as a percentage of coil current, and I'm not sure if that's the switching voltage or not.Also, I think that if I get a 5V relay then if I ever want to use 3V logic to control it I'm out of luck and will have to redesign the board to use another relay.Also also, I think I'll need a diode across the relay's coil to avoid killing my microcontroller.QuoteWell, what's not easy about using a SSR? It looks easy enough, and sounds like I can make it switch slow enough. Is there another issue I should be worried about? Nobody has yet answered if I need to be concerned about the inductive spike from the speaker. But I can't see how using a regular relay would solve that problem. I mean the relay itself would survive, but maybe not the amplifier.

author: Pjotr
author_rank: Frequent Contributor
timestamp: July 31, 2015, 01:35:37 pm
content: Quote from: Starlord on July 31, 2015, 01:18:14 pmRead over post 2 then. If the amplifier likes it or not depends on the amplifier. But a decent one shouldn't care about it.

author: Chris C
author_rank: Frequent Contributor
timestamp: July 31, 2015, 01:53:49 pm
content: Yep, a decent amp should have at least some protection against inductive spikes built-in. Otherwise, any time you had a loose speaker wire, you'd blow the amp.However, an SSR may or may not have this protection. It can be added by putting two zener diodes in series, but facing in opposite directions, across the SSR; with the zener voltage being less than the maximum voltage of the SSR. (Or a TVS, which is equivalent to two zeners.)You may be able to get away without that, if you're:1) Switching the SSR slowly enough that an inductive spike doesn't develop.2) Switching only a secondary parallel speaker, leaving the primary speaker connected at all times; which gives the spike a path to travel through, so it won't rise to a particularly high voltage.But I'd be more comfortable with the zeners. Cheap insurance.

author: Starlord
author_rank: Frequent Contributor
timestamp: July 31, 2015, 02:16:23 pm
content: Quote from: Chris C on July 31, 2015, 01:53:49 pmSo wire them cathode to cathode or anode to anode (which way doesn't matter?) across the SSR's output pins? Or use a TVS?When you say Zener voltage do you mean breakdown voltage or voltage drop?And is there a way I could tell if the SSR has these diodes even if they're not shown in the schematic? Some spec that would give their presence away?QuoteNumber 2 would be likely true most of the time, but I can't trust that will always be the case.

author: Chris C
author_rank: Frequent Contributor
timestamp: July 31, 2015, 05:39:31 pm
content: Quote from: Starlord on July 31, 2015, 02:16:23 pmYes.Quote from: Starlord on July 31, 2015, 02:16:23 pmBreakdown voltage. For example, the 1N4749 is a 24V zener, and might be a good choice for the CPC1020N (30V max).Quote from: Starlord on July 31, 2015, 02:16:23 pmNot sure on this class of components. In general I'd look for phrases like "ESD", "inductive spike", or "overvoltage" protection on the output. I noticed "Arc-Free With No Snubbing Circuits" on your pick, that might be significant or just mean no dV/dT triggering (a different issue with TRIACs), I don't want to falsely assume.

author: dashpuppy
author_rank: Regular Contributor
timestamp: September 26, 2019, 03:11:47 pm
content: Did anything ever come of this ?

author: Audioguru again
author_rank: Regular Contributor
timestamp: September 28, 2019, 05:05:20 pm
content: A speaker makes a POP sound if it is switched at the peak of the signal. To avoid the POP then mute the signal, switch the speaker then unmute the signal. The mute and unmute must be ramps, not abrupt changes.