I built this up this morning, it was a great way to break in my new cordless Dremel. My Sansa e200 series MP3 player only charges via USB, so I made a standalone charger with a female USB jack. It’s just an old 5-volt cell phone charger, but I replaced the cord with a jack from a USB extender cable. A little epoxy and electrical tape, and voila!
Naturally, the red and black wires on the USB connector go to the +5 and 0-volt connections in the wall wart. I spent some time trying to figure out when needed to be done with the white and green data wires. Some people online said they needed to be held at some intermediate voltage, but didn’t really know why. I found some specification for standalone USB chargers that said to short the two data wires together, so that’s what I wound up doing. I have a feeling it doesn’t really matter, but that worked for me.
I was hoping I’d be able to use this with my Motorola phone as well, since its charger has a USB-b connector, but I didn’t realize that the USB-b plug has a fifth “ID” pin so that all the manufacturers can pick a different resistance, rendering all the different brands of chargers incompatible. I think I could still use my device, but I’d also need to modify a USB cable, and seeing how my current charger works just fine I’ll hold off on that for now.