Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Switching/Buffering line level audio

Status
Not open for further replies.

bmwhittle

New Member
Heya!

I'm trying to build a small project that takes 4 line level inputs from PC soundcards and outputs to one of 4 outputs (2 sets of PC speakers, line in to a hifi amp or a pair of headphones).

I tried the basic switching of audio using CMOS chips with a 4066 which works well, now I want to be able to buffer it so that 1 source could drive any amounts of outputs needed without causing any loading issues. However I don't know whether the opamps should be setup as amplifiers or just as voltage followers.

I drew out this circuit, its pretty big and complex because it contains some power supply circuitry and the muxing. I also don't know if I need any input resistors or anything so the sources 'see' a load?

If you can have a look for me and tell me that'd be great and I can work on a new drawing.

Thanks,
Brian
 

Attachments

  • sound switcher.JPG
    sound switcher.JPG
    141.7 KB · Views: 656
I tried the basic switching of audio using CMOS chips with a 4066 which works well, now I want to be able to buffer it so that 1 source could drive any amounts of outputs needed without causing any loading issues. However I don't know whether the opamps should be setup as amplifiers or just as voltage followers.
both configurations can be used . if u don't need amplification use the follower config:
 
OK, but if I was to connect it up like so and connect up all the PCs and stuff, would the opamps be able to drive the line level audio for all of the different outputs? What if I set them to all use the same source, would the source have too much current drawn from it?
 
have you tested just using the output stage of your 4052s as the buffer?

i am working on a similar project... 4 inputs and 4 outputs... and had no problems with my initial breadboard testing.

oh, and how did you decide on a 10 volt supply? I went with 10 volts too, really just as an arbitrary number, seeing as how we're only dealing with millivolts here?

here's a bit of my ramblings:
https://projects.dimension-x.net/archives/category/project/audio/
 

Attachments

  • rev3-2_smt_sch.gif
    rev3-2_smt_sch.gif
    22.7 KB · Views: 930
Last edited:
Hi, I have tried it yes and it works fine, but I'm worried that if I want to play the same source on say 3 different outputs, it will load the source too much.

Your project looks really nice and rounded though, I want to get some PCBs made up for this project definately and its gonna have to be double sided! How do you get on with SMD? I'm kinda scared to design a load of boards to use SMD and find its a bollocks of a job to solder and I end up ruining lots of stuff....

Thanks
 
I haven't had those boards fabbed yet ... the project is still on a breadboard, kinda got distracted from it ;) I originally thought I'd be fabbing this in house, but when I counted the number of vias I had used, I knew that wasn't going to happen!

all the smd parts I used are fairly chunky, so I plan to just hand solder them. you shouldn'd fear smd, in my opinion having to take a little extra time to make sure the pads solder clean is worth it instead of having to drill countless holes for TH components.
 
Don't use a lousy old 1458 dual opamp for audio. It is noisy, distorted and has a bandwidth only to 9kHz.
Use a TL072 dual audio opamp and it will work much better for the same or a lower price. Because it is wideband, it will need a 100 ohm resistor in series with each output so that cable capacitance at the output won't cause it to oscillate.
 
Audio makes a good point, the 07*/08* series is much quieter and generally better. But seeing as your using quite a few, you'll save having to make so many power connections and board space by using the 074 or 084 quad versions. I bought 10 x 084 a while back, totalled £4, so a mere 10p per op-amp.
 
Ok well I did a bit of redoing and taken into account what everyones said. I'm still not 100% sure on the need for the opamp buffers but I don't want to overload my sources!

Here's an update schematic, I think it's doing everything I need it to, then I just need a controller board. I've resorted to headers for the inputs and outputs to allow me greater flexibility (ie, cascading outputs, different types of connector, etc).

> JustDIY, is it possible for me to have a look at your Eagle files?

Thanks,
Brian
 

Attachments

  • sound switcher 2.JPG
    sound switcher 2.JPG
    156.4 KB · Views: 428
sure, shoot me an email and I'll send the sch and brd in a zip (my addy is at the bottom of every post)... I've got a bit newer version than what's pictured... I optimised it a bit more based on my fab house DRC specs, and added ESD protection diodes to the inputs.

I'm still confused about the op-amps idea (and a little concerned regarding my design).

I get the need for an amplifier if headphones are used, since they're not a high impedance input like a line input would be on a set of powered speakers or a stereo receiver. Is this the root of your op-amp based design, sort of a pre-amp for headphones?

My design is going to be feeding high impedance line-level inputs only, no headphones or un-powered speakers... the input sources will all be line-level outputs from sound cards and perhaps a line-level feed from my cable box.

bmw, another thing I found while working on this project, if you use linux and alsa, you can split up a multichannel sound card into three (or more) discrete sound cards... really a expense saver and space saver ... with two SB Live! 5.1 (old ones) cards I have eight outputs on my media server, as each card offers three stereo outputs, plus the two stereo channels from the onboard sound. Plus I still have two pci slots free for additional cards ... the new SB Live with 7.1 has four stereo outputs, but I haven't seem the price drop on them yet.

You have to watch your cpu usage, too many heavy duty apps and the audio can hickup, but I've had six streams of shoutcast running using mpg321 with no problems at about 40% util on a celeron 933
 
justDIY said:
have you tested just using the output stage of your 4052s as the buffer?

That would be difficult in that the 4052 has no output stage and can't do any buffering. It's just a switch. Straight wire with a small resistance, bidirectional.
 
A CD4052 is not a perfect switch. Look at its datasheet to see how much distortion there is when it is on if it has a low impedance load (even 10k) and/or a low supply voltage.
When it is off it is a small capacitor that can couple a signal into a very high impedance opamp's input.

What keeps the input of an opamp from going crazy when its input CD4052 switch is off? The opamp's input will be floating and becomes an antenna for interference pickup. The opamp needs a resistor at its input to 0V.
 
Well, I was thinking that the opamp would get over the problems with the resistance to the switch because it can probably drive an output better than the source directly. I dunno thats why I was asking you if it was needed :)

audioguru > thanks for the point about the opamp pulldown resistor.

justDIY > thanks for that I've shot you an email. good call on the audio routing thing in alsa, I should do some more research into that. I've been using multiple winamps on a pc with 2 test soundcards and onboard sound at the moment to test it but the 5.1 card does only let me have one proper output so if i can split that into 3 on alsa sounds good. are you using mplayer? is it graphical frontend running or how else are you configuring it?

thanks
 
bmwhittle said:
.

justDIY > thanks for that I've shot you an email. good call on the audio routing thing in alsa, I should do some more research into that. I've been using multiple winamps on a pc with 2 test soundcards and onboard sound at the moment to test it but the 5.1 card does only let me have one proper output so if i can split that into 3 on alsa sounds good. are you using mplayer? is it graphical frontend running or how else are you configuring it?

i just used command line mpg321 (clone of mpg123) ... although mplayer also works, as does pretty much any ALSA aware application, like XMMS if you want a graphical front end.

for my testing, I just telnet into the box and fire up an mpg321 process and specify the output I want to use, but in the future I hope to automate the process with some scripting.

There is another application layer tool called JACK which can do real-time digital mixing of input and output sources, as well as splitting of signals, so if I manage to learn JACK, it will make this analog mixing and source selecting business a moot point ;) With JACK operational, each sound card output (or section there of) will be dedicated to an audio zone, and then software will select which source streams are fed to which zones, duplicating (or mixing) them as needed.

https://www.google.com/search?q=alsa+jack
 
Ooh interesting. Methinks I'm gonna have to setup my audio pc again and get going with linux. *Hunts down Fedora disks*

I'm torn with the idea of getting a matrix board made up (and trying to decide whether to SMD it like you or keep it through hole), or trying this software approach. I've also come across **broken link removed** nice looking little amp circuit I could use to power some sets of speakers all in one place rather than remote amplification, how would the CMOS go powering these do you think?

Thanks again
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top