This is a great way to power your battery powered device from an AC power source or from a DC / USB power source as I have in this project. The idea was to retro fit some dummy batteries into my portable speaker, so that I could use a 15000 mAh dual USB port power bank to power the speaker (and the mobile / cell phone) for longer duration's whilst out and about.
Just by chance, a friend was moving out and he had lost the AC power adapter for his iPhone / iPod docking station and he said that I could have it. Great! However, I quickly found out that it would only last for a few hours before the batteries needed changing again. I thought about it and decided to make some solder free dummy batteries to emulate the batteries. I wasn't sure at first if the 5V delivered over USB was enough so I did a quick test and it worked fine. 4 x 1.5 Volt batteries would be 6 V and not 5 V, so I measured the state of some old batteries that I used in the device before it failed and they fell to about 1.1 Volt each, giving you a combined 4.4 V. Seems its might run along the bottom line at times, but it sounds great, even at high volumes :)
Now I have wired it up to the USB battery and all the four LEDs on the USB battery are still active after 6 hours of music! Seems that the average, decent battery is about 1000 mAh, so this is the equivalent of 15, instead of 4 ;)
Works a treat. Hope this helps someone as it did for me.
3D Printed on a Ultimaker 3D Printer
Once printed, strip your connecting cables back about two small finger lengths and twist the ends. Feed the bare cable through the bottom hole and back through the top. Twist the cable to itself and use a cable tie to fasten the cable in place. If need be, drill a big enough hole for the cables in the cover of your device' battery compartment and also think about making two extra holes for a cable tie to fasten the cables in place to make sure they don't get yanked at any point.