PDA

View Full Version : How does iPhone headphone remote circuit work?




pcmofo
Dec 29, 2009, 02:39 PM
I am trying to figure out how the magic "chip" inside the iPhone headphones works to control play/pause/volume.

This Pinout (http://pinouts.ru/PortableDevices/iphone_headphone_pinout.shtml) shows the L/R/Gnd stereo connections + microphone connection of the 4 conductor iPod headphone jack. It also says that shorting out the mic to the ground is what the button does.

It is impossible to find a diagram or any info on how the new 3GS remote with volume control works because most search results show only headphone reviews or products to buy.

There is no power running to the remote so there can be no real circuit. This means they are most likely shorting out the mic with different resistors to create the additional 2 (vol +-) signals into the iPone.

I would like to make my own iPhone remote so that I can make a larger one for use while skiing and operate it with gloves on and will require no batteries.

If anyone has any idea how the remote works that would be a huge help. I will have to grab the multi meter and start testing things I guess.



gunzmaiet
Dec 31, 2009, 08:26 AM
u could ask apple for how the remote works but i doubt that they'll tell u

JellyUK
Jan 4, 2010, 05:04 AM
Do let us know if you find anything :) I'd be really interested for a similar application. Making a breakout box with outputs for headphones and a separate remote would be cool.

pcmofo
Jan 5, 2010, 12:05 AM
OK so I took a look with the multimeter. According to the pinout I linked to, pin 4 is microphone + and pin 3 is Ground. When you press the play/pause/skip/back button on the remote it simply shorts these two pins together. Obviously this must be done before the microphone. I detected a 1.8-2.0 ohm resistance when pressing the button. This may just be the resistance in the line or it could be a very small resistor to prevent damage from shorting out the wires.... not sure yet... either way it would be super easy to recreate this effect by just adding a button connecting pins 3 and 4.

I have a Giro headphone cord that came with my helmet that connects to a cellphone. I can rewire it to provide the iPhone functionality but this still does not solve the more difficult problem of how the + - volume buttons work...

On the official headphones the mic/buttons are on the Right earphone line. This means it is very likely that the buttons only interact with the mic+ and ground (pins 3, 4) in some way. We know that the center button shorts out the pins. the + - buttons must send some type of signal. As I said before the "circuit" is unpowered so it must be some type of resistor etc.

I was unable to detect any resistance value by testing the pins and pressing the + - button as I was able to do with the center button. When I set my multimeter to the diode setting, I got back a voltage reading. I have no idea what this means as I have never used this feature of my multimeter before but when I pressed either + - button I got back a consistent voltage result.

As soon as I talk to my electrical engineering friend to figure out what this means I will attempt to recreate everything on a bread board as a prototype/proof of concept. If anyone has any idea or suggestion as to what this might be please let me know.

ordan77
Jan 5, 2010, 01:29 AM
I was unable to detect any resistance value by testing the pins and pressing the + - button as I was able to do with the center button. When I set my multimeter to the diode setting, I got back a voltage reading. I have no idea what this means as I have never used this feature of my multimeter before but when I pressed either + - button I got back a consistent voltage result.

Interesting. I don't have the kit here to verify what I'm thinking, but it sounds quite simple... Option 1:

Center Button - simple ballast resistance
+ Button - single Forward Biased Diode
- Button - Forward Biased Diode in combination w/ ballast resistance


This is a simple design, which would require only three buttons, one passive and one semiconductor - all extremely cheap.

To detect the difference, the phone would look regularly (25 times / second or so) at the resistance and voltage drop between pins 3 and 4. If the center button is pressed, resistance will increase, but there will be negligable voltage drop. If the + button is pressed, there will be a negligable change in resistance, but the applied voltage (from the handset) will drop by a detectable amount. Finally, if the - button is pressed, both resistance and voltage drop would change.

Option 2 would be to use a slightly different combination:

Center Button - simple ballast resistance
+ Button - Reverse Biased Zener Diode breakdown at say 0.15V
- Button - Reverse Biased Zener Diode breakdown at say 0.35V


