DIY Mini UPS for WiFi Router V2.0




Introduction: DIY Mini UPS for WiFi Router V2.0

About: I am a DIY hobbyist by passion and Power Engineer by profession. Most of my works are related to Solar Energy and Arduino. Apart from Electronics I love 3D printing, Woodworking and to make crafts from used …

The pandemic COVID-19 outbreak forced companies to continue with work-from-home policy to maintain social distancing and for business continuity. More and more of us are working from home these days, and that means your home's WiFi networks are more important than ever.

Anyone with a fixed-line connection will know that their WiFi drops whenever the power goes out. It is annoying if you are in an important meeting/webinar through the Zoom, WebEx, or MS-Team, and there is an interruption due to power-cuts.

◆ Follow me on Instagram @ opengreenenergy

◆ You can visit my website:

To keep your internet uninterrupted during power-failures you have the following solutions

Solutions :

1. Using a conventional UPS ( Bulky and Costly )

2. Mini-UPS ( Light and Cheap )

I have already posted an Instructables on DIY Mini UPS, but there are some issues that were reported by the users. In this Instructable, I will guide you on how to make a powerful UPS for your Router.


1. Light Weight ( 200 grams )

2. Output: 12V / 2A

3. Back up time up to 2 Hours

4. Uses 2 x 3400 mAh 18650 Battery

5. Battery Voltage Display

6. 3D Printed Enclosure

Full Video Tutorial:


Components Required :

1. TP4056 Charger ( Amazon / Banggood )

2. Boost Converter ( Amazon / Banggood )

3. 2S BMS ( Amazon/ Banggood )

4. LEDs ( Amazon )

5. DC Jack- Female ( Amazon / Banggood )

6. DC Jack-Male ( Amazon / Banggood )

7. Rocker Switch 15*21mm ( Amazon )

8. 18650 Battery ( Banggood )

9. Diode 1N5822 ( Amazon / Banggood )

10. 20 AWG Wires ( Amazon / Banggood )

11. Heat Shrink Tube ( Amazon / Banggood)

12. Volt Meter: ( Amazon / Banggood)

13. Electrical tape ( Amazon / Banggood )

14.Duoble-sided Tape: ( Amazon / Banggood )

Tools Used :

1.Soldering Iron ( Amazon / Banggood)

2. Hot Glue Gun ( Amazon / Banggood)

3. Wire Cutter ( Amazon / Banggood )

4. Wire Stripper ( Amazon /Banggood )

5. 3D Printer ( Amazon / Banggood )

6. Hot Air Gun ( Amazon / Banggood )

7. Nitecore Charger ( Banggood )

Step 1: How It Works?

The working of the circuit is very simple, in normal condition, power from the mains is drawn by a 12V DC adapter to charge the 2x 18650 batteries and to provide power to the router. When the mains power fails, the stored energy in the battery is used to power up the router. The voltmeter display is used to display the battery voltage level. The two diodes 1N5822 are used to block the reverse current flow.

In the schematic diagram, the two18650 batteries are connected in series and then they are connected to a 2S BMS board for protection during the charging and discharging.

The positive terminal input DC jack is connected to the positive terminal of the output DC jack through a Schottky diode ( 1N5822 ).

The 12V input power from the DC adapter is connected to the input terminal of the TP5100 module through a 5.5mm DC Jack. The output terminal of the TP5100 charging module is connected to the battery pack.

The battery positive terminal is connected to boost converter LM2587 IN+ terminal through a rocker switch and the negative terminal is directly connected to boost converter IN- terminal.

The boost converter LM2587 Out+ terminal is connected to the positive terminal of the output DC Jack through a Schottky diode ( 1N5822 ) and the Out- terminal is connected directly to the negative terminal of the DC jack.

The voltmeter positive terminal is connected to boost converter IN+ and the negative terminal is connected to IN-.

Disclaimer: Please note that you are working on a Li-Ion battery which is potentially very hazardous. I cannot be held responsible for any loss of property, damage, or loss of life if it comes to that. This tutorial is written for those who have ample knowledge of rechargeable lithium-ion technology. Please do not attempt this if you are a novice. Stay Safe.

Step 2: Prepare the 18650 Battery

First, charge the two 18650 batteries by using a good charger. Here I am using a NITECORE charger.

Clean the terminal of the 18650 battery by using a clean cloth, if required you can use fine sandpaper.

Apply a small amount of soldering flux in all the four terminals.

