Using Lithium Iron Phosphate batteries with APC Smart UPS

ze_cook

Disciple
Fair warning: messing around with mains voltage (that the UPS generates) or high discharge rate batteries can set things on fire if you're not careful enough, or even kill you. Do not attempt this if you are new to these things, better let someone experienced handle.

Now that that's out of the way, let's start.
20240528_170826.jpg


I have a modest homelab, with a main server (12th gen, 48tb raw storage), mini pc pfsense router, switch, access points etc. On average this setup consumes 70w, is fairly quiet and lives in the pooja room in our apartment. With frequent powercuts though (and no DG backup), the APC ups in charge of running the lab fails often. I have an APC BR-1000GIN that has a 24V 9Ah battery pack. It has a theoretical capacity of >200Wh, but with lead acid battery losses, inefficiencies in the UPS, aging, the same 70W load has an expected runtime is ~50 mins. This being a smart UPS, my server can communicate with it over an USB cable, and pulls stat from the UPS to report voltages, load, runtimes etc. live.
1716905091468.png

My server is setup to shutdown safely when battery level reaches 30% or runtime is at 20 minutes, whichever is earlier. This gives me enough of a safety margin, even if the batteries are degraded. Effectively, my UPS is able to run my server for 30 minutes, and powercuts often lasting >1hr means the a shut down is certain. Frequent shutdowns interfere with long running tasks, such as parity check (takes ~23Hrs for 16TB drives), which gets aborted in case of a shutdown. I wasn't happy with the UPS, and wanted a longer battery backup. APC sells external battery packs for the Smart UPS series, which adds 4x 12v 9Ah batteries, effectively tripling the capacity. Costs 10k ish, comes with a neat little enclosure that looks like the UPS, and has a removable connector. But paying 10k more for low capacity lead acid batteries felt like a rip off, and LiFePO4 has a far better energy density and cycle life, though they're more expensive.

It was time to do some homework, can I even use LiFePO4 batteries? The graphs tell me that my UPS charges the battery up till 29.2 volts, which is exactly right for LFP full charge voltage, 3.65 * 8. It then idles the battery at 28V, which should be fine for LFP. The discharge curve for LFP is similar to lead acid, but flatter, hard to estimate state of charge (SOC) from voltages alone. For a typical SLA battery, at C/20 discharge rate, 10% SOC is ~23V, which corresponds to ~5% SOC for LFP batteries. LFP low voltage disconnect is normally set at 20V for a 8s pack, and the UPS should cut off before reaching 20V. Everything checked out electrically, was time to make some purchases.

I was wondering how I would connect the battery to the UPS, but then I came across this.
20240507_151126.jpg

The exact external battery connector cable, being sold in retail market for 900rs (from an online shop called estorewale, here in Bangalore). Ordered, arrived in a few days. Has a sturdy connector, and 10AWG wires. The connector has 3 pins, labeled +, - and s, with s shorted with - on the other end, probably used as a sense pin. The connector being sorted, it was time to actually make the big purchase, the battery.

Went through some suppliers on indiamart, some unresponsive, some quoting outrageous prices, and one trying to sell me (possibly) C grade cells, with the assumption that at most I'll get 80% capacity from the get go. I had 2 choices here, either build the battery from bare cells, bus bars, bms etc, or simply buy a pre-built battery. I did not want to invest a lot in tools/time actually building the battery and possibly mess something up while doing so. Found one supplier who were promising, prices were decent, and finalized a deal. Cost me 37k all inclusive (battery, gst, shipping) for a 24v (8s) 100Ah LFP battery with metal enclosure, Daly 100A smart bms with BT. They took 2 weeks to make the battery and deliver to BLR, but the battery arrived in good condition. It arrived in a sturdy metal enclosure, 6AWG (copper?) cables and 120A anderson connectors, weighs probably around 20kg, has a nice spring loaded handle on top. The only downside I see are the rivets, as that makes the cells/bms inaccessible (unless i drill them, which is dangerous with charged LFP cells inside), but they do offer a 3 year warranty (not sure if you'll be able to claim it if anything goes wrong) so the rivets sort of makes sense.
20240528_140750.jpg
The BMS does have a bluetooth module though, but it goes to sleep after an hour (can be changed) if the battery is idle. I had already ordered some 120A anderson connectors from sharvielectronics, but until they arrive, this is the sketchy setup I've done to activate the bluetooth module/charge the battery. Upon connecting to the BMS, the app asked for a passcode, which I had to pester the supplier for, but eventually they provided it, and I had full access.
Screenshot_20240528_184427_SMART BMS.png


