Introduction: Inline Media Controls for Mobile to Car Audio

About: Trying my hand at everything...
This Instructable will show you how to create a 3.5mm male to male audio cable to use between your mobile phone and car to give you simple media control without having to touch or look at your phone.

I have only tested it with a Samsung Galaxy S2, and am not sure if it will work or be safe with any other models, although I have reason to believe it should work with many Android based phones, as the operating system should be looking for the same commands, assuming that the hardware supports it (that the phone has a 4 pole connection in its headphone socket).


EDIT:
Since upgrading my phone to the latest version of Android (Ice Cream Sandwich, v4.0.3) the controls have changed! My cord now does nothing when the button is pressed, volume up on skip track back, volume down on track forward. If anyone else finds this problem with their phone please leave a comment below with the phone version and operating system version. I am working on a new cable, but I have to try to find the new values to perform the desired functions!

EDIT 2:
I have tried resistance values from 0 ohm to 1200 ohms and have only been able to increase or decrease the volume on my Samsung Galaxy S2 running Android 4.0.3.
Decreasing volume occurs between 300 - 720 ohms
Increasing volume occurs between 150 - 290 ohms
The original values (used in this Instructable) should still work with earlier versions of Android, and possibly on other phones.


I don't think that this it will work with iPhones, as they look for a series of impulses rather than varied resistance as inline media controls.

I also need to give credit to WideBread.com and author Rich Kappmeier for doing the leg work on this one. Without his article
         http://www.wisebread.com/build-a-cable-to-control-your-android-phone-while-you-drive
I would not have been able to get very far with my idea (which as it turns out wasn't very original, at least in this phase).

At one point I forgot to take photos so I made a second cable to get photos of the final steps, thus the different cord colour.


Materials:
1 x 3.5mm 4 pole headphone jack
1 x 3.5mm stereo headphone jack
4 core cable
1 x 220 ohm resistor
1 x 620 ohm resistor
1 x push button (Play/Pause)
1 x 2 way switch (Skip Forward/Back)
Short length of wire
Solder
Sugru or other joining/finishing product

Step 1: Striping the Wire

You will need to strip your 4 core wire.

My cable was very well insulated against chemical corrosion, far more than it needed to be for this purpose, which meant it was fairly hard to strip.

The outer jacket was a rubbery plastic which my wire stripper had trouble getting through without destroying the wire inside. After a few attempts I ended up using a sharp blade and bending the cable away from the cut and using the extra tension on the side facing up to make careful cuts till I got to the inner wires.

Only strip one end of your wire at this point. if you make a mistake you will need to cut it off and start again, making your cable shorter each time. Make sure you have plenty of excess cable and cut to length when you need to strip the other end.

This first end is going to be used for the 4 pole 3.5mm jack as it is the most tricky end of the cable, but more on that in the next step.

Step 2: Wiring the 4 Pole

The 4 pole 3.5mm jack is the end which goes into your phone.

The only jacks I could get where horribly cramped on the inside, with only a couple of mm to solder each connection very close to the others. Given the choice I would have gone for a 90 degree connector, because from what I have seen they are more spacious and have bigger connectors on the inside.

When you look at the internals of your jack you will see that, if it is like mine, it's very cramped. You will need to be careful to only expose very small sections of wire to soldier to the connection points, and to trim each wire to the appropriate length before soldering.

As marked in the Image 1 the connections are:
Top: Function
Mid Top: Earth
Mid Bottom: Right Speaker
Tip: Left Speaker

Long Arm: Earth
Furthest solder point: Left Speaker
Middle solder point: Right Speaker
Closest solder point: function

Your jack's connections may be different inside, so it's best to check them with your multimeter to make sure it's right. If you don't have a multimeter you can use a battery and a LED to make a circuit though the jack and find the continuity.

Keep your multimeter handy to check which pole corresponds to which solder point as you go, to get your wires connected properly. You don't want to have to unsolder the connections and try again if you have the same cramped connector I had.

Step 3: Wiring the Stereo Jack

The stereo jack, or 3 pole jack, is much easier than the 4 pole. Even with an inline jack it is more spacious inside the connector, but if you have a 90 degree one like I do (which I recommend for this use) it is very easy to connect on the inside.

The poles are the same as on the 4 pole jack, just without the function connection.
Top: Earth
Middle: Right Speaker
Tip: Left Speaker

Tracing that to the soldier points inside the jack is simple too:
Long Arm: Earth
Centre: Left Speaker
Non-centre: Right Speaker

At this point I also connected a second wire to the earth and ran it back out of the jack's housing along with the unused function wire. You could probably put holes in the housing and run these out the top or side to try to hide them, but I am intending to use Sugru to tidy things a little later on, and having them out the back keeps it out of the way for me to work on.

I am intending to mount my track skip switch to the back of the jack housing with the switch leaver extending past the end of the housing, and the play/pause button on top of the switch body, in line with the jack's poles.

At this point you can test to make sure your cable will work as a basic audio cable. Plug the 4 pole jack into your phone, and the stereo jack into your car stereo, computer line in, MP3 player dock or anything with a stereo socket that can play music, and fire up your favourite tracks on your phone.
It should play nicely through, if you have any issues with the connection you may only get one speaker working (indication the wire inside is broken or the solder point isn't connected properly) or no sound which could be the earth not connected, both speakers not connected or all wires not connected properly.

If you do find a problem, get your multi meter out and check the continuity of each pole to see which are not working, the open it up and try to find and fix the problem.

Step 4: Control Positioning

Using Sugru or an adhesive, position your controls where you want them.

For my set up I have the Skip Track control mounted on the back of the 3.5mm jack housing, and the Play/Pause button on top of that. Being careful not to block the motion of the Skip Track leaver or to jam up the button I placed enough Sugru around each to hold it in place and waited for it to cure (about 24 hours).

In the photo you can see I have already connected the resistors to the track skip control. That is because I had the switch wired up and ready to go, but trying to position it with wires connected was impossible. The tension in the wires was too much for the Sugru to hold before it cured. I disconnected the wires, but left the resistors in place. If you want to do the same read the next step before completing this one so you know which resistors to put where.

Step 5: Track Skipping

Once your Sugru has cured it's time to wire up the controls. Starting with the track skipping switch because in my set up it is on the bottom.

To skip to the next  or previous track I am using a switch which rests in its open position (not making a circuit), which is only connected to pins 2, 3 and 4. When pushed to the left it connects pins 1, 2, 3 and 4, and when pushed to the right it connects pins 2, 3, 4 and 5. See Image 1 for clarification.

I have connected pin 3 to the extra earth cable I ran out the back of the stereo jack housing.
Pin 1 has a 220ohm resistor soldered on.
Pin 5 has a 620ohm resistor soldered on.
Both the resistors on pin 1 and 5 are then connected to the function wire coming from the back of the jack housing.

When I push the switch lever left it connects the function wire through the 220ohm resister to earth and the phone knows to skip back. When pushed to the right the function wire connects to the 620ohm resistor and to earth and the phone skips forward.

Step 6: Play/Pause Button

The button I have for play/pause has 4 legs, and 2 pins for an internal LED. I don't want the LED, nor do I have a power lead for it, so I have cut the legs off to get them out of my way.

Checking with the multimeter which legs are connected only when the button is pressed I solder one to the function wire and the other to the Earth wire.

When pressing this button the function wire is Earthed with no resistance (or at least very little resistance) and the phone knows to play or pause the music (depending on which state it was in last).

As an added... bonus I guess, if you don't have a media player application running on your phone already when you press this button it will launch the default Android media player and start playing your music. Personally I don't like that, but if I can find a way to change the default player for my preferred one (Winamp) then it might become a useful feature for me.

My apologies, I didn't take a photo of the Play/Pause button before it was mounted to the other components. It's a fairly standard button.

Step 7: Over Moulding

To tidy up the cable a bit and cover all the currently exposed connections I used Sugru over the top.

Leaving the buttons and switch free I moulded the Sugru around the body of the switches and the stereo jack housing to give it a more clean, manufactured look, and to protect it against knocks and shorting out if it got bumped in the wrong way.
Sugru is perfect for this because it is non-conductive, easily moulds and has a good look when cured (depending on your finishing technique).

I also used a little on the 4 pole jack end of my cable as my connection didn't fit in the supplied housing properly and it bulged open a little around the connection, again easily fixed with Sugru.

The finished cable means I don't have to worry about pressing the wrong thing on my phone screen while driving, and makes it safer to operate while driving (as dangerous as changing radio station with a pre-set button). It also makes it more legal to use while driving as it is against the law to touch a mobile phone while driving in most (if not all) states of Australia, now I don't have to touch the phone to skip or pause my music.

Step 8: Final Test and Use

It probably doesn't need to be said, but use of the cable is quite simple. Plug the 4 pole jack in to your phone, the 3 pole in to the stereo. Press the play/Pause to start or stop your music, and flick the Track Skip leaver to skip tracks.

This could also be used to add an extension to a headphone cord with media controls. Change the 3.5mm jack for a socket and you can use it as a pass though for your headphones or speakers and get the advantage of media controls in line.


A note on testing this with your phone:
While I can't say for sure if it will work or not, or if it might cause damage to your phone, I think it should be fairly safe to try.
- If your phone doesn't support a 4 pole jack then the function wire becomes another earth wire (the connection inside the phone for earth is longer and touches both poles on the jack). If this is the case it will do nothing at all. Earthing an earth cable does absolutely nothing.
- If your phone does support a 4 pole jack but uses different resistance values, or even doesn't use resistance values at all and rather uses some kind of binary signal system for controls I don't think it will damage your phone because it is not supplying a higher voltage to the pins than already exists so your phone will probably just ignore the function wire if it doesn't know what to do.
- If nothing else the worst I can foresee it doing is the same as connecting a normal stereo cable to the socket and playing music through it to your stereo. any phone with a 3.5mm socket will have this ability, as it is expected that this is what the socket is used for.

I am not an engineer, and even if I where I do not work for every phone manufacturer in the world, so I can't say any of this with 100% certainty, but I was confident enough in my reasoning that I tested it on my phone (and working a minimum wage job I can't afford to replace it if something went wrong).

Doing this *might* void your warranty, but I doubt that as I don't think using third party peripherals is a voidable offence under any warranty I have ever read, but please check your phones warranty if you are concerned.