WattNWave
DIY projects › Power on the go and in power cuts

Build a mini UPS for your router

Keep the internet on when the power fails. Build a small DC UPS (a backup supply that takes over with no break): an old laptop charger keeps a lithium pack topped up, and a buck-boost board makes a steady 12 V for the router from the pack. Or build a USB-C trigger lead for a power bank.

9V
MediumSoldering2–3 hours
New to electronics? The words used on this page
Fuse
A small part that melts and cuts the power if too much current flows. It protects the wire from overheating.
BMS
Battery management system. A small board inside a lithium battery that stops it being over-charged, run flat or shorted.
LiFePO4
A safe, long-lasting kind of lithium battery. A 12 V one is 12.8 V and charges at 14.4 to 14.6 V.
18650
A common lithium cell, a bit bigger than an AA battery, 3.6 to 3.7 V.
Heat-shrink
A plastic tube that shrinks tight when heated. It covers and insulates a joint.
Multimeter
A hand-held meter that measures voltage. Use it to check before you connect anything.
Step-down (buck) board
A small board that lowers a voltage, for example 12 V down to 5 V.
Step-up (boost) board
A small board that raises a voltage, for example 3.7 V up to 5 V.
USB-C PD
Power Delivery: fast USB-C charging that can give up to 100 W for laptops.
In series
Batteries joined + to −, end to end. The voltages add up.

Which way is for you?

ADC UPS with a lithium pack

No break at all when the power fails. Runs for hours. Soldering · 2–3 hours

Laptop charger15–20 VCharging boardXL4015 CC/CV12.3 V · current limit23fuse4+−+−+−3-cell pack13S BMSBuck-boostset to 12.0 VIN+IN−OUT+OUT−55.5 × 2.1Router6+ positive− negative
Swipe sideways to see the whole drawing. The numbers on the drawing match the steps below.

You will need

  • 18650 cells and 3-cell holders3 in series; more groups for more hours (see calculator)
    View on Amazon
  • 3S protection board (BMS)Protects the pack
    View on Amazon
  • XL4015 charging board (CC/CV)Adjustable voltage and current: charges the pack and runs the router
    View on Amazon
  • Buck-boost boardMakes a steady 12 V from the pack's 9–12.3 V
    View on Amazon
  • Old laptop charger (15–20 V)Powers everything; the calculator gives the watts
    View on Amazon
  • DC lead with 5.5 × 2.1 mm plug and a fuseTo the router, and a fuse on the pack
    View on Amazon
  • MultimeterTo check voltages before you connect anything
    View on Amazon

Tools

Soldering iron, multimeter (with a 10 A setting), small screwdriver.

Step by step

  1. 1

    Build the 3-cell pack (more groups if the calculator says so) and fit the 3S BMS: B− to the pack −, B1 and B2 to the joins, B+ to the pack +.

    Check: all cells within 0.05 V before you start.

  2. 2

    Set the charging board before the pack is connected: power it from the laptop charger and turn the voltage (CV) screw until its output reads 12.3 V.

  3. 3

    Set its current limit: put the meter on 10 A across the output and turn the current (CC) screw to the value from the calculator.

    Check: remove the meter afterwards.

  4. 4

    Connect the charging board's output: + through the fuse to the pack +, − to the BMS P−.

  5. 5

    Connect the buck-boost board's input to the same pack + and P−. Set its output to 12.0 V with the meter, then wire it to the DC lead (centre +).

    Check: measure 12 V, centre positive, before plugging into the router.

  6. 6

    Plug in the laptop charger and the router. Test: unplug the laptop charger: the router must stay on.

Every connection, one by one

Tick each one as you make it. When every box is ticked, the wiring is complete.

DoneFromToWire
Pack −BMS B−Black
Joins between cellsBMS B1 and B2Thin balance wires
Pack +BMS B+Red
Laptop charger + / −Charging board IN+ / IN−Red / black
Charging board OUT+Fuse, then pack +Red
Charging board OUT−BMS P−Black
Pack +Buck-boost IN+Red
BMS P−Buck-boost IN−Black
Buck-boost OUT+ (12.0 V)DC lead centreRed
Buck-boost OUT−DC lead sleeveBlack