The BMS has 4 cell temperature sensors and a MOSFET temp sensor. Surprisingly enough, all 8 cell voltages are very close, with difference of 1 milivolts (!!). Did not expect this at all. And this has not drifted as the battery charged from 49% to 64%. The supplier probably used matched cells, did a top balance and then discharged the battery (or the voltage sensors are faulty). It's charging fine with the UPS. Also, turns out the UPS does not require main batteries to be in to work, so I can remove the lead acid batteries entirely (does not require disassembly, just need to slide them out), and don't have to worry about 2 different battery chemistries in parallel.


Need to do a full discharge test to check the actual capacity, but waiting on the anderson connector to finalize the setup. A note on UPS, they are not meant to be running for longer durations, at full loads, and are specced accordingly. I will probably get by with my setup as my load is typically ~11% of the rated capacity, but if you do this yourself, take thermals and aging into consideration as well. Will try to keep this thread updated as I do more tests.
 
Question: does the UPS have a LiFePO4 mode?

If not, I strongly urge you to stop using it immediately, or at the very least relocate the battery somewhere it can burn without affecting any thing else.

At first glance one might think both 24V Lead Acid (Pb) and 24V LiFePO4 (LiFe) batteries are the same voltage so it's a direct swap, but the nuances go deeper.
  • LiFe charger can be charged faster than a Pb since it can easily accepts more current than the measly 0.1-0.2C of Pb, so you can use the same charger as long as voltage match...this is totally fine
  • But once fully charged, Pb charger switches to trickle mode. This compensates for the high self-discharge rate of Pb batteries, thereby keeping them at 100% SoC, without overcharging them
  • LiFe doesn't need trickle charging. The charger should be disconnected once 100% SoC is achieved and it can be stored for stand-by use for a long time since it has a low self-discharge rate
  • Putting LiFe on trickle charge would result in overcharging, which is BAD for any Lithium battery, which might result in thermal runaway. Ever seen EV's catch fire? This is the primary cause
  • You're probably thinking the BMS will protect you: while it certainly helps, it is the job of the charger to detect fully charged state and disconnect. BMS is there to protect the cells from overcharging, excess discharge and over current, and provide a bit of balancing for individual cells
  • BMS can't disconnect the battery AND keep the battery ready for use by the UPS in case of power cut.
  • Not an issue for your specific use case, but LiFe typically have very low discharge rates. Pb in a 1100VA UPS can easily provide the 1100/12 = 46 amps to support 650W load (assuming 60% efficiency). If you try the same with LiFe, you will trigger over current, which might disconnect the battery from UPS at best, or catch fire at worst.
TLDR: Use the right tools for the right job. You can put kerosene into a petrol car and fire up the engine. It will definitely run for some time. But it will also destroy the engine. Just because you CAN do it, doesn't mean you SHOULD, or it is even safe to do so.

I got a LiFe battery last month and experimented with it: once fully charged, the BMS disconnects the battery for a few seconds. A proper LiFe charger will then stop charging. But a trickle charger will try to resume charging, and trip the protection circuit again, and this loop keeps repeating.

Also keep in mind that Li fires are almost impossible to put out - it can self ignite days after being doused in water, since the damaged cell will heat up gradually over time.

----

If the UPS does support multiple battery chemistries like how Solar Chargers do, then I just wasted my time typing all this lol

An easy way (at least in my mind) for retrofitting LiFe batteries in Pb systems is to add an extra cell in series. Since the total voltage required for 9 cells in series to reach 100% SoC will never be reached by a 24V Pb charger's 29.2V, there won't be any risk of overcharging. Downside is you will get less usable capacity, but this will increase your battery life

@rsaeon any thoughts?
 
The graphs tell me that my UPS charges the battery up till 29.2 volts, which is exactly right for LFP full charge voltage, 3.65 * 8. It then idles the battery at 28V, which should be fine for LFP.

That's so very, very close to the ideal voltages for 8s LFP battery pack. It's really helpful to know that this UPS is about as good as it gets for a LiFePO4 conversion with minimal modifications.

These are the ideal voltages:

24V 8S LiFePO4 Battery w/ BMS
  • Absorption: 29V
  • Float: 27.2V
  • Inverter Cut-off: 21.4V-24V