Then make a series connection between the two batteries. Keep two battery side by side, one battery positive terminal shall face towards the negative terminal of another battery. You can see the above picture for your reference. Then Join them together by using 3M double-sided tape.

Step 3: Connect the BMS Board

Solder a thick wire ( 20 AWG ) in the midpoint of the two battery ( junction of the positive and negative terminal )

Solder a black wire to the negative terminal of the first battery and red wire to the positive terminal of the second battery.

Before soldering the wires to the BMS board, tin all the soldering pads for the good soldering joint.

The red wire from the middle point of the battery pack is connected to the BMS MB terminal.

The red wire is connected to BMS B+ and the black wire is connected to B-.

At last, connect a red wire to the BMS P+ terminal and black wire to the BMS P- terminal. These two terminals will be used for charging or discharging the battery pack.

Step 4: Insulate the Battery Pack

It is essential to protect the battery pack from metal on metal contact, which is very important for your safety.

The best way to wrap the battery pack is by using the PVC Heat Shrink Wrap.

Cut the heat shrink wrap to the size of your battery (remember to leave a little extra on the ends as you want it to wrap around the corners). Then apply heat over the surface by using a hot air gun until the wrap is tightly fitted around the battery.

I have used Electrical tape to wrap the battery pack because of the unavailability of heat shrink wrap.

After wrapping the battery pack, check the terminal voltage by using a multimeter. If the battery is in a fully charged condition, then the voltage must be above 8V.

Step 5: Prepare the TP5100 to Charge 2S Battery Pack

The TP5100 is a charging management module suitable for charging a single/double lithium battery (4.2V / 8.4V).

The default setting of the board is suitable for charging a single cell ( 4.2V ) lithium battery. To set it for double cell ( 8.4V) charging, you have to short the soldering pad named as " SET ".

Apply a small amount of solder to your soldering iron tip and then short the two soldering pad.

Step 6: Prepare the Charging Status LEDs

The TP5100 charging module has one onboard bi-color LED ( red and blue ) to indicate the charging status. But the objective is that the led should be visible to the outside of the enclosure. We are fortunate that the module also has some pads for connecting an external bi-color LED (common anode) next to the input. You can use a common anode bi-color LED or use two LEDs ( Red and Green)

I have used two 3mm LED instead of a common anode bi-color LED.

First, bend the two anodes of LED at the right angle as shown in the above picture. Then trim the legs as per the desired length and solder them together.

Solder a red wire to the red LED cathode, green wire to the green LED cathode, and a yellow wire to the common anode. I have used 24AWG hookup wires to the LED legs. For solid connections and protection to the soldering joints, apply a heat-shrink tube.

At last, solder the terminal wires to the 3 soldering pads of charging module TP5100.

Step 7: Prepare the DC Jacks

The DC jacks are used for supplying power to the UPS ( 12V input ) from a DC adapter and delivering power to the Router ( 12V Output ).

Clean the terminals of the DC Jacks and then apply a small amount of soldering flux to them. The main purpose of the flux is to prepare the metal surfaces for soldering by cleaning and removing any oxides and impurities. Oxides are formed when metal is exposed to air and may prevent the formation of good solder joints.

Before soldering the terminal wires, tin them by applying a small amount of solder.

Solder a red wire to the positive terminal and black wire to the negative terminal of the DC Jack.

Apply heat-shrink tubing to insulate the exposed soldering joints.

Step 8: Prepare the Schottky Diode

In this project, we will use two Schottky diodes to prevent reverse current flow. You can also use general-purpose diodes but the main reason for using the Schottky diode is that they have a lower forward voltage drop then the general purpose diode.

The negative terminal of the diode is indicated by a silver ring on it.

Trim the two legs of the diode by using a nipper and then solder two pieces of wire to them.

Then apply heat-shrink tubing to the terminal joints as shown in the above picture.

The datasheet of the 1N5822 diode is attached below for your reference.

Step 9: Prepare the Rocker Switch

The switch is used between the battery pack and the boost converter input terminal.

Soldering wires to the rocker switch is normally very difficult because the solder does not stick easily to the metal terminals. To avoid this, apply a small amount of soldering flux before soldering the terminal wires.

Tin the terminals of the rocker switch as well as the wires to be solder by applying a small amount of solder.

Always use heat-shrink tubing at the exposed conductive parts.

Step 10: Prepare the Voltmeter

