Electronic – Digital data coming out of a cell phone headset mic

adaptercellphonemicrophone

I want to connect a sound board / mixing console / whatever-you-prefer-to-call-it to the headset jack of my Motorola Android phone. I know the typical TRRS pinout of Left/Right/Ground/Microphone, and I know about the mic being phantom-powered by the phone and using the external impedance to detect:

  • speakers only (long-duration short, could be fooled by direct connection to a line-out)
  • play/pause button (short duration short)
  • prev/next buttons (2 different impedances < 1kohms)
  • microphone present (impedance > 1kohms)
  • unplugged (open)

So I know I need an attenuator (probably a pot) followed by an RC highpass with R ~2k before it goes into the headset jack. Not a problem. What I can't figure out is, what's this on an unconnected mic?:
enter image description here
Kinda looks like a digital byte, doesn't it? It repeats the same thing at this rate forever. With a "bit" width of ~10ms (100bps, 50Hz) and a cycle time of ~250ms (4Hz), it sounds terrible. Probably not intended to be heard directly.
enter image description here
This adapter is intended for cameras, so the color code is wrong. A continuity checker says that the red plug is [S]leeve, which is mic for me.

Update:

I finally got around to adding a 2.2k termination to the mic plug and now it does this:
enter image description here

(same scale as before, just a different color)

I start an app that uses audio in, like an oscilloscope, spectrum analyzer, SPL meter, or call my voicemail, and it changes to this:
enter image description here

I don't have a good way to put a signal into it right now, but it looks like it works. I'll just need to add a series resistor to make it play nice with whatever it's plugged into when there's no app running to use it. I'll probably put it between the mixer's line out and the pot so as to guarantee a certain amount of attenuation. (it's still a mic in, not a line in)

The weird thing though, is when I remove the 2.2k termination, I get this instead of the original:
enter image description here

Almost like it saw the resistor, configured itself to use a mic now, and didn't go back. I'm still curious to know what it was doing before, but it looks like my project will work.

Best Answer

From diagram 3, I could think of two possibilities:

  1. The microphone interface is polling for an existence of a mic periodically and turning the line off when not found. Probably not correct.

  2. The mic input is doubled as another digital interface. Some phones have a way to detect whether the plugged in ear phones are manufacturer's original models or not, for example. If such a earphone pair is detected, the internal audio equalization may be tweaked to produce best possible fidelity.

The pulse shows narrow, I could not sit and figure out it's width, but it does look like a start bit for me. Assuming it is a start bit, it is probably followed by, say some bits and a stop bit - all are zeroes (like a UART). Beyond that, the controller probably is expecting a response.

The first diagram probably is the mic decoupling capacitor acting as weird RC filter with oscilloscope input impedance. Open drain outputs usually require a remote termination. That's another way to detect if remote is connected, somewhat like USB.

Which is the phone on the other end? I might not have access to the same model and I definitely don't have a similar cable handy to figure exactly out what is happening.

It might be interesting, though, to try sending an UART response on the line, taking the high pulse width as bit time: wait for ten or 11 bits and send high start bit and probably try some combinations. Even if we get a response, it might take a while to figure out the protocols etc. I would advise extreme caution, though - if it is a dangerous interface like a firmware backdoor, a trial sequence could potentially erase the flash.