Hi - is there any easy way to switch between two audio sources, and hopefully even mix between those two sources? To make it a bit more complicated - I need to control all of this electronically, probabaly by an AVR microcontroller. By the way - both audio sources are stereo, though I can't see that mattering very much. I would also like to keep this circuit as small as possible, and as low in power consumption as possible. I'm really hoping there are some dedicated chips designed just for this? That would make me really happy Thanks!
It is fairly simple, you just need 2 dual channel linear pots, (yes linear) 4 resistors, and a cmoy headphone amp. http://sound.westhost.com/project01.htm part one shows how to make a good logarithmic control from linear pots. Just set it up so 1 pot controls one channel, and the other pot does the other channel (duh) connect the lefts together, and the rights together. Run that to the inputs on the CMOY, which will give you a master volume control. The main reason to use the CMOY it to keep the impedance on the output of the volume controlls consistant, and high so the potential dividers work correctly. Google for CMOY or Chu MOY to find out more about the CMOY. If you build the CMOY seperately you can have a nice portable headphone amp also.
So I'd connect the sets of outputs from the two sets of volume control circuits together? So like I'd have L1 and R1 on one pot, and L2 and R2 on the other pot, then connect the L1 and L2 outputs together as the L input for the cmoy, and connect the R1 and R2 outputs to the R input on the cmoy? That sounds fairly doable... Though I think my EE professors would murder me if they found out I was connecting outputs together... Could I instead replace the two potentiometers with two digital potentiometer, such as two MAX451s? (2 channels, 100K, 256 steps: http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2568/ln/) Only thing that worries me about doing that is where it says "Res. Tol. (%)" is 25. Does that mean what I think it means? That the actual resistance could vary from 75K to 125K?! That's ridiculous! But a bunch of other companies make digital pots to - so I'm sure I could find a more accurate one... Thanks!
yep digi-pots are suprisingly innacurate. However there may be one or two things that saves them for use in this. Since we are feeding the outputs from them into a high-impedance device (the op-amp) the value of the pot isn't too critical, just as long as it performs as a voltage divider. and a quote from the microchip MCP41xxx/42xxx digi-pot data sheet So with a dual pot, the values should match fairly well, keeping the left and right balanced. The MCP41xxx/42xxx series uses serial, to transfer the data so they might be suited to what you are doing, since you can just send a new value to the chip, rather than, having to increment all the way up or down. Plus it would let the µC have better control over the pot, that way you know exactly which position it is at, rather than where it should be. But if you were doing it without a µC than I would say go for the increment/deincrement controlled pots, because you can just hook buttons up to it. If you don't want to connect the inputs together, put in 4 more op-amps at unity gain to provide isolation. You could use the digi-pots to control the gain on the op-amps, but you wouldn't be able to go below unity gain, so you couldn't mute a channel, so keep the digi-pots as volume controlls between the op-amps.
To switch between 4 stereo sources as on the usual modern preamp there's a dedicated IC, TDA1029. Switches by DC voltage applied to the right pin, so easy to interface. Quasar supply a kit (1071) with circuit & datasheet downloads. No mixer though.