Combining / splitting Audio outputs on Pi, Fona, amp?

Hiraghm

New Member
May 18, 2019
24
5
3
So I'm building myself a PiPhone (it's been a very educational and exciting experience, so far!)
I'm using a Raspberry Pi 3B+ and an Adafruit FONA Sim5320A module (also battery, powerboost, etc).
The display I'll be using is a 5" HDMI capacitive display.
My dilemma;
The FONA has audio out both to a 3.5" phono port, and to speaker headers.
The Pi has audio out via a 3.5" phono port (also composite out) and via HDMI.
What I want/need to accomplish is to have one 3.5" phono port coming out of the case (Adafruit has one that can detect plug insertion), and one speaker inside the case.

How can I combine the Pi's audio output with the FONA's audio output, and retain the functionality of both headphone and speaker?
I thought about adding a stereo amplifier, connecting it to the speaker outputs on the FONA... but I don't know if that would work, and it still wouldn't give me headphone support for the Pi itself, just the FONA.

Can anyone provide me with some guidance or advice toward solving this dilemma?
 
May 22, 2019
409
211
43
So you are trying to get the Pi and a GSM (or LTE) module to use the same headphone port and speaker?

You basically need an audio mixer.

You could just connect the outputs of the Pi and FONA together, but if the impedances don't match, you'll end up with very different volume levels, or one might even mostly suppress the other. So the best way to go is a simple mixer circuit, possibly using a couple of trim pots and capacitors. (This would be a passive mixer, or a resistance mixer.)

Or if you wan to do it right, you'll use two audio preamplifiers, each one calibrated to the output level of the two devices, and connect both of their outputs together to feed the headphone switching circuit (which will feed the headphone jack and the speaker amplifier.)
 

mchobby

New Member
Oct 13, 2019
8
1
3
Hi,
Based on the TomXP411, I did check for an passive audio mixer schematic and I did find this one on the DiyStrat blog
Two-channel passive mini-mixer
Using logartihmic potentiometer is certainly more appropriate for audio setup (@TomXP411 could you confirm this assumption?).
Kind regards,
Dominique
 

Markeno

Member
Jul 19, 2019
65
34
18
hobbytronics.home.blog
Tom may have more direction for you on that. I did something similar to this for my Pi to take it to Mono for a Mono Amp.

I don't think that is the source site I used at the time though. And I can't find what values I went with.

So the question is if you are taking it to Mono and then mixing both devices. If both sources and your output is Stereo then you would be mixing the Lefts and the Rights. If the outputs are different levels at Tom mentioned, then I expect you would adjust the one set of resistors to get them in balance, or use potentiometers like in the site you linked (although they are mixing guitars?). I haven't seen a passive mixer with capacitors on it, I would be interested in seeing one.