Any problems with this simple mixer schematic - Page 1
Forum section: electronics / beginners

author: donturner
author_rank: Contributor
timestamp: February 21, 2017, 11:02:22 pm
content: I have designed a 2 channel active audio mixer (virtual earth) which will be used to drive headphones. Schematic attached below.I've decided on an LM4562 op amp (http://www.ti.com/lit/ds/symlink/lm4562.pdf). The amp has unity gain (R2/R1=1) and C1 is used to filter any DC from the input signals. This is my first electronic circuit so I'd like to know if there are any obvious issues with it before I solder the parts onto a matrix board.

author: RJFreeman
author_rank: Regular Contributor
timestamp: February 21, 2017, 11:15:53 pm
content: Teh schematic seems to have gone missing....

author: donturner
author_rank: Contributor
timestamp: February 21, 2017, 11:20:18 pm
content: Thanks, hopefully you can see it now.

author: rstofer
author_rank: Super Contributor
timestamp: February 21, 2017, 11:28:37 pm
content: I'm not smart enough to prove the Kirchoff's Current Law works with just one capacitor. So, I looked around for a similar mixer and came up with this:http://www.learnabout-electronics.org/Amplifiers/amplifiers66.php..about half way downIn looking at several other circuits, the capacitor is ahead of the summing resistor and one capacitor per input.

author: Zero999
author_rank: Super Contributor
timestamp: February 21, 2017, 11:32:57 pm
content: The main problem is the TL081 is not designed to drive a 64 Ohm load.

author: donturner
author_rank: Contributor
timestamp: February 21, 2017, 11:39:40 pm
content: Ah, my mistake. I have updated the schematic with my actual op-amp: An LM4562 audio amp. Datasheet here:http://www.ti.com/lit/ds/symlink/lm4562.pdf

author: Benta
author_rank: Super Contributor
timestamp: February 22, 2017, 12:15:10 am
content: The gain will vary depending on the setting of the pots, and the potentiometer "law" will be a bit strange (neither lin nor log).Not an optimal design IMHO.

author: Audioguru
author_rank: Super Contributor
timestamp: February 22, 2017, 01:58:46 am
content: The datasheet for the LM4562 audio amp says it can drive 600 ohms, not 64 ohms. Most headphones amplifiers use an opamp with transistors at the output.Another serious problem with your schematic is that the opamp is not powered. Since the opamp is biased at 0V then there must be a dual polarity power supply with unknown voltages.

author: JS
author_rank: Frequent Contributor
timestamp: February 22, 2017, 04:05:44 am
content: Most opamps won't be happy with a cap directly to the inverting input, it's very likely to have stability issues. In this case if you connect a series RC is not the same as the other way around for instance.In any case better practice would be to AC couple every input and then DC couple each channel to the VE. If not you should add a small resistor in series with the cap to avoid oscillations. It could be an inductor or a parallel RL to avoid any degradation the such resistor would introduce.JS

author: Zero999
author_rank: Super Contributor
timestamp: February 22, 2017, 08:43:12 am
content: Quote from: rstofer on February 21, 2017, 11:28:37 pmIt does. The capacitor will appear to be a short at AC and the AC currents will be summed at the virtual earth.The resistors appear in parallel to make 5k, so with a 1uF capacitor, the lower cut-off will be just over 30Hz. If good bass response is required, then use a larger capacitor.QuoteYes, that's normally how it's done.Quote from: JS on February 22, 2017, 04:05:44 amIn this case, there's a minimum of 5k in series with the capacitor, so that won't be a problem.QuoteAgain, why? The capacitor already has 5k in series with it.

