1

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."

enter image description here

Here is the (presumed) working photo:

enter image description here

Nate
  • 173
  • 1
  • 8
  • 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 06:46
  • @Respawned Fluff Good point. I'll keep an eye out for one. – Nate Jan 16 '15 at 06:47
  • Related question: http://electronics.stackexchange.com/questions/31442/how-can-i-switch-this-audio-jack-using-its-own-mechanical-switches-without-cre – Fizz Jan 16 '15 at 08:12

1 Answers1

2

You could attach the +Input pin to Detect instead of R, and connect +Input to ground with a large resistor so that the input voltage is zero when the switch is opened, but equal to Output_R when closed.

Eraticus
  • 519
  • 1
  • 5
  • 12
  • Isn't that the opposite of what I want? Then when the headphones are plugged in the switch closes and the speakers will turn on. When the headphones are unplugged the switch opens and the speakers turn off. – Nate Jan 16 '15 at 05:41
  • I am wrong. Editting my post. – Nate Jan 16 '15 at 06:44
  • I was working under the incorrect assumption that the switch was open when when headphones were absent, it is the opposite. – Nate Jan 16 '15 at 07:22
  • @Nate: there are actually some jacks that operate like that, i.e. by closing a switch, but they [are a rarity](http://electronics.stackexchange.com/a/148740/54580). It is mechanically much easier to have the plug insertion open a switch. – Fizz Jan 16 '15 at 10:14
  • And as a comment on the solution: this works, but I suspect it be might noisy because the switch contact is likely not a high quality one. Also you might get some pops out the speakers when plug/unplug the headphones. Finally, the LM386 may saturate or even oscillate when you plug the headphone. Ideally you want the +pin to be grounded to turn off the speakers, not left in the air. (That's why there's usually an enable/disable pin on the slightly more expensive amp ICs like this.) You could fix that here by adding a high-value resistor (100K or more) from +pin to ground. – Fizz Jan 16 '15 at 10:22
  • I'll update the photo with this, but if this is a bad idea then what do you recommend? – Nate Jan 16 '15 at 18:15
  • @Nate: I didn't say it is a bad idea... I even upvoted the answer for its simplicity. Given the price point at which you have that speaker amp... I think anything more elaborate would be over-engineering it. So you should try this first, at least on a breadboard. If there are some unforeseen problems, you could ask a new question how to address them. Do keep a finger on the LM386 when you plug the headphones (at least for the first time). If the LM386 decides to saturates or oscillate at high-frequency on this occasion, you may not hear anything from the speaker, but the chip will get hot. – Fizz Jan 17 '15 at 13:05
  • I wish to control the headphone jack of a commercial AV receiver (Sony) via an IP-controlled relay. That means that the plug will always be in the jack. Is it a good idea to solder two wires to DET and to R (provided that I can find them) and connect them to a relay? – aag Feb 05 '17 at 15:58