Home » 12V DC to 220 AC Power Converters » 3 Simple DC UPS Circuits for Modem/Router
3 Simple DC UPS Circuits for Modem/Router

3 Simple DC UPS Circuits for Modem/Router

In the following article we discuss 3 useful DC to DC uninterruptible power supply circuits or DC UPS circuits for low DC to DC uninterruptible power applications

The first idea below presents a DC UPS circuit 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 interruption.like 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

2) 6V to 220V Boost UPS Circuit

The second circuit explains a simple boost converter UPS circuit for supplying an uninterruptible power to satellite TV set top boxes so that the offline recording is never allowed to fail during power outages. The idea was requested by Mr. Aniruddha Mukherji.

Technical Specifications

I am an enthusiast electronic hobbyist person. Though I know only the basics, I am sure you must be getting 100's of emails daily and I am completely betting on my luck if this one gets to your "eyes" 

My requirement:

16 volt 1 amp DC backup for my apartment Tata sky centralized distribution panel.
Issue: My apartment maintenance people do not run backup (generator) during day time, I have a Tata sky DVR which fails to record since there is signal loss due to power failure.

Resolution:

I had thought of a small back up system,I had purchased a small 6 volt 11 watt CFL Ballast circuit thinking as cheap alternate solution, but the same failed to work.

Why I am looking for AC supply instead of DC?I do not want to tamper with their system and get penalized for whatsoever failures which may come to it due to natural course of operation.

Could you please help me with a very simple cost effective circuit that will give me 220 volt 20 watts power from 6 volt 5ah battery. To be precise 220 volts from 6 volt battery, as I have purchased a 6 volt 5 ah battery recently. The output wattage requirement is less than 20 watts, the
adapter ratings are :

Output - 16 volt 1 amp
Input - 240 volt .06 amp

I know you have lot of work, but if you could spare some time and help me with this it would be of great help. thank you

Thanks,
Aniruddha

The Design

Since today all electronic systems employ an SMPS power supply, the input does not necessarily need to be an AC for powering these equipment, rather an equivalent DC or pulsed DC also become useful and works as good.

Referring to the diagram above, a couple of sections can be seen, the IC1 configuration enables a 6V DC to be boosted to a much higher 220V pulsed DC through a boost converter topology using the IC 555 in its astable form. The extreme left side battery section ensures an changeover from mains to battery back up every time a power failure is sensed by the circuit.

The idea is pretty simple and does not require much of an elaboration.

How the Circuit Functions

IC1 is configured as an astable oscillator, which drives T1 and consequently L1 at the same frequency.

T1 induces the entire battery current across L1, causing a proportionately boosted voltage to appear across it during the OFF periods of the T1 (induced back EMF from L1).

L1 must be appropriately calculated such that it generates the required magnitude of voltage across the shown terminals.

The indicated 200 turns is tentatively figured out and might need much tweaking for achieving the intended 220V from the input 6V battery source.

T2 is introduced for regulating the output voltage to the desired safe levels, which is 220V here.

Z1 should be therefore a 220V zener, which conducts only when  this limit is exceeded, which forces T2 to conduct and ground pin5 of the IC, stalling the frequency at pin3 to a zero voltage.

The above process continuously readjusts itself rapidly ensuring a constant 220V at the output.

The adapter which can be seen at the extreme left is employed for two reasons, first to ensure that IC1 works continuously and produces the required 220V for the connected load regardless of the mains presence (just as we have in online UPS systems), and also to ensure a charging current for the battery when mains voltage is present.

The associated TIP122 transistor is positioned to generate a regulated 7V DC for the battery and also to restrict over charging of the battery .

3) Redundant DC UPS Circuit

In this third concept below we learn a couple of straightforward redundant UPS circuits for providing a secured uninterruptible power to crucial gadgets such as computer ATX or modems etc. The idea was requested by Mr.  Shayan Firoozi.

Circuit Objectives and Requirements

  1. There are many products which has 2 input for different power supply,for example one for normal mains,one for generator or other mains,like servers,routers,and some critical equipment,we call it redundant power supplies
  2. I have an equipment which consumes 3 ampere in 12 volt dc,if I use 2 transfer with 12 volt,3 amp output which one take responsibility and which one is waiting for first loss?? Both are same on voltage and amperage,I don,t want them to work together,
  3. I want second power supply to be standby
  4. Just a simple question: What would happens if I replace battery with another 12 volt power supply ?? Will it work as a redundant or standby power supply ??
  5. Thanks for your answer in advanced And if it's possible tell us about model of diode and other components for 12 volt 3 ampere

 The Design

As per the request, the circuit discussed in the above link can be modified to work with another DC power supply by eliminating the battery and associated stages as shown in the following form of redundant UPS circuit:

redundant UPS circuit with alternative power source

Using Two Power Supply Inputs

As we can see, the circuit is intended to work with a couple of power supplies having identical specs, such that whenever the primary power supply fails, the relay instantly changes over to the secondary power supply source ensuring an uninterruptible power supply to the connected load.

The diode D1 makes sure that while the primary power source is active and the relay in the deactivated position, it connects in series with D3 creating a greater forward drop than the primary supply diode D4...thus allowing the primary voltage to be in command and powering the load.

However as soon as the primary source goes through an outage, D4 is disabled, and for that split second D1 and D4 takes over powering the load, until the relay has changed over bypassing D1 and enabling the full rated power to the load.

