# Simple audio signal mixer

Discussion in 'The Projects Forum' started by dsp_redux, Dec 22, 2009.

Joined:
Apr 11, 2009
Messages:
182
Location:
Hi,

I have little free time these days but I'd like to build a simple audio mixer. I'm thinking of using two ${\it LM358}$ for the adder and the inverter. Since they need $\pm 4V$, I'll be using a virtual ground circuit from a $9V$ battery (implicitely using a ${\it TLE2426}$). The two audio sources are electric guitars, the output will be a lamp amp and/or a electric amp. My question is, I'm I choosing the right components for the application? I want something cheap, but the gives rather good results (duh!). This is for personal use. I just want to be able to plus two guitars in a single amp so both players are able to play at the same time. Should I have good result from these components? (worried about the ${\it LM358}$ for audio) Is there a better way of doing this? I'm I forgetting something?
2. ### russ_henselWell-Known Member

Joined:
Jan 11, 2009
Messages:
814
Location:
South Dartmouth Ma
Seems reasonable. There are probably better op amps, but at low gain I doubt I would be able to hear the difference. I am assuming you are using a simple inverting adder ( there are other circuits which are also reasonable ). Check the output impedance of the guitar, usually this should be low compared to the input impedance of the op amp circuit )
3. ### AudioguruNew Member

Joined:
Dec 20, 2007
Messages:
9,411
Location:
The LM358 has up to 3% of crossover distortion and its full output level bandwidth drops above only 2kHz.
Most audio opamps are low noise, have almost no distortion (0.003%) ans have a full output level bandwidth to 100kHz.

Joined:
Apr 11, 2009
Messages:
182
Location:
@russ_hensel: Yes, I'll be using the second op-amp in the IC to invert the signal. Have you tried a LM358 in an audio circuit? Could you explain to me why I should consider input/output impedance ratio between the guitar and the circuit? I'm a bit confused on the io impedance's usage. I know how to calculate it, no problem, but why it is important other than power transfer (matched impedance) and power consumption.

@Audioguru: Thanks for pointing this out. I found the RC4580 which seems just fine for the application. I tought those kind of circuits were much more expensive than this.

Couple more questions. I've seen a mixer circuit using 10k ohms on each input. Why 10k? I tought the more resistive the circuit is, the more thermal distortion becomes an important factor. Should 1k or 100ohms be better in that case (keeping in mind I'm keeping unity gain). Also, the TLE2426 will give me the two rails needed, but I'm worried only a capacitor in parallel with the battery won't be enough to have two stable rails. The two rails are for the +- 2V of the RC4580, and I guess unstable rails will give unstable output. Is the use of 7805/7905 recommended here?
Last edited: Dec 23, 2009
5. ### AudioguruNew Member

Joined:
Dec 20, 2007
Messages:
9,411
Location:
A 10k input impedance is used for most mixers because most music sources are spec'd with a load of 10k ohms. A higher resistance will cause more hiss.

A guitar pickup should be loaded with a preamp that has an input resistance of 3M ohms.

The RC4580 dual opamp has a minimum supply of plus and minus 2v when it barely works. Use a higher supply for much better performance.

The supply voltages for an opamp do not need a voltage regulator.

You can bias the opamps at half the supply voltage, capacitor-couple the input and output then use a single supply voltage.

#### Attached Files:

• ###### guitar preamp.PNG
File size:
15.4 KB
Views:
49

Joined:
Apr 11, 2009
Messages:
182
Location:
Thank you Audioguru for the pointers. I'll soon post a schematic of what I'm planning to do with simulation; before buying the parts in case I'm forgetting something. Meanwhile, what do you mean by
I'll be using a 9V battery, minimum differential voltage is 4V for the opamp to work. I saw you recommended a TL07x instead in another post. Could you explain why?

Correct me if I'm wrong but I think I understood what russ_hensel was talking with input output impedance. The guitar pickup will try to drive a 3M load, so the preamp is used to interface the pickup with the mixer circuit (and so the input impedance of the mixer should be 1M or higher, 3M strongly advised). The amp is waiting for a pickup equivalent load on it's input, so the output impedance of the mixer should match the output impedance of the guitar pickup. Is that it? All that is normalisation
7. ### AudioguruNew Member

Joined:
Dec 20, 2007
Messages:
9,411
Location:
For a 3M input impedance you can use the Jfet circuit I posted as a preamp or use a Fet-input TL072 dual opamp as a preamp and mixer.