And if you want a 5000+ cycle lifespan (13+ years at daily full discharge):

If you want your LiFePO4 cells to last a long time, you can set your absorption to Victron's custom LiFePO4 charge profile recommendation:
  • 12V Battery: 14.1V
  • 24V Battery: 28.2V
  • 48V Battery: 56.4V
You can pull full capacity with the absorption figures above, but the charge rate will be reduced at high SOC.

Float should be 13.6V/27.2V/54.4V

Low voltage disconnect should be 12V/24V/48V

From: https://diysolarforum.com/threads/r...e-for-diy-lifepo4-batteries-sticky-post.5101/

You might be able to tweak the charging/float voltage of this UPS to bring it close to these values, but it's probably not necessary since this isn't a solar setup where you'd be charging/discharging daily.

Which leads to the question — why a 100Ah batttery pack? This UPS tops out at 600W, so if you're drawing the maximum capacity, you'll see a run time of 24x100/600 = 4 hours. At your current load of 70w, it's over 34 hours of runtime. A 6Ah battery pack of 32650's from quartzcomponents would've costed around Rs 4k and give you two hours of run time. Larger LiFePO4 cells are useful when you have a high current draw, since most cells are limited to 1C discharge. A 32650 based pack (6/12/18/24Ah) would be limited to a 24x6 = 144W max load. Your 100Ah pack can easily handle over 2000W constant load.

  • Putting LiFe on trickle charge would result in overcharging, which is BAD for any Lithium battery, which might result in thermal runaway. Ever seen EV's catch fire? This is the primary cause

This UPS float/trickle charges at 28V, which works out to be 3.5V per cell, which is less than the 3.65Vpc safe maximum, so there shouldn't be any issue with overcharging. Not all UPS/Inverters do this, but it looks like this specific APC model is uniquely suited for an easy LFP swap. Not NMC/Lithium Ion, but LiFePO4/LFP.

I left my 100Ah cells connected to 40A charger at 3.65V for over a day and there was no temperature rise over ambient, or any current draw, it flatlined to zero after full charge was achieved.

  • BMS can't disconnect the battery AND keep the battery ready for use by the UPS in case of power cut.

If the UPS floats/charges at less than the BMS cut-off, then there shouldn't be any battery disconnection issues. Which again, this UPS appears to be just about perfect for a LFP conversion, it's very exciting to know!

The biggest issue/drawback with LFP battery swaps is that the BMS would cut off the battery during a discharge before the UPS triggers a shutdown or low battery alarm. So you'd need to put in a system that prevents this scenario from happening (turning off load before the BMS's low voltage disconnect kicks in).

I have a similar issue with LA batteries in inverters, my Luminous inverters signal a low voltage alarm at 11.5V per battery and cut off load abruptly at 11.4V. I've setup battery monitors that trigger shutdowns before this voltage is reached. LA voltage levels also "bounce back" a little bit after the load is decreased so the inverter never actually shuts off. If a system fails to shutdown, then yeah, the inverter cuts off power abruptly. But I do not know if LFP's have a similar "bounce back" behaviour.

photo_2024-05-29 16.14.58.jpeg

Arrow points to the moment where shutdown is wrapping up. The reading after that is the "bounce back", this is for a two LA battery 24V system. If it drops to 22.8V, the Luminous inverter would cut off power.

But in this case, using 100Ah battery pack with a 70W load, this will probably never happen (BMS low voltage disconnect). You might even be able to move the entire setup to a cart/trolley, and keep your homelab online while switching houses — if you're chasing uptime stats like me:

mikrotik.png

  • Putting LiFe on trickle charge would result in overcharging, which is BAD for any Lithium battery, which might result in thermal runaway. Ever seen EV's catch fire? This is the primary cause

From what I've been able to read about (I'm not an expert) but EV fires are usually due to the dynamic nature of the system (bumps and knocks) which loosen up connections over time and cause imbalanced charging and/or arcing inside the battery pack which may not be built to the best standard, or when a less than ideal charger is used. In a static system like this, these issues shouldn't occur with a LFP pack.

I got a LiFe battery last month and experimented with it: once fully charged, the BMS disconnects the battery for a few seconds. A proper LiFe charger will then stop charging. But a trickle charger will try to resume charging, and trip the protection circuit again, and this loop keeps repeating.

