DIY Mini UPS for WiFi Router / Modem

124,590

612

73

Introduction: DIY Mini UPS for WiFi Router / Modem

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 …

In my locality, frequent load shading is a very common problem during the summer evening. I am really tired of this problem. I always wanted to have a mini UPS system which can power up my WiFi-Router/Modem for internet purposes and also charge my Smartphone. After some brainstorming and by using my past DIY experience, I have landed to this simple Mini UPS design . The best thing of this UPS is that it uses minimal components and it can easily fit inside my jeans pocket during the traveling.

It is capable of powering either a standard wireless router (that requires 12V DC), a Raspberry Pi/ Arduino, charging a smartphone or any 5V DC-powered device at up to 1A current.

You can visit my website : https://www.opengreenenergy.com/

My Hackaday Prize 2019 entry

Step 1: Components and Tools Required

Components Required :

1. TP4056 Charger ( Amazon / Banggood )

2. Boost Converter ( Amazon / Banggood )

3. USB Boost Converter ( Amazon / Banggood )

4. LEDs ( Amazon / Banggood )

5. DC Jack- Female ( Amazon / Banggood )

6. DC Jack-Male ( Amazon / Banggood )

7. Rocker Switch ( Amazon / Banggood )

8. 18650 Battery ( Banggood )

9. 18650 Battery Holder ( Amazon / Banggood )

10. 24 AWG Wires ( Amazon / Banggood )

11. Heat Shrink Tube ( Amazon / Banggood )

12. PLA Filament-Silver (GearBest)

13. PLA Filament-Red (GearBest)

Tools Used :

1.Soldering Iron ( Amazon )

2. Hot Glue Gun ( Amazon )

3. Wire Cutter ( Amazon )

4. Wire Stripper ( Amazon )

5. PCB Vise ( Amazon )

6. 3D Printer ( Amazon / Banggood )

7. Hot Air Gun ( Amazon / Banggood )

Step 2: How the Circuit Work?

The working of the circuit is very simple, in normal condition, power from the mains is drawn by a USB charger to charge the 18650 battery 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.

In the schematic diagram, the 18650 battery is connected to a TP4056 charging module. The output of the TP4056 module is connected to the two boost converter modules: one to power the Router (12V) and another to USB Socket (5V) for smartphone charging. The output voltage of the boost converter (SX1308 module ) can be set by twisting the trimpot on the PCB board. In my case, I have set it to 12V. If your router is running at 9V, then set it to 9V. The output from the boost converter (SX1308) is connected to the external 5.5mm DC jack via an SPST switch.

Disclaimer:

Please note that you are working on 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 on rechargeable lithium ion technology.Please do not attempt this if you are novice. Stay Safe.

Step 3: Selecting the Battery

First, check the specs of your router/modem, you can get all the information on the specification sticker.

My router input power is 12V and 0.5 A. So, the power requirement for the router is 12 x 0.5 = 6W

I was considered a backup time for 30 minutes. So Watt Hour Required is = 6 x 0.5 = 3Wh

The 18650 Battery nominal voltage is 3.7V

Required Capacity = 3 Wh / 3.7V = 0.810Ah = 810mAh

The same battery also used for charging my smartphone. Let I need to charge my phone up to 35-40% for emergency use only. My Smartphone (One Plus 6) battery is rated for 3300mAh.

The final capacity required is = 810 + 3300 x0.4 = 2130 mAh

By taking the losses in the converter into consideration, I have chosen a 3400mAh Panasonic battery for this mini UPS.

Step 4: Remove the Onboard Status LEDs

The charging status of the 18650 battery is indicated by two LEDs on the TP4056 module. My objective is that the led should be visible to the outside of the enclosure. So I desoldered the onboard LEDs and soldered two 5mm LEDs ( Red and Green ).

Take fine tip soldering iron, and carefully remove the LEDs from the board by taking the help of tweezers.

I have highlighted it in the pictures shown above.

Note: Be careful during the desoldering, otherwise you will damage the soldering pads on the PCB.

Step 5: Solder the Charging Status LEDs

I used 5mm red and green LEDs to indicate the charging status of the battery.

First I trim the legs of the LEDs as shown in the figure. The longer leg designated as the positive terminal.

Then solder 24AWG hookup wires to the LED legs. For solid connection and protection to the soldering joint, apply heat shrink tube on it.

At last, solder the LED terminal wires to the soldering pads of the onboard LEDs on the TP4056 module. The pads which are towards the TP4056 chip is negative terminals.

Step 6: Connect the 18650 Battery Holder

First, apply a small amount of solder to the B+ and B- soldering pads on the TP4056 module.

Then solder the red wire of the battery holder to the B+ and black wire to the B- terminal of the TP4056 module.

Step 7: Connect the Boost Converters

Similar to the previous step, apply a small amount of solder to the Out+ and Out- terminal of TP4056 module.

