Marcio Cunha

How to build a DIY mini UPS router with 18650 batteries

Learn how to engineer a 12V UPS circuit using lithium-ion cells and a TP5150 regulator module to keep your network router online during power outages.

Marcio Cunha•3 min
Also available in:PortuguêsEspañol
Summary
  • Lithium-ion 18650 cells provide high energy density and excellent cost-effectiveness for bench electronics projects.
  • The TP5150 regulator module manages battery charging and circuit power supply in an integrated, safe manner.
  • Home routers typically operate on 12 volts, requiring proper voltage matching to prevent unexpected reboots.
  • Oscilloscope and multimeter measurements ensure output line stability and eliminate electrical noise.
  • System autonomy depends directly on the total milliamp-hour capacity of the parallel cells used.

Why build a DIY mini UPS for your network router

Sudden power cuts often drop your internet connection right when you need it most. In practice, this means your router loses its fiber or ADSL sync, forcing long minutes of rebooting until the ISP reestablishes the connection. Developing an uninterruptible power supply, commonly known as a UPS, solves this problem using accessible bench electronics components.

Before getting your hands dirty, remember that the stability of any power circuit relies on precise measurements, something we also cover when discussing how to test an integrated circuit on board with an oscilloscope to spot hidden faults. For our router, the main goal is to deliver a continuous 12-volt supply without noticeable interruptions when the wall outlet stops providing electricity.

Choosing 18650 batteries and fundamental concepts

Lithium-ion cells in the 18650 format—named after their 18mm diameter and 65mm length—are the champions of portable projects and backup power systems. They store a significant amount of charge in a compact space, far outperforming older nickel-cadmium batteries. In practice, each cell operates nominally around 3.7 volts, reaching 4.2 volts when fully charged.

To power a 12V router, we need to wire three of these cells in series to sum their voltages, reaching a range between 9V and 12.6V. This arrangement requires careful charge balancing, as unevenly discharged cells can overheat. If you notice instability after assembly, it is worth checking associated regulation components, much like the process we follow when we test the AMS1117 voltage regulator with a meter to ensure no stage delivers sub-par voltage.

Understanding the role of the TP5150 regulator circuit

The core of our DIY UPS is the TP5150 module, designed specifically to manage lithium battery charging and ensure a smooth transition between grid power and stored cell energy. Simply put, it acts as an intelligent switch: while wall power is present, it powers the router and recharges the batteries simultaneously. As soon as a blackout occurs, the circuit instantly switches the load to the cells without the router noticing any drop.

Beyond managing current flow, the TP5150 protects the array against overloads and deep discharges, the main culprits behind lithium battery degradation. To ensure the system does not draw more power than necessary, you can check general energy behavior using practical methods, such as those described in our guide on how to measure real power consumption, adapting those principles to low-voltage bench setups.

Step-by-step guide to assembling the 12V circuit

Assembly requires precise soldering, adequately gauged wires to prevent voltage drops from resistance, and a secure battery holder. The basic procedure below guides the safe integration of the main blocks.

  1. Secure the three 18650 cells in a proper holder, ensuring the series connections are tight and insulated with kapton tape.
  2. Connect the positive and negative battery terminals to the corresponding input pads on the TP5150 management module.
  3. Solder the 12V output wires from the regulator circuit directly to the P4 barrel connector compatible with your internet router's power jack.
  4. Plug the input power supply (usually 12V to 15V) into the charging module to begin cell recharging.
  5. Use a digital multimeter to measure the voltage at the output terminals before plugging in the router, confirming it remains stable at 12 volts.

Final thoughts on safety and system autonomy

Building your own network backup system is an immensely rewarding project that boosts your home infrastructure resilience against unexpected blackouts. However, lithium batteries demand respect for basic safety rules: never use damaged cells, prevent short circuits, and keep the assembly in a well-ventilated enclosure. Monitoring thermal behavior during the first hours of use ensures the system operates reliably for years.