Did you monitor the voltages? If there's a way to adjust the charging voltage, change it to a value less than the BMS cut off. I'm considering swapping out the LA batteries in a 750VA ups with a small LFP pack but that's because my APC can be reprogrammed to adjust the charging voltage through a serial cable and an obscure set of commands.

An easy way (at least in my mind) for retrofitting LiFe batteries in Pb systems is to add an extra cell in series. Since the total voltage required for 9 cells in series to reach 100% SoC will never be reached by a 24V Pb charger's 29.2V, there won't be any risk of overcharging. Downside is you will get less usable capacity, but this will increase your battery life

That sounds like an inefficient but simple way of adding LFP packs to an unmodifiable inverter/UPS but it would not be easy to find a LFP BMS that can handle an odd number of cells (5S/9S/17S for 12V/24V/48V systems).

A note on UPS, they are not meant to be running for longer durations, at full loads, and are specced accordingly.

Your particular model should be fine, so long as it has a fan.
 
1st update.

The anderson connector arrived yesterday, but man the lugs are heavy duty af. My tools were almost not enough for a good crimp, had to use a lot of elbow grease, but it was done. Crimp looks solid enough, and finally connected the battery with a less sketchy connection.
1000171876.jpg

Will probably fill the wire side of the connector with 2 part epoxy. Started charging the battery, while closely monitoring the voltages, and stopped charging overnight in case something went wrong. My UPS has an average charge current of ~3A, took ages to reach full (?) charge.

I was monitoring voltages closely, and charging turned off at 28.2 volts, not 29.2. I suspect the UPS monitors the charge current and once it reaches a low threshold, stops charging the batteries. 28.2 is still >99% for LFP 8s battery pack, provided cells are balanced.
1000171866.png

As you can probably see, they're not that well balanced at the top of the cycle, with one cell (8) tracking lower voltages. 82mv is not great, not terrible, but this probably would've reached higher numbers had the UPS charged the battery till High voltage disconnect. And the BMS is trying to balance the cells, so hopefully they'll be in equilibrium soon ish.

The UPS however worked great for charging the battery, it did not overcharge the batteries, or hit high voltage disconnect of the BMS, as the low charge current threshold (presumably) was hit earlier than SLA batteries. However, I am seeing a 0.1A discharge with no load on the UPS (and mains power), not sure if that's due to the differential of UPS float voltage (27v) and battery voltage (>27.5v). Something to investigate I suppose. Upon closely looking at the graphs, I can see that after full charge the SLA battery voltage drops to 26.6V and then gradually goes upto 27V, where it floats, hence could be an expected behavior.
Screenshot from 2024-05-30 15-40-41.png
As long as the UPS does not keep draining the battery, should be fine.
Putting LiFe on trickle charge would result in overcharging, which is BAD for any Lithium battery, which might result in thermal runaway. Ever seen EV's catch fire? This is the primary cause
As @rsaeon has mentioned, if the charger keeps the charge voltage below HVD but close to full charge, charge current will drop to near zero. EVs do catch fire, but those would be using higher energy dense NMC cells, not LFP (Recent EVs are switching to LFP for increased safety) . LFPs do not out-gas H2 below 100% SOC, and that too will only do so at >150c temps. Conclusion from https://www.sciencedirect.com/science/article/abs/pii/S2352152X20315516 has the relevant info.
Screenshot from 2024-05-30 15-59-47.png


For thermal runaway to start, cell temp has to reach such absurd temperatures that something else has to have gone wrong catastropically, for example the BMS failing to trigger HVD or over temp disconnect, as well as the UPS kept charging beyond its normal parameters. I consider the risk of that happening to be within acceptable parameters.
Not an issue for your specific use case, but LiFe typically have very low discharge rates. Pb in a 1100VA UPS can easily provide the 1100/12 = 46 amps to support 650W load (assuming 60% efficiency). If you try the same with LiFe, you will trigger over current, which might disconnect the battery from UPS at best, or catch fire at worst.
This being a 24v system, the current requirements are ~23A at the same scenario. Typical LFP cells can pull 1C without much trouble, and the battery pack being a 100Ah one, I do not foresee a problem.
I got a LiFe battery last month and experimented with it: once fully charged, the BMS disconnects the battery for a few seconds. A proper LiFe charger will then stop charging. But a trickle charger will try to resume charging, and trip the protection circuit again, and this loop keeps repeating.
This does not seem to happen in my case, where the float voltage is lower (~27v) and the UPS stopped charging before HVD. I will admit this was a case I was concerned about.
Which leads to the question — why a 100Ah batttery pack? This UPS tops out at 600W, so if you're drawing the maximum capacity, you'll see a run time of 24x100/600 = 4 hours. At your current load of 70w, it's over 34 hours of runtime. A 6Ah battery pack of 32650's from quartzcomponents would've costed around Rs 4k and give you two hours of run time. Larger LiFePO4 cells are useful when you have a high current draw, since most cells are limited to 1C discharge. A 32650 based pack (6/12/18/24Ah) would be limited to a 24x6 = 144W max load. Your 100Ah pack can easily handle over 2000W constant load.
I will likely switch over to a Lithium inverter soon (in a few years) and probably start using a smaller pack with the UPS as you recommend, will transition the battery over to the inverter. Charging this battery on the UPS was a chore though, took hours ( a full charge will likely take ~2 days ).
 
