DIY Mini UPS for WiFi Router / Modem

62,680

423

54

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

Supplies:

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

Share

    Recommendations

    • Gardening Contest

      Gardening Contest
    • Party Challenge

      Party Challenge
    • Classroom Science Contest

      Classroom Science Contest

    54 Discussions

    0
    None
    Daijoubu

    Tip 4 days 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)

    3
    None

    Nice project!

    a couple quick comments. The charger may not put out enough juice to charge the battery and power the router. Could be a problem after a power outage. If the battery is really low, it will put out less than 3.7v while it’s charging, slowly going to 4.2v where it should shut off.
    the charger probably charges at a constant current until you get to 4v.
    problem is, during charging your router is pulling current from the charger and so is the battery. I don’t know what your router draws or how much current the charger can put out.

    over discharging a lithium ion cell will ruin it. It looks like your charger may have discharge protection (two + and two - pads) and you wired it correctly. But you should make sure and perhaps mention this issue in your instructable.
    or you could use a “protected” 18650. They have a tiny circuit under the false negative contact. It prevents over charging, over discharging, and short circuit/over current protection. The circuit is cool. Pull the wrapper off a dead protected battery. There is a thin strip of metal acting as a wire from the positive pole of the battery, down to the circuit.
    the negative metal circle can be pulled off the actual battery minus and reveal the tiny circuitry.

    not a bad idea to pay a little extra and get protected cells.

    Your switch is in the output which is good.
    have you measured how much current flows out of the battery when the thing is just sitting there, not connected to anything?
    if it’s significant, you might consider a second switch in the red wire from the battery.
    (one of the LEDs is on? The two boost converters are on, even though they’re not connected to anything. It’s called quiescent current. What something draws when it’s not actually doing what it’s supposed to do).

    in your stated use, you don’t need it.
    but you mention traveling and your pants..
    itd be a shame to get where you’re going and have a dead power bank.

    if I could teach you how to twist wires together your cable would look nicer.
    twisting wires is exactly like how they twist three small “ropes” together to make a larger rope.
    trick. Solder one end to the connector. Do not solder the other yet!
    twist the wires tightly together. While you do this, the individual wires will want to “spin” the other way - you have to let them in order for it to work. That’s why you didn’t solder the second connector yet.

    your case looks like you may get be able to fit a second 18650 (wired in parallel) for double the fun.

    1 reply

    An UPS would need a proper load sharing/power path, just need a schottky diode+mosfet to disconnect the cell when power is present/applied.

    0
    None
    GTO3x2

    6 weeks 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.

    5 replies
    0
    None
    DaijoubuGTO3x2

    Reply 4 days ago

    I would try to open up the VCR to identify the time keeping component and only power that instead, just like radio clocks that keep times using a single coin cell battery for the RTC chip.

    1
    None
    Open Green EnergyGTO3x2

    Reply 6 weeks ago

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

    Amazon now carry’s a line of small UPS.
    from the comments, they don hold much energy.
    but they’d keep the clock going on you VCR (what’s a VCR:)
    what’s a vcr without a blinking clock?

    i doubt the inexpensive amazon ones I reference could power a 3D printer for very long.
    in the comments, people have wildly different opinions of how long a pc will last on each model. Most of them have no clue. They do not know the difference between Volts, Amps, Watts and most importantly Amp Hours and Watt Hours.
    (they make strange, but authoritative, estimates based on the VA rating of the device. Which has no relationship to the capacity of the battery). That’s where the Amp Hours (Ah) of the battery are multiplied by the voltage of the battery (probably 3.2V or 12V) to get Watt Hours. Then you determine how many watts you’re drawing (amps to router times volts to router is watts to router - and voila. Watt Hours (available) divided by watts (being consumed)... drumroll... is Hours.
    of course the regulators are probably 80% or so efficient so you should derate for that.

    (if you’re confused by my math, remember that Amp Hour Ah is not Amps per hour (which would be A/h) it’s more like Amps for hours. 4Ah means you can draw 4A for an hour. Or 1A for four hours etc.)

    https://www.amazon.com/gp/product/B073Q48Z95

    1
    None
    ArdutronicoGTO3x2

    Reply 6 weeks ago

    Yep, that could also be used for 3D printers. Fortunately power outages are rare in my location but if one happens during a long 3D print...

    0
    None
    GTO3x2Ardutronico

    Reply 6 weeks ago

    I would think a commercial UPS is justified there - higher power consumption.

    5
    None
    frarugi87

    Question 6 weeks 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.

    2 answers
    3
    None
    RicksterInstructablesfrarugi87

    Answer 6 weeks 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.

    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
    None
    huyyy1

    4 days ago

    wow can't wait to start this project

    0
    None
    suvatn

    5 weeks ago

    Very simple project in a very very good explanation, I love it.

    1 reply
    1
    None
    eggu

    6 weeks ago

    Does this also help to filter "not clean" electricity from the wall? So does it all go through the battery or only when the input power is cut out?

    2 replies
    0
    None
    excessneteggu

    Reply 6 weeks ago

    Yes and no.

    The device only do DC-DC, so unclean power from the wall will go into the AC/DC power supply BEFORE this device. Since it have been regulated in DC before entering the UPS, it will "clean" the bad wave from the AC...

    But, typically, device using DC have the exact same setup as this, but without any battery in case of "lost of power".

    When we are talking about UPS "cleaning" noise from AC, it's because those UPS are doing AC to DC, then DC to AC, doing a full sin wave. In this case, there's no return to AC.

    0
    None
    oyekaexcessnet

    Reply 6 weeks ago

    OK. I want to power my Laptop for at least 24hours during outages now what modifications do I need?