book collections email follower instructable user
Picture of DIY Mini UPS for WiFi Router / Modem
IMG_6687 (2).jpg
IMG_6680.jpg

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

Picture of Components  and Tools Required
tp4056.jpg
IMG_6550.jpg
IMG_6546.jpg
IMG_6541.jpg
IMG_6512.jpg

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 )

geofflee8 days ago
Really nice job!
Open Green Energy (author)  geofflee7 days ago
Thank You.
suvatn9 days ago
Very simple project in a very very good explanation, I love it.
Open Green Energy (author)  suvatn9 days ago
Thank You.
eggu16 days 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?
excessnet eggu16 days 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.
oyeka excessnet15 days ago
OK. I want to power my Laptop for at least 24hours during outages now what modifications do I need?
See my post above. I guessed the laptop draws 2A. If I’m wrong, adjust my numbers accordingly.

With my assumed 2A, you need one hundred 18650 cells.
you also need a boost regulator that can handle 10A in and 2A out.

If I was trying to do what you want to do, I’d definitely go with deep cycle car batteries.
I think a large car battery is something like 100Ah. At 12V, that’s 1200Wh.
We “only” need 864Wh, so one large car battery could do the job.
smaller car batteries are more like 40Ah, so you’d need three.

get a battery (sears)
get a trickle charger (harbor freight)
get your boost regulator - which now only has to handle about 3A in (eBay)
some connectors...

a lot lot cheaper and easier than 100 18650’s.
and perhaps safer (100 18650’s multiplies that risk of a LiIon cell doing something nasty by 100).