author: donturner
author_rank: Contributor
timestamp: February 22, 2017, 10:58:55 am
content: Thank you all very much for your answers - this is extremely helpful to an electronics newbie. I've responded to some of the comments below.Quote from: Audioguru on February 22, 2017, 01:58:46 amFrom my basic impedance tests (mostly in-ear, low cost earphones) headphones vary from 32-300 ohms so I just put 64 ohms on the schematic as a rough average, is that a bad way to model the headphones? Also, what's would be the purpose of the transistor at the output?Quote from: Audioguru on February 22, 2017, 01:58:46 amI've updated the schematic to show a +/-4.5V supply. Power comes from a 9V battery with a voltage divider based on the power section of this circuit:https://tangentsoft.net/audio/cmoy/misc/cmoy-tangent-sch.pdf. My thinking here is that the LM4562 has a Common-Mode Input Voltage Range of 2V less than the +ve and -ve power supply, which gives a maximum peak-to-peak output voltage of 5V (9V - (2V * 2)).The nominal line level (https://en.wikipedia.org/wiki/Line_level#Nominal_levels) of each input will be between 0.894V (consumer) and 3.472V (pro audio) so as long as I don't connect more than one pro audio line input with its trim pot at maximum there shouldn't be any clipping on the output. Ideally I'd put an LED which shows when clipping occurs at the output but that's beyond the scope of this first project.Quote from: Benta on February 22, 2017, 12:15:10 amIs there a better way of setting the gain? Should I have an op-amp per input (a buffer) to decouple from the summing amp? I did consider this but it seemed overly complex.Quote from: Hero999 on February 22, 2017, 08:43:12 amI definitely do want good bass response but I can't find any small non-polarized 4.7uF capacitors. I currently have some of thesehttps://uk.rs-online.com/web/p/polyester-film-capacitors/0824020/but they're 18x8.5x14.5mm and take up a lot of space (one of my goals for this mixer is that it's very small). Do I have to use non-polarized capacitors? I thought this was necessary because the input signals are AC.

author: Zero999
author_rank: Super Contributor
timestamp: February 22, 2017, 11:48:23 am
content: Quote from: donturner on February 22, 2017, 10:58:55 amThe purpose of adding transistors would be to boost the current capacity of the op-amp. Whether it's necessary, depends on the op-amp's ability to output enough current into the load, at the peak voltage. The maximum output current will be given on the data sheet.QuoteThere's always some voltage drop in the op-amp's output stage, so the output can never reach either supply rail. If the op-amp drops more than 4.5 = 3.472 = 1.028V at the peak current, then there will be clipping. Another thing to consider is the 9V battery will no longer be 9V, towards the end of its life. For decent battery life, the circuit should be designed to work off 6V.QuoteI don't think that's necessary. You could either reduce the value of the pot. (if the source can still drive the lower impedance) or increase the value of RINand RFon the op-amp to avoid the effects of loading on the potentiometers.QuoteYou can connect two polarised capacitors back-to-back forming a non-polarised capacitor with half the capacitance.Another option might be to use a polarised capacitor and connect the source's 0V to -4.5V (if possible) and the capacitor's negative to the source and positive to the amplifier's input. The capacitor will then always have a 4.5V bias and will never be subject to reverse polarity.

author: Benta
author_rank: Super Contributor
timestamp: February 22, 2017, 04:48:53 pm
content: QuoteIdeally, a buffer or emitter-follower between pot and resistor would eliminate the problem, but as Hero999 writes, a higher resistance value ratio between resistor and pot will reduce the problem. If you can get a ratio of 1:10 or higher, it should no longer be a big issue.

author: Audioguru
author_rank: Super Contributor
timestamp: February 22, 2017, 05:42:45 pm
content: Your headphones amplifier with an LM4582 opamp has low output voltage and low output current and will clip badly when driving ordinary 32 ohm headphones loudly. Your amplifier will be fine driving 600 ohm Senheiser very expensive headphones.150mW into 32 ohms is a peak voltage of 3.1V and a peak current of 97mA. The Cmoy headphones amplifier you saw uses an OPA2134 opamp with double the output current and uses two 9V batteries for double the output voltage than yours.You need a huge 4.7uF non-polarized input capacitor because your amplifier is inverting with a low input impedance. If the amplifier is non-inverting it can have a high input impedance of at least 80k ohms and use a cheap little 0.1uf input capacitor for good bass.