For thermal runaway to start, cell temp has to reach such absurd temperatures that something else has to have gone wrong catastropically, for example the BMS failing to trigger HVD or over temp disconnect, as well as the UPS kept charging beyond its normal parameters. I consider the risk of that happening to be within acceptable parameters.
That's precisely my point: the dependence on the BMS is too high with Lithium batteries to maintain safety. LFP is safe relative to Li Ion or LiPo, but it is nowhere close to Pb which can be installed in the hot engine bay of a car without worry. Unless the BMS is capable of working safely with Pb system, you're taking a gamble, so this thread wouldn't be a user guide as much as an experiment.

This being a 24v system, the current requirements are ~23A at the same scenario. Typical LFP cells can pull 1C without much trouble, and the battery pack being a 100Ah one, I do not foresee a problem.
Oops brain fart: forgot my UPS has 2 x 12V batteries in series. Hmm 23 amps might actually be doable on smaller batteries

I'll be the happiest person if this direct battery swap works. (Except perhaps @lockhrt999)

I'm just expressing concerns over the safety aspect of this experiment. Do keep us posted.
 
so this thread wouldn't be a user guide as much as an experiment.
You're right. The only reason I chose "guide" is because this is more of guide than a review, and I don't know if there is a better sub forum for this, do suggest if there is one, I'll ask mods to move it there.
 
It's important to note that you cannot get a 'thermal runaway' situation with LFP chemistry. You can physically puncture it, or intentionally set it on fire but it won't self propagate. It'll eventually fizzle out and stop burning when all the electrolyte is burned off, just like everything else that catches fire (wood, etc).

Lithium Ion (NMC) cells are at risk for thermal runaway because of their chemistry, specifically Cobalt.

You can cause a LFP cell to overheat and eventually start a fire if the BMS fails and a cell is supplied with a voltage higher than 3.65V for a extended period of time, but that is why a BMS needs periodic/daily monitoring in the case of higher capacity LFP packs. This is less vital for smaller packs since again, LFP combustion is not self propagating.

There was/is an ongoing discussions of this on other forums, here's one of them: https://diysolarforum.com/threads/can-lifepo4-batteries-combust-in-thermal-runaway-event.999/

There's a few videos/photos linked in those pages that show what you can expect with thermal events involving LFP chemistry.

editing to add:

Suppose the BMS fails completely and you send the entire 24V to a single LFP cell, what can you expect?

 
Last edited:
I'll be the happiest person if this direct battery swap works. (Except perhaps @lockhrt999)
Dude, I was the first or second person who liked the OP. I love it.

The only thing I wondered about, but didn't ask, that if that BMS has the capacity to alter the charging voltage.

It's important to note that you cannot get a 'thermal runaway' situation with LFP chemistry. You can physically puncture it, or intentionally set it on fire but it won't self propagate.
So it doesn't explode like Lio? nice.

Last year I punctured L-po battery of my mobile while repairing. Some smoke came out, but still used it anyway for another 6 months. :D
 
Dude, I was the first or second person who liked the OP. I love it.

The only thing I wondered about, but didn't ask, that if that BMS has the capacity to alter the charging voltage.
Yeah it's good for everyone and the environment since these batteries will last way longer, and provide more backup time for the same capacity since the DoD is greater than Pb.

BMS circuits only cut off the batteries in case of: over voltage, under voltage, over current, over heating, low temperature.

Changing current/voltage is the job of the charger since each chemistry + battery configuration (no. cells in series/parallel) requires different values. Then there's trickle charging (Pb) and float charging (LiFe) to keep the battery at 100% without overcharging.
 
Back
Top