As I wanted to do timelapses with my Canon Ixus 220 HS (also known as Powershot ELPH 300 HS) using the great CHDK, I realized that the standard battery only lasts for 2.5 hours.
While searching the internet, I found that there is an existing solution by Canon with the major downside that it costs about 90â‚¬.
So I fired up openscad and came up with this battery dummy for the NB-4L battery. Using a female servo connector and some desoldering wick for the contacts, you are able to power your camera with an external power supply.
I supply a voltage of 4.0V which is generated using a cheap LM2596S step-down converter (search LM2596S on ebay). You could use a LM317 linear regulator or anything else that generates the required voltage and up to 2A.
You can easily adapt this thing to your own needs using the openscad file.
Slice the stl-file with your favourite slicing program.
Split the gcode into two parts, so that you can insert the parts during printing.
1) Print the first part
2) Insert the desoldering wick and the connector
3) Continue printing the second part