# Mutually exclusive headphone and speaker

I have a device that has only one set of analog audio out signals that are amplified for headphone usage. I want to be able to use these signals to output to a set of speakers OR a headphone jack, but not both at the same time.

The headphone jack has a detect pin that goes high when a jack is plugged in.

I have found a simple amplifier circuit for amplifying a headphone signal for an 8 ohm speaker.

I have created a test circuit (image below) with the headphone jack and the amplified speaker circuit on the right and the output for the right channel of the audio on the left. My thinking was that when the detect signal goes high, the LM386 Vs pin would receive voltage from Vcc. Feel free to delete parts of my circuit that are bad.

Using the detect signal from the headphone jack, I would like help designing the circuit that fits the following truth table:

Detect | Speaker | Headphone
0   |   1     |    X
1   |   0     |    1


If you know how to use 123D Circuit you can fork my circuit and pick up where I left off.

Edit 1: Turns out this isn't as complicated as I thought because I (finally) found some information about the detect switch states:

"The switch is closed when headphones are absent. The switch opens when headphones are inserted."

Here is the (presumed) working photo:

• Someone will probably come up with a solution that works with your chosen speaker amp (LM386), but the easiest thing would be to use an amp chip that has an enable/disable pin. – Fizz Jan 16 '15 at 6:46
• @Respawned Fluff Good point. I'll keep an eye out for one. – Nate Jan 16 '15 at 6:47
• Related question: electronics.stackexchange.com/questions/31442/… – Fizz Jan 16 '15 at 8:12