2
\$\begingroup\$

I'm looking for a way to detect microphone/headset/headphones. How I can detect if two pins of audio jack has been shorted? This is the easiest way to check what kind of equipment has been plugged in.

In this situation I would check short circuit between pin 2 and 3. I'm using ADAU1761 and 4 pin jack.

  1   2   3   4
|-----------\\\\
|GND|GND|GND|MIC
|-----------////

|-----------\\\\
|MIC|GND|RHP|LHP
|-----------////

|-----------\\\\
|GND|GND|RHP|LHP
|-----------////

Any idea?

\$\endgroup\$
0

1 Answer 1

1
\$\begingroup\$

It seems the ADAU1671 does not include a device detection feature. You need an analog switch to switch the microphone connection between pin 4 and pin 1 anyway, if you want to support standalone microphones as well as headsets. You can toggle the microphone bias voltage on and off. As the bias is current limited, it can easily be pulled down by a short circuit or a low-impedance headphone coil. So I would try it this way:

Couple MICBIAS via R and/or L to a comparator or Schmitt trigger, and its output to a general purpose input. Switch microphone to pin 4, enable bias. If the bias is not pulled down (so you detect high on the GPI pin), it's a headset. If not, toggle microphone to pin 1 (and remove headphone out from it), and check again. If it is pulled down, it's a headphone, if it's not pulled down, it's a standalone mic or no device at all (e.g. just an extension cord).

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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