As an Amazon Associate I earn from qualifying purchases. Links open Amazon search results.

BUSB-C trigger lead for a power bank

Quick build: a trigger board asks a USB-C power bank for 12 V. You swap the plug in a power cut. Soldering · 15 minutes

Power bankUSB-C PDTrigger boardset to 12 V1centre +2Router12 V3+ positive− negative
Swipe sideways to see the whole drawing. The numbers on the drawing match the steps below.

You will need

  • USB-C PD trigger boardSmall board that asks the power bank for 9, 12, 15 or 20 V
    View on Amazon
  • DC lead with 5.5 × 2.1 mm plugTo the router
    View on Amazon
  • USB-C power bank with PDIts label must list 12 V
    View on Amazon
  • MultimeterTo check voltages before you connect anything
    View on Amazon

Tools

Soldering iron, multimeter.

Step by step

  1. 1

    Set the trigger board to 12 V (a button or solder bridges, depending on the board), plug it into the power bank and measure 12 V.

  2. 2

    Solder the DC lead: centre (+) to the board's +, sleeve (−) to −. Cover with heat-shrink.

    Check: measure again at the plug: 12 V, centre positive.

  3. 3

    In a power cut, unplug the router's adapter and plug in your lead.

Every connection, one by one

Tick each one as you make it. When every box is ticked, the wiring is complete.

DoneFromToWire
Trigger board +DC lead centreRed
Trigger board −DC lead sleeveBlack

As an Amazon Associate I earn from qualifying purchases. Links open Amazon search results.

Size your UPS

Pack size, charging current, adapter and boards for your router.

For example 12V ⎓ 1.5A.
Our suggestion
—

How this is calculated

Method
Typical router draw = adapter V × A × 60%. Energy needed = draw × hours ÷ 88% (output board) ÷ 90% (usable pack). Pack = 3 cells in series (3S) × enough in parallel for that energy and for the peak current at 9 V. Runtime = pack Wh × 90% × 88% ÷ typical draw.
Assumptions
18650 cells of 2,600 mAh at 3.6 V, so one 3S group stores 28.1 Wh. Routers average about 60% of their adapter rating. The pack is held at 12.3 V instead of 12.6 V to extend cell life. BMS rated 1.5 × the peak current.
Sources
Router and ONT adapter ratings; 18650 cell and 3S BMS datasheets; XL4015 and buck-boost board datasheets.

Stay safe

Stop at once if a cell or board smells, gets hot to the touch, swells, hisses or smokes. Unplug it, move it onto a non-flammable surface outdoors if you safely can, and keep away until it is cold.
  • Fuse the pack's positive wire.
  • Always measure the output voltage and polarity before connecting the router.
  • Keep the pack in a ventilated box away from heat.
  • Use a TP4056 board with protection (the version with the DW01 chip and two outputs, OUT+ and OUT−), or a proper BMS for packs.
  • Buy cells from a known brand and seller. Fake cells often hold a fraction of the label and can lack protection.
  • Do not leave lithium cells charging unattended, and charge them on a non-flammable surface.
  • Never use a swollen, dented or leaking cell. Recycle it.
  • While soldering or spot-welding, keep the cell ends covered so nothing can short them.
  • Low-voltage DC only. Never connect any part of these builds to mains power.

Questions people ask

Why 12.3 V and not 12.6 V?

Keeping lithium cells slightly below full (about 4.1 V each) makes them last many more years, and you still get most of the capacity.

Why is there no break when the power fails?

The router always runs from the pack side through the buck-boost board. When the mains fails, the charging board stops, and the pack simply carries on.

Can it also power the fibre box (ONT)?

Yes: add a second output board set to the ONT's voltage and size the pack for both.

Can I use LiFePO4 cells?

Yes, with a 4S BMS and the charging board set to about 13.6 V. They last longer and are safer.

Written and checked by Moataz FOUAD, telecom and electronics engineer. About this site.