Schematic for a 3 channel analog audio mixer

Thread Starter

freeflyer

Joined Sep 9, 2016
148
I am trying to mix 3 audio sources which will then be fed into a small mono amplifier (LM4871).

The 3 sources are:

1. Bluetooth (MH-M18) audio left
2. Bluetooth (MH-M18) audio right
3. DAC (12-bit STM32) audio

I built the following circuit...

1750063938637.png

But the audio was VERY quiet, so I increased the gain of the TLV2372 by 10....

1750063959363.png

But this just gives me a screeching noise, even with no audio input. Then I realised that the bias voltage of 1.65V would also be increased by 10, so I assume the output of the op-amp is now saturated ?

I was going to use 1uF capacitors for the audio inputs, but only had 100nF to hand at the moment. Would this be causing any issues ?

How do I get this circuit working and am I taking the correct approach ? Or is there an all in one IC that will do the job for me ?
 

bertus

Joined Apr 5, 2008
22,882
Hello,

The resistors on the bias attenuate the signal.
Also the capacitor on the bias shorts the signal.
In the 10 times circuit the 10 k resistor needs a capacitor in series to ground.

Bertus
 

bertus

Joined Apr 5, 2008
22,882
Hello,

The output of the buffer will have a low impedance.
Put a resistor of say 100 k between the buffer and the input of the mixer.
Here is an application note for single supply circuits.

Bertus
 

Attachments

Last edited:

Thread Starter

freeflyer

Joined Sep 9, 2016
148
So is it case 1 that applies to my requirements ?

Vref is shown as a voltage source, but I am generating Vref using a potential divider

The midpoint of the audio sources are 1.65V and they swing between 0V and 3.3V
1750065801093.png
 

0ri0n

Joined Jan 7, 2025
160
You don't need the extra op amp stage and the bias network, just the common node of the three summing resistors going to the input (pin 4) of the LM4871. Use AC coupling.
 

Thread Starter

freeflyer

Joined Sep 9, 2016
148
I'm given up :(

I was using the PAM8302 but as its a class D (PWM) and there was a slight hum. So I thought I would try the LM4871 as its class AB. But the LM4871 is MUCH quieter than the PAM8302, even when directly connected to the audio source (single channel).

Both devices are eval boards so have the additional components required...

PAM8302:
https://thepihut.com/products/adafruit-mono-2-5w-class-d-audio-amplifier-pam8302?variant=27739753489

LM4871:
https://www.ebay.co.uk/itm/365129032262

The project is for an audible altimeter for skydiving, it will be fitted inside a helmet and call out the altitudes and also have the ability to play bluetooth audio using the MH-M18 (but not when in freefall).

Here is an example product on the market...

https://vog.ee/

Whats the best devices to use in a product like this, that will mix the 3 audio channels and amplify them for a speaker ?

And any recommendations on a speaker ? I am currently using this speaker, but I expect its not very good quality...

https://thepihut.com/products/20-x-...-ph1-25-connector-8-2w?variant=43764408516803
 

panic mode

Joined Oct 10, 2011
4,864
Most values are not readable:
1750084105050.png

but in case of LM4871 gain is set by ratio Rf/Ri.
the values used on this board do not match the datasheet which has 20k for both (so gain is 1)

Here the values are
Ri=4.7k (marked 472)
Rf=33k (marked 333)
so gain is 7.
1750084117017.png
 

schmitt trigger

Joined Jul 12, 2010
2,027
The circuit shown by panic mode is the classic summing amplifier, where the voltage is:

Vout = [-Rf/Rin]*[V1+V2+V3]

which means that it all the signals are present simultaneously, you may overload the amplifier. But I don’t know how you plan to use this circuit.
 
Last edited:

Thread Starter

freeflyer

Joined Sep 9, 2016
148
During the climb to altitude in the aircraft, bluetooth audio music will be playing and the DAC output will call out voice prompts for various altitudes. During freefall, only the voice prompt audio from the DAC output will be functional.
 

0ri0n

Joined Jan 7, 2025
160
Both devices are eval boards so have the additional components required...
You did not mention you are using eval boards. These need small modifications to make it work with 3 sources. I doubt that each source really delivers 3.3Vpp, this means gain (for LM4871) also needs to be adjusted, either through the feedback resistor Rf or the three summing resistors. The summing resistors do not have to be of same value. Pout is more than 1W into 8 Ohm, that is plenty for a helmet.
 

Thread Starter

freeflyer

Joined Sep 9, 2016
148
The thing is effeciency is important as this will be powered from a small 1S LiPo battery. So the PAM8302 is better as its class D. But I am trying to improve the audio quality and volume whilst also mixing the 3 audio sources. So I am at a loss especially as the LM4871 is so much quieter and also has noise on it for some reason.
 

Thread Starter

freeflyer

Joined Sep 9, 2016
148
Below is a scope capture of the 12.bit DAC audio (repeating the voice prompt "seven"). It is centered around 1.65V (2048 bits)...

1750089008872.png

Below is a scope capture of the MH-M18 bluetooth receiver audio (left and right channels) set to maximum volume on the Iphone, it is centered around 0V...

1750088975338.png

When I connect the DAC audio to the summing circuit, it slightly attenuates the bluetooth audio.
 
Top