0

I'm still new to electronics and signals.

I'm currently doing a project, and i have to detect the type of earpiece connected to an audio jack. So far, i found out that when you plug in your earphone/headphone, your mobile device detects that a earphone is connected, meaning, there is some sort of data being transferred when connected. Is it possible to detect the type of earpiece(or any sort of info) through the audio jack.

Thanking in advance.

  • There is no need for data being transferred, there is a device that can do the detection, it is commonly called "switch". – PlasmaHH Oct 21 '15 at 08:32
  • @PlasmaHH If im not mistaken, the switch only detects if a headphone is connected, but not on the type and model. Im finding for a way for it to detect the type, model or brand from the data received once a earpiece is connected. – user3466156 Oct 21 '15 at 08:40
  • @user3466156 Can you give us a reference to where you learned of this? Earphones and headphones are incapable of receiving or transmitting 'data' as, electrically, they consist of only a coil of wire and a magnet. The only information you could gather would be the coil resistance but that is little help. Most earphones are designed to give adequate volume at standard signal levels. – Transistor Oct 21 '15 at 08:50
  • @transistor: Found an Apple patent: http://www.google.com/patents/US7912501 – Fizz Oct 21 '15 at 09:00
  • But detection is limited to the type of plug/device used: three or four prong headset or headphones only. – Fizz Oct 21 '15 at 09:06
  • @transistor Im still doing my research. If im not mistaken, most earpiece comes with mic, and sets of buttons to control the volume. That would mean that some sort of data is being passed through(change in resistor). Using this info, am i able differentiate the earpiece model? – user3466156 Oct 21 '15 at 09:08
  • @RespawnedFluff Thanks for the info. will look more into that. – user3466156 Oct 21 '15 at 09:08
  • Also there are two competing standards for the 4-prong one http://forums.windowscentral.com/windows-phone-8-how-guides/249287-note-headset-standards-omtp-ahj-apple.html – Fizz Oct 21 '15 at 09:11
  • @user3466156: No mention of microphones in your question. :^) – Transistor Oct 21 '15 at 13:36
  • @transistor Sorry about that. Assumed that guys over here knew that 'data' means the mic and volume button because most earpiece comes with a mic atleast :) – user3466156 Oct 21 '15 at 15:25
  • @user3466156: No problem. Probably should have used "headset" rather than "earpiece" which suggests - ehmmm - earpiece. – Transistor Oct 21 '15 at 16:19
  • @transistor Actually, i am looking more into earpiece, rather than headset. – user3466156 Oct 21 '15 at 16:51
  • @user3466156: OK. Google defines "earpiece, noun: earpiece; plural noun: earpieces, the part of a telephone, radio receiver, or other aural device that is applied to the ear during use." That was my understanding. However a Google search shows that many are using "earpiece" as shorthand for earpiece with microphone, as you are. – Transistor Oct 21 '15 at 19:14
  • @transistor A quick search on wiktionary defines that earpiece as a speaker placed inside or held near to the ear, which includes in ear headphones :) – user3466156 Oct 22 '15 at 07:31

2 Answers2

1

Unless you're talking about some special brand headphones, there isn't exactly "data" transfer in the sense of digital data transferred from or to some IC on the headphones. The information what type of connector is present is decoded quite differently. This Application Note is quite a good reference for this. I'll quickly summarize the key facts for you, but I recommend reading that application note.

The basic idea is that on traditional 3-contact jacks, the sleeve is ground, and the first ring and tip are the two speakers. What is to be kept in mind is that they have a rather low impedance.

A typical microphone-enabled jack now moves the speaker on the tip of the jack to a second ring (that is mechanically in one half of the tip in the first variant) and connects the microphone to the tip. The microphone itself is quite high impedance. This microphone also needs biasing, i.e. a resistor in the order of a few Kiloohms from the tip to the supply voltage is required for operation.

In Variant 1, if the low impedance speaker is connected to the tip and thus to the resistor, a very low voltage can be read on that pin. In Variant 2, if the high impedance microphone is connected, higher voltage is present.

J A
  • 625
  • 4
  • 11
  • Thank you so much. I'll read into it and will comment here if i have any questions. Thanks again. – user3466156 Oct 21 '15 at 09:09
  • According to my research for this problem (http://electronics.stackexchange.com/q/136065/53375), the original Tip and Ring are still Left and Right speakers, and the Sleeve is split for Ground and Mic. This makes the same jack compatible with both 3- and 4-pin plugs. The detection part is entirely in the Mic circuit. – AaronD Oct 21 '15 at 17:01
0

The headset jack has a switch in it that detects whether there's a plug in it or not. Given that information, the phone can then use other methods to determine what it's actually talking to. For example, this is what my Motorola Android phone does: Digital data coming out of a cell phone headset mic?


The near-universal standard for analog headsets seems to be TRRS for Tip-Ring-Ring-Sleeve:

  • T: Left Speaker
  • R: Right Speaker
  • R: Ground
  • S: Microphone

Ignoring digital for a moment, all the detection is done with the Mic connection:

  • Shorted to Ground for a long time = Speakers only, no Mic. (3-pin plug)
    • This can be fooled by direct connection to a line-output, so an adapter my be required to reliably feed audio into it.
  • Shorted to Ground for a short time = Play/Pause button.
  • 2 different impedances, each < 1k to Ground = Prev and Next buttons.
  • Impedance > 1k to Ground = Mic present and ready for use

So far, there's nothing to determine who made it or what its specialized capabilities might be. To determine that, a manufacturer may resort to a proprietary detection scheme that tries to discover their own products but also detects anything else as a generic, analog device. This is probably what my phone is trying to do in the question that I linked above.

AaronD
  • 5,596
  • 10
  • 36