Maker Pro
Maker Pro

How do I make an opamp stereo mixer?

iStruggle

Jun 11, 2022
8
Joined
Jun 11, 2022
Messages
8
Hey everyone,

New user here trying to see if I am capable of a project, considering my complete lack of electrical engineering knowledge! Hoping the good people here can help (and be gentle!)

I like to be thorough when explaining things, so apologies for the length of this post.

I can wield a soldering iron just fine, have repaired many a cable and understand (very) basic principles such as "don't touch the wires together while they're live".

With regard to actual electrical engineering, I'm.... lets just say, at level zero. I know what a resistor is. I think I understand what a capacitor is for, and I've heard of transistors. That's where I'm at! I can, however, follow a schematic and put components together.

What I want to achieve:
I play a VR game called Hyper Dash (if you're into VR gaming, I definitely recommend it!). The game is great, but the in game comms are horribly latent. I'd like to use external comms when I play, but still hear in game audio through the same headset. A lot of current players have strange setups involving earbuds underneath overear cans, etc, which I would like to avoid.

So, the devices involved will be:
  • An Oculus/Meta Quest 2
  • Android phone running the comms app
  • A cheapo lavalier mic
  • A Vive DAS (Digital Audio Strap) to act as headphones.
Following previous research I've done online (and mostly didn't understand: dangerous, I know), I have tried creating abominations of splitter cables with TRRS and TRS male and female 3.5mm jacks. From what I understand, this is relatively safe to do without resistors since the devices themselves will have resistors in the output stage to prevent damage.

However, the result isn't great. It works, but there is obviously horrendous attenuation and distortion when everything is connected.

Everything I refer to below is 3.5mm

The abomination I have created is as follows:

1 x TRRS female to 1x TRRS male & 1x TRS male.

Originally I did not have a seperate mic and tried using an all in one headset (like as comes with a phone), which is why I was using TRRS. Since splitting out the mic feed (as follows), I have jumpered the 2nd ring and sleeve of the TRRS elements of this cable. It is effectively a female to 2x male TRS splitter.

Here's how this setup currently is:

Phone ==> USB C to female TRRS converter (phone has no headphone jack).
TRRS Converter ==> 2x female to 1x male Mic/Headphone y-splitter to separate out the feeds.
M/H Y-Splitter (Mic Side) ==> has the lavalier mic connected via a small converter that came with the mic. I believe this is something to do with wiring standards (OMTP and CTIA?) as the mic will not work without.

M/H Y-Splitter (headphone side) ==> the male TRRS end of my homemade splitter above (though jumpered to be TRS).

Other male end (actual TRS) of homemade splitter ==> Quest 2 headphone socket.

Female end of my splitter (jumpered TRRS) ==> Headphones.