Or you could just buy a commercial UPS that is rated at 1000Wh.
Hmmm. After some googling to see how expensive that would be, I see that UPS vendors rate them by Watts and/or VA - which is how big a load it can handle.
it gives you no indication of time.
excessnet oyeka15 days ago
You will have to change pretty much everything. A laptop with need about 70 to 120W at 16-20VDC, depending on a model (that's about 4A).

So you will have to change pretty much everything to handle and provide 5A and higher DC voltage at bare minimum. Then, you will have to hook a pretty big battery that will last atleast 20 hours (cause the laptop will last 4 hours on itself I guess?).

It's not an easy project.
oyeka15 days ago
Good job there.
Please, I want to power my Laptop for at least 24hours during outages now what modifications do I need?
Remember, Laptops have only AC adapters.
That depends on the power consumption of your laptop. For example, if the laptop battery lasts 8 hours and it's 72 Wh, then you need a 72 * 24/8 = 216 Wh battery (pack), plus losses, say 250-300 Wh. That's quite a big (and expensive) one, but you can buy/make one, with the same voltage as your laptop. You also need to set your boost converter to your laptop's voltage, and you're done.
Nice idea of an easy way to determine Watts of laptop without having to measure Amps. How long does the known quantity battery lasts... I like it.

of course if laptop battery is not fully charged when power goes out, the laptop will consume (significantly?) more than the approximately 8W in your example because we need to power the laptop and charge the battery.

of course in this scenario, the laptop was plugged in all the time, so the battery would be fully charged. But if it’s not... I guess you need to determine how long it takes to fully charge to determine the watts going into the battery while charging and add that to the number you determined for the laptop.
garzo oyeka15 days ago
Laptops don't have AC socket, they have AC-DC "power brick" therefore you'll only need a big DC power bank. You definitely can't use a TP4056 (or several ones), no matter of how much capacity can be provided by your cells (connected in parallel), you'll have no more than 5W (1.2A) at the TP4056 output. At first glance you'll need at least a "big" buck converter and a boost converter, a BMS (with cell balance feature) a couple of mosfets and several cells. That's not something that should be handled by everyone, lithium cells are not a joke.
A buck and boost converter?
Couldn’t you wire them all in parallel and eliminate the BMS/cell balancing?
(just run the whole thing at 3.7V like his design now).

calculate the watts of the laptop. Volts (18?) times the current (which you’ll have to measure because it’s less than what the power brick says it’s capable).
lets say your laptop draws 2A at 18V. That’s 36W.
24 Hours... 864Wh.

as an aside, 36W load on the boost converter backs out to an input of 36W (if life were 100% efficient. Your boost is probably more like 80%)
so we need 36 watts into the boost. That’s at 3.7V (assuming you put all the batteries in parallel to avoid cell balancing issues) . 36W at 3.7V is, of course 10A.
keep that in mind when choosing your wire etc.

a single 18650 cell is usually around 2000mAh I’ve found that any that claim more than 2000 are totally lying and are probably less (much less) than they say.
2000mAh at 3.7V is 7.4Wh Oh, wait. We need 864Wh.

crap. That’s over one hundred 18650 cells!

(some things might be easier if you put them in series/parallel, some things will be harder. But in either case, the Watts and Watt Hours are the same).

Note:
Volt - unit of potential
Amp - unit of “flow”
Watt - unit of power (volts times Amps)
Watt hour - unit of energy. ( volts times amp Hours)
Amp hour - is just confusing by itself because without knowing the voltage, it kinda is meaningless.

thats why converting everything to watts makes life easier.
you do t have to carry all the voltages through your calculations.
Buy more batteries for it Buy a generator.
frarugi8714 days 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.
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.
GTO3x216 days 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.
Open Green Energy (author)  GTO3x215 days 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
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...
I would think a commercial UPS is justified there - higher power consumption.
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.
raven-191115 days ago
would it not be possible to add a second jack plugged to mains power to charge the mini-ups and when the power goes out the router will stay up for 30 minutes until the battery drops specific voltage cutoff. and will start recharging as soon as the power comes back on.
Open Green Energy (author)  raven-191114 days ago
No need to add a second jack.
You can plug in a 1A Mobile charger to the micro USB port and power it up from the mains.
garzo16 days ago
It's a nice idea with a clean explanation, unluckily the TP4056 can't (or, at least, shouldn't) be used this way.
It's not meant to sustain at the same time battery charge and power output. The issue is the terminating current feedback, which won't be triggered in any case, and this could lend to a li-ion overcharge (with all the potential troubles that we know).
You could use a protected cell, so you don't have to rely on the TP4056 safety circuit, but this isn't optimal because you aren't fully expoiting the TP4056 and the protected cells are more expensive.
Also, the maximum output current on a standard TP4056 is 1.2A, so you'll have a power output in the 3-5W range depending on the battery charge level. It shouldn't withstand the power requirements of the router or a fast charging phone, especially if you consider also the DC-DC converter efficiency.
In the end it "could" work, i can consider this solution for something not critical in the garden, but i wouldn't use it in my house in case flammable materials are near.



Yep, to fix that you can add a microUSB socket (you can buy microUSB to pin header adapters), and wire it to the TP4056 and the boost converter in parallel.
Assuming that you're using a TP4056 with the DW01A safety chip onboard, how does this react to 5V applied at its output? Shouldn't it assumes that's the cell is overvolted and blocks any charge attempt?
Open Green Energy (author)  garzo15 days ago
Hi
thank you so much for reading my Instructables.
I really appreciate your valuable suggestion and safety alert.
JadinA215 days ago
Great job my friend, I have an idea, you could easily fit this build inside the router itself.
GTO3x216 days ago
Looks great, but lithium ion battery charging alarms me.
Open Green Energy (author)  GTO3x215 days ago
Thank You.
You are right special care must be taken when working with li ion battery.
BerenV16 days ago
Nice project. I might have thrown in a diode (to prevent backfeed) between the boost converter and the output DC jack. That way, if someone decides to plug in an AC adapter to the barrel jack, it wouldn't fry your boost board (and maybe other things). You could also put in a fuse, although I suspect the boost boards have at least some sort of overcurrent protection.

It never hurts to add a little extra protection to your circuit, even if you think you will be the only one using it. I have definitely fried things that I designed myself, simply because I forgot the polarity or something!
Open Green Energy (author)  BerenV15 days ago
Thank you for your valuable suggestion.
I will consider it during the next version of Mini UPS.
raddevus16 days ago
This was a very interesting article. I enjoyed it and I thought your 3D printed container was very nice. However, I'm a bit confused. Can you plug this in and then pass the normal router power cable through the device so that only when the power turns off then this kicks into action? That's how a real UPS (Uninterruptible Power Supply) really works, right?
I don't see how that would work that way in the article.
This is just a backup battery you can manually plug your router into if the power goes off, right?
Are you going to work on a 2nd part to the article to show how you might do the actual UPS?
Thanks,
He doesn't specifically lay it out but Step 2 and Step 12 have the answer - in step 2 the circuit charges the battery *and* powers the router *and* automatically switches from mains power to battery power *if* mains power is lost; Step 12 states that you power the whole rig with a basic 1A USB charger, the "whole rig" here being the UPS *and* the router. This is why you need to know the specs for your router so you can power it with the circuit (Step 3) by calibrating the trimpot (second half of Step 2) and the customized DC power jack (Step 9). Hope that helps!
Open Green Energy (author)  KurtHuber15 days ago
You are right.
Thank you for clarifying on behalf of me.
mastallama15 days ago
Wow! Great project! I have 1 question: will it keep the battery charged while also supplying power to the router?
Open Green Energy (author)  mastallama15 days ago
Yes,
When the battery is fully charged, the protection ic will cut off the charging, the usb adaptor will provide power to the router. When there is a load shading, battery will supply power to the router.
john_m0ers15 days ago
An interesting project, but how or where do you connect the routers normal power supply, so that if the mains drop out the ups takes over until power is restored?
1-40 of 49Next »