In this, slightly more complex scenario, the handset would (again, regularly) send a stepped waveform accross pins 3 & 4, 0.05V, 0.15V and 0.35V. The breakdown voltages may vary - these are just examples to aid the explanation below.

If the center button were presed, the handset would detect a signal at the 0.05V step, through the ballast resistor. If the + button were pressed, the signal would be detected at the 0.15V step through the first Zener as it reached its breakdown voltage. Finally if the - button were pressed, the signal would be detected at the 0.35V step through the second Zener. No button pressed leaves the circuit 'high impedence' (not quite open circuit, as the microphone is still connected).

Both of these scenarios would require that the system stop 'polling' for button presses when the microphone were in use, such as when using voice control, or when on a call - ar at the very least, significantly reduce the polling period. Any polling while the microphone was in use would cause distortion to the received audio.

Of course, there are other possibilities, and Apple's engineers are smarter than me - but these are my thoughts based on your description so far.

lemonademaker
Jan 5, 2010, 07:23 AM
love this stuff!! post a video!! LOL

www.instructables.com

glad to see other DIYgeeks on here!!

djrobsd
Jan 5, 2010, 04:46 PM
I use the Bose on-ear headphones, and they have a mobile headset for it for $40 bucks, but it only has one button, to answer the calls on the iphone. I would like to have something like this and be able to use whatever headphones I want. The new apple ear buds that came with my 3GS iphone don't even stay in my ears!! WORTHLESS!!!!

djrobsd
Jan 5, 2010, 04:48 PM
Found this at Newegg:
http://www.newegg.com/Product/Product.aspx?Item=N82E16855990086&nm_mc=OTC-Froogle&cm_mmc=OTC-Froogle-_-Mac+-+iPod+Accessories-_-iLuv-_-55990086

Went to the manufacturers site:

They claim it works with 3GS iPhone, and the 3rd Gen iPod shuffle (with the hold button down to get voice over)..

One guy on Newegg says it doesn't work with the 3G iphone, so probably only 3GS. :)

I'm ordering one!

viggen61
Jan 5, 2010, 07:02 PM
Found this at Newegg:
http://www.newegg.com/Product/Product.aspx?Item=N82E16855990086&nm_mc=OTC-Froogle&cm_mmc=OTC-Froogle-_-Mac+-+iPod+Accessories-_-iLuv-_-55990086

Went to the manufacturers site:

They claim it works with 3GS iPhone, and the 3rd Gen iPod shuffle (with the hold button down to get voice over)..

One guy on Newegg says it doesn't work with the 3G iphone, so probably only 3GS. :)

I'm ordering one!

Me too! Perfect for using in my car with the cassette adapter!

The 3G does not support the volume control on the remote, while the 3GS does. I don't think the 3G has the right circuitry to make it work.

:apple::apple:

djrobsd
Jan 5, 2010, 11:26 PM
Me too! Perfect for using in my car with the cassette adapter!

The 3G does not support the volume control on the remote, while the 3GS does. I don't think the 3G has the right circuitry to make it work.

:apple::apple:

Not sure what you mean by this, I had a 3G Iphone that came with a headset that had the volume control on the headset. :)

viggen61
Jan 6, 2010, 03:13 PM
Not sure what you mean by this, I had a 3G Iphone that came with a headset that had the volume control on the headset. :)

According to Apple themselves, that shouldn't work!

:apple::apple:

viggen61
Jan 6, 2010, 03:16 PM
u could ask apple for how the remote works but i doubt that they'll tell u

Actually, if you apply to their "Made for iPod" or "Works with iPhone" programs, and they let you in (for a fee, of course, and likely not a small one), they'll tell you. That's how all these other companies get the specs so their devices will work.

A lot of pinouts used to be available on the pages at Apple's support site.

:apple::apple:

