Build a mini USV/UPS

Batteries, Chargers, and Battery Management Systems.
User avatar
izeman   10 GW

10 GW
Posts: 4907
Joined: Jun 21 2011 8:25am
Location: vienna, austria
Contact:

Build a mini USV/UPS

Post by izeman » Jun 12 2019 7:36am

I plan to install a new smart home security systems. Therefore several low voltage devices need to stay powered during a power outage.
This includes cable modem, switch, smart home hub and the security system itself. All of them run off 5/12V.
So i thought of building a small UPS from 18650 batteries of which i have lot left. Something like a 3s4p system would be 12V/8Ah. Overall power consumption is around 2A, so it will be good for ~4h.
The easiest approach i could think of was a "standard" 3s BMS like this:

Capture.JPG
Capture.JPG (28.01 KiB) Viewed 475 times

The BMS will be permanently connected to mains power via a 12V wall AC/DC converter and to the 12V powered devices in parallel.
That way the battery will be permanently fulled to 12v (which is fine as the battery will have a longer shelf life @4V/cell), and permanently emptied at the same time. Well probably not emptied, as the wall plug gives enough power to keep the battery charged and power the devices at the same time.

Do you see any issues with this approach?

john61ct   10 kW

10 kW
Posts: 859
Joined: Dec 18 2018 2:06pm

Re: Build a mini USV/UPS

Post by john61ct » Jun 12 2019 11:11am

Sitting at Full will reduce their lifetime.

Lead batteries thrive on that, and even those specifically designed for Standby use are not expensive.

Also, if you do go with LI, the voltage range of neither 3S nor 4S will necessarily suit all 12V components.

Filter the output through a DCDC converter / stabiliser.

billvon   100 MW

100 MW
Posts: 2662
Joined: Sep 16 2007 9:53pm
Location: san diego

Re: Build a mini USV/UPS

Post by billvon » Jun 12 2019 11:16am

Use LiFePO4. They don't mind staying at close to full charge all the time.
--bill von

User avatar
izeman   10 GW

10 GW
Posts: 4907
Joined: Jun 21 2011 8:25am
Location: vienna, austria
Contact:

Re: Build a mini USV/UPS

Post by izeman » Jun 12 2019 11:41am

Battery life is not really a concern. I got enough of those cells. And 4V/cell is not fully charged (well almost). So it should last quite a while. If they are dead i can replace the pack.
Buying Lifepo4 for this application is a waste of money - in MY case.
I will also need to add some dc/dc converter to keep the voltage at 12V output when the battery voltage start to decrease (in case of the power outage). I can add 5V/12V/15V ones to cover everything.

john61ct   10 kW

10 kW
Posts: 859
Joined: Dec 18 2018 2:06pm

Re: Build a mini USV/UPS

Post by john61ct » Jun 12 2019 11:50am

And in fact LFP is "relatively damaged" just as much sitting at Full as other LI chemistries.

Just that you're starting of with (from an absolute POV) so many thousands of cycles, we usually don't care about losing them off the back end, if otherwise properly cared for will last for well over a decade anyway.

billvon   100 MW

100 MW
Posts: 2662
Joined: Sep 16 2007 9:53pm
Location: san diego

Re: Build a mini USV/UPS

Post by billvon » Jun 12 2019 10:14pm

izeman wrote:
Jun 12 2019 11:41am
Battery life is not really a concern.
If you don't mind finding out your batteries are shot when power goes out - then you don't need a UPS.
--bill von

jonyjoe303   10 W

10 W
Posts: 80
Joined: Aug 31 2017 9:44pm

Re: Build a mini USV/UPS

Post by jonyjoe303 » Jun 12 2019 11:38pm

myself I would add a cheap overvoltage protection relay (5 dollars). When the battery reaches a certain voltage say 12 volts it stops the charging, the lithium battery will slowly drop voltage when it reaches the minimun you set like 11.6 volts it starts charging again. All my lithium packs have these overvoltage relays, they never fail me.