The next diagram shows a method which allows a battery to be included within the proposed redundant UPS circuit, and the primary power source replaced with a solar panel, making the system a 3 way protected UPS circuit

redundant UPS circuit with charger and 18V solar panel

Using Power Supply with Battery

Referring to the diagram, as long as the solar energy is available, the relay stays activated keeping the mains derived 14v supply cut off from the system.

The solar power in the meantime charges the battery and also the connected load via D1.

The battery power being slightly subdued than the solar panel power keeps D2 deactivated such that only D1 is allowed to carry the solar energy to the attached load at the output.

Using TIP122 for CV Battery Charging

The TIP122 ensures a regulated and safe over charging protected supply for the battery which charges solely through the panel voltage during day time.

As night sets in, the relay deactivates at some of time when the solar supply gets too weak to hold the relay activated.

The above changeover instantly switches the mains operated 14V into the system enabling the load to switch to the mains derived voltage without an interruption.

The battery power makes sure that while the relay is transferring over from the solar to the mains adapter supply, it compensates the split second changeover lapse in power by supplying its own power to the load, and inhibiting even a microsecond break of supply for the load.

The battery also forms the third "line of defense" in case both the primary and the secondary power happens to fail together, and is always positioned in the standby mode for the recommended redundant uninterruptible power supply circuit operation.

The first redundant UPS circuit incorporating two power sources can be better modified in the manner shown below, here the relay N/C can be seen directly connected with the load, thus enabling zero drop in the supply line:

zero drop redundant UPS circuit
SHARING IS CARING!


About the Author

I am an electronic engineer (dipIETE ), hobbyist, inventor, schematic/PCB designer, manufacturer. I am also the founder of the website: https://www.homemade-circuits.com/, where I love sharing my innovative circuit ideas and tutorials. If you have any circuit related query, you may interact through comments, I'll be most happy to help!



