Hack a Female USB Port to a Motorola Phone Charger
Step 2Solder on Female USB port
There will be just enough wire left to solder the jack on. The positive wire (the one with some kind of grey pattern on it) goes to USB pin 1. The negitive wire goes to USB pin 4. After you are done soldering, place the circuit boad in the half of the case with the prongs, plug it in (carefully!), and test with a multimeter to make sure everything works.
I had the same situation but came up with a different solution: instead of cracking open the charger I carefully cut open the existing cable and spliced in a cable with a USB socket at the end (obtained by "emasculating" a USB extension cord, ie cutting off the male end), soldering red to red, black to black as you'd expect, and also connecting both data lines to red via separate 22k pull-up resistors, as in http://www.ladyada.net/make/mintyboost/make.html All solder joints were insulated with heatshrink tubing, and I encased everything in fatter heatshrink tubing after tying the separate bits of cable together with zip ties for strain relief.
So now the cable splits into two plugs: the original phone charger and the USB socket. The nice this about this is I only need to carry one charger for two devices. I haven't been brave enough to try charging both my phone and MP3 player at the same time (not enough current? or phone may not like it?) but it works fine on separate devices.
I had the same situation but came up with a different solution: instead of cracking open the charger I carefully cut open the existing cable and spliced in a cable with a USB socket at the end (obtained by "emasculating" a USB extension cord, ie cutting off the male end), soldering red to red, black to black as you'd expect, and also connecting both data lines to red via separate 22k pull-up resistors, as in http://www.ladyada.net/make/mintyboost/make.html All solder joints were insulated with heatshrink tubing, and I encased everything in fatter heatshrink tubing after tying the separate bits of cable together with zip ties for strain relief.
So now the cable splits into two plugs: the original phone charger and the USB socket. The nice this about this is I only need to carry one charger for two devices. I haven't been brave enough to try charging both my phone and MP3 player at the same time (not enough current? or phone may not like it?) but it works fine on separate devices.