Simple Prioritizing Audio Switch - Page 1
Forum section: electronics / beginners

author: dnyberg
author_rank: Contributor
timestamp: August 07, 2021, 12:31:33 am
content: So, I have a small project in mind and a candidate design, but I'm hoping for a sanity check before I go too far, to check against any totally bonehead errors, before I get too far in.Project is a 2 input prioritizing audio switcher, hopefully from the jellybean parts I have on hand. This doesn't have to be audiophile signal quality, and I'll tinker it a bit on proto board, so I'm not committing to a pcb layout out of the gate or anything like that.Let's call the inputs A and B, A will be intermittent (a radio with squelch) and the high priority input; B will be continuous (say a music player) to be muted any time A switches on.My idea was to simply run both signals into an op amp summing circuit, with a minor twist: I take a tap from the A circuit, run that to a peak detector (op amp follower charges a cap through a diode), with a bleed resistor across the cap so it decays at some reasonable rate. Output goes to a fet that pulls signal B to ground to mute it when A is active. Probably a 2n7000 as I have some on hand. I might have to amplify the peak detector's follower a bit to get gate voltage high enough to turn on the fet, but I can live with that.On the principle the radio might not like its output shorted to ground, I'm thinking the B channel's summing resistor might have to be two resistors in series with the pulldown point being their junction; do you think that will work and is there a problem with that?Also thinking I should be able to build all this with a single LM324 (mainly because they're on hand) and a 2n7000 as mentioned, same reason.Is there anything obviously brain damaged about this scheme? If so, I'd really like to hear about it before I get busy trying to make this work.Thanks!

author: Benta
author_rank: Super Contributor
timestamp: August 07, 2021, 01:27:22 pm
content: Audio is bipolar. How should the 2N7000 handle that? DC offset and AC coupling? Will probably give you quite some pops when turning on the switch.

author: tooki
author_rank: Super Contributor
timestamp: August 07, 2021, 03:50:33 pm
content: What you’re looking for is commonly called a “ducking” circuit (because it makes the first signal “duck” out of the way when the second, higher priority one appears). Just google “audio ducking circuit” and you’ll find stuff.

author: dnyberg
author_rank: Contributor
timestamp: August 07, 2021, 11:02:52 pm
content: Well everything in the system is battery driven; radio presents a pin marked GND, which my circuit would also treat as battery minus aka ground, so I'm expecting to treat everything as 0->something +volts. I *may* be able to find out if the radio's output is capacitor coupled, but I'd expect not, as most people would just plug a speaker right into that radio out, and I doubt cheap radios add circuitry to drive an output outside its own battery's voltage range. Might need a resistor to slow down charging of the peak detector cap. I wouldn't be surprised if anything I did had pops, though.

author: dnyberg
author_rank: Contributor
timestamp: August 07, 2021, 11:03:46 pm
content: I would never, had my life depended on it, have guessed that terminology. I'll go look, thanks!

author: tooki
author_rank: Super Contributor
timestamp: August 07, 2021, 11:14:00 pm
content: Quote from: dnyberg on August 07, 2021, 11:03:46 pmI know I would never have been able to guess it, either! I learned the term from voiceover recording features in video editing software.Let us know what you find!

author: dnyberg
author_rank: Contributor
timestamp: August 08, 2021, 12:15:55 am
content: Quote from: tooki on August 07, 2021, 11:14:00 pmSo far everything I'm finding is oriented toward pre-amp'ed mic inputs, prior to a PA system's main amp. All my inputs will be signals some mfr (of portable devices) intended to drive headphones or earbuds directly, so I can't directly clone what I'm finding. On the other hand, looking at people's circuits, it seems they're doing things pretty similar to what I had in mind. So I may not be far off base. Still looking...

author: Bassman59
author_rank: Super Contributor
timestamp: August 08, 2021, 11:36:45 pm
content: Quote from: dnyberg on August 07, 2021, 11:03:46 pmThat Corpto the rescue!

author: Renate
author_rank: Super Contributor
timestamp: August 09, 2021, 02:29:37 pm
content: You know, this would behave much better if you had it trigger off the squelch signal on the radio.It's better to have the default audio duckbeforethe interrupt audio actually starts.Is there a handy LED on the radio receiver? You could even just use a photo transistor if you don't like to hack the radio.Also, it's nicer if you can ramp the default audio, especially when it comes back on where you have the freedom to make it as slow as you like.

author: dnyberg
author_rank: Contributor
timestamp: August 10, 2021, 02:18:33 am
content: Quote from: Renate on August 09, 2021, 02:29:37 pmNo squelch signal immediately available. There's an LED, but IIRC it's a red/green, so... inconvenient; I'll run entirely from the output jack signals, as a matter of convenience.but...Your ramp suggestion is very much on point; my initial design includes an RC delay to restore the low priority channel (we'll see how smooth or sharp that is when it's testable); recently added a resistor to do the same to the ducking of the low priority input. I'll think about what I can do easily to ramp up the high priority; version 1 device (simple adapter to radio not previously mentioned) has a lot of pop originating from the radio itself. Quashing that pop would be worthwhile for its own sake. I'll contemplate. But being a beginner at analog, that may be beyond my abilities for now.Thanks for the thoughts!

author: Renate
author_rank: Super Contributor
timestamp: August 10, 2021, 10:29:05 am
content: Quote from: dnyberg on August 10, 2021, 02:18:33 amAw, just use a color filter.Is the receiver a little portable thing or a bigger desktop thing?You could wire an optoisolator in series or parallel with the right LED and adjust the resistor.Put terminals/connector on the back.

author: dnyberg
author_rank: Contributor
timestamp: August 11, 2021, 03:02:18 am
content: Quote from: Renate on August 10, 2021, 10:29:05 amEverything is portable/handheld/battery driven. Small and cheap/jellybean are priorities. Tweaking a trim pot for a particular radio would be ok, since it can be done by ear and should require setup only once.I've not been very successful looking for pop filters, at least simple/cheap ones. Seems to me that shouldn't be too hard... op amp integrator feeding a fet that blocks incoming signal until the integrator reaches some level? One-shot to do the same thing time based? Shouldn't be hard or need many components. Is there a classic, well known design for something like that?

author: Renate
author_rank: Super Contributor
timestamp: August 11, 2021, 09:59:59 am
content: Some radios actually have a squelch output on the speaker connector. YMMV