pcmofo
Jan 6, 2010, 03:28 PM
Thanks for the detailed explanation. Like I said, I used the Diode setting on my multimeter and got back specific voltages so I am guessing that the second one is the way to go.

I have a older Giro headset cable which has a 4 pin 2.5mm cellphone jack + a 3.5mm 3pin audio jack. The idea being that you can connect both your cellphone and your MP3 player at the same time. This also has a built in volume wheel.

I have traced everything out but the Mic+/ground. Need to find a normal cell to plug in to test which is which. I picked up a 4 conductor inline remote similar to the iLuv one posted above but with a much longer cable and just one button and the mic. I am using the cable so that I can rewire the existing Giro headset to connect to my iPhone.

I can then turn up the volume 100% on the phone and use the inline manual volume wheel to control the volume output manually.

I tested the button. It definitely shorts out pin 3/4, through a small Capacitor.

If this works then I wont need to recreate the iPhone + - button functionality. Hopefully trying this tonight.

wisefire
Mar 1, 2010, 07:35 PM
for posterity among other things, this volume button thing must be answered.

i found a damaged iphone headset somewhere, and tried the short of the mic first. this works..

i have a 3gs and the headset that comes with it, ive tried measuring it..
it does indeed short out the mic when the middle button is pressed. but the 2 volume buttons dont.. also ive tried measuring both ways and there is no difference, so as far as i can tell there are no diodes in play..

no resistance in play aswell, well, a lot of resistance but it isnt doing anything..

im kind of out of ideas.. im hesitant to disassemble my headset, allthough i really dislike the in ear headphones..

what is driving these volume buttons?

i know it is a small condenser mic, so its getting some voltage, therefor a small chip could be driven by this voltage. if thats the case we can forget about fully diy headsets, and need the chip inside this headset to control volume..

pcmofo
Mar 2, 2010, 08:30 AM
This just came out (http://david.carne.ca/shuffle_hax/shuffle_remote.html). It explains everything.

wisefire
Mar 2, 2010, 08:36 AM
This just came out (http://david.carne.ca/shuffle_hax/shuffle_remote.html). It explains everything.

thnx, it does explain things.. too bad though, would've loved to build my own.

guess i'll leave out the volume buttons..

Shenaniganz08
Mar 2, 2010, 07:41 PM
This just came out (http://david.carne.ca/shuffle_hax/shuffle_remote.html). It explains everything.

Damn do I love reading articles like that :):):)

After reading it I was actually disappointed that there was no PayPal donate button ( we need to encourage more people like this ! )

rgarjr
Mar 2, 2010, 09:47 PM
I'm wondering what fails when sweat gets into this control.

Shenaniganz08
Mar 3, 2010, 01:18 AM
I'm wondering what fails when sweat gets into this control.

that's a no brainer

sweat = short circuit

dillon.mcinnes
Jul 30, 2010, 12:44 PM
so if i wanted to build a control button into my car, would i just need a button that shorts the microphone and ground? or are there some other components that are required?

Infernex
Aug 9, 2010, 10:34 AM
so if i wanted to build a control button into my car, would i just need a button that shorts the microphone and ground? or are there some other components that are required?

You have to read the article linked, but just having the single button should work by shorting those 2 lines (short control/mic line with the ground)

To have volume control is more in depth, as you would need to replicate the voltage drops while also sending the identification 'chirp' (current chirp modulation) on startup to authenticate the remote.

The author of that article has not been able to replicate this without applying external power, but for a car that should not be a problem. If you take the time and patience, you should be able to build an integrated circuit to replicate the remote. He posts a couple of schematics of the circuit at different points in his testing, and with a little tweaking it should work.

LordG
Dec 21, 2010, 11:24 AM
Any of you dorks think about putting a 1M potentiometer in line with the headphones?

You could even get one that has an SPST built in for an all-in-one solution.

99 cents.

2 minutes.

DannyBres
Jan 10, 2011, 06:43 AM
will this circuit work?!
do i need a resistor (dashed lines) to imitate the microphone or not?!
do i need a small resistor (not shown) inline with the switch aswell so that it is not a complete SC?