author: G0HZU
author_rank: Super Contributor
timestamp: February 22, 2017, 07:57:05 pm
content: You should really be summing the two audio inputs at the inverting input node and not via a 1uF capacitor. i.e. the two signals should meet at the inverting input if you want the full benefit of a classic summing amplifier. But I guess it depends on how much you care about getting the most from the design and if you would notice the benefit here.For example, one limitation would be crosstalk. With the circuit as drawn, the summing node is not quite at the opamp virtual earth and so very low frequency signals (eg 100-300Hz) will be able to leak across from one source to the other because the reactance of the 1uF capacitor is not going to be very low at all frequencies. If the purpose of the headphones is to allow mixing of two sources so someone can listen to this, then anyone else listening to just one of the original sources could hear some low level leakage/crosstalk during quiet periods. Probably most noticeable on boomy bass stuff eg drum beats might be able to leak across cause annoyance to anyone monitoring just one of the sources.If you place the summing node at the virtual earth point (inverting input) then the isolation between sources will be much better at all frequencies.

author: donturner
author_rank: Contributor
timestamp: February 23, 2017, 01:51:09 pm
content: Quote from: Audioguru on February 22, 2017, 05:42:45 pmI'm a bit confused. Where did the 150mW figure come from? I thought the typical output from a headphone port was only about 12mW (reference page 2 ofhttp://www.rane.com/pdf/old/note100.pdf)?

author: donturner
author_rank: Contributor
timestamp: February 23, 2017, 02:09:29 pm
content: Thanks to everyone for your answers, a gold mine of informationI've updated my schematic in line with suggestions.Changes from V2 to V2.1- Added 4.7uF caps to each input and removed the single 1uF cap - this is so that the summing point is at the op-amp inverting input (virtual earth) rather than separated by a cap (thanks to G0HZU).- Changed the fixed 10k resistors to 100k so that the ratio between the input resistance and pot resistance is 10:1. This decreases the effect of the 10k pots on the op-amp gain and therefore allows closer control over the amplitude of the input signal (thanks to Benta and Hero999)- Changed the headphone impedance to 32 ohms as this seems more typical

author: Benta
author_rank: Super Contributor
timestamp: February 23, 2017, 07:09:24 pm
content: QuoteYour input is still separated, though now with two caps instead, and is AC-wise/Thevenin no different than what it was.I think G0HZU meant placing the caps before the pots to get a DC path and controlled low frequency response.

author: G0HZU
author_rank: Super Contributor
timestamp: February 23, 2017, 08:02:30 pm
content: To get high isolation between inputs I think you are supposed to sum the two inputs at the virtual ground so I think the second circuit is better because it achieves this.If the opamp was perfect and the feedback maintained a perfect virtual ground here then the isolation between inputs would be infinite at all audio frequencies. But in reality I'd expect it to be >60dB with a reasonable opamp.But the original circuit would have quite limited isolation at low audio frequencies because it sums into the 1uF cap ahead of the virtual ground. So there is a path here for some crosstalk between the inputs. I guess a lot depends if you need the isolation against this or not.

author: donturner
author_rank: Contributor
timestamp: February 24, 2017, 12:03:22 pm
content: Right, I understand now, thanks! Updated circuit below (v2.2) with caps before input pots.My main area of confusion now is about the output power required. I know I'm going to need to change my op-amp, but I could do with some guidance on why my current one (the LM4562) is not suitable.If I assume that my peak voltage output is about +3V, this into a 32 ohm load (the headphones) gives a current of 3/32=94mA a power of 94*3=282mW. The LM4562 has a peak current of 26mA (with a supply of +/-17V, mine is +/-4.5V) so it's way under what's required to drive 32 ohm headphones.Looking at other headphone ampshttp://www.ti.com/lsds/ti/audio-ic/headphone-amplifier-product.pagethe output power of most of them is <105mW. Why is this so much lower than my calculated maximum of 282mW?I feel like I'm missing something obvious, so sorry if this is a stupid question.

author: Zero999
author_rank: Super Contributor
timestamp: February 24, 2017, 12:59:34 pm
content: Quote from: donturner on February 24, 2017, 12:03:22 pmTwo reasons.1) The specification provided by TI is the average RMS power and you calculated the peak power which is double.2) You've over-specified the amount of power you need. 100mW into reasonably sensitive head phones will be deafening.

