I originally made this for my old Palms. With a few resistors it works for the iPhone.
Simple design. A DB-9 hood with the ears cut off as the case, the ubiquitous 7805 as the regulator and a 9volt battery connector. (I used one from an old battery, its stiffer then the ones you would buy at Da Shack) Granted the 7805 is far from efficient, but it works and keeps the whole thing small and easy to build.
7805 5 volt positive regulator
100K SMT resistor (2 pieces) Size 2012
20K SMT resistor (1 piece. I didn't have a 20K but used a 10K) Size 2012
USB female connector (I gutted a device to get mine)
9 volt battery connector (I got mine from an old battery, worked best for me, plus its less in the landfill)
DB 9 hood plastic for easier modifications
Wire, solder, heat shrink, potting compound (optional)
Rat tail file
Dremel (though I used a milling machine, a bit overkill)
Soldering iron (hot air SMT with paste works best, but I didn't dig up that stuff for such a small project)
On with the show!
The USB connector:
Pre solder the pins for soldering the SMT resistors. I did it far from the end as not to unsolder it when soldering on the wires later. I also snapped off the PCB mounting lugs
The order as seen left to right.
100K 20K and 100K
(remember I used a 10K, but I suggest keeping with the 20K)
Once done, you should test it. With a DMM on ohms, test between pins 1 & 4 and it should be 220K +/- the cumulative tolerance of the 3 resistors. If not, then something is amiss. Wrong resistors or bad solder joint.
I used a rat tail file.
Just a note. Its copper (thuogh some might be aluminum) so it will clog the file quickly, have a file card handy to clean the file.
Also trim out the cable end of the hood to fit the USB connector. A file or heated ex-acto blade works well. Dremel can work too, just need to square up the corners afterwards.
Dremel will work well for cutting off the ears too.
Go slowly with each and keep testing for best fit. A little 'grab' from the hood helps to keep things in place if not using potting compound.
Trim down pins 1 & 2 of the 7805 and bend back pin 3.
Pin 1 is the 9 volts into the 7805
Pin 2 is the negitive (common or 0 volt or ground take your pick of nomenclature)
Pin 3 is the 5VDC out
Now add the heat shrink tubing to the wires and solder up to the USB connector
USB pin 1 = 5DVC
USB pin 4 = GND
Shrink the tubing over the USB connections and pin 3 of the 7805
Stuff the guts into the hood and close up.
At this point you can fill the cavity with potting compound.
(If using JB weld, epoxy or other makeshift potting compounds test to make sure it doesn't conduct electricity when its dry/cured!! )