# Providing DC power with failover DIY for IP camera

I'm building a simple battery backup box for a 5V IP camera. I've got a few options for battery, sealed lead battery or a mix of portable LIPO style "USB" power bricks. I've seen boards built for security systems that supply power to the system via 110 to 12V DC while keeping a sealed lead battery charged then without interrupting power switch over to the battery when the power goes out. These boards are $70-$100.

The USB battery pack bricks are nice because they regulate down to 5V built in. The one I'm testing now has a 19V power supply for charging and so far it will charge the battery while the camera pulls power from the USB connection. My concern in this configuration is that The battery will be in a constant state of use and charge while the camera pulls power.

I'm guessing the impact of constant use and charge will shorten battery life versus keeping the battery charged without use. So my goal is to find a way to connect two 5V sources, one is the factory 5V camera adapter, the other being the battery source and have it switch to the battery source when the DC adapter looses power without interrupting power to the camera. The battery has a built in charge regulator so while the camera runs off of the 5V from the DC adapter the battery will stay charged.

SparkFun has a LiPo Charger/Booster that works online.

• note the current limit of this one. Based on the schematic, i would say that the current limit is always, not just for the charging part. Its also quite inefficient since it steps down, then back up under normal operation. Apr 14, 2015 at 19:08

The application described is almost ideally suited to the use of a simultaneous charging and power sourcing IC.

Several other manufacturers offer similar power source selection devices, with various additional features. It would be worthwhile to examine and distill the design requirements to greater detail, then narrow down to a specific part that would best fit such requirements.

• This is great info Thanks. I'm still not convinced the USB power brick is the way to go as it is not performing as expected. A 12ah sealed lead 12V battery with 5V regulator provided 30 hours of power to the camera whereas the 8000mAh USB brick battery provided only 9. The camera pulls an average of 300mAh, the math tells me the 8000 mAh USB brick should have lasted 18 Hours and the 12000 mAh lead battery 28 hours. Once I know what battery and voltage I'm going with I can focus on components for the failover and charge. May 17, 2013 at 20:25
• Is that a switching or linear regulator, and if switching, what is the efficiency at the different input voltages? 8000 mAh at 3.7 Volts is a lot less energy than 12 Ah at 12V. Jan 17, 2014 at 5:29
• From your numbers, your USB brick worked great! The SLA battery has 12v*12Ah=144Wh of power. The USB brick has 3.7V*8Ah=29.6Wh of power. If you got 30 hours with 144Wh you can expect 6hrs with 29.6Wh and you got 9! (My calculations are back-of-the-envelope not exact due to varying voltage during discharge, SLA low voltage cut-off, etc.)
– TvE
Jun 25, 2018 at 17:31

The battery will be in a constant state of use and charge while the camera pulls power.

I think this is un-true. The battery will largely see a "float" voltage, and act as an impedance reducer for the source power seen by the load.

Even LiPo batteries, notoriously finicky and unwilling to "trickle" charge, can work fine in a "float" situation where the floating voltage is lower than the top charge voltage. I'd expect the proper float voltage to vary by specific cell, but be in the 3.9-4.05V range.

As long as the battery management system ("charge/load controller") knows to do the right thing with the float voltage, you'll do fine. If you want ready-made products, the SeeedStudio LiPo Rider Pro might be something to look at.

• What you write is all well, how would you actually implement it, cost efficiently? Where do you get a LiIon charger that you can set to stop at 3.9-4.05v that doesn't cost an arm and a leg (or at least a significant multiple of a basic 4.2v one)? You're basically into programmable chargers at this point.
– TvE
Jun 25, 2018 at 21:22
• You mention the SeedStudio LiPo Rider Pro, which uses the CN3065 charging chip, which charges to 4.2v. As far as I can tell from the schematic, you'd be charging the LiPo from 4.1v to 4.2 volt, then discharging to 4.1v and recharging back up. Not exactly LiPo life-extending as far as I know.
– TvE
Jun 25, 2018 at 21:28
• It's true that adding a low-power MCU with an ADC, or something like that, will add some cost. For a one-off project, like the original requestor seems to have, that's probably totally fine. (MSP430 are good for low power.) Also, I remember using chargers where the top voltage was set with a resistor divider, but I can't recall the parts number off-hand. Maybe try looking for lead/acid cell CV/CC charger chips? Jul 16, 2018 at 21:58