I am working on a project that has an (amplified) speaker through which I am playing tones from a pin on my Arduino. I am using a Sparkfun Mono amp and all is working fine. My issue is that I also need a headphone jack for sound output and I am struggling to figure out how to wire in the headphone jack so that when I plug in headphones, it stops the sound from the speaker and plays only through the headphones.
You need a switched jack that cuts the speaker signal when the headphone jack is inserted: Stereo Switch Jack
Search www.mouser.com for P/N STX-3790-5N
Hi,
Thank you for taking the time to reply, I had a switching jack in my box of scavenged parts and it does make it work, although as I read below, I shouldn't use the headphones with the amp so I'll have to change my circuit.
Thanks for taking the time to help, I'll have to re-work my circuit. I am a newbie as I'm sure is apparent, could you please tell me briefly why I shouldn't connect it to headphones?
The speaker terminals of the amplifier have a constant VCC/2 (~2.5volt) on them.
The speaker is connected between the two output terminals, so doesn't see that DC voltage.
But if you connect (grounded) headphones to the amp,then that 2.5volt could burn out the headphones. I suppose you could ground the headphone socket to ground of the amplifier through a DC blocking capacitor (+ to socket ground). Try 1000uF. The only issue is that with a mono bridge-mode amp the two cups are out of phase (weird sound).
Leo..
Thank you Wawa for taking the time to give a detailed explanation, I'll have to re-work my circuit so that the headphones are not connected to the amp.
I solved the issue by reworking the circuit so that the headphone jack comes before the amp. The amp controls the volume coming from the speaker and I am using a resistor to limit the volume of the headphones.