Emergency Backup Power and Wallwarts Eliminator

DC Uninterruptible Power Supply I built for cluster of Modem, router, VoIP etc. It also consolidates the power adaptors.

Similar projects worth following
Blackouts/brownouts can happen whether you are in 3rd world country or one with an aging electric grid or just plain bad luck. As we rely more and more on internet instead of telephone line for our communication, it is important to have some form of backup power for our critical home network in case of an emergency. Even then always have an alternative means of making an emergency calls.

In your traditional UPS, backup battery power is converted to AC and then back down to DC again to the various wall warts to power your devices. This DC UPS improves on the efficiency as it bypasses the extra conversion step to DC with high efficiency power supply modules. The added bonus is that you have now removed the clutter of power bricks.

This system has been in service in my home for 7-8 years now and survived a few short blackouts. It is something simple enough to be designed and put together by an experienced hacker.

Here is the block diagram of my UPS.

A old laptop 18V adaptor is used as the main power. The voltage is choosen to be just high enough for recharging the back up battery. The output of the adaptor and the battery is wired together with Schottky Or'ing diodes for their low drop and fast switching. Since the battery voltage is always lower than the supply, the diode on that branch is reverse biased. During a power outage, the power is routed from the battery. As the voltage from the AC adaptor drops below the battery, the diode connected to the battery starts to conduct and the battery picks up the slack. The switching is smooth as the bulk decoupling capacitors supplies the current during the transition.

The battery charger keeps the battery charged. NiCd and Lead Acid batteries are suitable for this type of application as they can handle long term trickle charge. Initially I used a NiCd pack, but switch to Lead Acid as I needed the higher battery capacity for the higher power electronics. UC2906 has temperature compensation and a 2 steps float charge for extending the battery life and is far superior than your regular float charger.

Some of the things that could be improved upon is to add a microcontroller to monitor the voltage, current usage, run time, a low battery alert. Since the battery life depends on the charger, I would still use a charger controller instead of rolling my own in firmware.

An under-voltage shutoff circuit protects the battery from over discharge. As you drop the load, the discharged battery voltage would climb back up. A large hysteresis is used to make sure that the output power would turn on after the AC power has been restored.

A Bargraph Display with integrated LM3914 driver was used as a voltage monitor. The part is now obsoleted. Inexpensive 3 digits Voltage display from China can be used as an upgrade/substitute.

My older design with integrated DC/DC. Everything were soldered down. This makes upgrading a soldering/desoldering exercise.

DC/DC Converters are used to convert the 18V down to the 5V/12V levels. After a couple of PCB revisions of trying to tailor to the changing needs of my electronics, I have decided a modular approach for the DC/DC modules. I used the old 78XX pinout for the modules. You can also modules that uses the same pinout and in similar form factor. My "SMPS replacement for 7805" was part of the module collection.

My new modular approach uses a 3-row connector (trimmed down VME connector) for the plug-in power supply modules. A breakout area with connectors are added to make it easier for changing the outputs. A1..A2 are Auxillary outputs that are have no backups. B1..B4 are the backup from modules and there are 2 outputs that bypass the modules.

A number of the routers can handle the higher voltages as they have internal buck converters. Some of them are designed with a wider range of input voltages as they may be using a non regulated transformers or non-regulated switch mode supplies (as they reduce the cost for $0.30). Those can be used with a jumper bypassing the module. There are some oddball modems such as my old DSL modem that requires 26V supply. For those, I have designed a boost converter module.

My ATA (VoIP) and my cordless phone both have decided to cut cost and both of them omitted the transformer to the POTS connection. This results in an undesirable DC current going through the supply and phone line. I had to make an non-regulated isolated supply for the phone.

Additional backup batteries can be added as it is a simple Or'ing diode connection. With a 8AHr battery from an old UPS and a home made float charger (show above), I got about 4 hours of backup power.

Looking at the list of WiFi hotspot from my router before and during a blackout, I can tell that about half of them has UPS, a large portions of them drops off after 2 hours. Not too bad for what I built from parts, free samples and from recycled parts.

Hardware Description

Read more »

  • 1 × TL7702 (TI part) Powerr Supplu Supervisor / Power Management ICs / Power Supply Support
  • 1 × power supply modules (TI)
  • 2 × b340 3A 40V Schottky diode / Discrete Semiconductors / Diodes and Rectifiers
  • 1 × Ebay voltage display module (TMS3934 is obsoleted) Voltage Display
  • 2 × mosfet P-MOSFET