The RC4580 has a max input bias current that is too high for it to be used as a preamp with a 3M input resistance.

The 1M or 3M input resistance of the preamp does not match the impedance of the guitar pickup. The 1M or 3M is a much higher resistance to avoid loading down the pickup. When the resistance is matched then the output level is cut in half and the sound is different.

The Jfet guitar preamp can drive a mixer with an input of 20k ohms and higher. The opamp preamp can drive a mixer with an input of 2k ohms and higher.
8. ### russ_henselWell-Known Member

Joined:
Jan 11, 2009
Messages:
814
Location:
South Dartmouth Ma
You may already be on top of the impedance issue. A thought experiment ( which you could make a real experiment). Take the guitar output, and strum the guitar in a standard way. Measure the voltage output. Now put a resistor as a load on the output and measure the voltage again. It will be lower. A simple model of this is that the ouput is a perfect voltage source with a resistor in series with it. Thus with a load there will be a voltage drop across this internal resistance and the output voltage is reduced. Suppose you find a resistor that drops the output in half. In that case you external resistor will equal the internal resistor, so you now know the value of the internal resistor. It also so happens that this value is the best value for energy transfer from the output to the resistor -- not an important fact in this case. Now guitar output has a dependence on frequency and will shift its phase when loaded, so its resitance is actually a complex number ( or modeled by a complex number ). We normally reserve the term resistance for real numbers and use the term impedance for complex values. To some extent none of this matters, if you want the maximum output from the output you should load it with infinite resistance ( impedance ). Even that does not matter. Because the designers of the output planned some impedance for the load, and that is what load should be used. A spec. sheet for the device would be useful. Audioguru is probably giving you a standard or typical value and that should be fine.

An inverting adder has an input impedance ( this is the load on the guitar output ) that is equal to the input resistor.

A non-inverting 2 input adder has an input impedance equal to something more than the input resistor ( depends some on the details ).

A non-inverting buffer ( 1 input ) can be used with no input resistor then the input impedance is equal to the impedance inherent to the op amp, and field effect transistors have very high input impedances.

Last edited: Dec 24, 2009

Joined:
Apr 11, 2009
Messages:
182
Location:
Thanks you for the input russ_hensel,

I already knew about complex impedance, laplacian domain transfer function etc... I'm quite familiar with all the maths involved in circuits. The thing I lack (that ONE thing my school seems to forgot in their EE program) is practical example and doing real thing with what we learned (an academic mirror current or 2 stages amp in hyper controlled environment doesn't count in my book). What I'm looking for are the WHYs of practical circuit design (the reasoning) trough a simple project (that I will certainly use for fun). Why do that instead of that. For example, I used the uA741 extensively. But things like Audioguru said, you should use that kind or that kind of opamp or a FET preamp because of that and that. That is called experience, thing money can't buy.

Those input you two guys are giving are exactly what I'm looking for. Keep up the good work. I'm still not posting a circuit because of work and lack of time and christmas coming, but I'll be posting one soon.

Extra questions: The pre-amp concept is new to me. A pre-amp is a circuit you build just before real power amplification to the speaker and is the stage that interfaces the pickup (for example) with the circuit to do your signal modification at low level, right? You need to interface the pickup with the circuit for maximum power transfer to the circuit. Since "no" current enters the gate of a FET, you can easily control the input impedance of the pre-amp with a transistor or FET opamp and a resistor to ground on the gate. The treatment is then done, treble/mid/bass control, mixer circuits, etc. The output impedance should be low compared to the input impedance of the electric amp so that my circuit doesn't have to drive a lot of current, hence draining the batteries, right? Now the sound probably goes in another preamp for the amps effect, treble, etc, than brought to line level to finally be amplified with high gain to the speaker (and that's why you want low impedance on speakers like 8 ohms so a lot of current can go trough it, constant tension, V*I = Power). Correct my reasoning if it's wrong please!

Back to my circuit, I'll need a preamp for each instrument to interface both with the mixer, than one output (low impedance) to the real amp. Is that it?
10. ### AudioguruNew Member

Joined:
Dec 20, 2007
Messages:
9,411
Location:
Modern audio circuits do not match impedances for "maximum power transfer".
Old vacuum tube amplifiers matched impedances.

We use a much higher load resistance so that the source is not loaded down. Matching impedances results in half the signal voltage being thrown away.