203 thoughts on “3 Simple DC UPS Circuits for Modem/Router”


  1. Howdy, Friend! Interested to Learn Circuit Designing? Let's Start Discussing below!
    • 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.

  2. 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.

  3. 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?
    Thanks.

    • 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..

  4. 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?

    -Thanks
    Sujay

      • 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?
        -Thanks
        Sujay

        • 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

  5. 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.

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

    • 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.

      • 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.

        • 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

          • 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

            • 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.

  7. 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?

    • I think you must use 3 cells in series and not 4…so 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

  8. HI, Not an electrical student but can understand circuits to an extent. My Dlink router is 12V 1.5A listed. I have a power backup for my apartment but it takes 2-3 minutes to resume the power and in calls, this is very annoying to connect again. Can you recommend a circuit that can be used with AA rechargeable batteries? Like I mentioned, I would need backup only for max 5 mins. I would like to assemble myself so appreciate your detailed response.

    • yes I understood your requirement, you can still use the above concepts, for the battery you can use 8 rechargeable AAA cells in series….rest can be as is.

      the first design looks more appropriate as it will not allow the batt to overcharge once the emitter side limit is correctly set.

      the circuit (diodes) will automatically disconnect the battery as soon as the power resumes from your apartment backup.

    • Thanks for your prompt response. Are you recommending the one with TIP 122 circuit? Will the ratings for diode and resistor remains what you have recommended elsewhere?

    • yes the first design using TIP122, the base resistor can be increased to 1K that's not very crucial, but the zener value should be selected such that the voltage at emitter is slightly higher than the battery voltage that is around 13.5V, rest can be as given in the design

      • 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.

        • 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

          • 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?

            • 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

  9. good day sir

    i am using normal inverter at home. the modem also connected to the normal power supply at home.when a power failure ( mains ) happens the inverter take some micro secs to switch over to battery and viceversa . so in that period the modem restarts and will take time to function . i need a backup for modem to avoid this operation, modem using 9v dc supply.( i installed a 9v dc batery to overcome this in parallel with power supply but it didnt work out still modem restart during this small changeover time )

    can u help me to sort it out . (i dont want to install a separate full ups only for modem ).

    regards

    john

    • good day john, a modem will not reset if the changeover is within microseconds…it will happen only if the delay lasts over 500ms approximately.

      you can probably try solving the issue by connecting a high value filter capacitor across the supply terminals of the modem. it should be at least a 6800uF/25V rated capacitor or above.

  10. Hi there I was wondering if I'm charging the battery with an outside source charger I just need to add a diode to the positive line of the battery, so I don't get a feedback to the battery is that correct?

  11. Hello sir,
    I need you help. This is what i m looking for. My router adapter rating is 9V 600mA. And i want to use 12V 7AH battery. which circuit will be batter in my case? How much backup i will get from this battery.

    Sorry for my english

    • Hello Rahul,

      sorry, none of the circuits will work because a 9V source can never charge a 12V battery….so you will have to procure a 14V adapter, or build a 14V adapter using a 0-12/1amp transformer along with a bridge rectifier/capacitor output network, for the application

  12. I have a 16,5 VAC – 1,5 AMPS transformer. Can I use it with a full rectifier bridge (or 4x1n4007)? (I think I obtain 23.3V on the output)

  13. Not a electrical student. Have a wifi router. Adaptor says power output 18v/1a. Couldn't get a UPS for this router in market. Only 12v is available. Can you help me with this. Need to make my own ups.

    • you can buy a 0-12V transformer and connect a diode bridge rectifier to its output along with a filter capacitor, this will provide you an output of around 19V which can be used for driving your router.

  14. Thanks sir for your kind reply.
    Sir I got the idea of emitter follower cct for transistor but I forgot to mention in previous question that my battery is 12 volt.
    One thing more I want to ask that, does the formula R= 1.25/charging current apply on the second circuit only and Ohm's law apply on the first curcuit for the the value of R1. If yes then for the 1st cct, is the value of R1=12/2 = 6 Ohms or 14/2= 7 Ohms for 2 Amps of charging current. And what will be the wattage rating of other componants like zener diod for this charging current.

    • You got everything right Alis!

      the wattage can be calculated with the following formula

      P = R x I^2 = 6 x 2×2 = 6 x 4 = 24 watts

      By the way the current is supposed to be 1/10th of the battery AH…I am not sure what's 2 amp in your case.

  15. Dear Swagatam.
    I tried to make the circuit according to the diagram, but i got an issue.
    The line going to the laptop has very low and fluctuating amperage although the voltage is fine. I am actually trying to power two routers and it works flawlessly on one router, but it only works with the mains connected in the second router. Once the mains is disconnected and battery is connected, the amps is too low and fluctuating. What could be the reason for this? Please give feedback

    • Dear Kailash,

      check your adapter specifications or change with a higher current adapter, I think it may be low in current and therefore not able to charge the external battery and the laptop together.

    • Dear Swagatam,
      Thank you for your prompt response.
      I bought the adapter just for this project according to the specs you had given on one of the comments.
      It is a 14 volts adapter with 2.37 amps current. I could not find the 3 amps one in the market so I got the 2.37 amps one.
      I cannot afford to buy another adapter at this moment, so is there anything that could be done for instance by adding transistors or any other parts in the same configuration.
      I would be very grateful if you could provide the solution.
      Thank you once again.

    • Dear Kailash, please try the new adapter and see how it performs.

      for a better response you can try connecting a 2200uF/25V cap across the D1/D2 junction and ground.

      • Dear Swagatam,
        I think that there has been some misunderstanding regarding my situation.
        The circiut works fine when the adapter is connected to the main line of 220 volts. Once I switch the main line off and the circuit is running on battery, It can power one of the routers, but the other fluctuates. I do not think that this is the issue with the adapter. I might have done some mistake with circuit itself. I am a bit confused with the final part of the circuit. From the d2 and d1 junction it goes to the +ve of the modem. What about the -ve of the modem?I have connected the negative of the adapter to the negative of the battery using a wire from which I have cut two areas which connect to the -ve of the modem and to the ground. Is this correct? I think that this could be the issue. Please shed some light on this.

        • Dear Kailash. yes I misunderstood and thought that the issue was when the mains was ON.

          The negative line shown with the earthing sign should be connected in common to all the negatives of the respective devices….

          If the voltage is not dropping then the current fluctuations can be ignored…please measure the voltages across the specific routers and confirm whether it's constant or not.

    • Dear Swagatam,
      Thank you for your prompt response.
      Could you please post picture of the capacitor connection. I am new to all this stuffs. I do not think that I could do it without a picture.

    • Dear Kailash,

      It's easy, solder the long lead of the capacitor with the D1/D2 junction, and the smaller lead with the bottom negative line or the earth line

  16. Dear Swagatam.
    I tried to make the above circuit, but I have come accross a certain issue.
    The amperage on one of the connection is very low and fluctuating.
    I am new to electronics, so could you please shed some light on this matter.
    The line connected to the laptop has the problem. The one going to the router is just fine.
    Thank you for your time

  17. Thanks a lot for nice and great information.
    Sir, I just want to know that what phenomena in the first circuit is to protect overcharging the battery, that is less current, voltage or anything else.
    Secondly if I want to charge my 9Ah AGM battery with 2 Amps for quicker charging what changes should I made in first cct, what will be the value of R1 and across it what will be the value of resister in series of Led to indicate charging.
    Thanks again.

    • Thanks Alis,
      in the first circuit, the transistor is wired in the emitter follower mode in which the transistor is simply not allowed to conduct or is "choked" as soon as the emitter voltage reaches the base voltage level or at a difference of 0.6V (close to it.)

      therefore assuming if the base zener voltage is 14.6V, then as soon the battery voltage reaches 14V, the transistor is unable to conduct any further, unless the battery drops to below 13.8V

      for 9V battery, you can use a 11V zener diode

    • R1 can be calculated by using ohm's law
      R = V/I

      9/0.5 = 18 ohms
      watt = 18 x I^2 = 4.5 watts or 5 watts

      if an LEd is connected in parallel to R1, then a 100 ohm resistor will be enough to safeguard it

    • click the diagram to enlarge, and write down the components as it's shown, your retailer will understand and give you the components accordingly…

    • Rusan, you did not ask me about the circuit selection therefore I did not suggest about it.

      both the circuits are correct and will work.

      you can use any of those as per your convenience..

      12V adapter will not charge 12V battery…so it must be set to 14.4V adapter

  18. Hello, Swagatam.

    I want to power my router which requires 9 volt 1 amp but i have two 6 volt 4.5 Ah Lead Acid Battery. So, i want to use two 6 V batteries to power my router. Is it possible? I would be very thankful if you could help me.

    • Hi Rusan,

      yes you can do that, just be sure to add a 7809 regulator across the output, that is across the cathode junction of D1/D2 and ground

  19. Sir can I use a Transformer with bridge connected instead of 12v adapter and can I also just skip voltage regulator and directly connect through R1/D1 & which R1 resistor should I choose if I need 2.5~3.0ampere current for 12v battery. Thanks for your help & It is humble request to you please reply this message.

    • Adnan, yes you can do it in that way, but please note the battery charging section is crude therefore it's better to use a reduced charging rate.

      you can use 1/20th of the battery AH as the charging rate.

      Use Ohms law for R1, that is R = V/I, where I is the charging rate as described above, V is the supply voltage

  20. Sir Great Work but I some confusion there,I have 12v Battery 7.5aH & 1Ampere consuming Modem. As LM317 Regulator only gives 1.5ampere, so will this 1.5ampere regulator run modem & also charge battery efficiently. Another thing is that I got L78012CV Regulator, so can I use this regulator instead of LM317/TIP122 without changing something in circuit. Thanks in advance Sir

  21. Thanks for uploading your schematic circuit ,! I have some questions here.Could you please reply me soon ?.
    1.As far as i know ,the voltage for battery charging is about 13.6v -> ~ 15v (depending on your battery type).Your first circuit apply 12v adaptor ,does it work ?
    2.When the battery is full ,it is about 13.5~13.7 .The battery voltage is dominant ,leads it works continuously (at that time the circuit won't use adapter supply ,it will use the battery ).

    • For a 12V batt the input is supposed to b e 14.4V, the diagram shows a 12V adapter because we don't get 14.4V adapter, so readers are advised to handle such situation with discretion and logically.
      The batt voltage can never surpass the adapter voltage, therefore the adapter voltage will be always the dominant one as long as the mains is available.

  22. Dear Swagatam,

    I want to design a ups circuit with the following requirements:

    – Power supply AC/DC: 35W, 15VDC (www.meanwell.com/search/LRS-35/LRS-35-spec.pdf)
    – Battery: 12VDC
    – Operation: While the AC is OK, the battery will be charged (WITHOUT OVERCHARGING) and the output will be the power supply 15VDC. When the AC is NOT OK, the output will be the battery 12VDC.

    I think that a simple way to detect if the AC is OK or not could be to read the output voltage. If it's 15VDC i can consider that the AC is OK and if it's 12VDC it's not OK.

    To sum up: I need a circuit to charge the battery without overcharging and to provide me an output with 15VDC when AC is OK and 12VDC when AC is not OK.

    I have seen your experience with UPS, could you help me with that?

    Lots of thanks,

    • Dear Eudald,

      You can effectively use the first circuit shown in the above article, just eliminate D1 so that the full 15V is able to reach the output while mains is present. rest everything can be as is.

  23. Thank you for answering. Its an Lead Battery. By the way, is it possible to set a led to indicate full charge? If yes, where should i put it? Thank you again!

    • you can try adding an LED across R1 with a series 50 ohm resistor, and check the response, as long as it stays illuminated you can assume the battery to be getting charged.

  24. Hi there! Thank you for the schematic! For the second circuit i have a 2Ah (12v) battery. Im using a 12v 1amp charger. Witch is the value of R1? R1 = 1.25/1A = 1 Ohm?
    Thanks!

    • Hi, if it's a lead acid battery then the charging current should be restricted to 2/10 = 200mA

      so R1 should be 1.25/.2 = 6.25 ohms

      if it's a Li-ion batt then your calculation results will work.

      the first circuit is more efficient in terms of voltage control so I recommend the first circuit

  25. Thanks for the nice tutorial of yours Mr. Majumdar!

    Here what I want to do is a bit different. I Have a UPS with 12v, 9AH (cycle use: 14.4 – 15.0v) battery inside and NO LOAD CUT OFF feature added which means it will charge the battery even if it is off but connected to the main outlet.

    And at the same time I have a DSLR router with 9v, 0.85A adapter. Now I want to connect the router to the battery directly without the need of adapter of course.

    What sort of circuit do you recommend for this purpose. Initially I want the router to be feed from UPS coming connections to the battery and when the main power fails the battery should feed the router?

    Thanks in advance

    • Thanks for the reply.

      One thing to make sure as the alternative power or 12V DC from UPS main is connected to battery terminals, so I should have the UPS mains (alternative power) and battery terminals (12V adapter) connected together, right? At this stage it will charge the battery and feed the router at the same time.

      And the 2nd thing that I need a 9v, 0.85A output, but the mentioned circuit is for 12v 3A I think. How should I adjust that?

    • I was a little confused here….so if that is the situation, then you won't need anything, rather you can simply connect your router directly across the battery terminal via a 7809 IC. just make sure the IC is fitted with sufficiently large heatsink.

    • Thanks again
      That does the job and brings the voltage to 9v, but it still outputs 1A I think, right? So no problem for router?

    • no problem even if it's 100 amps, because as long as the voltage is as per the load specs, the load will draw only the minimum required amount of current.

  26. Hi again sir ,

    i need to do the same with two 24 volt AC 5 Ampere adapter , i mean how can i make redundant power supply for AC adapters ?? and which diode or which technique should i use ?

    many thanks Swagatam

  27. sir give me a circut diagrame.i have a bike battry 12v and dsl modem with chager.give me diagrame in which i connet these things.some qulity must b in.like no need to disconncet battry when light in on and overcharge protection and off during light off

  28. Sir can you please make me circuit for 9v and 0.6 amps…and there is a POE also i want that also to backup …its is rated as 12V and 1amp also can do the job or 0.7 or 0.8 amp also…plz post ASAP sir i want to build it

    • Asif, you can use the same circuit as presented in the above article.

      just add 4 more diodes in series with the D1, D2 outputs and use it for the 9V load while the D1/D2 terminals can be used for the POE

    • D1, D2 junction can be used for your 12V load…and connect three mote diodes in series at the junction of D1/D2, and the end of this four diodes series can be used for powering the 9V load.

      D1
      —>I—|12V
      D2 |————–>I—–>I——>I——->I——– = 9V
      —>I—|

    • …sorry the above diagram did not publish correctly….but you can get the idea…D1, D2 ends are joined and connected with the 4 diode chain….the left end of this chain gives 12V, and the right end gives the 9V

  29. Thank for your reply,
    The point is clear,there are many products which has 2 input for different power supply,for example one for noraml mains,one for generator or other mains,like servers,routers,and some critical equipment,we call it redundant power supplies

    I have an equipment wh consumes 3 amper in 12 volt dc,if I use 2 transfer with 12 volt,3 amp output which one take responsibility and which one is waiting for first loss?? Both are same on voltage and amperage,I don,t want them to work together,I want second power supply to be standby

    Thank you
    And if it's possible tell us about model of diode and other components for 12 volt 3 amper

    • OK understood, the above circuit can be used with two power supplies, but one of the supplies will need to be slightly higher than the other for ensuring that the diodes do not conduct together or randomly…the main power supply could be made slightly higher than the standby supply, may be by a volt, amperage won't be an issue.

      or in case the both the supplies are equal, the standby supply can have two diodes in series while the main supply may be provided with a single diode…. this will take care of the alternate switching of the diodes.

      for 3amp use 6A4 diodes

  30. Hi sir
    Just a simple question:
    What would happens if I replace battery with another 12 volt power supply ??
    Will it work as a redundant or standby power supply ??
    Thanks for your answer in advanced

    • Hi Shayan,

      sorry I could not understand the logic behind this…of course it would work like a battery would do…but what's the point in using two mains operated power supplies??

  31. Thanks for the reply, with the same idea that it 12 V battery I connected, does polarity make any difference in DC connections probably I did not take care of polarity.
    In that case, can i connect as following-> 12V SMPS charger to Battery terminals and From battery terminals to Modem Just like an on line UPS? do I have to incorporate any safety components from Terminals to Modem?
    ( they may calling it 12 V SMPS, but probably it is more than 12V it is actually used in UPS/Inverters for charging it is perfectly charging the exide battery)

    • yes, maintaining a correct polarity is definitely critical, a wrong polarity can instantly damage a particular device unless it may be protected with a diode.

      It's possible to connect the units the way you have suggested and no safety measures are essential except for a battery over charge cut off circuit…or if you want to avoid this you can use a13.5V input instead of a 14.3V, which will never allow the battery to get 100% charged and therefore can be used without the over charger protection feature.

      it would be advisable to measure the SMPS output volatge and make sure it's delivering above 13.5V

    • SMPS when not connected 13.70 When SMPS charging it is showing 13.35 , battery voltage is 12.80 when SMPS not connected ,Should we have any protection before the modem to limit it to 12 Volts/ I mean, is it necessary? if so what should we put there .

    • You can use two more diodes in series, meaning put two more diodes in series with D1, this will rectify the issue and drop around 1.2V from the adapter output for the modem

  32. HI Swagatam nice explanaations and ideas, i need help on similar need, here are what i have at hand
    1.12 V 35 Amps exide battery
    2.7V/7AH Batery
    312 SMPS charger i am using to charge the exide battery
    4.12V/1 Amp Adapter for modem
    5.Modem
    I wanted to have two circuits
    1.To use with Exide battery -UPS circuit ,Charging with existing SMPS charger, and powering the Modem on power fail switch to battery power

    2.To use with12V/7AH batter-UPS circuit charging the 12v 7Ah and powering the Modem on power fail switch to battery power
    i did a stupid thing connecting 12 V 35 amps Exide battery directly to modem thinking that it just 12V and my modem is in't working now, i just bought new modem and seek your help. Yes i can assemble circuits on experimental boards
    Kindly need your help, regards

    • Hi Chris, Thanks for posting your question!

      The circuits explained in the above article are perfectly suited for fulfilling your requirements.

      You can try the second circuit which is more sophisticated than the first one for both the needs..

      A 12V adapter might not charge a 12V battery…the adapter output needs to be at least 14V to implement this.

      If your modem is rated to operate at 12V, then I think you have done nothing stupid by connecting it to the 12V/35AH battery. Here the current is not important as long as the voltages are compatible…so it's quite OK to operate your 12V modem with any DC 12V source, even if it may be rated 1000 amp or 100000 amps

  33. hello Swagatam, I have Lead Acid battery with 6v 6Ah, laptop charger with 20V, 3.25mA. i want to use these thing to operate modem which operates on 12V, 800mA. Please help me to find the solution of this problem.

    • hello Athar, for operating a 12V modem with a 6v you'll require a boost converter circuit which could be quite difficult if you are a newcomer in the field of electronics.

  34. Hello Brother, I have a 12v 7ah battery. And I want to use it for backing up a 12v 0.5Amp modem. I want to run this setup continuously. Thus iam worried about overcharging of the battery. which circuit is preferable in this situation. 1st pic or 2nd pic ? and I also have a 24v wall adaptor could I use it on this setup ?

    • Hello black bird, you can use the first circuit for charging your battery continuously without worrying, just make sure the zener diode is not rated above 14V. R1 can be selected arbitrarily, may be a 1 ohm resistor will be just enough…24V adapter can be used with the first circuit

    • Thanks For the Reply 🙂 . Any way Could you please list the exact values of items that are included in the circuit. And is these items are easily available ? especially the Transistor TIP122 and 14v Zener ? Thanks again 🙂

    • D1, and D2 cab be 1N5408 diodes, rest everything is given in the diagram itself, yes all these are standard components and should be easily available in the market.

    • Sorry Brother One More Doubt 🙂 , The adapter that is with me now is rated 24v 0.5A . So could it provide sufficient current to charge a 12v 7Ah battery ? Iam a newbie in electronics . So please help me ?

    • yes bro, it will be able to charge your battery, you can remove R1 for ensuring quicker charging, withing 8 to 10 hours.

    • Sorry to disturb You again , Iam getting 24v in between Modem out terminals , when using a 24 v power supply. and about 16v in between battery out terminals ? My modem is rated about 12v .? what to do ?

    • I am sorry blackbird, I just overlooked the fact that the 24V would get directly connected with your modem….please do the following change in the design…just disconnect the anode of D1 and connect it directly with the emitter of the TIP122….and entirely sure that the zener diode is rated at 14V or slightly lower, you can try connecting a 1K preset parallel with the zener diode for correcting the output voltage to the required precise levels

    • ye, 8V/700mA will do, you can use it, if possible put a 1N4007 diode in series with the positive of the charger… this will drop the voltage to 7.4V…

  35. sir i have a battery 6v 4.5ah/20hr and i want to charge plz help me what voltage i use to charge the 6v battery
    and i have a 12v charger can i use 12v charger to charge the 6v battery plzz help me plzz

    • Syed, you must use 7V as the input for the battery at the rate of 500mA current for your battery.

      No, you should not use 12V for charging a 6V battery, it might damage the battery permanently or start internal gasing of the cells

  36. hello sir i want to make wifi ups for 5v 1a and mean to say that when the ac power is on the router is on the ac power and that time the battery will also on charging and when the ac power is off or cut router is on on the battery power when the ac is on the router will run on the ac power sorry for bad english and i hope you will help me plzz

    • Hello Syed, the above indicated circuits are exactly as per your application needs, you can try any one of these for implementing the same.

  37. Can a relay be used for auto backup function in this circuit if so then plz tell and give the circuit diagram for that

    • relay is not required here, the diodes do the changeover automatically….for relay operation the diode set up won't be required, it may be done simply by using a single relay with the mains adapter supply and wire its N/O, N/C contacts with the load and the battery

  38. sir i have made this circuit but i am not sure whether the battery is charging or not because i have also used an ammeter in series with battery junction and its shows no current flowing into the battery while mains is available

    • Zainey, what is your battery Ah rating? and what is your input current range and what resistor have you used in series with the battery?…what is the FSD range of the ammeter that you have used?…specify all these I'll try to troubleshoot it.

  39. dear sir , i followed all your instructions for the above mentioned circuit but unfortunately i could not found the Lm338 and 1N5402 instead there is 1N4007 available here.so i want to know if there is any way of connecting my modem directly to the battery and is it possible to use a 1A fuse in line …..2ndly can i charge my 12v 30Ah battery with 12v 1A charger which is at the same time powering the modem also???? any help will be appreciated pls help…. i'll be waiting for your ans from now

    • I am sorry mudassir, the diodes are the heart of the circuit, with no diodes the circuit would become meaningless, so you must find 1N5402 or iN5408 diodes for you particular application. 1N4007 will not do

      12v/1amp will not charge a 12V/30ah battery properly…the adapter should be rated at 14V/3amp minimum.

    • hello Swagatam majumdar ….i found an adopter and there is 5-13v 700mA stated on it will it charge 12v 30Ah battery ….if yes then it will take too long to charge fully what you say?

    • hello mudassir…13v will just not work…it should be at least 14.5V…and at 700mA it may take ages to get your 30ah battery fully charged.

    • yahooo…. i did it easily with a simple way… i connect a 1A fuse inline and connet it with 12v 30Ah battery directly and it worked fine for me now i can use it for 25-28 hours continously powering my dsl without any problem i used a 2way switch between battery and 12v dc adaptor …..

  40. hi sir…..appreciate your work
    actually i have a 12v and 30amps(not sure) and i wanna use it to power my 12v 1amp modem ….what changes should i made for that in this schematic that exactly fulfil my requirements and do not damage my modem ,…..i am waiting for your kind suggestions

    • thanks mudassir,

      you can use the same circuit for a 12V 30amp battery also, no changes would be required except the following

      in the second circuit, use LM338 instead of LM317 and use 0.25 ohms/1watt for R1

      in the first circuit remove R1 and replace it with a wire link.

    • thanks….and what if i plan to use it permanently with modem .i mean if the battery is over charged will this circuit stop charging ?

  41. Hi Swagatam,
    Can I use 3ah battery instead of the 7.5ah one? The suggested 14v adapter is not widely available on our market? If 12v one is used, will it not work? And if 15v adapter is used, will the router run a risk of burning out?

  42. Hi Swagatam,
    I want to use an external 3.6VDC 700mAh Lithium Battery as backup instead of charging it from main supply & want to drive a 5W light rather than modem/router will this work?

    • Hi Dipto, do you mean you don't want the LM317 or the TIP122 stage and want to use only the diodes for the changeover?

      Yes the above circuit can be used for your application too….but a 5 watt light will be too big for the mentioned battery, will drain it quickly

  43. hi Swagatam,
    i have a laptop charger "19v, 4.2amp" i build a voltage regulator lm338 to use it as a 12v battery charger..with variant resistor.. and i adjust it to get 14.5v to charge the battery.. but the output current had never crossed 1.7 amp.. even if the battery is fully discharged.. why?? you told me that lm338 output could reach 5amp.. so what is the problem?? why cant i get at least 4 amp??
    another question.. when the battery is fully charged.. the output current from charger is near 0.2amp.. does that mean the charging is stopped?? or this current will harm my lead acid battery??
    and thank you very much

    • Hi Ahmed,

      Either the input charger is not supplying 4 amps to the IC LM338 or the IC LM338 is faulty or duplicate….a good IC and a good charger will definitely allow full 5amp to the load….of course only if the load would be consuming this much current.

      By the way what is the AH rating of the battery??

      When the battery is fully charged it will naturally stop accepting current from the charger but that doesn't mean it's not being charged, the input will need to be switched off in order to avoid damage to the battery in this situation.

    • what do you mean by AH rating??
      and about the charger .. i tried to apply the charger directly on battery "with 19v" it gives 4.2amp.. but when i use the regulator it's never cross 1.7
      thanx again

    • AH means ampere/hour it can be seen printed on your battery body

      if you apply 19V to a 12V the battery it will get damaged quickly, so it's never recommended even for a short duration.

      Your ICLM338 is faulty for sure, a good IC will allow the full amp to be delivered to the battery depending on how the battery is pulling….

      test the battery charging amp with a different 14V source that will give a clearer idea regarding the consumption.

    • it's 70AH .. and when i charge using another charger it get 10amp.. but thats mean like you said that the ic is very bad..
      anyway thank you very much

    • for a 70AH battery LM338 will not work anyway, because the batt will need around 8 to 10amp charging current and LM338 can provide max 5amp, better to use a 14V 10amp smps and charge the battery with it directly for 8 hours.

  44. sir i want to construct a 14v and 10A transformer but i do not know about wire diameter, number of turns and aria of bobbin. so kindly guide me or send me any link that is helpful to beginners.

  45. sir, i want to eliminate the charging system.
    I just want to connect the wifi router with battery when the AC(Main) fails.
    I have use a relay for desired operation but when the AC(main) fails the device restarts and wifi connections are disconnected.

    • use only D1, D2 for it.

      D1 comes from the adapter positive, D2 from the battery positive, their common cathodes ends join with the router positive.

  46. Most laptop adapter nowadays output 18.5 to 19V. I guess they're OK for laptop use, of course, and would give the required 13.8V to the battery?

  47. Hello Swagatam,

    just made this circuit with a 1ohm resistor to provide a lower (thus safer) current to my 4.5Ah battery. I used it with a 12V adapter, but forgot that a 12V battery needs about 13V to charge properly, whereas there's only 10.5V on battery terminals. Is the circuit built with 9V batteries in mind by any chance?

    • Hello Pat, the adapter voltage should be 14V, the diagram shows a standard value adapter (12V) which could be ignored and a 14V must be used.

  48. thank you very much for your advice
    i did what you told me… but i got a problem
    since i use a 12v adapter..when i connect it with diode it decrease to 11.5v and since i use a car battery.. most of time it gives 13.5-12.5v so its always above the adapter.. so its always take the lead.. and the adapter only work when i disconnect the battery.. (the circuits do the opposite of its purpose" 🙁
    so should i put some 7812 for the battery?? or use a higher volt adapter like 14v?? but am afraid for the router because its 12v only

    thank u again

    • yes, a 7812 with the battery output would solve the problem instantly.
      If possible use an adapter which has a feature of fine-tuning the output through a preset.

      This would allow you to increase the adapter voltage slightly, may be to 13V for getting a perfect response.

  49. hello Swagatam
    first of all i have to thank you very much for your nice work.
    i have a 12v.5A router, wireless phone "panasonic" 6v/0.5A , an acid battery with 100 amp and a 20A charger for the battery…
    1.i want this ups but without charging myu battery "because i have a chagrger"
    2. could i put 7806 regulator on output to run my wireless phone ?
    3. i have a 12v/1.25A and laptop charger 19v/3.5A.. which one should i use ??

    and thank you again

    • Thank you Ahmad.
      I did not quite understand how you are planning to use the above circuit.
      Do you mean you want the 20A charger in place of the adapter shown in the above circuit??
      2. yes 7806 can be used at the output
      3. If you intend to use it as the input source, you can use a 14V adapter, if the battery is rated 12V, but none of this would be able to charge a 100AH battery.

    • i like to build this circuit but without charging feature because i want to charge the battery manually
      i mean.. i will use an adapter 12v as main current but i dont want it to charge the battery… i want it only to be the main current…
      when the adapter power fail… the battery will give the current instead of the adapter…
      when i notice that the battery need to be charged.. i will connect my 20amp charger manually..
      hope u get my idea
      thank you again

    • Ok, the following design will be sufficient in that caes:

      1.bp.blogspot.com/-I2zlapFq6RM/UML_NxUJy2I/AAAAAAAAB3w/27ZLDjK9C9g/s1600/simple+modem+UPS+circuit.png

      The entire R1 link may be included excluded, it won't make much of a difference.

      use 1N5402 for the diodes.

  50. …with load connected, with smaller load no issues….smaller load of about .5A. At full load, Ammeter shows an average draw of 3.5A, sometimes it oscillates between 3.4 to 3.8A. what surprises me is that the 338 never even warm up talk less of very hot, I thought it will heat up initially, so I mounted it on a heat sink. Surprises, it never warms up even, its cold there…

    • that's strange…at 3.5Amps the IC should get very warm….I am not sure if everything's correct in the circuit,
      try different values for R1 and check the amp consumption, if it varies accordingly then you can assume it to be OK.

  51. Swagatam,
    everything works well, but am having problem with the diodes, I used 4 1N5401, but they are still getting warm…..what should I do with this diodes…..

    • …with load connected or always??. check the current consumption by an ammeter to confirm if everything's correct.

    • ..with load connected only, in fact if i put a small load less than an 1amp, no problem, until i put the entire load on it, or should i go for a higher diode , like 6 or 10amps?

  52. Am doing an additional follow up despite sending you an earlier one. The reverse current still flows, despite putting a diode, may be am putting it wrongly. Kindly help. This is the way I did it. Am using 1N5401 for this, this is the arrangement, the input positive power rail is connected to the anode of the diode and the cathode of the diode connects to the input of the LM 338…. Is that right?

    Secondly, I have also added 2 additional diodes in parallel to D1.

    Thanks for your support.

    • Elijah, that cannot be possible…a diode at the input of the LM338 will never allow an opposite flow of current,

      the suggested diode connection is correct.

      The band side of the diode is the cathode.

  53. Hello Swagatam,
    Thank you so very much on this, without Load, I have not experience the heat, but I will check again and observe. Do you have any recommended make of the 338.

    I will try to work on the leakage and feed you back.

  54. Hi Swagatam,
    This is a nice solution I have been looking for and very simple to implement, but I want to use it to power a monorail motherboard, that is rated for 12V, but a about 5A, what do I need to do to this circuit to help me deliver 12V, 6A, and what battery capacity do you recommend.

    • Thanks Elijah,

      for a 12V 6A load the recommended battery would be a 12V 40 ah, this would provide a back up of around a couple of hours max.
      For this you can simply eliminate the resistor R1 (in the second design) and use a LM338 IC in place of the IC 317.
      LM338 is specified for operating at maximum 5amps, so the battery would be always charged at the optimal rate of 5amps safely.

    • HI Swagatam,
      I appreciate your magnanimity at your replying me. I actually have implemented the circuit replacing Lm 317 with LM 338. It work quite well, but figured out that Diode D1, is getting very hot, I have to shut down. My guess was that the load (a monorail motherboard with other accessories are drawing a lot of current, while the battery is also charging. I changed the diode to 1N5408…thinking it should work, yet it is still very hot, though it worked well, I also eventually have to shut it down what do you advise, what am I doing wrong?
      And or what am I suppose to do?

      2- My adapter has a light by the side that lights up when its doing it job. I also discovered that despite taking the mains off, but battery is still connected to my board, the green light on the adapter still lights up/ Hope current is not flowing back from battery…..

    • Hi Elijah,

      Is the diode getting hot even without the load connected? If so then there could be some problem with the LM338 circuit. Otherwise its fine, you may put a couple of more1N5408 diodes in parallel to the existing one.

      To stop a reverse flow of current from the battery, put a diode at the input of the LM338, this will prevent the battery voltage from leaking back to the modem.

  55. Hello,

    I have a router of rating 9V, 0.6A. Can I use the same circuit with output voltage set to 9V. Plz suggest a battery rating for this configuration.

  56. Oh, and what wattage should R1 be? Charging current squared times number of ohms calculated?

    I am a bit afraid that this DC UPS, having no charging regulation, reduces the battery life.

    • In the second circuit which uses the IC 317, wattage of R1 will be 1.25 x battery AH/10, yes without an auto cut-off it wouldn't be the best of the chargers, however the inclusion of the 317 current controller stage would help to keep the battery safeguarded to a considerable extent.

  57. I have no 1N5402. Would it be possible to use a 4004 instead in this application? Forward voltage drop is only 1.1V (1V for the 5402), and allows for less amperes. If used with a low-draw modem, would such a replacement be correct?

    And if I want to power both a modem and a router from the same battery, different voltages, would I be able to use my DC booster to get the required 18V for the modem while keeping 12V for the router?

    • 1N5402 will handle upto 3 amps while 1N4004 not above 1 amps.

      yes you can use a booster circuit for getting the required 18V for the same source.

    • Thanks for your quick answer Swagatam. My goal is to re-use small 12V batteries I have to power the essentials: Modem and internet gear!

      I will be using the inverter in a car. Considering the hassle associated with building a homemade inverter (namely, hard-to-find transformer and costly radiators), I'd rather buy a ready-made one.

Leave a Comment

Do NOT follow this link or you will be banned from the site!