I had some of these overvoltage relays running 24/7 for over 2 years, they only go on/off as needed. This is good insurance in case bms fails, also it has a nice bright led showing battery voltage.

I had lithium packs I havent used in over a year and they still almost fully charge and work just as good. They are cheap enough, why not use them in your project. Even kept fully charge they will last years, I never seen any degradation. I never had to replace a pack because they lost capacity. The only comparison to what you doing is laptop batteries, they always connected to AC and fully charged, rarely you run a laptop just on battery power.
a overvoltage relay.jpg
a overvoltage relay.jpg (55.75 KiB) Viewed 423 times

User avatar
izeman   10 GW

10 GW
Posts: 4907
Joined: Jun 21 2011 8:25am
Location: vienna, austria
Contact:

Re: Build a mini USV/UPS

Post by izeman » Jun 13 2019 3:05am

billvon wrote:
Jun 12 2019 10:14pm
izeman wrote:
Jun 12 2019 11:41am
Battery life is not really a concern.
If you don't mind finding out your batteries are shot when power goes out - then you don't need a UPS.
I'm with your arguements, but your heavily exaggerating. It's really not the case that batteries will just fail from one day to the other just because they are kept in a charged state. They will loose capacity.
I have a SOHO ups from a german brand with lead acid battery. Guess what happens when the lead acid battery dies. Exactly! It just will not work. They don't have something like regular internal testing or something. You find out if it works when you need it. So regular user tests are mandatory. Same like backups - those never fails. It's the restore that fails. ;)

User avatar
izeman   10 GW

10 GW
Posts: 4907
Joined: Jun 21 2011 8:25am
Location: vienna, austria
Contact:

Re: Build a mini USV/UPS

Post by izeman » Jun 13 2019 3:12am

Btw: I could also just charge to like 3.9V per cell which is close to storage voltage. This would make it last very long. But then i'm losing capacity - which is no big deal, i may just add one or more cells in parallel.

billvon   100 MW

100 MW
Posts: 2662
Joined: Sep 16 2007 9:53pm
Location: san diego

Re: Build a mini USV/UPS

Post by billvon » Jun 13 2019 12:35pm

izeman wrote:
Jun 13 2019 3:05am
I'm with your arguements, but your heavily exaggerating. It's really not the case that batteries will just fail from one day to the other just because they are kept in a charged state. They will loose capacity.
Right. And you will never see the gradual decline until you need it one day - and it won't work.
I have a SOHO ups from a german brand with lead acid battery. Guess what happens when the lead acid battery dies. Exactly! It just will not work.
No different than a li-ion battery.

Overall, UPSes do better with lead acids because
1) lead-acids like to be kept fully charged. That maximizes their life.
2) their degradation rates are _very_ well known in those applications.
3) lots of lead acid companies make batteries specifically for UPS service.

That being said, if you get all your batteries for free, no reason to not use any specific chemistry. Keep li-ions at as low a state of charge as possible to maximize their life, and keep them cool. Use an ACTIVE (not a resistive) balancer since they will never hit the balancer voltages that a resistive balancer requires.
--bill von

User avatar
izeman   10 GW

10 GW
Posts: 4907
Joined: Jun 21 2011 8:25am
Location: vienna, austria
Contact:

Re: Build a mini USV/UPS

Post by izeman » Jun 13 2019 3:00pm

Everthing agreed on, and nothing i will argue about.
I should have been more precise when i asked about your thoughts. It was not about chemistry or batteries in such, but about the layout, or the practical approach.
Feeding the devices and the BMS with the same power line at the same time shouldn't cause any issues i guess, as it's a common charge and discharge port. This port will be open between 3.0 and 4.2V. Lower or higher and it will decouple the batteries.
So if the main power goes out the devices will be powered by the battery. No fancy circuits needed. Correct?

billvon   100 MW

100 MW
Posts: 2662
Joined: Sep 16 2007 9:53pm
Location: san diego

Re: Build a mini USV/UPS

Post by billvon » Jun 13 2019 3:44pm

