HTC Headphones

As mentioned on the Car Bluetooth Audio page, I like to listen to music from my HTC Desire in the car. Using a Bluetooth adapter works well, but the cheap adapters are flimsy, buggy and never charged when I want them to. I decided to reverse engineer the standard HTC Desire headset to work out how the next, back and play buttons are linked into the phone. I had a basic idea of how it worked, so I decided to give it a go... Here is what I found.

= Connector = The (badly drawn) image on the right shows the pinout of the standard HTC Desire headphone connector. These plugs can be purchased from Maplin Electronics. They are 4-pole 3.5mm jack plugs. These are ideal for connecting to your phone.

= Dismantling the HTC Headset = The next step was to look inside the original HTC headset to see exactly what was involved. I had read some reports of iPod Shuffle headphones requiring a microprocessor (I think the Atmel Tiny was being used). I knew that this wasn't necessary, and hoped that HTC had avoided it. They have! It is important to note that standard iPod/iPhone headsets work with the same principle as is detailed here. See the schematic section below for more detail.

Here is what's inside the HTC Desire headset. I didn't learn much from this, other than the type of circuit. Values were not obtained from the disassembly - see the Component Values section below.

Click an image to enlarge

= Component Values = Knowing the principle of operation from the disassembly, I was able to measure the resistances required to perform certain functions. This really was just a matter of measuring resistance between the control and ground pins of the circuit. From other designs and similar pages detailing how standard iPod/iPhone headsets worked, I knew there would also be a microphone element connected across the control line. The standard iPod/iPhone headset only has one button - this is the equivelant to the HTC headset's play button, and shorts the mic element out with $$0\Omega$$.

By measuring resistances the following table was obtained, and shows what the Next, Back and Play/Pause/Answer buttons do; electrically, of course!

It is important to note that the resistance in the idle state (that is, with no buttons pressed), the resistance measured is that of the microphone element and is not important.

= Schematic = The following is a schematic of the HTC headset. Prototype one (below) is built from this schematic and works perfectly. The resistance values used in the schematic are not exact. If you would prefer to get closer to those measured, then you can combine resistors in series/parallel to obtain the required resistances. I didn't find it mattered that much.



People report that the $$1M\Omega$$ resistor and the $$100nF$$/$$100K\Omega$$ network both reduce noise on the microphone audio (if used) and improve the reliablity of the button operation. The resistor R4 may be made to $$10K\Omega$$ should there be noisey audio. If the buttons do not work as intended, and the circuit is correct, you may also wish to make R4 $$10K\Omega$$. Adjusting the resistor for the required function (back [R1] or next [R2]) making it closer to that stated in the Component Values section should also help.

= Prototype One = This isn't pretty. But as a test, it proved the schematic was correct.



It works great. My next step is to interface this knowledge into the car. I would ideally like to interface it to my Ford Focus' Sony CD-132-MP3 player. I am looking for a method of doing so, using the radio front panel/stalk control buttons. Failing that, and for simplicity (and the health of the car) I may simply use 3 push buttons hidden from view.