I discovered an easy hack to force an iPhone 3G[S] to charge on a regular USB-charger with just one resistor.
To force charging you have to force high the levels of the data pins 2 (D-) and 3 (D+) (white and green wires) by connecting a resistor of about 20 kΩ (or 68 kΩ as I used) between the data pins on the USB cable. This resistor would act as a pull-up resistor. You don’t need to connect this resistor to VCC (+5 VDC) since the iPhone outputs +2.84 VDC on the data pins when it is connected to a power source. This is enough to force the levels of the data pins high. To do this hack, I recommend using an USB extension cord, instead of ruining an iPhone USB-cable, since you of course wouldn’t be able to use this as an regular USB-cable afterwards.
Remember to leave the data wires going to the male USB-connector end (the one you plug in to your power source) unconnected, you might seal the ends with insulating tape or glue. This way you could use this cable to be able to charge an iPhone on a computer that is in standby-mode or a computer that supports the sleep-and-charge USB feature, which would let you charge your devices even when the computer is turned off.
This hack would probably work on other iPhone models too, the iPod Touch, Classic, Shuffle & Nano models, and the iPad. It might even work on other devices needing a signal on the data pins to be able to charge.
Links to interesting articles about iPhone charging, where I found out how easy it was to force an iPhone into charging mode:
Apple iPod, iPad and iPhone dock Connector Pinout – AllPinouts has some information about force charging using two 10k resistors connecting D+ and D- to VCC
USB – Universal Serial Bus Connector Pinout – AllPinouts also mentions that one could use 10k resistor to force charge USB devices.
Modify a generic USB car charger to charge a 3rd gen iPod Nano – Instructables Instructables article about modifying a car charger to be able to charge an iPod Nano. Also use two resistors.
How to Charge an iPhone – tzywen.com Mentions how to force charge an iPhone, and shows a proof-of-concept charging circuit schematics.
DIY iPhone Charger – tzywen.com A DIY iPhone charger using 4 resistors, made from the proof-of-concept shown above.
DIY iPhone 3G Charger – tzywen.com another DIY iPhone charger using 4 resistors. Also mentions why an iPhone needs a pull-up-resistor to be able to charge.
I take absolutely no responsibility for what might happen to your iPhone, your charger or even yourself using the method mentioned above. You do this solely at your own risk.
DIY – Force an iPhone to charge on a regular USB-charger by Håvar I. Henriksen is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.