Signal routing with shift register and 4067
« on: December 07, 2017, 10:57:08 AM »
Hey Again,

I'm now working on audio routing for my synth project and wanted to run this past you.
I am using a shift register to control a pair of 4067 16 channel analog multiplexers.
Schematic attached.
The circuit is supposed to take the output from each voice and of course route it to different physical outputs.

I'm not sure if the audio signals going into the multiplexer needs to be pre-attenuated and then amplified again on the other side, I read somewhere that the IC will saturate.
thanks



abbey road d enfer

Re: Signal routing with shift register and 4067
« Reply #1 on: December 07, 2017, 11:09:19 AM »
Hey Again,

I'm now working on audio routing for my synth project and wanted to run this past you.
I am using a shift register to control a pair of 4067 16 channel analog multiplexers.
Schematic attached.
The circuit is supposed to take the output from each voice and of course route it to different physical outputs.

I'm not sure if the audio signals going into the multiplexer needs to be pre-attenuated and then amplified again on the other side, I read somewhere that the IC will saturate.
thanks
The 4067 will handle signals within its power rails limit minus a few volts; the maximum rail voltage is 15V, so basically it could handle safely signals of 12V p-to-p. Many think the distortion in voltage mode is unacceptable for HiFi, and prefer to operate in current mode (inputs via a resistor and output through a VE stage), at the cost of increased x-talk. Your choice depends on your targetted performance.
Who's right or wrong is irrelevant. What matters is what's right or wrong.
Star ground is for electricians.

Re: Signal routing with shift register and 4067
« Reply #2 on: December 07, 2017, 11:27:16 AM »
sorry for the noob question but, 'VE stage' ?

The application is a synthesizer, i guess that should qualify as 'hi-fi'

Andy Peters

Re: Signal routing with shift register and 4067
« Reply #3 on: December 07, 2017, 11:38:47 AM »
Hey Again,

I'm now working on audio routing for my synth project and wanted to run this past you.
I am using a shift register to control a pair of 4067 16 channel analog multiplexers.
Schematic attached.
The circuit is supposed to take the output from each voice and of course route it to different physical outputs.

Arrrrgh, the utter EVIL of hidden power supply pins.

You need to be careful here. The CD4067 uses, of course, CMOS input thresholds, which are set by the supply rail. If you want to take advantage of its 15 V rail, then your logic driving its select inputs need to be able to swing to 11V to guarantee a logic '1'. No 74-series logic family can do that, so you'll need a level shifter. See the data sheet: http://www.ti.com/lit/ds/symlink/cd4067b.pdf

You can run the 4067 at 5 V and have its logic inputs compatible with 5 V 74-series logic, but that reduces its analog input range.  So dump the obsolete 4000-series crap and choose something modern, like perhaps ADG5206, which is a 16:1 analog mux with analog rails up to +/- 22 V (or 9 V to 40 V single supply), and the best part is its logic inputs are TTL compatible, meaning you can drive it with 3.3 V logic no problem.  See http://www.analog.com/media/en/technical-documentation/data-sheets/ADG5206_5207.pdf See also the Intersil DG406: https://www.intersil.com/content/dam/Intersil/documents/dg40/dg406-407.pdf (also available from Maxim and Vishay).

Yes, these parts are more expensive than the CD4067 but they're better in all respects.


"On the Internet, nobody can hear you mix a band"

abbey road d enfer

Re: Signal routing with shift register and 4067
« Reply #4 on: December 07, 2017, 11:39:26 AM »
sorry for the noob question but, 'VE stage' ?
Virtual Earth. In other words, it converts current (in) into voltage (out).

Quote
The application is a synthesizer, i guess that should qualify as 'hi-fi'
Not really. Distortion and noise in synth modules are not very good.
Who's right or wrong is irrelevant. What matters is what's right or wrong.
Star ground is for electricians.

Andy Peters

Re: Signal routing with shift register and 4067
« Reply #5 on: December 07, 2017, 11:39:34 AM »
sorry for the noob question but, 'VE stage' ?'

Virtual Earth (or virtual ground as we say here in the colonies).
"On the Internet, nobody can hear you mix a band"

JohnRoberts

Re: Signal routing with shift register and 4067
« Reply #6 on: December 07, 2017, 11:53:04 AM »
Using CMOS transfer gates for switching audio has been discussed before...

The distortion from using them in voltage mode depends somewhat on loading, (the on resistance of the TG changes with terminal voltage), so higher impedance termination makes less distortion.

For best linearity using them in current mode, in series with an inverting stage reduces the voltage swing sensitivity.  Of course the CMOS power rails, and CMOS logic signals will need to be shifted to accommodate audio centered on 0V, or shift audio 0V up to CMOS V/2

JR

PS: For TMI back in the 80's I used CMOS TG for electronic switching inside a large recording console, by putting the TG inside the op amp's NF loop which made distortion even lower. I couldn't measure any THD increase from the CMOS TG using the Sound Technology distortion analyser (bench standard SOTA for back then).  Of course you need to terminate sources that are turned off, and clamp inputs to prevent exceeding CMOS rails. Switching logic may need to be slowed to manage clicks, but not so slow that on/off contention occurs.
Visit https://circularscience.com to hear what properly "cleared" drums sound like.

