The easiest way to charge an iPhone is to plug it into the USB port of a computer or use the wall charger supplied with it. But what if you want to charge it in the car with a car charger? I'm sure some of you have tried it. You can't because the iPhone doesn't charge like other normal USB devices. Just by supplying 5 volts to the USB cable of the iPhone will not charge it. That's why most car chargers will not work with the iPhone.

IMG_9339
An iPhone taking charge.

Today I decided to discover the secret behind how the iPhone initiate its charging sequence. I tried plugging it into a few ordinary USB chargers which supplies 5 volts to pins 1 and 4 (refer diagram below). As expected, the iPhone refused to charge. Then I turned my attention to the iPhone's wall charger.

usb
Image courtesy: wikipedia.com

Before I get into the interesting bits, a little basics here. A USB charger supplies a regulated 5 volts to pins 1 and 4, with 1 being +5v and 4 being 0v. When a USB device is plugged in, it draws power through pins 1 and 4. The device also draws power from there to charge itself. So it would seem that just by supplying 5 volts to pins 1 and 4 would be sufficient to charge a device. But that is not the case for the iPhone (and I'm sure there are other devices that are built that way too). Alright, enough of the basics, back to our experiment.

By measuring the output of all of the pins on the iPhone wall charger, I realised that it gave a an additional reference voltage on pins 2 and 3 (Note: on normal USB car chargers, pins 2 and 3 are not connected). On pin 2, with reference to ground, it was 2.5 volts. On pin 3, with reference to ground, it was 1.8v. So I came up with the hypothesis that those reference voltages tell the iPhone to start charging.

To test this hypothesis, I removed the reference voltages and sure enough, the iPhone refused to charge. Even removing either one will result in the iPhone not charging. Interestingly, once the iPhone is charging (with the reference voltages applied), I can remove the reference voltages and the iPhone will still keep on charging. But, if I apply the charging voltage initially without the reference voltages, and then only after that I apply the reference voltages, the iPhone still will not charge. So I came to the conclusion that the iPhone will only charge if the reference voltages are present when the charging voltage is applied.

iphone_charger_circuit
Updated schematic! I way way prefer to draw on paper than use a schematic software to draw nice schematics.

Using the voltage divider setup above, you'll be able to get the 1.8v and the 2.5v reference voltages. The iPhone was only drawing about 10 microAmps or 0.01mA from the reference voltages so large resistor values are acceptable. By supplying these reference voltages to pins 2 and 3 of the USB connector, you should be able to fool your iPhone into thinking it is plugged into the wall charger and it should start charging immediately, in theory. I mean, how hard is it to trick something that has no brain?

Anyways, a disclaimer here. I have not built a charger using this method yet so I cannot guarantee that it will work. And although it is almost impossible to destroy your iPhone by using the circuit above, I hereby declare that I take no responsibility for whatever that happens to your iPhone. This is just a proof-of-concept that I came up with and will hopefully be trying it out very soon.

Update June 29, 2008: The iPhone charger works! DIY iPhone Charger. See also: DIY iPhone 3G Charger.