Simple DC UPS Circuit for Modem Router

The following explained circuit of a DC UPS can be used for providing back up power to modems or routers during mains failures, so that the  broadband/WiFi connection never gets interrupted. The idea was requested by Mr. Galive.

Technical Specifications

I need a circuit like,
I have two 12v dc adapter(600mA and 2A).
When input Mains is present, with the 600ma adapter i want to charge the battery(7.5AH) and with the 2A adapter i want to use my wifi router.
when the AC mains fails the battery will backup my wifi router without UPS.
MY modem is rated as 12V 2.0A. That is why i want to use two 12v dc adapter.

The Design

Two adapters actually are not required for the proposed application. A single adapter, probably the one which is being used for charging the laptop battery may be used for charging the external battery also.

Looking at the given DC modem UPS circuit diagram we can see a simple yet interesting configuration involving a couple of diodes D1, D2, and resistor R1.

Normally a laptop charger is specified with 18V, so for charging a 12V battery this needs to be lowered to 14V. This is easily done using a transistor zener stage.

When mains is present, the voltage at D1 cathode is more positive than D2, which keeps D2 reverse biassed. This allows only D1 to conduct, supplying the voltage from the adapter to the modem.

D2 being switched OFF, the connected battery starts receiving the required charging voltage via R1 and begins getting charged in the process.

In an event AC mains fails, D1 gets switched OFF, and therefore allows D2 to conduct, enabling the battery voltage to instantly reach the modem without causing any interruptions to the network.

R1 must be selected depending upon the charging current rate of the attached battery.

A much better and improved version of the above is shown in the following diagram:

router modem DC UPS circuit

Need Help? Please send your queries through Comments for quick replies! And please Bookmark my site :)


Drake said…
I have found an old laptop charger which I would like to use. Its O/p is 19.75V 3.5A. Can I use your second circuit using LM317?

1. I see the direct o/p in your diagram from 12v to 12 v but that will not be case for me. How do I step it down? Can I use LM7812 there for reducing the o/p from 19.5v to 12v? What will be my current in that case?

2. While going through LM317 circuit, what should be value of R1? Can I use LM 7814 for charging the battery?

My router is rated at 12v, 1.5A.
Swagatam said…
1) yes you can use a 7812, the current will be limited to 1 amp.
2) you can use 7814 in conjunction with the LM317 for charging the battery.
3) R1 will be = 1.25 / charging current limit
Drake said…
Thanks for 1.5A, I was thinking of LM7912. Will that be ok as it outputs 1.5A?

If using 7814 instead of LM317, the charging current will be 1A. Will that mean that I need R1 as 1.25 Ohm?
Swagatam said…
you can use 7912.

the charging current is supposed to be extremely low, may be around 1/20 of the battery AH if it is an SMF type of batt.

therefore R will need to be calculated as per this charging current rate
Drake said…
I am still confused. If you recall, I will be using chargeable batteries (I am planning to use 3.7 V 18650*4) in series as I need just 2-3 mins of backup . If I use LM7815 (7814 not available) in place of LM317, I will get 15V charging voltage and 1A fixed. How can I reduce the current here for batteries charge?
Swagatam said…
I think you must use 3 cells in series and not the full charge level becomes 4.2 x 3 = 12.6V.
even if you need 3,4 min backup the battery would be continuously charged by the system and therefore it would need some kind of limiter, the current actually won't matter if the voltage is kept slightly below 12.6V... to implement this you can configure the LM317 as a voltage regulator instead of current limiter, and fine tune the output to may be around 12.3V, 7815 can be totally avoided
Drake said…
Having 3 cells would actually give me less than 12v (3.7V * 3 = 11.1v) that's why I was thinking for 4. Will that be an issue? Also, how will the charging be limited else batteries will be ruined in no time on continuous charging
Swagatam said…
11.1V won't be an issue for your modem...3 cells is the right number that you must use
as I mentioned in the my previous comment if the 4.2V per cell is prevented then an auto cut off won't be required, because the cells will never be able to reach their full charge levels and therefore be safe.
NooMan2032 said…
HI Sir, my router requiere 12v 0.6A I want to plug it straight to car cigarette socket, do I need any protection or just an adequat fuse. thank you.
Swag said…
Hi Nooman, just do it through a 7812 IC, that will take care of everything
Sujay said…
Hi Swagatam,
I have 1 switch [12V, 2A] & 1 router [12V, .5A], both of them needs a backup from 12V 7AH battery. So there will be 2 o/p from battery. I have following queries..
1) Can I use D1 & D2 as 1N4007, so that it can limit to 12V, 1Amp output of the circuit and can be input for switch?
2) How can I restrict the current to .5A [12V .5A] in another output, as an input of the router?

