HeadsFree jack Detection - Page 1
Forum section: electronics / beginners

author: arslan43711
author_rank: Contributor
timestamp: November 22, 2024, 06:05:06 am
content: Hi everyone,I am designing a PCB in which I need help with jack detection. I have decided to go with PJ-328B0-SMT this audio jack. there is no dedicated pin for the detection. How can I detect if the audio jack is inserted or not. I will connect this to a micro-controller to perform the operation.I want to go with CTIA StandardI have attached the picture of the schematic symbol with this post.

author: Analog Kid
author_rank: Super Contributor
timestamp: November 22, 2024, 06:42:11 am
content: You want to know when aplugis inserted.Can't you use one of those two switches shown there (2-3 & 4-5)? They're normally closed and will open when the plug is put in. Unless you're going to use those for some other purpose.

author: Ian.M
author_rank: Super Contributor
timestamp: November 22, 2024, 06:57:36 am
content: Exactly. As CTIA has ground one ring up from the sleeve, pin5 will be ground, so you can use the switched pin 4 for jack detection. Use a RC network for ESD mitigation as this is in very close proximity to external connections and a pullup to MCU Vcc.

author: arslan43711
author_rank: Contributor
timestamp: November 22, 2024, 07:09:05 am
content: QuoteI have on board speaker option also. when no jack is inserted those will redirect the audio to the on board amplifier.

author: arslan43711
author_rank: Contributor
timestamp: November 22, 2024, 07:10:32 am
content: QuotePin 1 will be ground. pin 5 will be the right audio

author: Ian.M
author_rank: Super Contributor
timestamp: November 22, 2024, 08:18:00 am
content: Ah, I read the contacts backwards. That only gives you the audio lines for jack detection. With the audio amp muted, there would be no signal on L and R, but that doesn't guarantee their potential. You could add resistors from L and R to ground, e.g. 3.3K would keep them at near ground potential with no headset connected, so you could sense their switch contacts as previously described. When the headset is plugged in the 3.3K resistors would be in parallel with the earpiece coils but as they are only a few tens of ohms, the resistors would have negligible effect. The pullups to Vcc would need to be at least an order of magnitude higher e.g. 33K. When the jack is plugged in the pullups and ESD filter network are disconnected from the audio path.However the disadvantage is you cant use those contacts to directly switch internal speakers at the same time as using them for jack detection. The easiest option there is a separate speaker amplifier, controlled by the MCU, though if there is only a single speaker you could wire it via the L jack switch, and route mono (L+R) audio through the left channel amplifier with no signal to the right amplifier input.

author: arslan43711
author_rank: Contributor
timestamp: November 22, 2024, 10:26:46 am
content: I have found an application note from TIHere is the link of thathttps://www.ti.com/lit/ab/slva961/slva961.pdfBut I am not sure what is GND_detectOn the other hand I have decided to go with other audio jack(SJ3-35024K-SMT-TR) which is bit expansive, But it has 4 conductor and 4 switches.