Then solder the wire from the Boost converters to the TP4056 Module as shown in the schematic.

SX1308 Module:

VIN+ connects to Out+

GND connects to Out-

USB Boost Converter:

VIN+ connects to Out+

VIN- connects to Out-

You can see the above image for better understanding.

Step 8: Prepare the DC Jack and Switch

Solder wires to the terminal of the SPST switch and DC Jack.

The smaller leg of the DC jack is the positive terminal.

At this stage don't connect the DC jack and switch to the Boost Converter module, it will be done after installing them into the 3D printed enclosure.

Step 9: 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 10: 3D Printed Enclosure

To give a nice commercial product look, I designed an enclosure for this project. I used Autodesk Fusion 360 to design the enclosure.

The enclosure has two parts:

1. Main Body

2. Cover Lid

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

I used my Creality CR-10S printer and 1.75 mm Grey and Red PLA filaments to print the parts. It took me about 5 hours to print the main body and around 1 hour 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 11: Installing the Components

Insert the components ( TP4056, Boost Converters, LEDs, Rocker Switch, and DC Jack) on the Main Body slots as shown in the picture.

At last, insert the 18650 battery inside the battery holder. Make sure you have to insert with the right polarity. The polarity is marked in the battery holder.

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

Step 12: Testing and Conclusion

Plug in the UPS to standard micro USB mobile charger (5v/1A). During the charging process, the red LED will be ON and when the charge finished it will be turned off and the green LED will be switched ON.

Now connect the Mini-UPS the to router by using the adapter cable prepared in the earlier step. The router LEDs should lit up.

To test the USB port, I plugged in my smartphone, and checked the charging process by using Ampere app.

Thanks for reading my Instructable.
If you like my project, don't forget to share it. Comments and feedback are always welcome.

This project is entered in to Pocket-Sized Contest, please vote for me.

Pocket Sized Contest

Runner Up in the
Pocket Sized Contest