Swag said…
Hi Sujay,

1N4007 will burn at 1 amp unless it is on some form of will have to use a higher rated diode such as 1N5408 etc. for allowing 1 amp current through it.

for restricting current you can use a simple LM317 IC and wire it as per the following concept
Sujay said…
Thanks Swag.
I need some more clarifications about the same. As router needs ".5A" current, I can use LM317 to restrict the current for that device input. For switch, hope I can directly connect through 1N5408 diode. Or in both scenario I should use LM317?

In precision current limiter, to calculate R1, Vref used as 1.25V. But here my Battery is of 12V & device input voltage also 12V, so Vref is practically 0. So how should I define Vref to calculate R1?
Swag said…
Hi Sujay,

actually current control is not required for any of the devices because if the voltage specs for the devices match with the battery voltage, current would be immaterial. You can safely connect the devices directly with the battery.

as for the 1.25V ref, I don't think it is dependent on the input supply, this reference will be available as long as the input supply is well over the 1.25V value
Drake said…
Sorry, couldn't follow this up earlier.

I will be using your second circuit with LM317, to be adjusted to 12V output. My input is 19.75V 3.5A using an old laptop charger. I am planning to use 3 cells 18650 in series for 1-3 mins backup

Can you please tell:

1. If 3 cells would be sufficient.
2. Can I use battery protection module in your circuit - just before the battery charge
3. Need help with R1 value with the values mentioned above.
Swag said…
3 cells would provide around 10V which won't be sufficient for a 12V load.

yes you can use any battery protection module in between the LM317 and the battery

R1 = 1.25 / 0.5C, where C is the Ah value of the battery
Drake said…
Hi Swagat,

In an earlier post before last one, you asked for using 3 cells only

"11.1V won’t be an issue for your modem…3 cells is the right number that you must use
as I mentioned in the my previous comment if the 4.2V per cell is prevented then an auto cut off won’t be required, because the cells will never be able to reach their full charge levels and therefore be safe."

I am fine to use 4 if that's the case. Please clarify
Swag said…
Hi Drake, I said this with reference to the modem supply requirement, but as far charging is concerned 4 cells would required 16V and furthermore this level may be higher for the modem too, so it is better to use 3 cells, just check whether at 10V the modem still works satisfactorily or not, if yes then you an go ahead with 3 cells.

you can fix the charging level to 12V which will never allow the cells to get overcharged.
Nish said…
Hi Swagatam. I have a 9V 600mA router and I was wondering if I could use this circuit with 18650 cells in 3S2P or 3P formation with a TP4056 charging circuit? Using a DC-DC step down converter to drop the input charging voltage to 5V and then using another DC-DC boost converter to increasing it back to 9v at battery output. Is this convoluted and if yes then is there a better way?
Swag said…
Hi Nish,

You can use this circuit for the mentioned application, however you can keep things simple by eliminating the step down converter, and instead using the cells in series to match the 9V output, because using two converters together can waste some power in the process and also make the system unnecessarily bulky..
Swag said…
In the first circuit if you set the maximum output at the emitter of T1 to little below the specified full charge level of the battery, then extra no cut-off circuit would be required, for a 12V battery this could be set at 13.9V.
The negative line which is connected with the battery negative should eb connected with the load's negative.
Swag said…
1N4148 will not do, you must use the ones specified in the article, that is 1N5408 or 6A4
Shigida said…
What is the role of 1k resistor in the first diagram?
Swag said…
without some kind of load the emitter side will show an incorrect reading on the meter while setting it up, connecting the 1K creates a dummy load for the transistor and allows a correct reading to appear on the meter.
ali said…
Dear Swagatam
to flow of 12 Amp, can I use SBL2040CT diode or two parallel 6A4 diodes ?
please guide me
Swag said…
Dear Ali, you can use two 6A4 in parallel by clamping them together on an aluminum heatsink
ali said…
hi dear swagatam
does the circuit in the following link work for 12 amps?
Swag said…
Hi Ali, it will work, but the diodes will need to be rated at 20 amps and on heatsink, the LM338 will also need a large heatsink

Contact me for Customized Circuits


Email *

Message *

 Follow on G+  Follow on Facebook   Follow on Tweeter  Follow on G+  Follow on G+

Follow Homemade Circuits