Need help multiplexing audio - Page 1
Forum section: electronics / projects

author: cmumford
author_rank: Contributor
timestamp: September 26, 2020, 02:49:51 am
content: I'm seeking advice on how to properly route audio in a radio. I'm creating something with two tuner IC's, and I'd like to be able to listen to one tuner, while MP3 encoding the second with a VS1063 chip. I don't know if there is such a thing as a multiplexer with 3+ inputs and two outputs - or, for that matter, if a multiplexer is what I need.I guess I can use two muxers, but won't splitting the audio lines degrade the signal? I'm probably going about this the hard way. Attached is a diagram.

author: NiHaoMike
author_rank: Super Contributor
timestamp: September 26, 2020, 04:08:09 am
content: Dedicate the second radio to the MP3 encoder, then all you need is a switch to select between MP3 playback and radio playback. Or just some resistors, with the switching done by enabling/disabling the radio and MP3 playback using software commands.A more modern way to do it would be with SDR.

author: cmumford
author_rank: Contributor
timestamp: September 26, 2020, 04:32:20 am
content: The two radios don't have the same bands, and it would be nice to be able to record from either one. You're absolutely correct about an SDR, but am mostly taking this approach for the fun of it.

author: BrianHG
author_rank: Super Contributor
timestamp: September 26, 2020, 06:20:13 am
content: What's wrong with using 2 of the CD4052 / 74HC4052?

author: cmumford
author_rank: Contributor
timestamp: September 26, 2020, 04:49:33 pm
content: @BrianHG are you suggesting something like this?

author: Yansi
author_rank: Super Contributor
timestamp: September 26, 2020, 05:21:47 pm
content: Quote from: BrianHG on September 26, 2020, 06:20:13 amWay too low off state signal isolationThere is however a neat trick how to use these shitty MOS switches for audio applications: See for example the book from Douglas Self, Small Signal Audio Design.//This way it offers >80dB isolation at 20kHz, with +20dBu (7.8Vrms) applied to input. Pretty good now, huh? Also, your signal is not limited by the supply voltage of the gate.

author: Yansi
author_rank: Super Contributor
timestamp: September 26, 2020, 05:28:03 pm
content: Also, I'd add one more trick - replacing the the shunt switch gate with a discrete transistor (D. Self recommends JFET - but I don't see a reason not to use a cheap low capacity N-mos - the substrate diode should not a problem here as the inverting node shall under nowrmal circumstances always be about GND level) should further improve off state isolation by a mere 20 dB.That way using a simple 4016 (4066) gate plus three discrete N-MOS transistors, you can make a decent 3:1 audio switch with very cheap components.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: September 26, 2020, 06:49:55 pm
content: The small switches such as in the CMOS Muxes have a series resistance of around 100 ohm.Small SOT23 fets can have resistances in the milli ohm region.With the inverting opamp trick from the schematic above, both the switches only see GND level on both Source and Drain, the only difference is whether they conduct current (on) or not (off). So you can use these (tens of) milli Ohm MOSfets for both switches.To mitigate gate capacitance effects, you can simply use a 10Meg or so resistor (limited by gate leakage) in series with the gate. This makes them switch slower, and in this case that is probably beneficial because it reduces the plopping noises during switching.

author: Yansi
author_rank: Super Contributor
timestamp: September 26, 2020, 08:10:44 pm
content: Do not generalize. There is a lot of cheap modern CMOS switches, that are in the single digit ohms range and are way better than a discrete N-MOS switch, in terms of charge injection.From a small Nmos like a 2N7002 you get about 100pC of charge through the G-S, while a cheap modern mux gate such as LVC1G3157 (or whatever similar) is in a single digit pC amounts. No 10Mohm hacks required.CMOS switches like 4016, 4066, 4051, 4052, 4053 and a like are really old stuff and have quite awful characteristics in every aspect. But as I have provided an example, there are ways around these limitations, so one can use them even for demanding applications.And of course it may be possible to use a SPDT switches (such as the above mentioned LVC1G3157) instead of two SPST switches. Hence just simply only single control logic signal is required per audio signal input. No other parts required. (same way you could get away with a 4053 for three channels, but I recommend getting a modern better switch anyway).

author: julian1
author_rank: Frequent Contributor
timestamp: September 26, 2020, 09:33:29 pm
content: Quote from: Yansi on September 26, 2020, 05:21:47 pmHow does that work? The 22k with the mux input gate capacitance forms an RC circuit. And then you impedance match across to the output side with an op-amp also with a 22k?

author: Yansi
author_rank: Super Contributor
timestamp: September 26, 2020, 11:06:44 pm
content: Very detailed description of the circuit and description of its evolution, including measurements, present in the book I have mentioned above. If you'd give it even a try to find it...//EDIT: PS: Chapter 16

author: BrianHG
author_rank: Super Contributor
timestamp: September 27, 2020, 03:26:03 am
content: Quote from: cmumford on September 26, 2020, 04:49:33 pmThat will work.Also, you can use the unused input channels for a separate external AUX line in and last channel for the mute.As for others talking about isolation, yes in the data sheet, the typical isolation is ~ -60db, 1000:1 for the generic NXP/TI/On Semiconductors 74HC4052 in the MHZ region, but in the 25KHz audio band, the isolation is >-90db, or > 30,000:1. (TI version or 74HC4052).Just so we are clear, the old CD4052, HEF4052, MC14052 are older different animals. Their -60db isolation is at 10KHz allowing tin sounding audio crosstalk.You can still double isolate the analog switches, like using a 2x74HC4053 to create a T switch each input to source audio or GND and each those outputs feeding the next stage of a 74HC4052 mux making that ~30K:1 isolation mux into a ~900K:1 mux.

author: cmumford
author_rank: Contributor
timestamp: September 27, 2020, 02:52:19 pm
content: Thanks for your help BrianHT, and others that commented. Grateful to have access to your expertise.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: September 29, 2020, 02:42:49 am
content: I apologize for the generalization.I'm a bit stuck in old-school stuff sometimes.Just typed in "cmos switch" at digikey:https://www.digikey.com/products/en/integrated-circuits-ics/interface-analog-switches-multiplexers-demultiplexers/747?k=cmos%20switchAnd the first on the list was a DG408https://www.vishay.com/docs/78084/dg408le.pdf17 Ohm, and -98dB crosstalkThen there is actually a sort column for Rds on, and they start at 3 Ohm.But still.Using discrete MOS-fets here with slow switching fit the application and charge injection is irrelevant here. Crosstalk should also be superior because they are physically different devices.

author: Haenk
author_rank: Super Contributor
timestamp: September 29, 2020, 08:20:34 am
content: Little print relais for audio signals are also widely used in professional audio gear.2 relais + logic should do the trick