izeman wrote:
Jun 13 2019 3:00pm
Feeding the devices and the BMS with the same power line at the same time shouldn't cause any issues i guess, as it's a common charge and discharge port.
This works as long as the current from the supply is limited to under the max charge rate of the battery, and as long as the load can operate at the battery charge voltage (which could be 10 volts for a while.) You also need a diode to prevent backfeed of the AC supply.
--bill von

User avatar
izeman   10 GW

10 GW
Posts: 4907
Joined: Jun 21 2011 8:25am
Location: vienna, austria
Contact:

Re: Build a mini USV/UPS

Post by izeman » Jun 13 2019 4:25pm

Ah ok. Didn't think about that. I need let's say 2A for all connected devices. The power supply will be able of let's say 4A. If no device is connected those 4A would go directly to the battery. The 6p pack makes this 750mA per cell. That's 0.3C. Worst case. Normally the max charge is 2A as the other 2A are taken by the devices. But only a few mA will be used as it will just keep the charge. Maybe add a current limiter between power supply and BMS. Hmmm, won't work if powe supply, devices and BMS share the same level. :lol:
The diode as such is a must, sure, to keep current flowing back into the power supply.
For the discharge situation there will be a DC/DC boost converter that will keep the output at stable 12V even with a 9V input.

billvon   100 MW

100 MW
Posts: 2662
Joined: Sep 16 2007 9:53pm
Location: san diego

Re: Build a mini USV/UPS

Post by billvon » Jun 13 2019 4:43pm

izeman wrote:
Jun 13 2019 4:25pm
Ah ok. Didn't think about that. I need let's say 2A for all connected devices. The power supply will be able of let's say 4A.
Make sure it's really 4A. Many supplies rated for 4A will put out 7-8A if you pull them below their voltage setpoint, then either shut down or current limit and get hot.
Maybe add a current limiter between power supply and BMS. . . .For the discharge situation there will be a DC/DC boost converter that will keep the output at stable 12V even with a 9V input.
So sounds like a current limiter going into the battery, and a boost converter coming out of the battery. That works as long as your current draw is far below the charge limit of the battery (sounds like it is.)
--bill von

LeftieBiker   10 kW

10 kW
Posts: 544
Joined: Nov 06 2012 1:33am
Location: Upstate NY, United States

Re: Build a mini USV/UPS

Post by LeftieBiker » Jun 13 2019 5:10pm

Why not take an existing UPS unit sold for electronics backup, and replace the SLA battery with a lithium pack with a nominal ~12.9 volts, with a BMS in line between the UPS and the pack, I think...

john61ct   10 kW

10 kW
Posts: 859
Joined: Dec 18 2018 2:06pm

Re: Build a mini USV/UPS

Post by john61ct » Jun 13 2019 6:11pm

Check out Samlex BBM for a DIY UPS.

PSU ordinarily feeds loads, and keep backup 3S batt charged at 5A and 3.8Vpc, in a power cut, millisecond cutover to the backup


User avatar
izeman   10 GW

10 GW
Posts: 4907
Joined: Jun 21 2011 8:25am
Location: vienna, austria
Contact:

Re: Build a mini USV/UPS

Post by izeman » Jun 14 2019 4:44am

LeftieBiker wrote:
Jun 13 2019 5:10pm
Why not take an existing UPS unit sold for electronics backup, and replace the SLA battery with a lithium pack with a nominal ~12.9 volts, with a BMS in line between the UPS and the pack, I think...
Good idea, but probably to bulky, and this then again means i'd need many seperate power supplies as the 12VDC gets converted to 240VAC and then back to 12VDC.
I like the simplicity and small space footprint of the direct battery approach. I will also add a 12V->24V boost converter to feed the PoE access point, and maybe a step down coverter for 5V for the Raspberry - in case I move it from the living room down to the basement.

User avatar
izeman   10 GW

10 GW
Posts: 4907
Joined: Jun 21 2011 8:25am
Location: vienna, austria
Contact:

Re: Build a mini USV/UPS

Post by izeman » Jun 14 2019 4:46am

john61ct wrote:
Jun 13 2019 6:11pm
PSU ordinarily feeds loads, and keep backup 3S batt charged at 5A and 3.8Vpc, in a power cut, millisecond cutover to the backup.
Setting the power supply to 3.9V would give the same result? Wouldn't it? I would like to keep it as simple and small as possible (and cost effective of course 8) )

john61ct   10 kW

10 kW
Posts: 859
Joined: Dec 18 2018 2:06pm

Re: Build a mini USV/UPS

Post by john61ct » Jun 14 2019 10:30am

I'm not sure what you are asking.

The BBM is an alternative to any other UPS-functionality components.

I've used them for mission-critical gear can't be interrupted by the main bank failing.

Yes the voltage of the "usual" power source can be whatever you like.

User avatar
fechter   100 GW

100 GW
Posts: 13843
Joined: Dec 31 2006 3:23pm
Location: California Bay Area, USA

Re: Build a mini USV/UPS

Post by fechter » Jun 14 2019 10:48am

I was looking at doing the same thing here. One problem is the voltage range of the batteries may be outside the acceptable range for the loads. One solution for this would be using a small dc-dc converter to output a regulated 12v or 5v. Then you could use a 4s pack and charge it to whatever level you think is good. It may be good if the dc-dc only kicks in when the power fails via diode or relay. This is the part I have to think about.

I also have a lot of unused 18650 cells lying around that could be used for this. Sitting at 4.1v and not cycling very often, they should still have 80% capacity after 10 years. I also have some lithium titanate batteries which would be ideal for this application.
"One test is worth a thousand opinions"

User avatar
izeman   10 GW

10 GW
Posts: 4907
Joined: Jun 21 2011 8:25am
Location: vienna, austria
Contact:

Re: Build a mini USV/UPS

Post by izeman » Jun 14 2019 11:52am

These little boards claims 4A output. Sure this is chinese amps, and it will not work converting 5V to 30V@4A, as it's the input current AND the output current that count. But if you say your working battery range is from 9V to 12V and your output is 2A@12V you should be fine.
You can then decide if it's better to down convert 4S to 12V or boost (non fully charged) 3S to 12V.

https://www.aliexpress.com/item/DC-DC-N ... 4c4dTy5a0W


Screenshot from 2019-06-14 18-51-40.png
Screenshot from 2019-06-14 18-51-40.png (173.44 KiB) Viewed 332 times

john61ct   10 kW

10 kW
Posts: 859
Joined: Dec 18 2018 2:06pm

Re: Build a mini USV/UPS

Post by john61ct » Jun 14 2019 12:21pm

No need to go that cheap.

Lots of DCDC converters, 12V-12V "voltage stabilisers" are affordable, reliable and available in-country, even at much higher (and more credible) amp ratings

User avatar
stan.distortion   100 mW

100 mW
Posts: 48
Joined: Jun 12 2019 12:53pm

Re: Build a mini USV/UPS

Post by stan.distortion » Jun 14 2019 12:25pm

If you're not too far in already maybe go up to 4s and drop back down to 12v with an LM7812:
https://datasheet.octopart.com/LM7812-I ... 981488.pdf

Cheap and extremely reliable, shouldn't be any problem finding ready made boards.

john61ct   10 kW

10 kW
Posts: 859
Joined: Dec 18 2018 2:06pm

Re: Build a mini USV/UPS

Post by john61ct » Jun 14 2019 12:26pm

1.5A rating

User avatar
stan.distortion   100 mW

100 mW
Posts: 48
Joined: Jun 12 2019 12:53pm

Re: Build a mini USV/UPS

Post by stan.distortion » Jun 14 2019 12:29pm

john61ct wrote:
Jun 14 2019 12:26pm
1.5A rating
They can be run in paralel or there are higher output alternatives, I've some 5 amp 5v ones buried around here somewhere but can't remember the numbers atm, will have a look and edit if I can dig them out.

Post Reply