|
|
| You are currently reading a post on tzywen.com. Click here to go to the homepage for more stories!
|
How to Charge an iPhone
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.
 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.
 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.
 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.
Posted on Monday, May 19 @ 22:42:22 MYT (26215 reads) by tzywen |
| |
About Me |
 With 21 years of real life experience, this is where I put them to good use. Here, I post up snippets of my life, interesting things that I do, current projects, outings and events and sometimes something very random.
Currently with MAS studying for my aircraft maintenance license, I'm passionate about my job (or technically my future job), computers, gadgets, electronics, cool stuff, cars, technology, and the environment. I love sports, traveling and enjoying nature. I unwind by sleeping.
Check back here often. I update at least 7 times a week.
Email:

MSN:

|
|
Article Rating |
Average Score: 5 Votes: 6

|
|
Options |
|
|
| "How to Charge an iPhone" | 28 comments | Search Discussion |
|
Post Comment | | The comments are owned by the poster. We aren't responsible for their content. |
|
| | Thankyou! I will build one of these into my solar power project... Good man!! Posted by: Howard on Monday, July 21 @ 10:41:50 MYT |
|
| | Nice article. The question, however, that begs to be asked: WHY did Apple make it this way? Posted by: Arthur on Monday, July 28 @ 21:35:30 MYT |
|
| Arthur: Thanks. To answer your question, it's mainly for effeciency purposes. I have some explanations in the comments section of the "DIY iPhone Charger" post. You can get to that page by clicking on the link at the end of the above post.
Basically the chip that apple uses will make charging the battery more efficient. The concept that i present here will put the chip into "wall adapter" charging mode which will instruct the chip to start draw power from the usb source and charge the battery.Posted by: tzywen (http://tzywen.com) on Tuesday, July 29 @ 00:50:26 MYT |
|
| Thank! Too much trouble, I bought a car charger on ebay for $9.00 and it work great...Posted by: Steven (http://houstonuptownlofts.com) on Monday, August 04 @ 11:43:16 MYT |
|
| Thaks for the great information, I got out the multimeter and started to measure voltages when I though about Googling it and I found your blog.
Thanks for doing this it saved me having to, now to modify my chargers.... were did I put those resistors....Posted by: Phil (http://gadjetsblog.blogspot.com/) on Sunday, August 17 @ 03:19:15 MYT |
|
| Hey there,
Very interesting page. I have tried to do this as well, and found that two resistors (the same value), generating about 2.5v, would work fine with 2.1 firmware. However, this did not work with previous versions. I wonder if Apple has relaxed the restrictions in newer firmwares...
My page http://thecave.homeunix.org/ipod.jsp has details of what I have found so far.
BTW, what theme are you using for your iPhone battery? I assume it is a Winterboard theme? I would like to get that one for my iPod touch as well...
CheersPosted by: Wyatt (http://thecave.homeunix.org/ipod.jsp) on Tuesday, September 23 @ 00:58:44 MYT |
|
| Wyatt: interesting. I would assume it has nothing to do with the firmware because the charging is handled by a dedicated chip. look at my iphone 3g charger page for more information.
I'm using Aqwoah Battery. It can be found under tweaks in installer.Posted by: tzywen (http://tzywen.com) on Tuesday, September 23 @ 17:55:38 MYT |
|
| Brilliant! Thanks a lot! :-) Is it possible to use voltages up to 30v with your solution, like you could with the older iPods (like 5G Video)? My dockingstation in the car uses the two firewire-pins with 12 to 15 volts from the car's battery.Posted by: Nico on Tuesday, January 06 @ 03:39:26 MYT |
|
| Nico: you'll need to have a 5v regulator to regulate the voltage to 5v. Don't use anything more than 5v and you should be fine.Posted by: tzywen (http://tzywen.com) on Tuesday, January 06 @ 21:19:25 MYT |
|
| Hello All,
if you want to create 2V for the (D-) and 3V for the D+ from a single 5V source, why not use just 3 standard resistors in series and get te voltages, like:
5v----------39k------(D+)--------18k------(D-)--------39k---------0V ^ ^ ^ ^ | | | | 5V D+ D- 0V
Do you think this works as well?
greetings felix29Posted by: felix29 on Friday, February 20 @ 20:29:00 MYT |
|
| | can't someone fix this with a little app? on the palm this was possible to charge through usb with a special program. (wasn't designed to be charged on a usb port). That would be a great program for cydia or the installer which are otherwise useless meanwhile. Posted by: maze on Monday, March 30 @ 00:51:53 MYT |
|
| maze: I'm afraid this is more of a hardware issue that cannot be fixed with an app.Posted by: tzywen (http://tzywen.com) on Monday, March 30 @ 07:49:36 MYT |
|
| Hi Tzywen, I have a question for you :) How can you charge an iPhone battery out of the phone? I'm a little confused as there are 4 terminals on the battery. Any idea which ones to attach the power source to? Thanks! :)Posted by: Callum on Saturday, April 25 @ 13:43:38 MYT |
|
| Callum: It's dangerous to charge the lithum battery unless you know how. You'll need a proper circuit to regulate the current and voltage. Overcharging can cause the battery to explode so be careful!
there are some resources here: http://www.batteryuniversity.com/partone-12.htmPosted by: tzywen (http://tzywen.com) on Saturday, April 25 @ 17:03:51 MYT |
|
| Thanks for the link and the quick reply!! I have done lots of reading (and watching of lipo batteries exploding) and have come to the conclusion that I don't know much about LiPo batteries... :p Although, I have come up with an idea, what do you think...? :p
Using an old LiPo camera battery charger, just hook it up to the iphone battery... Obviously the v is the same, and this charger is for a battery of the same mAh. With this set up I would lose the thermister connection and thus lose a safety feature of charging, but if need be I can just manually turn the charge off once the battery reaches 4.2v (or 4.1v to be on the safe side...)
I am still a little confused as to what the 4 terminals on the battery are for... #1 + #2 maybe ident or temp? #3 pretty certain its Temp #4 -
Any ideas? No one online seems to know...
Thanks again! CallumPosted by: Callum on Monday, April 27 @ 19:43:26 MYT |
|
| Callum: I'm not sure if the extra connections on the battery are for the thermister. On some multi-cell batteries, they are just voltage tappings from the individual cells. Obviously with just 3.7v, there's only one cell in the battery.
Using an old camera battery charger is a safe way to charge a lithum battery provided the battery chemistry is the same. But still, take safety precautions as you probably now know the dangers of lithum batteries.Posted by: tzywen (http://tzywen.com) on Wednesday, April 29 @ 00:23:49 MYT |
|
| Hey thanks for the great "discovery." I'm making a solar powered iPhone charger and I'm trying to figure out a way to make all of this work... Would I have to use resisters to maintain 5V, 2.5V, and 1.8V? Since my power source does not maintain a constant voltage, I was thinking a voltage regulator may be a better solution, but I know next to nothing about them. Any advice besides spend some more of my time researching?Posted by: Question (http://www.tzywen.com) on Saturday, June 13 @ 03:03:49 MYT |
|
| Question: if you want to make a solar charger, you'll need to have a battery to provide a constant voltage. The solar cell will be used to charge the battery. This is a better way because I doubt the solar cells will be able to supply enough current to charge the iphone.
So you setup will be a solar cell connected to a battery connected to a regulator (if required) and finally to your iPhone with the resistors for the reference voltages.Posted by: tzywen (http://tzywen.com) on Saturday, June 13 @ 11:12:37 MYT |
|
| | Can I use a PS2 to charge my iphone? Posted by: Gizmo on Wednesday, July 01 @ 05:35:16 MYT |
|
| Gizmo: if you can tap a 5v source out from it, yes.Posted by: tzywen (http://tzywen.com) on Thursday, July 02 @ 17:10:23 MYT |
|
| | Do you know why the iPhone 3GS can sync but will not charge when using a 30cm USB extension cord? I've verified that the USB extension cord has 4 wires and the 4 pins are correct. Posted by: Boon on Wednesday, January 27 @ 04:42:37 MYT |
|
| Boon: are you using an active extension cord? or just a normal straight thru one? how fast is the sync speed? normal?
honestly I have not tried my iPhone with an extension cord. However, I have tried using extensions in the past and I get slower speeds and some devices even refuse to connect. I don't really know the reason why, but it may have something to do with interference
Can anyone using extensions help us out here?Posted by: tzywen (http://tzywen.com) on Thursday, January 28 @ 00:04:11 MYT |
|
| I was using a normal extension cord.
I had gone thru several USB extension cords in my shelves, and found one old one which is 100cm long and at least 4 years old, and it worked! The one that didn't work was new & shorter (30cm). Didn't notice any sync speed difference for both cords.
My initial thoughts was that the wires in the extension cord could have caused voltage variations and that iPhone could be sensitive about it.Posted by: Boon on Friday, January 29 @ 06:26:11 MYT |
|
| | I think the answer is simpler. The two data lines only need to be shorted to each other and not connected to any voltage. I tried this with my Droid (which has the same problem as the Iphone) and it works. This seems to be part of the USB specification (from http://pinouts.ru/Slots/USB_pinout.shtml [pinouts.ru]): "A simple USB charger should short the 2 data lines together. The device will then not attempt to transmit or receive data, but can draw up to 1.8A, if the supply can provide it." I connected my Droid to a 5V power source using a USB cord that I had opened up, cut the two data lines (white and green) and shorted them to each other on the Droid side. It charged perfectly. Posted by: David on Friday, January 29 @ 22:00:46 MYT |
|
| David: I think shorting the 2 data lines together does not work all the time. I tried doing that for a wall charger which output 5V and 500mA. My my iPhone 3GS still refuse to charge, even though my other Windows Mobile device can still be charged.
I might try the resistors method and see if that works.
Posted by: Boon on Sunday, January 31 @ 15:54:41 MYT |
|
| | yo bro what kind of battery theme is that? Posted by: chin on Tuesday, February 02 @ 10:28:14 MYT |
|
| David: I think the shorting of pins only works for certain devices.
Boon: Try the resistor method and please let us know your results. Thanks
chin: I'm using Aqwoah Battery. It can be found under tweaks in installer.Posted by: Tzy Wen (http://tzywen.com) on Thursday, February 04 @ 22:39:10 MYT |
|
| | Tried the 3 resistor but didn't work. Moving my updates to your other post "DIY iPhone Charger" at http://tzywen.com/modules.php?name=News&file=article&sid=683 Posted by: Boon on Friday, February 05 @ 11:18:50 MYT |
|
|