The voltmeter display that I have used in this project has 3 wires. The red and black wire is given to power the meter and the third wire ( yellow ) is given for measuring the voltage allowing for a greater range of measurement.

In our case, we will measure the battery pack voltage only, so there is no need to use the third wire. You can short the soldering pads of the red and yellow wire together.

Then check it by connecting the display to a 18650 battery.

Note: You can buy a two-wire voltmeter instead of three-wire for this project.

Step 11: Prepare the DC Output Jack

Now you have to prepare the adapter to connect the UPS output to the router input. First, check the specification of your router to confirm the size of the jack ( Sleeve size ) and the tip polarity. Your router will have a small diagram indicating the polarity expected by it; care should be taken to adhere to this, as an improper power supply may damage the device.

In my case, the size of the jack is 5.5mm and the tip polarity is positive. According to the size, order two male DC Jack. Then solder red wire to the tip (smaller one ) and black wire to the sleeve.

Step 12: Enclosure Designing

To give a nice commercial product look, I designed an enclosure for this project. I used Autodesk Fusion 360 to design the enclosure. The dimensions of all the components are measured by a vernier caliper then the same were considered during the design.

The enclosure has two parts:

1. Main Body

2. Cover Lid

The Main Body is basically designed to fit all the components including the battery. The Cover lid is to cover up the main body opening.

Step 13: 3D Printed Enclosure

I have used my Creality CR-10S printer and 1.75 mm Grey and Red PLA filaments to print the parts. It took me about 3 hours to print the main body and around 1.5 hours to print the top lid.

My settings are:

Print Speed: 60 mm/s

Layer Height: 0.2mm ( 0.3 also works well)

Fill Density: 25%

Extruder Temperature: 200 deg C

Bed Temp: 60 deg C

Download the STL files from Thingiverse

Step 14: Using Heat Set Inserts

Threaded brass inserts can be a great way to add longevity to our 3D printed enclosures because we will 4 screws at the 4 corners to secure the top lid. Threaded inserts are commonly brass with a pre-formed thread within them.

Allow your soldering iron to heat for 3-5 minutes before installing inserts. This will ensure that you have to use the least amount of force to install inserts. The tip of the iron heats up the brass and softens the plastic. Pressing down pushes the insert into the part and once it cools down, it’s locked in place.

Step 15: Connect the Input DC Jack to TP5100

Mount the 5.5mm female DC jack to the 3d printed enclosure slot.

Then solder the terminal wires of the DC jack to the input terminal of the TP5100 as shown above. The red wire is positive and the black wire is negative.

Step 16: Install the Components

Install the DC Jacks, Rocker Switch, and Voltmeter display unit to the slot provided in the 3D printed enclosure.

Apply hot glue to mount the charging status LEDs and Voltmeter.

Similarly mount the TP5100 charging board, battery pack, and the LM2587 boost converter by using hot glue.

Note: Mount the charging board, battery pack, and the boost converter only after completion of all the connections as per the schematic.

Step 17: Make the Circuit

Solder one diode positive terminal to the positive terminal of the TP5100 and the negative terminal to the positive terminal of the Output DC Jack. Similarly the second diode positive terminal to the boost converter Out+ terminal and negative terminal to the DC jack positive terminal. To avoid any damages to connecting two thick wires to the DC jack terminal, I made a junction point ( covered by yellow heat-shrink tubing ).

TP5100 positive terminal is connected to the positive terminal of the battery pack and one terminal of the rocker switch. And the negative terminal is connected to the boost converter IN- and battery pack negative terminal. The other end of the rocker switch is connected to the boost converter IN+.

Voltmeter display positive is connected to boost converter IN+ and the negative terminal is connected to the IN-.

I will recommend to take a printout of the attached schematic diagram and make the circuit as per it. Before connecting the input DC adapter, double-check all the connections.

Note: Red and black wire in the schematic represent positive and negative respectively.

Step 18: Set the Boost Converter Output

After connecting the wires to the Input and output screw terminal of the Boost Converter, you have to set the output voltage.

Place your multimeter prove at the output terminal and adjust the trim pot until you get 12V.

Step 19: Close the Top Lid

Finally, place the top lid and secure the 4 screws at the corners.

I have used 3M x 8mm screws to secure the lid. the counter sinkholes in the enclosure fit perfectly to the screw heads. I used the Allen key to tighten the screws.

Never overtighten the screws, otherwise, the enclosure may cracks or breaks.

Step 20: Final Testing