Re: Signal routing with shift register and 4067
« Reply #7 on: December 07, 2017, 11:59:04 AM »
Thanks for the great responses and advice.

these voltage swings you talk about seem quite high.. the audio I am dealing with here is around line level. thats a maximum of around 2v isn't it?
The voice input shown in the schematic is actually coming from the output of a DAC.

Andy Peters

Re: Signal routing with shift register and 4067
« Reply #8 on: December 07, 2017, 01:16:03 PM »
I am using a shift register to control a pair of 4067 16 channel analog multiplexers.
Schematic attached.
The circuit is supposed to take the output from each voice and of course route it to different physical outputs.

I'm not sure if the audio signals going into the multiplexer needs to be pre-attenuated and then amplified again on the other side, I read somewhere that the IC will saturate.

Consider reading this app note from Analog Devices.

Figure 23 shows the virtual-ground configuration. This is the standard inverting amplifier configuration. The input resistors are in series with the on-resistance of the switch, and with 10k input resistors and 100 ohm on resistance the effect of that on resistance is minimized. Also, since the switch is at the summing node of the amplifier, it's at essentially 0 V, with the voltage across each switch on the order of 100 mV or so.

Math: Remember in a virtual ground (inverting) amplifier, you set the non-inverting opamp input to 0 V, and op-amp action forces the inverting input to 0 V too (hence "virtual ground"). But also remember the other opamp rule: since the inputs draw no current, the current into the virtual-ground node is the same as the current going out. That current is set by the feedback resistor. Assume max swing of 10 V on the output, that's 10 V across the feedback resistor, so 1 mA through it. That means 1 mA through the selected channel's 10k input resistor + the 100 ohm on resistance. 1 mA through 100 ohms drops 100 mV. With such little swing across the switch the distortion is very low.

Figure 26 shows an another option. In this case, the switch output is buffered by a non-inverting opamp. The opamp's high input impedance swamps the on resistance, making the switch basically load-independent.


"On the Internet, nobody can hear you mix a band"

abbey road d enfer

Re: Signal routing with shift register and 4067
« Reply #9 on: December 08, 2017, 05:30:01 AM »
these voltage swings you talk about seem quite high.. the audio I am dealing with here is around line level. thats a maximum of around 2v isn't it?
You have to consider the actual p-to-p value.



Quote
The voice input shown in the schematic is actually coming from the output of a DAC.
The output level from a DAC is highly variable. If it's a voltage-out DAC,  level is constrained by the supply rail. For a single-ended DAC powered with a 5V rail, the max output level would be about 3.5V p-p. For a differential out, it would be 7Vp-p, but anyway you would need a bal-to-unbal converter, that you can scale to whatever level you wish.
For current-out DAC's there is always a current-to-voltage converter, that you can also scale as you wish.
Who's right or wrong is irrelevant. What matters is what's right or wrong.
Star ground is for electricians.


Andy Peters

Re: Signal routing with shift register and 4067
« Reply #10 on: December 08, 2017, 10:47:46 AM »
The output level from a DAC is highly variable. If it's a voltage-out DAC,  level is constrained by the supply rail.

The output is constrained by the reference voltage, which may or may not be the supply rail.
"On the Internet, nobody can hear you mix a band"

abbey road d enfer

Re: Signal routing with shift register and 4067
« Reply #11 on: December 08, 2017, 11:44:28 AM »
The output is constrained by the reference voltage, which may or may not be the supply rail.
Yes. I stand corrected.
Who's right or wrong is irrelevant. What matters is what's right or wrong.
Star ground is for electricians.

Re: Signal routing with shift register and 4067
« Reply #12 on: December 08, 2017, 03:36:35 PM »
I believe the reference voltage on the dac is 2v

Re: Signal routing with shift register and 4067 New
« Reply #13 on: January 05, 2018, 03:06:27 PM »
I'm not an expert on the subject but I saw someone mention 7400-series and multiplexing which was exactly what I came in my mind.

Now, I've read about people doubling their Arduino digital inputs by using an 8-bit shift register (74HC595) and a muxer but I'd figure it slows down the circuit somewhat. I'd try it to demonstrate but I don't have the chip or a multiplexer (edit : or a good reason to do so)

EDIT : One thing I noticed about the Arduino projects is that most of the stuff going to the ground has a 220k resistor (I'd figure it's to protect the board)

EDIT 2 : I think the slowing down isn't an issue in most applications but from a computer architecture standpoint it would provide useful if the multiplexing was asynchronous (I don't know whether it can be done) because now it just cycles through the pins at a given rate whether there's stuff coming in or out, which to my understanding would require extra bits to let the circuit know which one of the pins is active to achieve an optimal transfer rate. It's not a problem when all of the i/o is in use though. The Arduino digital inputs use a LOW/HIGH logic to determine the pin state but I haven't really got around to it.

EDIT 3 : It may seem funny that I'm talking about DSP and some advanced computer architecture and at the same time building a dance stack that dates back to the 70's and a designing a rotary mixer which is basically an aluminium case with circuitry from the 50's.. it's like working for Intel in 2018 and making a Pascal compiler..
« Last Edit: January 05, 2018, 04:19:49 PM by efinque »