The USB Battery allows you to charge a USB enabled portable device using a 9V battery. This can be useful if your device has a built in rechargable battery which cannot be swapped out, and it's not convenient to charge it at a power point.
Inspired by the USB Battery design from Hack A Day, I made my own design to charge my Palm Tungsten E. Notable changes include the use of a switching voltage regulator, and a output voltage indicator LED.
Nearly all my components are bought through Farnell-Newark InOne. Within Singapore delivery is fast, and free for purchases above SGD$30.
78SR105VC
Fully integrated switching voltage regulator from Texas Instruments / Power Trends. By far the most expensive component (~US$18). This components convert the 9V input from the battery, into the 5V output needed by the USB device. It can accept inputs ranging from 7V to 30V, and deliver up to 1A.
There are other cheaper alternatives (search the national website), but they tend to be much larger or requires external components. If you want to keep it really cheap and simple, use a 7805 linear voltage regulator instead (under US$1). It's smaller and much cheaper, but less efficient and can get pretty hot during operation.
1A Schottky diode
This is connected on the input to protect the voltage regulator from reverse current. It won't tolerate a very high reverse voltage, but with a low voltage drop it should allow slightly more power to be squeezed out of your battery.
1uF multilayer ceramic capacitor
I put one each on the input and output of the regulator to reduce the noise. Not sure if I really need it, especially on the input, but it's cheap and small so why not?
4V Blue LED and 2V Zener diode
This is the tricky bit. As the current required by the LED is pretty low, you can connect these two across the 5V output and still get enough current to light the LED. Voltage drop is around 1.7V across the zener, and 3.3V across the LED. When the battery gets flat, the voltage output will start to drop, and the LED will shut off around 4.5V on the output, letting you know it's time to change a battery.
If you are just using a resistor and an LED, this will not work. The output voltage will have to drop much more before the LED turns off. Your equipment will likely stop drawing current well before that, greatly slowing the rate of voltage drop. It'll probably be hours from the time your equipment stop charging to the time the LED turns off.
Connectors
In addition to the above, you'll also need some means to connect your battery and your USB device. The 9V battery connector is pretty easy to find, but the USB connector can be a little problematic. You can use the method in the Hack A Day site, or you can do what I did; Buy a USB cable with the connector and cut it. It doesn't really matter much how you do it, just make sure it's connected right (refer to the Hack A Day website for more details on this).