View all 8 components

  • Module Breakout

    K.C. Lee05/12/2015 at 20:23 0 comments

    This is the boring part of the design. I used a VME 3 rows DIN receptacle that I removed from old parts for the plug-in power modules. I removed a portion of the connector as it was too wide for my box.

    B Row is the ground. The A Row is the output from the power modules. The pins are connected to JP1-3 which is wired to the power cables for my electronics. The C Row is the power input for the modules. A section of it runs directly from the AC Adaptor for the non-essential outputs. The rest are run from the backup power.

  • Undervoltage Shutdown

    K.C. Lee05/12/2015 at 20:01 5 comments

    This is the undervoltage shutdown circuit that protects the batteries from over discharge. A very large hysteresis has been introduced to the circuit to make sure that the power is re-enabled only after the blackout is over.

    TI TL7702 power supper supervisor is used for monitoring the backup power rail. This is the bipolar high voltage version that works up to 18V (and even available in DIP!) This circuit shows how versatile this building block is. It has a timer, a temperature compensated internal reference, open drain true and complement outputs, well defined behaviour down to 1V. To do the same with a dual comparator or a 555 would require a reference source, and more discretes etc, but won't come close.

    On the falling edge, /RESET (open collector) is inactive, so R23, R24 forms the voltage divider and determine the falling threshold. V(fall) = 2.53V * (R23 + R24)/R24 = 9.3V

    On the rising edge, /RESET is at logic low. So the lower branch of the divider becomes R24 // R36 = 3.73K
    V(Rise) = 2.53V * (3.73 + 15) / 3.73 = 12.69V

    With the Schottky Or'ing diode drop of about 0.5V under load, we are looking at about 9.8V when the battery will be disconnected. The diode has almost no load prior to reconnecting, so the circuit recovers at just below 13V.

    The P-MOSFET is driven from the RESET pin. When RESET is asserted (i.e. undervoltage), the MOSFET gate is raise close to +UB rail, thus turning its output off. When RESET is deasserted, R31 + R32 pulls the gate low. R32 and C5 at the gate of the P-MOSFET converts it into an integrating amplifier whose output rises linearly in response to a step change in its input, limiting the in-rush current to downstream capacitor C12.

  • Battery Charger - Part 2

    K.C. Lee05/12/2015 at 16:16 0 comments

    This is the NiCd Charger I used. The charging algorithm of Ni type battery is hard as it depends on a small voltage and rate of change. I used a BQ2002 NiCd/NiMH Charger Controller.

    It is optional as this type of battery are harder to find these day. X3, C4, D4, D5, and C7 are not part of the charger circuit and they should always be there. +UB is the the backup supply rail. Additional battery packs etc should be made with Or'ing diode to +UB.

    Most of the design details are covered by the datasheet and the app notes.

    I have selected C/2 for the charge rate by connecting TM pin to mid rail voltage with R5 & R6.

    The CC control signal is level translated by Q3 to the Constant Current ciurcuit. Q5 provides the negative feedback by sensing the voltage across R16 hence regulating the current. In this case, the current is about 0.7A which is roughly 1/2 C for th battery pack I have. Q4 selection is non-critical as almost any P-MOSFET would do.

    Voltage divider R13, R14 is used to attenuate the battery voltage. I have N=10 cells, so I pick R13 to be roughly 9X the value of R14. The BQ2002 voltage is regulated by a 5V Zener diode (D3). Q6 detects when the battery pack is connected and use it to power cycle the BQ2002.

    I use a bicolour LED for the charge status on the front panel: Red = Charging, Green = Battery Full and Off = No batteries.

    J1 is the battery connector. Due to high current involved, a 4-wire connections is used to measure the battery voltage.

  • Battery Charger - Part 1

    K.C. Lee05/12/2015 at 02:31 0 comments

    This is a simple Lead Acid Battery Charger based on TI's UC2906. VCC is 18V from my AC adaptor.

    I based it on Figure 1 "Dual Level Float Charger" from the datasheet. There is an Excel spreadsheet that I used to calculate the values on my Github.

    The charge current is set to 500mA by R1//R2. I also have a NiCd battery and charger with a much faster charge rate to take care of short term outages. The charge current is limited by what my AC adaptor can spare. For my 8A*Hr battery, that should take 16 - 20 hours to fully recharge. This is one area that a microcontroller can provide some flexibility by allocating a higher charge current based on the amount of current available. The charge algorithm for lead acid is actually very similar to Li-ion batteries.

    Figure 2 in the datasheet shows the equation to arrive at the values while figure shows the charging states. The charger is temperature compensated for proper charging.

    The circuit was constructed on a single side PCB that was etched with toner transfer. You want to keep the charger chip near the battery as it sense ambient temperature. Ideally you want to place the transistor on a heatsink away from the charger chip and run wires. There isn't much heat generated in float charge stage where the battery spend most of its time, so the heating effects is minimal.

    3D rendering of the PCB.

