Audio matrix switch design: need some help and ideas

GroupDIY Audio Forum

Help Support GroupDIY Audio Forum:

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

DavidS

Member
Joined
Apr 16, 2005
Messages
6
Location
Belgium
Gents (m/f),

Some questions for all you audio gurus out there. I am currently designing an audio matrix switch. Being an amateur radio operator, I have an ever-changing need of connecting different audio devices to each other, and I am getting sick of changing cables and even soldering up new ones each time I want to do something different with my equipment. I have radio's, computer sound cards, headphones, audio modems etc, that accept line level and microphone level inputs and have line level outputs, and that all need to be connected to each other in a flexible way.

What I need is an audio matrix where I can connect the audio inputs and output of all my devices to, and that can dynamically switch any input to any output. My design would consist of three modules:

- Input/output modules
- Audio matrix module
- Control module

The audio devices that I want to connect will be connected to the in/output modules. An in/output module used as input would convert any incoming signal (either a microphone or a line out) to line level, where it would get switched to the correct in/output module for output. This latter module has to be able to convert from line level to either line level or mic level, so that it can be outputted to the appropriate input of another audio device. The control module will configure the audio matrix module so that the correct inputs are connected to the correct outputs.

In the audio matrix module I plan on using two MT8816 chips, which are 8x16 Analogue Switch Arrays that can be configured by a microcontroller. An example of the use of these chips can be found at http://www.microship.com/bike/behemoth/bikelab/910221.html, the datasheet at http://products.zarlink.com/product_profiles/MT8816.htm. Combining two of these switch arrays will give me 32 in/outputs that can be connected together using 8 internal busses. The resistance of a switch in the matrix when in on-state is 65 Ohm max. The following conceptual diagram shows what I mean. The inputs and outputs are on the right-hand side (in this diagram they were used in a RS232 cross-connect, so ignore what remains of the original serial zener and RS-comments)

sexbarconcept.GIF

