Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Can't get homemade headset to be recognized by Android

Status
Not open for further replies.

Hyerman

New Member
Hi,

This is my first post on this forum. My apologies if it is the wrong section or I get anything wrong.

I am trying, and failing, to create a simple headset for an android phone out of basic components. My design only has one speaker rather than the two that a headset normally has. It also doesn't have any of the fancy control buttons. It just has a single speaker and a microphone.

The android spec for audio pugs can be found here. https://source.android.com/devices/accessories/headset/plug-headset-spec#electrical
The jack side of the android spec can be found here.

The datasheet for the microphone I have been using can be found here.
The datasheet for the speaker I have been using can be found here. NOTE: this is a link to a pdf download rather than a web page.

The CTIA wiring for 3.5mm plugs is described rather well in this post.

I wired my headphone up the same way as the CTIA diagram in the prior link with a few exceptions:
1) I only used one speaker rather than two. I wired up the right speaker and not the left speaker.
2) I added a 110 ohm resistor in front of the speaker so that the combined resistance on that line would be 117 ohms. The android plug spec indicates that the resistance should be between 32 and 300 ohms.
3) I added a 520 ohm resistor upstream of the microphone so that the combined resistance on that line would be 1120 ohms. The android plug spec indicates that the resistance should be greater than 1000 ohms.

When I plug in my headset I get nothing. Nothing comes thru the microphone or out thru the speakers. My phone will continue to use its built in speakers and microphone. I also use an app that detects and indicates headphone insertion. An app that works pretty well to determine if a headset with-or-without a microphone is attached is called “Headset Notifier” on Google Play. I turn off all the options for it so that it only comes on when I want it to.

For comparison, I have a cheapo Skull Candy headset with a microphone. It works great in my android phone.

I checked the resistance of the various plug contacts on both my headset and the Skull Candy headset. I see what I expect on my headset. The Skull Candy headset has infinite resistance on the sleeve connections, which I don't understand.

Here is my naming conventions for the plug.
Tip-Spkr-L
Ring-Spkr-R
Ring-Ground
Sleeve-Mic


Contact 1Contact 2Skull CandyMy headset
Ring-Spkr-RTip-Spkr-L40 ohmsInf
Ring-GroundTip-Spkr-L20 ohmsInf
Ring-GroundRing-Spkr-R20 ohms117 ohms
Sleeve-MicTip-Spkr-LInfInf
Sleeve-MicRing-Spkr-RInf1120 ohms
Sleeve-MicRing-GroundInf1120 ohms


I appreciate any guidance that can be provided. I am a software person, but 30 years ago I had an aerospace engineering degree and took basic 200-level circuit courses. My understanding of your comments won't go much beyond that.

Thanks,

Hyer
 
The audio output to the speaker will be divided down by the ratio of the total resistance to speaker resistance; if it worked, you would be getting about 1/15th the volume you should.

Try a 22 Ohm resistor, one in series and one connected directly from left to ground, so the other channel has a DC load.
Or 10 series and 22 for the other channel.
The left output (tip) may be the one used for connection sensing.

If you don't have any other resistors, use a 110R from left to ground, so it sees a load, just to confirm that causes it to switch over.

You should not need any resistor in series with that mic.
 
rjenkinsgb ,
I am sorry to say, but your suggestions didn't work. I am still unable to get my homebuilt headset to work. The android phone won't recognize my headset. Any other suggestions?
 
Strange!

Try just two resistors, from the plug tip & first ring to the second (ground) ring?That should be seen as headphones connected?
 
OK, try directly linking the ground ring to sleeve? That should make the plug appear to be a three-pole so only headphones rather than headset.

If that works, it must be sensing mic circuit resistance rather than the fact that headphones are connected....
In that case, try something between 1000 - 1500 ohms across mic & ground; if that is still detected, see what the voltage is across the resistor & let me know both the resistor and voltage!
 
Holy Toledo. I swear I check that, but I must not have.
Shorting the mic and the ground makes it identify the speakers. That means Android checks between the speakers and the mic and not the speaker and the ground.
A 1000 ohm resister between the mic and the ground makes it identify the mic. The voltage across the 1000 ohm resistor is 0.87 on the 20 DC V setting on my multi-meter.

Thanks!
 
That makes, sense, I think mics or headsets with control buttons switch in different resistors across the mic circuit for different functions.

Try connecting your mic directly between ground & mic in, and see what voltage you get then? If the voltage is a lot higher you may need a different type of mic capsule, or connect a resistor across it, as high a value as you can and it still detect it.
 
Let me correct myself. I have done a little bit more playing around.
Shorting the mic and the ground indicates to android that there is a headset without a mic.
Connecting the mic and the ground with a 1k or 1.5k resistor indicates to android that there is a headset with a mic.
The connectivity on the two speaker lines doesn't matter when it comes to android thinking there is a headset attached or not.
 
rjenkinsgb Can you tell me why you want me to put a large resister between the mic and ground? Should it be in series with the mic or in parallel?

FYI. The voltage across my mic is 2.67 on the 20 DC V setting of my multi-meter. The impedance across my mic is 1250 in one direction and Infinity in the other direction.
 
The input sensing circuit in the phone/tablet appears to work from the voltage on the mic terminal, with different voltages making it select different modes.

2.67V is too high for it to switch to "headset", so adding a resistor in parallel with the mic will reduce the voltage; but also reduce the mic output to some extent.

You need to add a resistor that pulls the voltage down to something from 1 - 1.5V at a guess, just enough so it reliably selects headset.
Too low will muffle the mic and possibly switch out of headset mode again, too high will not get the voltage to the required range...
 
rjenkinsgb ,
Thanks for all your help. It made a huge difference in my getting a headset that works.
FYI:
- android sees the headset (without a mic) being attached if ground and mic (ring2 and sleeve) are shorted.
- android see the headset also having a mic if ground and mic have reasonable resistance across them (I have tried 1K, 1.5K, and 1250 ohms). I have not tried any other resistance to simulate button presses.
- my mic and speakers work fine with a 8 ohm speaker and a 1250 ohm mic. The datasheets for both of them are above. It records my voice fine and I can hear the speaker in my ear. I have only hooked up one speaker and android doesn't seem to care if I use one or two speakers.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top