Custom USB UPS

I made a USB UPS out of my old laptop battery cells.

I have an old laptop. A while ago the battery started failing and the laptop would just die rather than shutdown gracefully. I ordered a cheap replacement battery. This battery worked for a while, but eventually completely failed and would not hold any charge.

One day, (out of boredom I think) I pulled apart the batteries and extracted the cells from each. I measured each cell with a probe and found one cell from each collection was much lower than the rest. I’m guessing that these cells failed causing the whole battery to fail.

Buying junk off the internet I stumbled on some DIY-ish power banks for USB charging. You can buy a case with 1-8 cell capacity to make your own USB power bank supplying you own cells. As its just the case and charger circuit they only cost a few dollars. More searching found you can just buy the charger board.

As I had 14 cells I decided to design and 3d-print my own case and buy the charger board. Previous experience with power banks suggested that they don’t allow you to power something and charge at the same time. I figured I could get around this by using two charger circuits in parallel – one for supplying power, and one for charging.

The 3d model design took way longer than I planned, but I’m reasonably happy with it. The charger board has a button on it to turn it on. I designed a shaft to allow the button to be pushed when the case was assembled, but somehow neglected a hole for the shaft to poke through. The cells where a little cramped but managed to fit.

The plastic I used I haven’t touched for a while and I forgot how much it warps. As the top of the case was a box shape with long thin sections there was some deformation and splitting while it printed. To fix this the model would need to be changed, adding small splits periodically along the long sections, or perhaps alternating divots. This should contain warping to small sections that would impact less on the shape as a whole. Better plastic/printer will also likely help.

The charger board is available from:
The case is designed such that the 5mm led on each board is removed. I chose this board as it was cheap, had two USB outputs, and had an LCD display.


The battery is destined to be a UPS for my router which powered up after a couple attempts running from the battery. From rather empty, the battery took about three days to fully charge. At this point I unplugged the charger to test how long it would last.

0 — — — 100%
1 hour ---- 97%
6 hours — 83%
9 hours — 77%
12 hours - 72%
24 hours - 59
48 hours - 18%
60 hours - 15%

The router battery will easily last longer than the UPS on our nbn box (~24 last time I tested). It also seemed to slow down the rate of depletion in later hours.

The two boards report different charge amounts. The board initially used for charging slowly increased, but the other board did not. I then swapped and charged using the other board until they both read 100%. During the test the board used for power declined as expected, while the inactive board remained at 100%. I haven’t changed anything since testing it and the power board has continued to remain at 15% - where I ended the test, while the charging board reads 100% again.

I plan never to use both circuits for charging at the same time, but I am still uncertain about the safety of using two boards on the one set of batteries. Currently the battery is sitting in a metal pot in the garage just in case of fire.

The case is held together with 4 M3 x 10mm screws. The number of cells can be changed by editing RS18650.scad.

Model is available at:

Stl’s are available at:

1 Like

For completeness, you may want to measure the rate of discharge when no load is attached to the ups.
This is good to know if it is stored, unused, for a while.

Hi Ian,
FYI, the May Silicon chip features a DIY uninterruptible power supply system.

1 Like

There should be a copy of this issue at the space. However, that project is for a rather significant UPS, in terms of capabilities and cost. It is constructed by assembling standard commercial components in a case. Looks nice though.

1 Like

There was a power outage last night…

I’m happy to report this worked well.
We where happily able to sit in candle lit ambiance and while away the hours watching netflix on a battery powered tablet.

1 Like