The last step is to test the UPS, plug in the 12V adapter jack to the input jack. Now you will notice the red will glow, it indicates the battery is charging. You can always check the exact battery voltage from the voltmeter display at the output side.

Once the battery is fully charged, plug in the DC jack cable prepared in the earlier step into the female jack at the output. The other end of the cable will connect to the Router power input port.

Turn the switch ON, the router status LED starts to glow and after a few minutes, your router is ready for providing the internet service. At this stage, you can unplug the input DC adapter, you will notice the router is still working flawlessly. You can check the backup time in this condition. I have checked with my router ( 12V / 1.5A ), the backup time is more than 2 Hrs.

1000th Contest

Runner Up in the
1000th Contest

2 People Made This Project!


  • Unusual Uses Contest

    Unusual Uses Contest
  • Retro Tech Challenge

    Retro Tech Challenge
  • Micro:bit Contest

    Micro:bit Contest



Question 3 months ago

Can I use a solar panel instead for the power input of this UPS? How long does the UPS last if the power outage is for a long time? Thanks.


4 months ago

Hi! I am about to build this ups, one question, is it necessary to have a switch, meaning can I leave it always connected or it would sum up the voltages?


Question 5 months ago

Hi. I have a 3s BMS. Can I still use a TP5100 module to charge the batteries? Great tutorial BTW!!


Question 9 months ago

For my setup, I need 5v @ 3a, 12v @ 1a, 12v @ 0.75a. Can I simply put a 5v buck converter parallel with the LM2587 and parallel 2 jacks for 12v? I'm concerned about the required charge/pass thru current on the TP4056 (TP5100?)?


Question 10 months ago

I am excited to build this! I do not have a 3d printer though and this seems like the best excuse to jump in as i've been wanting one. Could you give me the finished product dimensions so I know the minimum size 3d printer to get? Thank you and keep up the fantastic work!


Answer 10 months ago

Its 120x90x27mm
Dependent on what sort of 3d printer you're after, a simple cheap one (< £100) might not be able to print this as they tend to have small (eg 90x90x120mm) beds.
The Ender 3 Pro, which I have, has a print bed 235x235x250mm and is relatively cheap around £150-£200


11 months ago

I ordered 15x10 rocker switches and they are far too small for the hole? Are they supposed to be 21x15?


Reply 11 months ago

Can confirm, 21x15s are the correct size


Reply 11 months ago

You are correct. I am extreamly sorry.


11 months ago

Can this be upgraded to 4 or 6 amps?


11 months ago

Beautiful Instructable. Very well presented. Clear and concise. I learned some things too. The threaded brass inserts were a revelation to me. So may possible applications! I will make a UPS sooner than later. Thank you for posting.


Reply 11 months ago

Glad my Instructables help you to learn something new.


11 months ago

This instructable is a masterpiece, clear, well done, easy to understand. thank you.


Reply 11 months ago

Glad you like my Instructables. Thank You.


11 months ago

I'm more familiar with lead acid charging techniques, so forgive my question if it's obvious, but....
To work as an actual UPS, the switch needs to be turned on. With the switch turned on, the boost converter will draw some current - even if it's output voltage is set lower than the pass through voltage and not getting pass the diode - so how does the charge controller correctly determine the state of charge of the Li-Ion's? If I understand correctly, when charge current drops to a certain level the charge controller stops charging the batteries. But since some current is going to the boost converter as well, the charge controller will just think the battery still needs more charge, right?


Reply 11 months ago

Upon further reflection, I've attached a mark-up of your circuit which I think properly isolates the battery to ensure it charges properly. I've added an extra normal diode (another might be required) to ensure the incoming 12 volts is dropped sufficiently for proper boost module operation (most require a minimum differential be maintained), and another in the battery to boost connection.
Another option in case you want to maintain the efficiency of the 12 volt pass-through is to configure a transistor/MOSFET to disconnect the battery to boost connection when 12 volt (ie external power) is available/sensed. I haven't looked into this yet though, but would require a switching operation fast enough to ensure no power is lost on the output, even for a few milliseconds.

Annotation on 2020-10-26 at 04-28-08.png

Reply 11 months ago

THank you for your feedback.


Reply 11 months ago

Otherwise, this is a great instructable, and thanks for taking the time to post it.


11 months ago

I plan to make something in kind.
In my opinion better is to connect yellow wire from voltmeter to 12volt Output. This makes more safely for over discharge li ion accumulators.


Reply 11 months ago

Thank you for your suggestion.