View all 4 project logs

  • 1
    Step 1
    1. Figure out the power consumption for your electronics
    2. Find suitable battery and design a charger for it
    3. Size AC adaptor for the load + charger
    4. Size the power components - P-MOSFET, diodes
    5. Layout PCB and populate it with parts etc
    6. Testing to make sure you get the right voltages
    7. Wire up the cables and label them!
    8. Put away your wall warts or sell them :)
    9. Enjoy your work

View all instructions

Enjoy this project?



con-f-use wrote 08/21/2015 at 19:43 point

And another question: I didn't get why exactly you needed some modules isolated (i.e. the converter for the cordless phone and that for the VoIP box). Please explain a little more in depth, what the problem was there. 

Why is there a DC current going through the supply and phone line, when the 18V laptop supply is isolated? I understand the phone line can be on a different potential than mains but that shouldn't matter if the supply is isolated. If the VoIP box was on a different potential than the cordless phone, isolating just one of them should be enough. What am I missing?

  Are you sure? yes | no

K.C. Lee wrote 08/21/2015 at 20:49 point

Both ATA & cordless phone *assume* that the other device connected to them are isolated, so they *both* take short cuts i.e.  bad kludges in their design.  

The VoIP box line interface is not isolated, so one of the phone line signals is actually connected to the power GND.  Dito for the phone except that there is a voltage difference in the two because the ATA tries to make a -48V/-100V supply with an non-isolated inverter.  When you connected this with the cordless phone there is a circuit path going to the phone's line interface back to the power supply side along with the high voltage negative supply.  What I get is a very loud hum as there is a short in connection.  This issue exists for two different ATA models.

There are no outside phone lines connection to POTS as this is VoIP.  So your assumption about phone line and power supply is not relevant.

I am isolating just one of them in the design by using a *single* isolated module for the cordless phone.  I  don't randomly added extra stuff in my design if it works without one.

  Are you sure? yes | no

con-f-use wrote 08/22/2015 at 13:38 point

Thank you. I just wanted to understand, didn't mean to imply your work was anything but perfect.

  Are you sure? yes | no

Neal wrote 02/06/2016 at 03:49 point

My vonage box (12v) and cordless phone (6.5v) were much more fun.  I ended up with my non-isolated dc-dc converter bursting into flames when i connected my dc UPS to them!  

I built my system using an old fire alarm power supply to handle my battery charging and switchover.  Thankfully this means my main dc supply is completely isolated from the power grid and from earth.  3 amps at 24 volts is enough to make one hell of a show though!

  Are you sure? yes | no

leandro wrote 06/13/2015 at 02:34 point

i was planning to build something like this since there are so many power blackouts here in summer...

great work!

  Are you sure? yes | no

K.C. Lee wrote 06/12/2015 at 14:16 point

Project files now available:

  Are you sure? yes | no

vibrolax wrote 05/13/2015 at 01:14 point

Good job working from the junkbox and samples.   I look forward to seeing your finished doc.

  Are you sure? yes | no

K.C. Lee wrote 05/11/2015 at 20:43 point

You don't want any series resistance with the diodes.

Busy doing multiple things right now.  There'll be more documentation on how things works and schematic/board files will be posted at some point.  

  Are you sure? yes | no

Starhawk wrote 05/12/2015 at 00:18 point

OK, cool. Thanks!

Whatever you're doing, I hope you're enjoying it :)

  Are you sure? yes | no

Starhawk wrote 05/11/2015 at 19:46 point

Very nice! I'm interested in building one -- but I'm no electronics engineer, not yet, no sir. I can point you to a datasheet for the battery I have, if you can help me with the rest. Also -- does one need resistors on the diodes?

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates