2
\$\begingroup\$

I'm working on a circuit for a small audio device and I'm a bit confused about the headphone jack wiring, I hope someone can shed me some light. I'm using the LM4875 because I have a speaker and a headphone jack in the circuit, so when the headphone is connected the speaker output will stop, switching to the headphone output with the correct amplification.

I want to use a standard DIP stereo jack for the output, but I'm not sure how to wire it.

Below I'm attaching an image of the example in the LM4875 datasheet, with added arrows for indicating pins:

enter image description here

And below an image of my stereo jack's symbol:

enter image description here

I understand that P1 is connected to ground (sleeve), but in relation to P2 and P3 I'm not sure. I'm not familiar with the schematics for audio jacks. I imagine that P2 that is carrying the signal could be the ring and P3 the tip, but if I connect it like this wouldn't the output go to a single channel, to the right earpiece only? This same signal has to output to the two channels of the headphones.

I appreciate any help, thanks.

\$\endgroup\$
  • \$\begingroup\$ "The same mono signal has to output stereo for the headphones" does not make sense \$\endgroup\$ – Maple Oct 8 '18 at 19:06
  • \$\begingroup\$ Sorry, what I meant to say is that this single signal will split to left and right on the headphones. I've just fixed what I wrote, thanks. \$\endgroup\$ – Chu Oct 8 '18 at 19:09
  • \$\begingroup\$ Ah, OK. You can't use word "stereo" in this case, because it means different outputs to two channels. \$\endgroup\$ – Maple Oct 8 '18 at 19:13
3
\$\begingroup\$

I'm not familiar with the schematics for audio jacks

This is just a bit of explanation about wiring audio jacks in general and in your case specifically.

Some audio jacks use internal switch to re-route audio signal between the plug and additional circuitry, e.g. speaker. When the plug is not inserted, the audio signal coming into jack goes right out via additional pin. The only difference between stereo and mono jacks is that stereo jacks have two channels coming in and two corresponding return pins coming out.

Normally, it works like this: enter image description here

The schematics in LM4875 datasheet uses return pin in non-standard way. The voltage divider R1-R2 sends 50 mV to "HP Sense" pin when headphones disconnected (3). This enables "Audio -" differential output to the speaker. When you plug in headphones (4) the resistor R2 is disconnected from voltage divider, leaving R1 as pull-up. This disables differential speaker output. Note, that R2 remains connected in parallel to the headphones. Even though it is higher than headphone resistance, it still "steals" some of the output power, for this reason I do not like this circuit much.

enter image description here

In any case, your jack cannot be used with this schematics, since it does not have built-in switch. Luckily, most of the jacks are manufactured with variety of contacts. Here is one datasheet example:

enter image description here

So, one option is to use different jack, as suggested in @Transistor's answer. Since you'll be connecting pins 2 and 3 together (to feed mono audio to both headphone channels) it does not matter which jack you use, as long as it has at least one return pin.

Note, however, that the resistor R2 in parallel with headphones will still be there. So, here is an alternative solution (5), which uses headphone resistance as pull-down, very weak pull-up and inverting comparator for generating "HP sense" signal. It also lets you use your existing jack.

enter image description here

The voltage divider resistors should be selected to supply reference voltage slightly below Vcc. The pull-up R1 can be over 100K, barely affecting the output of the amplifier.

Finally, one more option for you to consider. Since your channels are wired together at the jack, the return pins either shorted and have common mode equal to audio signal, or they completely disconnected and can be weakly pulled to different rails. I believe something like window comparator can be used to generate HP sense signal from the differential between two return pins. Note, that there are ready-made window comparator chips, like TPS3701, so you do not have to use two discrete components.

\$\endgroup\$
3
\$\begingroup\$

The connector in Figure 27 is a switched mono jack plug. When the jack is inserted P2 is lifted and breaks contact with P3. For audio use P3 would be connected to the internal loudspeaker and inserting the headphone jack would disconnect it.

Your second diagram shows an unswitched stereo jack.

enter image description here

Figure 1. A switched stereo jack. When unplugged 2 connects to 4 and 3 to 5. Inserting the jack disconnects 4 and 5. Source: Switchcraft.

You need a switched stereo jack. It will have 2 P2/P3 contacts and (at least) five terminals.


To understand your Figure 27 we can see that there is a HP sense which, in the context, must be a headphone sense input. Without headphones, as shown, HP_Sense is pulled low by the 100k/150 voltage divider. When the headphones are inserted P3 is disconnected and HP_Sense is pulled high by R1. This can be used by the device to adjust the volume to the last headphone setting, etc.


Further clarification:

For stereo you will need two amplifier chips. Left goes to tip (3) and right to ring (2) of my Figure 1.

For a mono amplifier to stereo headphones wire 1 to GND and connect 2 and 3 to the amplifier output.

\$\endgroup\$
  • 2
    \$\begingroup\$ The LM4875 is a mono amp. To drive both sides of his headphones, he will have to connect the amplifier output to terminals 2 and 3 of the stereo jack, and 4 or 5 to the HP Sense terminal of the LM4875. \$\endgroup\$ – Peter Bennett Oct 8 '18 at 19:05
  • \$\begingroup\$ At first read I thought you were suggesting 2 for output and 3 for ground which would work but give the "hole in the middle" anti-phase signals. You are correct. I didn't pick up on the mono-amp, stereo-phones part of the question. Fixed, thank you. \$\endgroup\$ – Transistor Oct 8 '18 at 19:17
0
\$\begingroup\$

The signal comes in on P2. With no plug in the jack, P3 is connected to P2. With a plug inserted P3 is disconnected from P2. P3 does not connect with the plug at all.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.