(http://microship.com/microship/techinfo/microshipnet/sexbar.html)

The control module to control the matrix chips will use a PIC 16F877A.

The input/output modules would have 4 inputs/output ports each. They would have a cinch connector on the back panel per port, where I would connect my audio device. Each port would have to be flexible; it has to be able to be used as an input as well as an output (switchable), and needs to be able to input or output a microphone level signal or a line level signal.

This sketch illustrates the concept of my audio matrix switch.
http://www.flickr.com/photos/58991656@N00/9559125/

I've got experience with digital systems, so I have the microprocessor and matrix chips covered, but I am not that good at audio design, so this is where I need your help.

The functional demands for the in/output modules are:

- Good audio with low noise figure. No need for hi-fi quality though, just acceptable FM radio quality audio.
- Low parts count. Simple design. It needs to be duplicated for each of the 32 in/outputs, so it has to be CHEAP!
- Able to convert microphone or line levels to microphone or line levels by setting internal jumpers.
- Should be able to be used as input or output using a switch.
- Ground loop isolated with audio transformer.
- Input / output signal level control with potmeter.
- It must be possible to switch multiple inputs to multiple outputs.

Questions:

(1) What op amp do I choose? To reduce cost I am inclined to use the quad opamp chips that are available (I'm considering the LM324N Low Power Quad Operational Amplifier).
(2) Should I go with JFET / BiFET / CMOS op amp designs, and if so, for what reason?
(3) What other low-cost decent quality op amps would you suggest? I want to be able to use a single +12V supply, unless there is a very good reason for using a split power supply with negative and positive rail.


(4) Can anyone tell me what signal levels and impedances are used for microphone and line levels? I have done some research on the net, and as far as I can tell these levels are not standardized, but should be around 1mV for microphone level and 100mV @ 10Kohm for line level.
(5) This would mean I need a gain factor of 100 to convert between microphone level and line level?

I plan on converting all inputs to line level, then switch them internally, and then convert the line level signal to line level or mic level for output.
(6) Is this the most sensible thing to do, or what would you recommend?
(7) Are there any issues with crosstalk or noise to be expected?

Based on a flexible conversion from microphone to microphone, from line to line, from microphone to line and from line to microphone levels, I came up with the circuit for an amplification stage (below). Rin1 and RL1 are 1K, Rin2 and RL2 are 100K. Line-to-mic would need JPin set, mic-to-line JpL, and line-to-line or mic-to-line would need either no jumpers or both jumpers to be set.
(8) Is this a sensible thing to do?
(9) How could the design be improved, or what would be a better design with the same flexibility and low parts count?
(10) In the case of a unity gain amplification, would it be best to set both resistors at 1KOhm (JpIn and JpL off) or at 100KOhm (JpIn and JpL on)?

http://www.flickr.com/photos/58991656@N00/9559123/in/photostream/


(11) In the circuit below, will the input/output ?reverse? switch cause any cracks when switching? (12) How would I be able to suppress them?

http://www.flickr.com/photos/58991656@N00/9559124/in/photostream/

(13) In this circuit above, will I be able to connect multiple inputs together to multiple outputs, or would there be a problem with load in this case?

(14) In the circuit above, what would the best choice for Rp be? A 10K logarithmic potmeter?

(15) The circuit below looks like what I need, but would it be the same if the inputs were connected together immediately after the potmeters, and if the 47k resistor would be just one resistor connected to the output opamp?s inverting input? Because that?s basically what I intend to do.
(16) If I do this, would the output from one input stage cross-couple with the feedback loop of the other input stages?
(17) The switch resistance through my matrix chip would give me 130 Ohms of resistance; I guess this won?t cancel much of the cross-over?
6ipmix.gif

(http://www.zen22142.zen.co.uk/Circuits/Audio/6ipmix.htm)

Only 17 questions :cool: Well, I hope you can/are willing to answer some of them. Thanks for your help!

David [email protected] (you know which part to remove :razz:)
 
You're not asking for much are you ;-)

This is a non-trivial project. The digital control part is perhaps the only relatively trivial aspect, and at that the likely layout and power supply issues to avoid boatloads of switching crap in the signal chain are formidable.

I've not got the time to go into this at great depth. But for openers, the LM324 is about the poorest op amp for audio that I can imagine. If the output is loaded with a pulldown resistor to the negative rail it helps a lot, but I would reserve this part for very undemanding low-frequency apps.

What kinds of microphones are you planning on? This will have great impact on the details of any switcher, especially when you are asking to convert levels.

The rationale for doing this yourself? Lack of commercial products fitting your requirements, cost??
 
Bcarso,

>You're not asking for much are you ;-)

Well, I figured if I am going the post some questions, I might as well be throurough :)

>The rationale for doing this yourself? Lack of commercial products fitting your requirements, cost??

Well, first of all I don't know of any commercial products that meet my requirements, but I am quite sure that if they exist, they will come in 19" rackmountable cases or something of similar size. I need my matrix to be small and portable.

Cost? I have learned over the years that by the time you have built something yourself, you will have spent more than a commercial item would cost at a flea market or on eBay, but I must say I have learned a lot building stuff myself. I just want a product in a small package that works exactly the way I want to.

> This is a non-trivial project. The digital control part is perhaps the only relatively trivial aspect, and at that the likely layout and power supply issues to avoid boatloads of switching crap in the signal chain are formidable.

I understand that this is not a walk in the park. Bear in mind that I require only decent sound, nothing above normal FM radio quality. Above all it has to be simple.

Yes, the digital control will probably cross over to the audio signal path, but the thing is, the microprocessor can clock new data into the audio matrix chips in a few milliseconds and go to sleep after that, and I really don't mind a short blib in the audio. I know most of you guys (m/f :cool: ) are looking for the lowest distortion, max dynamic range and all that, but I just want an acceptible sound.

> But for openers, the LM324 is about the poorest op amp for audio that I can imagine.

What cheap single supply opamp would you recommend for this application? To keep my board size small, a quad opamp package would be a great plus.

Microphones? My microphones are those used for ham radio gear, which either means 600 Ohm impedance electret mikes, or headsets with a 2000 Ohm impedance and a sensitivity of -66 dB.

Thanks for you comments!
David.
 
David,

I have to run at the moment (well, waddle might be more accurate) but one detail you might not have considered: the electret mics have to have a pullup resistor. They have an internal FET, and the output hot is the drain (usually). This complicates matters for your ~universal approach. There are some pro ones that have internal batteries OTOH so this would not be a consideration.

When you say portable, can I assume at least that it is mains-operated?

Brad
 
Brad,

Yes I have considered the power requirements of electrets. Since all my input/outputs are cinch plugs, I will need to make adaptor cables. The resistor and cap for the electrets would be in this adaptor cable. Universal principal saved :grin:

And no, I plan to run the matrix from the 12VDC supply that is my universal supply in my shack, and sometimes from a heafty pair of lead-acid batteries.

Thanks for the replies, and good luck with the waddling!

David
 
> To reduce cost I am inclined to use the quad opamp chips that are available (I'm considering the LM324N Low Power Quad Operational Amplifier).

No, no, no!!!! Yuck!

Op-amps are about the cheapest part of the project. A basket of NE5532 or LM833 would give faultless sound at low cost. If you must shave pennies and milliAmps, use TL072, though not for loads lower than 2KΩ. Power demand is similar to '324, but the '072 actually passes all of the audio (the '324 won't).

Mike levels are VERY variable. Granting that you don't have big percussion in your radio shack, I still think there will be a wide range of mikes and voices and signal levels. Fixed-gain of 100 is probably not going to work every time. Mike amps are usually variable-gain, or take gain in two stages with a gain control between.

Most naked electret capsules are closer to 2K than 600Ω, and I would expect loss of signal with your suggested 1K input resistors. Also the inverter tends to be noisier than a non-inverting amp, though with electrets the mike self-noise may be higher than a reasonably designed inverting amp.

Standard line level in hi-fi is 0.3V at 0VU, better described today as 2V RMS at maximum peak level (digital full scale, or 100% modulation).

Output of electret capsules at a foot or so from a talker runs around 4mV, but varies a lot with capsule, talker, and working distance. If you get an old-time preacher an inch from the mike, you can easily get 300mV. A conversation with mike in the center of the table can run well below 1mV.

In music-audio, there is normally a STRONG segregation of IN and OUT. I'm wondering why you want the ability to connect ANYthing to anything else: an input to an input makes no sense, an output to an output makes no sense, and while out+out+in seems to be a mixer, without isolating resistors the two outputs fight each other and distort.

I'm old-fashioned and simple. To me, your needs could be met with an 1870 invention: the Patch Bay. Any jack can be connected to any other. Any jack can be input or output. You wire some spare jacks as "buses" for splitting one signal to multiple outputs. The patching survives power-failure and computer-crash and static-charge shocks. A patchbay never distorts or overloads, and has zero power consumption.

Yes, most are packed for 19" racks. But the classic Bell System patchbay is a block of phenolic with holes: you can take off the ears and metal label-strips and cut it to any length. While the 1/4" 3-contact balanced patchbay is well proven, there are unbalanced patchbays with hi-fi type jacks.
 
PRR,

Thanks for the reply!

I liked your statement of being old-fashioned and simple. It makes sense to keep things simple and stupid indeed. And the way you look at it, I am indeed trying to make a digitally-controlled patch panel. I hadn't thought about using a patch panel yet, which is quite funny, because as an ICT project manager I am usually up to my ear in patch panels :grin: Still, I am sticking with my original idea because I want the flexibility a microprocessor offers me. My whole shack is computer-controlled (antenna direction and switching, radio frequency and mode control, radio modems etc), and an audio patch panel with a bunch of cable spaghetti attached to it would not fit into the picture. Computer control is a must.

Ok, I admit the NE5532 might be a better choice than an LM324N :shock: The quality difference will probably warrant the cost :grin: Point taken.

> Mike levels are VERY variable. Fixed-gain of 100 is probably not going to work every time. Mike amps are usually variable-gain, or take gain in two stages with a gain control between.

Any ideas how I can solve this? Come to think of it, I would only need two mic inputs, all the rest will be line level inputs. It would probably pay off to make two separate microphone level inputs and leave the rest fixed at line level. Can anyone point me to a schematic of such a variable-gain or two-stage design for flexible mic amplification? Remember, it has to be simple rather than high-end.

> Most naked electret capsules are closer to 2K than 600Ω, and I would expect loss of signal with your suggested 1K input resistors.

Hmm, according to the specs mine is indeed 600 Ohm. What would you suggest as an input resistor then? I believe the input resistor determines the input impedance of the circuit? So I guess the impedance of the mic element would then determine the value of the opamp circuit's input resistor, which would in turn determine the value of the loop resistor (for a given gain)? Hey - I'm actually learning here :grin:

Would it be possible to have a potmeter as either input or loop resistor, thus controlling the gain of the opamp? What would be the disadvantages?

> In music-audio, there is normally a STRONG segregation of IN and OUT. I'm wondering why you want the ability to connect ANYthing to anything else: an input to an input makes no sense, an output to an output makes no sense, and while out+out+in seems to be a mixer, without isolating resistors the two outputs fight each other and distort.

Hmm, it is not my intention to hook up inputs to inputs or outputs to outputs, this is rather an unwanted side-effect of the flexibility of the matrix chips that I plan on using. The microprocessor would not allow this condition to be configured.

You have a point with your last comment of two outputs fighting each other and distorting. I know that isolating resistors are needed. In the last schematic of my original post, these resistors are 47k. What would be the minimally acceptable value? My matrix switch already has about 130 Ohm of internal resistance, this would probably not be enough?

David
 
Can anyone point me to a schematic of such a variable-gain or two-stage design for flexible mic amplification?

There is a cool one which uses two opamps (i.e. one 5532) and one pot such that you get a first non-inverting gain stage and afterwards an inverting configuration. Gain control is pretty nasty clever and swings between 0 dB and 60 dB, nicely distributed between the two stages.

Noise performance will not be extraordinary (original design uses a step-up transformer which is to expensive for this job), but probably OK for your application. Give me some days, and I'll draw it.

Samuel
 
Samuel,

What you propose sounds like it could do the trick for me.

> Noise performance will not be extraordinary (original design uses a step-up transformer which is to expensive for this job), but probably OK for your application.

Welll, noise is not as much of an issue to me. Since I am going to use the matrix switch mostly for weak signal reception, most signals this thing is going to process are 99% noise and 1% signal anyway.

> Give me some days, and I'll draw it.

Eagerly awaiting you drawing. A scan of a quick-and-dirty sketch would do fine.

I was in Zurich over the weekend by the way, nice place!

Thanks,
David
 
Eagerly awaiting you drawing.

The waiting has an end: Shared_Gain_PreAmp_r0.gif

If someone wants to use this for high quality audio, there are some issues like potentially scratchy pots to be considered; maybe I'll draw a more elaborate version later.

I was in Zurich over the weekend by the way, nice place!

Next time you drop me a PM and we'll discuss the pro and cons of this mic pre design, OK?

Samuel
 

Latest posts

Back
Top