Signal routing with shift register and 4067

GroupDIY Audio Forum

Help Support GroupDIY Audio Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

muzikliberated

Active member
Joined
Mar 7, 2013
Messages
33
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

 

Attachments

  • audio_routing.PNG
    audio_routing.PNG
    48 KB · Views: 27
muzikliberated said:
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.
 
sorry for the noob question but, 'VE stage' ?

The application is a synthesizer, i guess that should qualify as 'hi-fi'
 
muzikliberated said:
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.


 
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.
 
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.
 
muzikliberated said:
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.


 

Attachments

  • Fig23.pdf
    468.3 KB · Views: 13
muzikliberated said:
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.



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.
 
abbey road d enfer said:
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.
 
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..
 
Back
Top