Thanks

http://img69.imageshack.us/img69/793/circuitsu.jpg (http://img69.imageshack.us/i/circuitsu.jpg/)

leachboy
Jan 27, 2011, 08:38 PM
will this circuit work?!
do i need a resistor (dashed lines) to imitate the microphone or not?!
do i need a small resistor (not shown) inline with the switch aswell so that it is not a complete SC?

Thanks

http://img69.imageshack.us/img69/793/circuitsu.jpg (http://img69.imageshack.us/i/circuitsu.jpg/)

I realize your post is a few weeks old, but I'm wondering if you've had any luck with this. I've been trying to wire up a play/pause button on a set of headphones, and I can't get it to work at all. I've tried the following things:

shorting the mic connector directly to ground.

connecting the mic connector to ground through a 2 ohm resistor (since the apple headset has a resistance of about 2 ohms when the button is pressed).

trying both of the things listed above, but with a 1 megohm resistor simulating the mic (as in your diagram).

I know my cable is not bad because I wired it between the iphone and the apple headset, and the button worked. Any ideas of what might be going on?

leachboy
Jan 30, 2011, 10:55 AM
I know my cable is not bad because I wired it between the iphone and the apple headset, and the button worked. Any ideas of what might be going on?

I read the link above a little more closely, and now I know what is going on. The circuit that I built is not working because the iphone expects the power-on signalling that it's not getting.

Not that it matters, but I also misread the circuit diagram above, thinking that the resistor was 800K ohm, which is why I subbed a 1M ohm for it.

Anyway, my plan is to forgo the answer button on my customized headset, unless I can get my hands on a junked headset that I can scavange the parts from.

wiichkin
Feb 10, 2011, 11:12 PM
I think the answer lies in Figure 6 - basic circuit.

I also have the same goal as the original poster, to integrate iphone remote control into a giro helmet. However, I don't see a reason why the whole remote has to be recreated from stratch. Rather, I will wire up the remote to the chin strap to use it as a mike and will create a control circuit like in Fig 6 with large buttons elsewhere on the helmet.

we'll see how it goes.

pcmofo
Feb 12, 2011, 04:14 PM
After taking another swing at finding something I could wire together I have finally found a product that is exactly what I wanted in the first place.

Smith just released a cable compatible with the iPhone this season 10/11 but I never saw it because I have a Giro helmet.....

http://www.amazon.com/Skullcandy-Single-Shot-Audio-Smith-Optics/dp/B003C8HZPK/ref=sr_1_1?ie=UTF8&qid=1297548101&sr=8-1

Its a single cable that plugs into the iPhone with a 4 conductor jack and is fully compatible with the remote functions like FF and RR as well as the voice command and mic functions.

The other end is a female 3 conductor cable compatible with the existing headphones wired in my helmet (also made by skull candy)

It even has a volume control! Its analog so its more reliable than the digital one, toggling the buttons and hitting the correct one.

Now for the bad news....

I tested it out at home and it worked great. On the slopes was a different story however. Sometimes the button did not work and required me to either unplug and replug the cable to the iPhone, or to shield the mic/button from the cold/wind to get it to work again.

Also, when talking from iPhone to iPhone, both people using the same mic/headset their were issues.

I suspect a poor build quality for the electronics as main issue due to the cold. The volume in the white headset is dependent on resistance/capacitance to send a signal to the iphone. I suspect the cold is effecting this quality as, after close observance, I find that pressing the button, when cold, causes the volume to adjust slightly down instead of play/pause, the original issue I had with it not working well.

Overall, it works better than any other existing solution as their is no other solution I know of. Unfortunately, it is $50 with the headphones for a Smith helmet, which I did not need, and if you need Giro headphones you will have to make these fit or buy them separately.

Skull candy makes these for Smith only right now, but also makes headsets for Giro, why they dont have this exact model is beyond me, but maybe that will change.