The output impedance of a modern power amplifier is extremely low like less than 0.04 ohms for good damping of the resonances of speakers.

Joined:
Apr 11, 2009
Messages:
182
Location:
Here is my first schematic for this circuit. In the ZIP file are waves picked on the circuit. I probably did some kind of error here because Vout after the capacitor C4 is oscillating too much, and the value is given in uV (I'm supposed to have about 400mV PP, non-inverted. If you guys want to look at it and give me suggestions. I'm currently debugging that and trying to understand what I'm doing wrong.

#### Attached Files:

File size:
18.1 KB
Views:
2
• ###### mixer_sch.png
File size:
9.1 KB
Views:
28

Joined:
Apr 5, 2008
Messages:
12,615
Location:
Amsterdam,Holland (GMT + 1)
Hello,

You have created a differentiator direct after the mixing point.
Put a resistor (1K) in series with the capacitor C6 to reduce the gain there.

Greetings,
Bertus

Joined:
Apr 11, 2009
Messages:
182
Location:
Hum, for the mixer circuit, I thought you could control the gain of the output (before R17) with Vout = -R12(V1/R7 + V2/R8). If you look at the wave just before the last cap, it seems I have a +- 200mV wave with a 4.5V offset which should be normal. But, after that same cap, not only the offset is cut, but also a strong attenuation. Or maybe I'm in error and there is something I don't see.

BTW, I tried with a serie resistor like you proposed with no luck.

Joined:
Apr 5, 2008
Messages:
12,615
Location:
Amsterdam,Holland (GMT + 1)
Hello,

Here I have drawn the resistor in the schematic.

The resistor will prevent the differentiator working of the capacitor.
The gain at this stage will be around 10 times with the 1K.

Greetings,
Bertus

File size:
10.3 KB
Views:
44
15. ### AudioguruNew Member

Joined:
Dec 20, 2007
Messages:
9,411
Location:
The 1k added resistor is not needed since the input resistor to the U1 opamp is the 6.8k drain resistor of the Jfet plus the 10k output resistor.

The output level is very low because R15 is 0.003 ohms (3milli-ohms).

The TL072 has a wide bandwidth that causes it to oscillate when it tries to drive the capacitance of a shielded output cable. A 100 ohms resistor in series with its output isolates the capacitance from its output then it doesn't oscillate.

A volume control feeding R17 will be easier if the values of R16 and R17 are increased to 20k or 200k ohms.

Joined:
Apr 11, 2009
Messages:
182
Location:
Wow! My error! I wanted to put 3x10^6 ohms and typed 3M... that gave me miliohms, not megaohms. Just by changing that, I now have the desired output. The R15 is just for simulation and is the amp's input impedance (approx.).

In fact, if I only want to do a mixer circuit, I could remove the last stage (U2) because the JFET preamp is inversing the signal the first time, then after the merging of both signals, the TL072 will invert the signal again so the signal will be back to normal. I could the use two potentiometer, on R7 and R8 to control guitar 1 and 2 volume. The second TL072 of the IC could then be used in a futur project, like adding effect to the signal.

Question about the type of capacitor to use. C1 and C5 should be polarized electrolytic caps, and the others should be film or ceramic caps?
17. ### AudioguruNew Member

Joined:
Dec 20, 2007
Messages:
9,411
Location:
C1 and C5 should be 100uF polarized electrolytics to stop the supply and reference voltage from jumping around when the supply current changes with the signals.

R13 and R14 could be volume controls.

C2 and C3 don't need to be 4.7uF which gives a cutoff at 2.1Hz. Use 330nF film capacitors instead for a cutoff at 30Hz.

C6 should be increased to 330nF because 0.1uF causes the cutoff to be at 99Hz.

The output capacitor should also be a film type.

Joined:
Apr 11, 2009
Messages:
182
Location:
Here is the new schematic. I wonder why it takes SO long to simulate the circuit using LTSpice when I don't use the same sin wave frequency on each input?

#### Attached Files:

• ###### mixer.png
File size:
8.2 KB
Views:
25
Last edited: Dec 28, 2009
19. ### AudioguruNew Member

Joined:
Dec 20, 2007
Messages:
9,411
Location:
The way it is now, R13 and R14 don't do anything and can be removed.
R12 should connect to the output pin of the opamp.
C3 should be 330nF and it and C2 should be non-polarized.

Joined:
Apr 11, 2009
Messages:
182
Location: