Android device external mic wiring

Android devices can be used as signal generators and signal analyzers. It is easy when all you want is to get the signal out of the speaker or headphone connector, and you are happy to analyze what internal microphone in the device receives. But what if you want to feed some external signal into your Android device?

Most Android devices use 4 contact 3.5 mm plug for headphone/hand-free-set. The hands-free sets have microphones in them, so there must be a way to get signal into your device though this connector. I started looking around. I found that almost all smartphones expect the mike and common leads on connectors 3 and 4. I found out that there are actually two ways to wire 4 contact 3.5 mm plug for headphone/hand-free-set, here is table from A note on headset standards: OMTP, AHJ and Apple article:

A little bit Googling and measuring revealed that most Android phones (and iPhone) are wired using AHJ pinout shown on right. This pin-out seems to be the case with my Samsung S4 mini smart phone and a small Denver TAC-70031 Android tablet I have.

Replacing the TRRS Plug on my phone headset discussion offered the following circuit diagram which shows how external microphone and headphone can be connected to Android phone or iPhone.

Source: http://www.anythingbutipod.com/forum/showthread.php?t=55510

 

The How to connect an external microphone/synthesizer/guitar to the Android/iOS device? article reveals details how the connection of external microphone works:

Source: http://www.warmplace.ru/docs/mobile_audio_input/

Here is another interfacing circuit diagram from Sensor Data to iPhone Through the Headphone Jack (Using Arduino) article (same basic idea, different component values) and idea used in SoftModem for Arduino interfacing:

Source: http://www.creativedistraction.com/demos/sensor-data-to-iphone-through-the-headphone-jack-using-arduino/

The trick in detecting the external microphone on the smart phone is to have right impedance between the mic pins. Samsung phones seem to require a microphone with impedance of around 1.0k – 1.5k Ohm. Some other devices might also work with somewhat higher resistance values (1 kohm to few kilo-ohms). It is a good idea to keep the impedance always higher than 1 kohms, not because you would risk braking something (short circuit is OK because what what happens when you plug in normal headphones), but because some resistance values less than 1 kohms resistance values can be used for control buttons on some hands-free kits.
Galaxy S4 Headset Mic & button wiring schematic pinout???? and Nexus One Headset Controls: Issue, Solution and the Aftermath articles shows a circuit diagram for Samsung headset. I got my Samsung S4 to detect external when I used 1.5 kom resistor between MIC pins (the same trick did not seem to work on Denver tablet for some reason).

The $0 Android Oscilloscope article tells how to build an oscilloscope probe for use with Android for no money if you have some basic component around. The article tells that this method allows you to get 44k samples/sec in at least 8 bit resolution. It should be enough for many uses. The article shows how to get oscilloscope view with free OsciPrime Oscilloscope Legacy app.

 

A Preamplifier for Smartphone Oscilloscopes article shows an improved version of the same Android oscilloscope. A Preamplifier for Smartphone Oscilloscopes Instructable describes a preamplifier circuit for making smartphone scopes more versatile and resistant to accidentally transferring too high voltages into your audio jack (destroying your expensive smart phone).  The input impedance is increased from around 2 KΩ (typical mic input) to 1 MΩ (typical oscilloscope input). The supported signal voltage range is 10 mV to 50 V or more, and the safe overload range is equal or higher.

Now I got the signal connection working with my Samsung smart phone nicely, but my original aim was to use the Denver TAC-70031 Android tablet as lab instrument. So I had to do some more experimenting to get it work. First I tried several other resistance values for mic input without any better results. Always the internal mic seems to be active and no signal getting in from 3.5 mm jack. There was some small voltage on the mic pins which would indicate that there could be mic in headphone connector…. What else should I try? I need to understand better how the mic/headphone detecting circuits work to come up with new ideas. Some details on mic detection can be found at Audio Jack Detection and Controller article that describes NCX8193 audio jack accessory detector and controller operation.

 

Source: http://www.eeweb.com/company-news/nxp/audio-jack-detection-and-controller/

It seems that this IC has detection on both the headset pins and mic pins. I quessed that maybe I should also have something connected to headphone pins as well. I tries 47 ohm resistors on headphone pins and 1.5 kohms resistor on mic input. The mic detection does not seem to work, or at least it does not seem to turn off the internal mic.

It seems that I have to forget using this Denver TAC-70031 as oscilloscope / audio signal analyzer for signals coming through cable. It seems to be only useful as signal generator and analyzing signals that internal microphone can pick up.

 

28 Comments

  1. Tomi Engdahl says:

    How To Connect an External Microphone to your Smartphone
    http://www.doityourselfgadgets.com/2014/09/how-to-connect-external-microphone-to.html

    Reply
  2. Tomi Engdahl says:

    Fairchild’s Audio Jacks, Technology Worth Listening To
    http://www.eeweb.com/blog/eeweb/fairchilds-audio-jacks-technology-worth-listening-to

    In the portable electronics market, cell phones and MP3 players have greatly expanded the use of headsets for listening to music, making phone calls, and watching videos. The advent of the earbud has brought these devices into the modern era. Over time, by adding function and features, electronic device manufacturers have implemented these headsets in many different configurations. Without a cohesive audio-jack standard body, these accessories have diverged in ways that have made universal support difficult. The ability to support multiple versions of headset devices as well as support advanced features of these headsets would help the ultraportable product vendor deliver a value-added experience for the end user. Fairchild recognized the difficulty manufacturers were having with this and devised a family of audio jack device (ADJ) products.

    The early days of the ‘earphone’ was a monaural device
    very commonplace use of the 3.5mm audio jack

    The next version of the earphone-style headset was the move to stereo. There were two ear pieces that each needed their own wire and return for a total of three wires. The 3.5mm audio jack now needed to be modified to support the third connection.

    When cell phones started using headsets the need for a microphone and hence a fourth wire was necessary, so the 4-pole 3.5mm jack was adopted. In addition to needing a fourth connection device, makers wanted to add additional functions such as a send-end button for answering and hanging up phone calls as well as buttons for pause-play or volume up-down. The camera industry also adopted this 4-pole connector to port audio and composite video from their devices. This additional capability complicated the use of the four-wire approach. There also have been different implementations of the jack pin out, which has been a major driver in the need for Audio Jack Detection products.

    There are two basic methods for audio-phone implementations, one from the Open Mobile Terminal Platform (OMTP), and the other is the Cellular Telecommunications Industry Association (CTIA) standard in North America. Both are in use today and mobile device manufacturers would like their devices to work for both.

    To further compatibility complexity there are differences in the implementation of the headset itself, even using a similar pin out. Speaker impedance, amplification, microphone characteristics, and button resistances all spell trouble for anyone working on compatibility. Resistive detection, production testing, and battery charging are yet even more capability being added to this interface. For makers of large-scale application processors, call processors and audio codecs don’t have the agility to keep up with the changes happening in the 3.5mm jack world. This phenomenon has spawned the audio jack detection (AJD) product market.

    Many different types of headsets exist

    3-pole passive audio headset (typically 16-32 Ohms impedance).
    4-pole, CTIA passive audio headset (typically 16-32 Ohms impedance).
    4-pole OMTP passive audio headset (typically 16-32 Ohms impedance).
    3 or 4-pole active (amplified and noise cancelling) headset, typically high impedance.
    4-pole headset with send-end key, sometimes with volume up-down keys.
    Card readers such as Square or PayPal that utilize any of the 4 pins with low or high impedance.
    Data cables such as universal asynchronous receiver/transmitter (UART) for production testing or customer problem testing.
    Docking cables for use as auxillary inputs to stereo systems and car audio systems.
    Ultraportable devices using an FM radio typically use the headset as an FM antenna as well as an audio headset.
    Text telephone (TTY) devices for the hearing impaired.

    As shown by the above list, the headphone jack is being used for more than just audio.

    Reply
  3. android apps says:

    wonderful submit, very informative. I’m wondering why the other experts of this sector don’t
    realize this. You must continue your writing.

    I am confident, you’ve a huge readers’ base already!

    Reply
  4. De Credit Fut says:

    I enjoy what you guys are usually up too. Such clever work
    and exposure! Keep up the superb works guys I’ve you guys to my personal blogroll.

    Reply
  5. Arjan says:

    Seeing as this article is over a year old, I’m wondering if you ever found a way to get the mic detected on the Denver TAC-70031? I’m asking because I’m thinking of using a TREKSTOR SurfTab Wintron 7.0 in a project (I need it to be a Windows tablet and it needs to be cheap) and I might end up with the same problem so would be good if you or anyone knows how to get a stubborn tablet to recognize the ‘mic’.

    Reply
    • Tomi Engdahl says:

      I never got the mic detection to work with Denver TAC-70031.
      I got mic detection work nicely on Android smart phones..

      Reply
      • Arjan says:

        Thanks. Guess I’ll just have to try it and see if I can get it to work. It’s a different device so maybe I’ll be lucky and it will work from scratch. Worst case if I can’t get it to work I’ll have to add a USB audio adaptor with a powered USB hub so that the tablet can charge and use the USB audio at the same time (this is intended for a fixed installation).

        Reply
  6. Carlos Aguilera says:

    Do someone knows the range of voltage that is supposed to come out from the microphone? I mean, what’s the voltage that the phone recognize when the mic is connected? I would really appreciate your answer since I’m measuring from my earphones while they are connected and the wire has its own mic.

    Reply
    • Tomi Engdahl says:

      > Do someone knows the range of voltage that is supposed to come out from the microphone?

      The typical bias DC voltage that the phone feeds to the mic connector through suitable resistor is typically at around 2.5-3V range.

      > I mean, what’s the voltage that the phone recognize when the mic is connected?

      When mic is connected it will start pulling some current, the DC voltage on the mic pin drops typically to something around 0.0-1.5V range (the actual range could be larger and what is accepted by the devices can vary).

      The AC signal voltage that comes out of microphone is typically in millivolts or tens of millivolts range when loud sound comes to mic.

      Reply
      • Carlos Aguilera says:

        Thanks about your answer Tomi. I just would like to ask smth and I’m sure someone or even you know the answer :
        a) If I use an external mic which has a breakout board with its own amplifier ,and it requires 2.7 to 5.5 v feeding and has ~1 vdc bias at the output ( https://www.adafruit.com/products/1713),If I atenuate the signal in order to get it in mv, and if I use a capacitor to eliminate the ~ 1v bias voltage in the output, would it work good with the phone? And could smone recommend me a mic that has already worked?

        b) I want to feed op amps for filtering and atenuation but I don’t know if feeding them with the voltage from cellphone would work or would be better with a external supply?

        C)The external mic shouldn’t be feeded by a external supply different from the cellphone through jack connector, should it?

        Thanks in advance.

        Reply
  7. hany says:

    I want to use android phone 3.5mm jack to play audio message for caller and detect DTMF,the problem is most android phone not allow to make this you must use speaker
    So the idea is to use 3.5mm jack and connect earpiece to microphone (make loop)
    Any idea how to make this ,can I connect them directly without any additional component
    Thank you

    Reply
  8. ferro da stiro says:

    I tend not to write a great deal of responses, however
    after looking at through a few of the comments on Android device external mic wiring |.
    I actually do have a couple of questions for you if it’s okay.

    Could it be simply me or does it look like like some of the responses look like they are written by brain dead
    folks? :-P And, if you are posting at additional social sites, I would like to follow you.

    Could you make a list of every one of all your social pages like your Facebook page, twitter feed, or linkedin profile?

    Reply
  9. catholicheritagemuseum.org says:

    Please let me know if you’re looking for a writer for
    your blog. You have some really good posts and I think I would be a good asset.
    If you ever want to take some of the load off, I’d really like to write
    some articles for your blog in exchange for a link
    back to mine. Please blast me an email if interested.
    Kudos!

    Reply
  10. Tomi Engdahl says:

    $3 Homemade Oscilloscope for Smartphones and Tablets.
    https://www.youtube.com/watch?v=okP4a6NrhlQ

    Reply
  11. dave says:

    I want to use my android phone to record audio from a audio source. What are the audio levels required for the microphone input?
    The audio level out of the thing I want to use is in the range of 1 watt into an 8 ohm load. How sensitive is the microphone input of the android device? Don’t want to trash the microphone input to the phone.

    Reply
  12. Tomi Engdahl says:

    How to make mobile oscilloscope ?
    Existing Oscilloscope are costly but must needed Equipment for circuit testing & Learning Electronics.
    Hope you like this video.
    https://youtu.be/S1CYbK8GKv8
    #sansinnovations #oscilloscope #Diy #Circuittesting #electronics

    Reply
  13. Tomi Engdahl says:

    Connect 3.5 mm Headphone (4 pins) to Stereo audio jack | Mobile to woofer system connector cable
    https://www.youtube.com/watch?v=7_ntVF4CYW0

    Connect 3.5 mm Headphone (4 pins) to Stereo audio jack | Mobile to woofer system connector cable
    Mobile to woofer system connector | making of woofer connecting cable

    in this video, i want to show you how to connect 3.5 mm from old headphone jack (4P) to AV stereo audio jack, use for stereo speakers …

    It simple !!!

    Reply

Leave a Comment

Your email address will not be published. Required fields are marked *

*

*