author: donturner
author_rank: Contributor
timestamp: February 24, 2017, 04:57:07 pm
content: Quote from: Hero999 on February 24, 2017, 12:59:34 pmYou mentioned sensitivity so let me make sure I have this straight...If I have a pair of headphones which have a sensitivity rating of 90dB SPL, that means when supplied with 1mW they're going to produce 90dB SPL. If I increase that power to 2mW I'm going to get 93dB because: 90+(10*log(2))=93. So at 100mW I'll get 90+(10*log(20))=110dB SPL, the sound of a chainsaw from 1 metre i.e. deafening, as you say.With my current amp I can expect a current of 9.2mA (with a +/-4.5V supply, from datasheet p21), which at 3V peak output gives a power of 27.6mW. Into those same headphones I'd be looking at an SPL of 90+(10*log(27.6))=104dB, disco 1m from speaker <- still pretty loud.I haven't factored the headphone impedance into these calculations, should I have?If my calculations are correct, why do I need an amp with more power for headphones? Even 12mW into those headphones would give 100dB which surely is loud enough for most people?

author: Benta
author_rank: Super Contributor
timestamp: February 24, 2017, 08:05:40 pm
content: You're mixing up things, so let's get a couple of points clear:Audio power amplifiers (headphone, loudspeaker, whatever) are voltage sources, and will deliver output voltage = input voltage times X.This means, that for a certain output voltage, the only thing limiting the delivered output power is the impedance of your phones/loudspeaker.If you supply 1 Vrms to a 32 ohm phone, it will dissipate 31 mW (and hopefully convert most of that to audio). If you supply the same to a 600 ohm phone, it's 1.7 mW. If it's an 8 ohm speaker, it's 125 mW.The amplifier will at some point protect itself by limiting output current (eg, when looking into a 1 ohm load), but that's no longer normal operation.The sensitivity of your phones is a completely different discussion.

author: Zero999
author_rank: Super Contributor
timestamp: February 24, 2017, 08:43:13 pm
content: Quote from: donturner on February 24, 2017, 04:57:07 pmYour amplifier already has no voltage gain, as the feedback resistor is equal to the input resistor, so the output voltage is equal to the input voltage.However, just because there's no voltage gain, it doesn't mean there's no power gain. What's connected to the amplifier's inputs won't be able to drive the 32 Ohm head phones directly. The amplifier's input will present a high input impedance to the source and a very low impedance to the headphones.Another thing is this is a mixer, rather than a straightforward amplifier. The voltage on each input is added together, so it does have voltage gain. If the inputs are connected to the same voltage source, then it will have a voltage gain of two.

author: Audioguru
author_rank: Super Contributor
timestamp: February 24, 2017, 09:37:09 pm
content: Sound Pressure Level from headphones.They are used to hear music, not thunder or a chain saw. Music has dynamic levels from very low to very high. A long time ago I measured the sound oressure levels in a disco. The bass beat was 120dB but it and the music did not seem to be too loud. A symphony orchestra measured almost as high. Don't you want your headphones amplifier to produce loud peaks without clipping? Clipping sounds much louder than clear sounds because of the extra harmonics.My stereo produces 50 real Watts into 2 channels for a total of 100W maximum. Its average power is about 5 Watts per channel for 10W total. My speakers have a sensitivity of 88dB per Watt each or 91dB for both. Then the average sound pressure for both channels is 101dB and the maximum sound pressure for both channels is 111B.My Kenwood Headphones are 32 ohms each each and have a sensitivity of 97dB per milliwatt so 120dB is produced with 200mW. 200mW is produced with a peak current of 112mA. An opamp by itself cant doo dat! Maybe you want an occasional peak to produce 123dB without clipping then the peak current is 158mA.

author: donturner
author_rank: Contributor
timestamp: March 02, 2017, 10:48:13 pm
content: A big thank you to everyone who has responded - this is very insightful stuff, it's helping me to understand the complexities of designing audio equipment, even in seemingly simple devices.Quote from: Audioguru on February 24, 2017, 09:37:09 pmWhat would you suggest to get this kind of power output? I was considering was using an LM4881http://www.ti.com/lit/ds/symlink/lm4881.pdfwhich has an output power of 85mW into a 32 ohm load (top of page 4) which would result in a dynamic range of 116dB, is that too much on the low side?