Simple UPS for Router, using Relay

Discussion in 'The Projects Forum' started by parmaja, Mar 30, 2015.

  1. parmaja

    Thread Starter Active Member

    Jul 2, 2008
    37
    0
    Hi, I have this simple circuit that use relay to switch between router adapter (main power) and 12v battery to supply my 12v router.
    So no need to any of regulating.

    I am using 7ah battery, it give me over 13v but it work fine with my router,
    in the circuit i put Led for testing, I used double contacts relay in my real project to charge my battery with its charger with other contact.

    Until now it is work fine but only when the main power dropped, the router restarted (repowerd) there is drop voltage at this moment, but when the main power come on there is no restart.
    What do I need, increase value of capacitor or something else?

    I found this project on internet
    http://mresoftware.com/ups_12V.htm
    but I not understand why he need to use comparator?

    notice: i used CircuitMOD to draw it
    Thanks in advance.
     
  2. DickCappels

    Moderator

    Aug 21, 2008
    2,654
    632
    Nice schematic. He used a comparator so he could have precise control over the voltage at which the relay begins to switch. Making the capacitor huge might help, the size of the capacitor depends on the at which the relay begins to switch in, how quickly the relay switches, the current that the router draws, and the voltage below which the router would need to be reset.

    Another solution would be to add a delay so that the rout goes all the way and then if it is like the routers I have it would do a power-on reset.

    When I have faced this kind of problem in my circuits, I use a diode or a diode and transistor to perform the switching.

    The simplest and fastest switchingcircuit would be one or two diodes from the battery to the router. They would be arranged such that the diodes conduct when the router's power supply voltage drops. Since the battery voltage is just over 13 volts (lead-acid?) I would use three (PN -non-Schottky) diodes of the appropriate current rating to drop the battery voltage to below that of the 12 volt power supply.

    [​IMG]

    Source:
    http://joshuavasquez.com/docs/jVasquez/Tutorials/batteryBackup.html
     
    parmaja likes this.
  3. parmaja

    Thread Starter Active Member

    Jul 2, 2008
    37
    0
    Thank you for advice, I cant use this 2 diodes solution because i am charging the battery when the power electric is on, i used double contacts relay in another contact i switch the battery to the external charger for SLA batteries.
     
  4. DickCappels

    Moderator

    Aug 21, 2008
    2,654
    632
    Are you sure that charging the battery while power is on would prevent you from using the "diode-OR" solution if you use three or more diodes to make it impossible for the voltage from the battery lower than the 12 volt supply for the router?

    I believe that in that case, the diode circuit would be equivalent to the relay but a lot faster.
     
    parmaja likes this.
  5. alfacliff

    Well-Known Member

    Dec 13, 2013
    2,449
    428
    gthere are power supplies from several manufacturers that have battery backup circuits built in to power repeaters and other radio ezuipment when the power goes off. basicly they use the diode "or" as above, but tap off before the regulator to power a charger circuit for the battery.
     
    parmaja likes this.
  6. Reloadron

    Active Member

    Jan 15, 2015
    963
    232
    The downside of using a relay is depending on the routers holdup time and relay switching time when power is interrupted to the router the router wants to restart. This is why I dislike using relays for applications like this and keep the switching electronic. Here is another circuit similar to the one posted by DickCappels and as can be seen R2 controls the battery charge rate.

    Ron
     
    parmaja likes this.
  7. #12

    Expert

    Nov 30, 2010
    16,298
    6,810
    I'm just repeating other people but, this circuit is old news. The diode method has no detectable time lag and its contacts will not wear out. It's a, "set it and forget it" device.

    Personally, I'm 64 and don't expect to outlast many more relays. If you are not already collecting your pension, use the diodes.
     
    parmaja likes this.
  8. alfacliff

    Well-Known Member

    Dec 13, 2013
    2,449
    428
    hams have been doing that for years, using a light bulb instead, when the battery is low, the light brightens and has lower resistance while charging, when the abttery is charged up, the bulb cools and the resistance goes up.
     
    parmaja likes this.
  9. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,540
    1,251
    If the battery charger makes enough power to charge the battery and run the router at the same time, go with what is sometimes called an online ups. The router is connected to the battery all the time with no relay or diodes, and the battery is connected to the charger all the time, maybe with a series diode in case the charger does not go to a high impedance when it loses AC power. Basically, the battery and router are in parallel across the charger. The battery powers the router under all conditions, the charger tops off the battery when needed, and the switching time is literally zero. My home router has been running this way for over 10 years, no relays, no diodes, noproblems.

    ak
     
    parmaja and #12 like this.
  10. #12

    Expert

    Nov 30, 2010
    16,298
    6,810
    AK just reminded me that some people think of this as a charger and a battery and a router and its power supply and a switching circuit, while I would immediately simplify...leaving a beginner puzzled.

    Sorry about that. :oops:
     
    parmaja likes this.
  11. parmaja

    Thread Starter Active Member

    Jul 2, 2008
    37
    0
    Hmm, The battery charger is auto, it give 1.5 amber and 14.5v when the battery is empty, when it reach full, the charger low the voltage to 13.8 float charging.
    My problem is i am afraid to lose that detecting if i connect my router to it, i mean the charger cant detect if the battery is full.
    By double contacts relay in main power on I connected the battery with that charger, and the router with adapter, it is more safe.
     
  12. parmaja

    Thread Starter Active Member

    Jul 2, 2008
    37
    0
    I mixed it with 2 diodes, I added 2 diodes between battery+ and my load as picture in attachment, now not need to use capacitor, and the batte ry will supply my load when relay is switching.

    [​IMG]
     
  13. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,986
    745
    dont understand why you feel the need to use the relay, when the diodes will do the job better...:oops:
     
    parmaja likes this.
  14. parmaja

    Thread Starter Active Member

    Jul 2, 2008
    37
    0
    It is the charger of the battery, it is automatic charger, i made new schema, look at input source 14.5 it is from charger, 12v it is from adapter of router.

    relay-3.png

    I made it with https://sourceforge.net/projects/circuitmod/
    I think it work with http://www.falstad.com/circuit/index.html

    Code (Text):
    1.  
    2. $ 13 5.0E-6 11.558428452718767 50 5.0 50
    3. r 352 176 432 176 0 500.0
    4. c 208 176 208 112 0 5.0E-4 10.9185567729487
    5. 178 544 192 544 240 1 2 0.2 -1.1294113586997832E-5 0.05 1000000.0 0.02 20.0
    6. v 208 320 208 368 0 0 40.0 12.0 0.0 0.0 0.5
    7. w 208 368 336 368 0
    8. w 496 320 208 320 0
    9. s 240 240 336 240 0 1 false
    10. w 496 240 336 240 0
    11. d 432 304 432 272 1 0.805904783
    12. g 144 320 144 336 0
    13. R 240 240 176 240 0 0 40.0 12.0 0.0 0.0 0.5
    14. w 496 256 496 240 0
    15. w 496 320 512 320 0
    16. w 512 320 512 240 0
    17. 162 352 176 352 112 1 2.1024259 1.0 0.0 0.0
    18. w 208 320 144 320 0
    19. w 560 368 560 240 0
    20. w 544 192 544 176 0
    21. w 432 112 560 112 0
    22. g 560 112 560 128 0
    23. w 496 256 528 256 0
    24. w 528 256 528 240 0
    25. w 352 112 432 112 0
    26. d 336 368 432 368 1 0.805904783
    27. d 544 176 432 176 1 0.805904783
    28. d 496 320 496 256 1 0.805904783
    29. w 432 352 432 304 0
    30. w 576 240 576 384 0
    31. w 576 384 432 384 0
    32. w 592 192 592 64 0
    33. R 208 64 160 64 0 0 40.0 14.5 0.0 0.0 0.5
    34. w 592 64 208 64 0
    35. w 432 368 560 368 0
    36. w 432 352 432 368 0
    37. w 432 384 336 384 0
    38. w 336 368 336 384 0
    39. w 432 208 432 176 0
    40. d 432 272 432 208 1 0.805904783
    41. o 6 64 0 39 20.0 1.6 0 -1
    42. o 0 64 0 39 20.0 0.025 0 -1
    43.  
     
  15. alyeomans

    Member

    Sep 13, 2010
    29
    2
    It is more than likely that the circuit needs a storage capacitor to have a reservoir during the switch. The relay is a mechanical device and takes a long time to switch compared to a diode and thus needs a much larger capacitor (becomes pricey).

    As suggested above the diode method is faster, it will greatly reduce the switching time and capacitor size for your purpose.

    To suggest another circuit see attached as an alternate to to the relay.

    battery backup cct.png

    Cheers
    Al
     
    parmaja likes this.
  16. dtm

    New Member

    Apr 4, 2015
    1
    0
    Why the comparator was used: When the line voltage fails the DC output of the power supply is still at 12V. As the filter capacitors in the power supply and router slowly discharge the relay would remain energized until the voltage had decreased to the point where the relay dropped out. By this time, the voltage input to the router would be below the minimum needed to sustain the processor and cause the router to reboot. The comparator is set to energize the relay and bring the backup power into the circuit before the voltage drops too low.
    ---
    The advantages of using a relay: The relay isolates the router from the battery charger. This allows the use of any type of backup power. Many chargers, in particular automatic lead-acid chargers, are poorly filtered and poorly regulated. Independent charging of the battery also minimizes the charge/discharge cycles needed to keep the battery "topped off" and thus extends the life of the battery while maintaining a more constant input voltage on the router. There is also no voltage drop through steering diodes. Many commercial UPS systems still implement relays for these reasons.
    ---
    The disadvantages of using a relay: It is mechanical. It consumes more power. It switches slower. It makes a click noise. It also makes the circuit more complicated.
     
Loading...