The biggest problem with this setup is that the audio coming from the phone (ie, my teammate's comms) loops back through the mic feed (even if the mic is unplugged), but ONLY if the Quest 2 is connected. The result is that my teammates are hearing echoes of themselves, unless my mic trigger threshold is super high.

From more reading, I think what I need is a mixer with an opamp (TL072??) to act as virtual ground, isolating the input signals? This may make me sound more knowledgeable than I am, but I geniunely barely understand these terms.

I can buy such a mixer, but they are more than I am willing to spend for this application, especially as I'm not even sure that this is the cause of the problem.

So, what I'm hoping someone here is able to do is tell me if this is even possible, whether it is likely to be beyond my skill level or not, what I need to know or find out (impedances of devices??) and some sort of schematic I could follow if possible. It's a big ask, I know.

As it is for VR gaming, (and I will not be wired to a PC), this needs to be as portable a solution as possible. My headset has a battery pack I can draw 5v from to also power the mixer if needed.

I have done a lot of reading, and found lots of schematics, but my lack of knowledge prevents me from knowing which, if any, are appropriate for my needs.

I don't really need any pots on the mixer itself, as I will control volume at each device.

Please also explain this to me like I am 5, and don't worry about being patronising or offending me if the situation warrants it!

Thankyou in advance!
 
Last edited:

iStruggle

Jun 11, 2022
8
Joined
Jun 11, 2022
Messages
8
Hey Bertus,
Thanks for your reply.
I did in fact find both of those pages as part of my research, but I'm not quite sure how to adapt them to my requirements, for example, if I remove the potentiometers, do I need to change the value of the fixed resistors; are the capacitors correct for what I need; can I power this from USB - things like this.

When I said I have minimal knowledge, I REALLY have minimal knowledge!
 

bertus

Moderator
Nov 8, 2019
3,304
Joined
Nov 8, 2019
Messages
3,304
Hello,

Did you see the basic mixer schematic?
ESP_p94-f2.gif
It will need a dual powersupply.
You can use two 9 Volts batteries.

Bertus
 

iStruggle

Jun 11, 2022
8
Joined
Jun 11, 2022
Messages
8
Thanks again,

Ah no I think I was looking at a different one which had additional components.

I'm guessing this is for left and right audio?

Is there any way to power this from 5v?

If I do not need volume control, do I omit everything past R116/216?
 

crutschow

May 7, 2021
839
Joined
May 7, 2021
Messages
839
Below is the portion of you need from the circuit Bertus referenced if you just want the mixer and don't need controls:

For a gain of 1, change R115 to the same as the input resistors, 10kΩ.

You an operate that circuit from a single 5V supply (connecting U3A's pin 4 to ground) if you generate a voltage at 1/2 the supply voltage using a restive divider connected to pin 3 (remove from ground), as shown below.
Also add a 10µF capacitor in series with each input (minus side to input).

View attachment 55383
upload_2022-6-11_8-22-44.png
 

Attachments

  • upload_2022-6-11_8-22-8.png
    upload_2022-6-11_8-22-8.png
    6 KB · Views: 5

iStruggle

Jun 11, 2022
8
Joined
Jun 11, 2022
Messages
8
Thanks for your reply.

I think I understand what you are saying and I appreciate your effort, but I'm going to watch some 'basics' videos to make sure I understand the terminology.

I mean, I could just buy a premade mixer for this, I guess, but it's not nearly as fun as learning how to solve the problem yourself (or at least, being shown by others!) in my mind!

Appreciate the input (no pun intended) from you both - I might have more questions when I'm ready to give this a go!
 

bertus

Moderator
Nov 8, 2019
3,304
Joined
Nov 8, 2019
Messages
3,304
Hello,

You an operate that circuit from a single 5V supply (connecting U3A's pin 4 to ground) if you generate a voltage at 1/2 the supply voltage using a restive divider connected to pin 3 (remove from ground), as shown below.

Do the same for pin 5 for the second channel.
Also add the mentioned capacitors on the second channel.

Bertus
 

iStruggle

Jun 11, 2022
8
Joined
Jun 11, 2022
Messages
8
Basically, the aim is to make a Maker Hart Just Mixer S, with 2 stereo inputs and no pots.
 

CircutScoper

Mar 29, 2022
300
Joined
Mar 29, 2022
Messages
300
They would convert a linear level control into a logarithmic volume control.

Not really much of a logarithmic effect, since the max impedance (i.e. at mid-scale) of a 100k pot is only 25k, making the mid-scale amplitude ~0.19 instead of 0.5.
 

crutschow

May 7, 2021
839
Joined
May 7, 2021
Messages
839
Not really much of a logarithmic effect, since the max impedance (i.e. at mid-scale) of a 100k pot is only 25k, making the mid-scale amplitude ~0.19 instead of 0.5.
What do you think midscale should be for a log response?

Actually it's a reasonably good curve (simulation below of pot output versus wiper position):
The yellow curve on the bottom would be straight if it were perfectly logarithmic, since the left axis is plotted on a logarithmic scale.
As you can see the deviation is not that much, and should be more than adequate for audio volume-control purposes.
The difference between that and a true log response pot would likely not be noticed by the human ear.

upload_2022-6-11_18-53-55.png
 
Last edited:

CircutScoper

Mar 29, 2022
300
Joined
Mar 29, 2022
Messages
300
What do you think midscale should be for a log response?

Actually it's a reasonably good curve (simulation below of pot output versus wiper position):
The yellow curve on the bottom would be straight if it were perfectly logarithmic, since the left axis is plotted on a logarithmic scale.
As you can see the deviation is not that much, and should be more than adequate for audio volume-control purposes.
The difference between that and a true log response pot would likely not be noticed by the human ear.

View attachment 55395

Sorry, but a gain change of only 5:1 (14dB) over fully half of the pot's rotation is not a log taper.

Midscale of a true log response should be the square root (geometric mean) of the endpoints. E.g., 0.1 (20dB) for 0.01:1 (40dB), 0.03 (30dB) for 0.001:1 (60dB)

Here's a pretty good discussion of the topic. https://tangentsoft.net/audio/atten.html
 

crutschow

May 7, 2021
839
Joined
May 7, 2021
Messages
839
So...... no 5v?
You just need an audio op amp that can operate at 5V.
Look at the OPA134, OPA2134 and OPA4134, or the MC33171 single, MC33172 dual and MC33174 quad opamps, or the MC34071, MC34072 dual and the MC34074 quad.
 

crutschow

May 7, 2021
839
Joined
May 7, 2021
Messages
839
Midscale of a true log response should be the square root (geometric mean) of the endpoints. E.g., 0.1 (20dB) for 0.01:1 (40dB), 0.03 (30dB) for 0.001:1 (60dB)
Okay, I think I better understand what you mean.
So if the resistor value to ground is reduced further relative to the pot resistance, than the mid setting attenuation will be higher.
For example, below is the plot for a 3kΩ added resistor:
That gives a midpoint output of -25.4dB relative to the 0dB maximum, or -19.4dB below the -6dB of a linear pot at the pot position.
The pot does deviate from the log response approaching the end points, but that likely is okay for audio applications.

upload_2022-6-12_1-7-30.png
 

CircutScoper

Mar 29, 2022
300
Joined
Mar 29, 2022
Messages
300
Okay, I think I better understand what you mean.
So if the resistor value to ground is reduced further relative to the pot resistance, than the mid setting attenuation will be higher.
For example, below is the plot for a 3kΩ added resistor:
That gives a midpoint output of -25.4dB relative to the 0dB maximum, or -19.4dB below the -6dB of a linear pot at the pot position.
The pot does deviate from the log response approaching the end points, but that likely is okay for audio applications.

View attachment 55399

That's the right idea, although maybe a little extreme. 6.2k, thus -20dB at the midpoint, might be a bit better.
 
Top