I have seen may nice products that plug into the dock port and uses the iphone power as a flash. The only problem i see with this is that you have to carry another device with you. You might as well just carry a flashlight round all the time.
I fix iphones for a living, and i know how much room is inside of a 3g or a 3gs. (this hack would be almost impossible with a 4 or a 4s considering how little free space there is.
I will show you how to add three low profile leds to the back of your iphone 3g or 3gs and have it powered by the internal battery.
Step 1: Tools and Parts Needed
parts and supplies:
--3 low profile leds from radio shack part # 276-0024 they are $2.49 each
--a micro switch, since i do iphone repairs, i used an extra mute switch i had from a previous repair. I would recommend you buy one of these since they use a thin ribbon cable that will make the hack turn out better. just search ebay for "3gs replacement headphone jack". This will cost you $2.81
--Very thin wire. i found some at radio shack for 5 bucks part # 278-502
--paperclip that you can heat-up to melt a hole. (you will also need it to remove the sim from your phone)
(optional tools that help)
--helping hand (the thing with the magnifying glass and clips)
--Apple "black stick" used to open iphone
--miltimeter to test direction of led and battery
Step 2: Open the Iphone
First remove the logic board and speaker
then the battery
Step 3: Install the LEDs
i think the location i used would be the best because it won't block anything when you are putting it back together.
After you have your holes made and all the LEDs fit, you must now connect them.
each led has four pins. by look in closely you can see how the two pins on each side are connected internally. the leds are designed to run between 3.5v and 4.0v. the iphone battery is 3.7 volts so this means we can light all the LEDs without any resistors by running them all in parallel which means all the negative connections will be connected together and all the positive connections will be connected.
if you don't know which sides are negative and positive, you can use the diode test on your multimeter. If you are not using a multimeter, don't worry, we can determine this later
Next, you want to fold all the pins over on the inside. make sure that the negative pins are only folded over on the negatives and same for the positives.
if you lined up the LEDs exactly as I did then yours should look like the 3rd picture.
Step 4: Soldering
use the thin wire to solder all the like polarity pins of the LEDs together. make sure to leave extra wire. then put some electrical tape over it to prevent from shorting anything.
next we have to do some soldering with the micro switch.
I used the micro switch of an iphone mute button. The switch is very very small yet is able to handle the current of the leds. It also uses a thin ribbon cable which makes it perfect for our hack.
all you need to do is cut the switch off from the rest of the headphone jack ribbon cable
make sure you cut BEFORE the two resistors on the cable (they look like tiny black squares)
the reason for this is that it is the only place you will be able to successfully solder your wires to.
there is a tiny glob of glue on top of the resistors. carefully peal this off so you can solder to it. then you want to use your "helping hand" to solder the wires to the resistors.
Step 5: Lets Put It Together
Step 6: Wire It Up and Put Back Together
you can use a multimeter to see which side of the batter is positive and which is negative as well as with the LEDs.
you can simply touch the leads that you soldered to the LEDs to the two outside pins on the battery. if they don't light up, then switch the wires around and they should light up.
if they don't, or you see a spark, or the leds are very dim: google search "series vs parallel"
Now that you have your polarities figured out, lets connect everything. connect one side of the LEDs to the corresponding side of the battery. Next, connect one of the wires from the switch to the other side of the leds. connect the other wire of the switch to the correct pin on the iphone battery.
if this does not make sense, google search "simple circuits"
the outside pins of the battery are where you want to connect to. solder the wires on correctly.
you can now put the iphone back together.
I then used some super glue to keep the switch in place. careful when you do this, because if any gets into the switch, it will not function.
Step 7: Finished
i am thinking about replacing the leds with one of these