Be the First to Share

    Recommendations

    • Mason Jar Speed Challenge

      Mason Jar Speed Challenge
    • Bikes Challenge

      Bikes Challenge
    • Remix Contest

      Remix Contest

    73 Discussions

    0
    HaydnC3
    HaydnC3

    Question 25 days ago

    Hi, thanks for the project, it looks awesome, my router needs 1.5a at 12v do any of these modules need to change? would this have enough juice to do that? what are the part numbers of the new modules i'd need please?

    0
    wesley14
    wesley14

    3 months ago

    I tried to power power my router using the boost module and using 1 18650 battery but it wont work. it will turn on but not initialize the internet(not enough blinking leds)

    0
    normcdn
    normcdn

    8 months ago

    Great! I am working on roughly the same project. My modem and router uses about 1.2 Amp.
    My main concern is when you use a Lithium battery, voltage drops, so eventually you will not be able to provide a steady 12 volts. What will happen to my router and modem when voltage drop under 12 volts. Can it damage them ? Should I install some kind of device to cut-off power under 12 volts ? thanks

    0
    SalmanZaheer
    SalmanZaheer

    Reply 4 months ago

    Sir I need your help I made 12v ups for my router but my router can't run properly ,it showed power light but starts blinking .without connecting ups ,connects with the Adapter it's stable and run properly
    My router specifications are
    Huawei 12v 1A
    THANKS

    0
    baluvinoth
    baluvinoth

    Reply 3 months ago

    I also have the same problem, I have Huawei 12V 2A router.
    Let me know if you are able to fix this issue

    0
    Daijoubu
    Daijoubu

    Tip 1 year ago

    I would use a bi-color LED, common anode, either leave the 10k SMD resistor on the grounds or use a resistor on the positive and wire the 2 cathodes to the TP4056. Ideally this thing should take 12V input and 12V output, a switching charging IC may be better in that case (eg TP5000)

    0
    saadland
    saadland

    Reply 7 months ago

    agreed and 2 anode wires are inutile, TP4056 got a comman anode supply for the 2 smd led, so only 1 common anode was anough. and of course as the said bi-color led are the best. but when buying/ ordering, the type with comman anode should be selected!

    0
    saadland
    saadland

    7 months ago on Step 5

    Great and very usefull device!
    You could use only 1 positive wire for the leds, seens the TP4056 have a common anode for the leds indicator (charging and Charge full). so then 2 negative wires...
    I do it all the time, and it works fine ;)

    0
    AAndy
    AAndy

    8 months ago

    will the kit ever be instock again? 300 beans is a fine price... thanks..

    2
    vazquezjm
    vazquezjm

    1 year ago

    Hi! Congrats on your project. I'm working on something very similar but instead of a router, I want to power up my Raspberry Pi.

    What I've done is what you can see in the images attached. I'm using a P-Channel MOSFET to switch from mains to bat. Currently it is not working because of the transistor (I need to find the appropriate part #).

    Reading your project description I noticed you do not use that kind of switching, you're powering the DC boost module from TP4056 directly. Would't that affect the way the battery is charged? I'm asking this because the module will be charging the battery while powering the Raspberry (or router in your case).

    Thanks!

    ups2.pngups1.png
    0
    ayavilevich
    ayavilevich

    Reply 8 months ago

    Vaz, you are right. It is not good to discharge the battery when the input power is available. There are special ICs/modules that can charge AND power an output using the input. For a ready to use solution see Adafruit PowerBoost 1000 module or make your own by using a MCP73871 chip/module. The feature of the charger is called "load-sharing".

    0
    rosekreuze
    rosekreuze

    Reply 1 year ago

    the concept of the ups is to make the battery always available during power failures. im working also on a similar project for a digital atomic clock which always hooked to outlet which draws 12v 1amp. so a 3s 1p bms setup would be enough. as for charging, the bms protect the batteries from over charging hence cutting the current supplied to the batteries.

    0
    vazquezjm
    vazquezjm

    Reply 1 year ago

    So when the battery is charged, the TP4056 won't charge it anymore?

    0
    rosekreuze
    rosekreuze

    Reply 1 year ago

    it supposed to but my build drains the battery overnight while still plugged to a wall charger. it lights red so it means its still charging. if i add a diode from a charger line right before the battery and the load the charger doesn't recognize the current voltage of the batteries thus the charger lights a green light which means full.

    but mine is a 3s setup. my tv is only pulling 0.3amps while on standby. so overnight it wasnt supposed to drain my batt while plugged to a power source which has a float voltage of 12.6v. anyway this thread just give me an idea and applied it to my 12v setup

    6
    frarugi87
    frarugi87

    Question 1 year ago

    I think you are out-of-spec for both a router battery and, definitely, for a UPS.
    The specification for your items are:
    - Battery: 3.7V, 4.8A current max
    - 12V step up: max 2A
    - Lithium battery charger: 1A

    If you want to use the 12V output only, the router you have has a 12V 1A input. This means that the current required from the battery is 12V*1A/3.7V = 3.2A. The battery can sustain that, but I'm not sure about the boost (the maximum output current of 2A is probably at very low voltages, not at 3x the input voltage). Probably the 1A current for the router is the absolute maximum one, but some more calculations are needed. For sure you can't charge your mobile while the router is powered...

    Regarding the UPS usage, so using it while it is plugged in, the charger output of 1A will never be able to sustain the 3.2A current required. For this reason, you can't use it as a usual UPS.

    5
    RicksterInstructables
    RicksterInstructables

    Answer 1 year ago

    Agreed. After a power outage that drains the battery (hopefully the device does it’s job and gets you through the blackout), when power comes back the charger will be putting out 1A - probably at a lower voltage than 3.7v. But your boost regulators are drawing more than an amp. Which means... you’re going to continue to discharge the battery.

    In fact, starting out with a full battery, it will discharge during use, even if charger is plugged in.

    (for me, it’s easier to convert everything to watts, then you don’t have to keep putting voltages into your calculations.).

    in this case, you’re charger is putting in 5W.
    your router (if it really draws an amp at 12v) is drawing 12W.

    As Frarugi87 points out, the math just doesn’t work for using it as UPS.

    The router would need to draw less than about 0.25A for the math to work.

    it will make a very nice power bank, though.

    0
    Daijoubu
    Daijoubu

    Reply 1 year ago

    Usually the given limit for a boost converter is the input, so a 2A DC-DC converter like you said would be able to do 3.7V nominal * 2A * 0.7 (assuming 70% efficiency) / 12V = 0.43A, I would do a 4S configuration (14.8V nom) and use a buck converter with usually higher efficiency. Personally, I have a bunch of power tools batteries with 5S and 5S2P laying around, I'm going to convert an old charger into an UPS instead :) Router/modems nowadays needs 2.5A+ because of higher power ARM SoC, dual band radios and are power hogs.

    0
    nic.bryan.73
    nic.bryan.73

    Reply 8 months ago

    Either that or a 3S (11.1 nominal) with a regulator to keep it at 12V.

    Actually, that idea to use a tool-battery for it isn't a bad idea. Add in a secondary set of wires and a circuit in the charger so it can act as a charger with throughput while plugged in, but discharges from the attached battery when the power goes out. (Especially if it's an older charger that does 1A/18.5V output, because that takes too long to charge a battery you're USING regularly, but you can stick a 4A battery on it and leave it there, and pull it off if you need an emergency tool battery, but still keep the UPS charged up.

    0
    GTO3x2
    GTO3x2

    1 year ago

    A bit off-topic, but I've been wanting a mini UPS that is enough to sustain 120V/60Hz power (maybe 10 watts) for up to 10 seconds. I keep a VCR in use, and occasional power blips clears the time setting.

    1
    opengreenenergy
    opengreenenergy

    Reply 1 year ago

    I will try to make one if possible in future.
    Thanks for putting this point.