1

Is it possible to distinguish between a TRS plug from a headphone or from an MP3 player?

As we know, the output from an MP3 player has a signal unlike the output from a headphone.

What I want to do is basically the following:

enter image description here

What options do I have on this?

Marcus Müller
  • 88,280
  • 5
  • 131
  • 237
Elektrik
  • 81
  • 5
  • answered, but downvoted because, in your previous question, you've already been pointed at questions of the type "is it possible..." are yes/no questions with a "yes" as default answer (unless physically/mathematically impossible, that is). It doesn't say someone has yet invented a way of doing that. Your title has nothing to do with your question's content: you want to know *how*, not *whether* possible. Please fix your title and the first sentence of your question. – Marcus Müller Jun 11 '20 at 12:03
  • Oh, this is a duplicate of your previous question. And there you already got an answer to the "is it possible?" question. – Marcus Müller Jun 11 '20 at 12:04
  • Does this answer your question? [How to detect if a TRS cable is connected to a MP3 player output?](https://electronics.stackexchange.com/questions/504174/how-to-detect-if-a-trs-cable-is-connected-to-a-mp3-player-output) – Marcus Müller Jun 11 '20 at 12:04
  • Not exactly, that's why I posted this question here which I think is more specific and direct. – Viewsonic Jun 11 '20 at 12:10

1 Answers1

0

Yes, headphone, microphone and line in presence detection is something that every smart phone does these days.

Basically, it just takes a bit of observation whether you see any relatively high voltages (say, above 50 mV), then there's an active signal driver (i.e. the line-out of a player, or a heaphone driver) attached.

For headphones vs microphone detection proprietary approaches exist, but my understanding is that they are basically DC and AC impedance measurement.

It's probably not hard to write software for a microcontroller that has an ADC and an analog signal switch to do that detection and then light up the LEDs you want.

Marcus Müller
  • 88,280
  • 5
  • 131
  • 237