For now I am sticking it out with the Single-Shot, until someone comes up with something better. Hopefully someone will find this info useful as it took over a year for someone to build this product.

jsoundz
Jun 6, 2011, 01:21 PM
Ok so i'm in the same boat as you guys. right now i have a "throat mic" set up that i want to modify for my iphone. I know that its near impossible to replicate the volume controls, but for the center button, could i just replicate it by simply shorting the mic to common/gnd?

here is the product i have in mind:

http://www.dealextreme.com/p/3-5mm-2-5mm-retractable-throat-vibration-finger-ppt-acoustic-tube-earphone-mic-for-kenwood-71827

The headset has a push to talk button, which i could rewire to short the mic to ground. I hope this would work, please confirm.

pcmofo
Jun 7, 2011, 03:35 PM
Ok so i'm in the same boat as you guys. right now i have a "throat mic" set up that i want to modify for my iphone. I know that its near impossible to replicate the volume controls, but for the center button, could i just replicate it by simply shorting the mic to common/gnd?

here is the product i have in mind:

http://www.dealextreme.com/p/3-5mm-2-5mm-retractable-throat-vibration-finger-ppt-acoustic-tube-earphone-mic-for-kenwood-71827

The headset has a push to talk button, which i could rewire to short the mic to ground. I hope this would work, please confirm.

You must not have read this entire thread as all the answers you need are in here...

You NEED to have an apple approved accessory headset in order to do ANYTHING with the microphone. It has a chip which sends a code when you plug it in. Their are no other options, hacks etc, with the exception of building your own chip which will simulate this code. This is not only complex but also not ideal as you would need a separate power source.

Putting all of that stuff aside.... it *could* be done with the mic you listed... IF you hack an iPhone headset and splice it into the one you want. Again I say *could* because in order for it to work with the mic in the headset you have to make some solder connections that most likely wont work well if at all, and you will have to hope the POS $20 mic you are buying works well in the first place.

If you REALLY want a iPhone compatible throat mic.... suck it up and buy one thats designed to work with the iPhone... otherwise you are undertaking a task that will cost you much more in both time and money and have a high chance of failure.

http://www.thinkgeek.com/electronics/cell-phone/c8e1/

RYVAL
Jun 15, 2011, 09:17 PM
I built the fig.6 circuit outside the apple headphone using raw components just to replicate the system. None of the features worked like the OEM apple mic, simply shorting the two wires did nothing and doing either of the vol+ or vol- made the volume slider skip to 75% full for as long as I held the toggle button. The fact that I got it to do something amazed me.

I didn't have any sort of speakers in the circuit (to emulate the headphones) but I doubt that the absence of those would mean anything.

I'm looking at replicating this for use in a vehicle, replacing the factory head unit with an ipad2 to send signal out to the external factory amplifier. I have 4 years of vehicle electronics experience so all that is left is to get this headphone control circuit working to retain the steering wheel controls. If there's no other way I might have to revert to continuing to use the OEM apple headphone cable and wiring up the steering wheel buttons to do continuity like pressing the apple buttons do.

I really wish that this were possible through the dock connector.

ChicagoApple
Aug 20, 2011, 02:04 AM
You should read up about the TRRS connectors on wikipedia. That may answer some of your questions about how the microphone on the headphones work.

The Apple buttoned earbuds work so great with the iPod Touch, iPad, and iPhone, that I got 4 of them. Of course iPad 1 does not have a microphone, but the earbud's buttons still work.

vincent vaughan
Nov 5, 2011, 01:21 PM
Hello everyone

So glad I stumbled over this thread by accident....sounds great.

Ideally I would like to use my iphone/Ipod to play backing tracks while gigging but would really need the ability to start / stop the track using a foot pedal thus making the unit 'handsfree' so to speak
Is it possible to configure the wiring to do this.

I dont need the microphone..........just the audio 'out', play/pause and forward / back would be a big bonus if connected to seperate pedals....

Any help, advise etc would be really appreciated

Regards

Vincent