Author Topic: UPS - Charging a Li-ion battery whilst also powering a load?  (Read 2321 times)

0 Members and 1 Guest are viewing this topic.

Offline IonforbesTopic starter

  • Contributor
  • Posts: 48
  • Country: gb
UPS - Charging a Li-ion battery whilst also powering a load?
« on: March 21, 2020, 10:49:47 pm »
I'm trying to build simple 12v UPS poweredd by 2 18650 cells in series. I was thinking of a sort of topology where the normal 12v source would go to straight into the charger IC. The output of the charger IC would connect to both the li-ion cells and the input of a boost converter in parallel like the 1st image '2S charger block diagram 1' (sorry I can't work out how to embed images). Under normal conditions, the battery would feed the converter to power the load whilst the charger ic from the normal 12v input would keep the battery from discharging. When the 12v onput is disconnected, the battery would feed the converter and discharge (I'll also have some undervoltage protection). When reconnected, the charger would recharge the battery whilst also feeding the converter as I would charge the battery with more current than is being drained from it.

However it seems thaty designs for similar goals instead prefer to go for a different approach where they switch between the regular input source and battery+converter as in the image '2S charger block diagram 2.' Why is this 2nd desitgn the one thaat's commonly used (or is not)? Would the first idea work? Which would be the better route to go down and why? Any help much appreciated.

-Thanks, Ion
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15802
  • Country: fr
Re: UPS - Charging a Li-ion battery whilst also powering a load?
« Reply #1 on: March 21, 2020, 11:04:38 pm »
Not 100% sure of what exactly you envisioned, but basically constantly trickle-charging a Li-ion battery (unlike with other chemistries) is a big no-no.
 

Offline jbb

  • Super Contributor
  • ***
  • Posts: 1265
  • Country: nz
Re: UPS - Charging a Li-ion battery whilst also powering a load?
« Reply #2 on: March 22, 2020, 12:24:51 am »
Hmm
You could look at the Texas Instruments battery charger chips with Narrow Voltage DC (NVDC) feature. But some messing around will be required.

If currents aren’t too high, it might be better to use the LiIon cells in parallel, as this simplifies battery protection and removes the need for battery balancing. (At cost of reduced efficiency.)
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9323
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: UPS - Charging a Li-ion battery whilst also powering a load?
« Reply #3 on: March 22, 2020, 01:30:03 am »
Not 100% sure of what exactly you envisioned, but basically constantly trickle-charging a Li-ion battery (unlike with other chemistries) is a big no-no.
It works perfectly fine if the voltage is limited to 4.1V/cell or less.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline IonforbesTopic starter

  • Contributor
  • Posts: 48
  • Country: gb
Re: UPS - Charging a Li-ion battery whilst also powering a load?
« Reply #4 on: March 22, 2020, 01:53:09 am »
The battery would be hooked up to a dedicated charging IC so if the coltage rose too much the charger would just allow it to discharge and effectively hold it at 4.2V
 

Offline digsys

  • Supporter
  • ****
  • Posts: 2209
  • Country: au
    • DIGSYS
Re: UPS - Charging a Li-ion battery whilst also powering a load?
« Reply #5 on: March 22, 2020, 02:28:05 am »
Quote from: Ionforbes
The battery would be hooked up to a dedicated charging IC so if the coltage rose too much the charger would just allow it to discharge and effectively hold it at 4.2V
It really depends on the load / charge profile and how long you want it to last, EVEN for lead-acid systems. You can get away with minimal degradation with lead-acid, with low to medium power profile, but it is a lot greater with Lithium, again depends on usage. Figures I've personally seen are 10yrs > 5yrs or 3yrs (even 1-2yrs in more extreme environments), with poor management, and I've been making DC UPS's for many years.
The "common" practice is to have 2 separate circuits - one running your dedicated charging IC, and the other running the main supply. You then either use OR diodes / switching relays / power FETs etc, depending on requirements for the change-over when main supply fails. This way, you are pretty much guaranteed the full life expectancy of the battery pack. Again, depends on what "degradation" you are happy with.
Hello <tap> <tap> .. is this thing on?
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9323
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: UPS - Charging a Li-ion battery whilst also powering a load?
« Reply #6 on: March 22, 2020, 02:58:22 am »
The battery would be hooked up to a dedicated charging IC so if the coltage rose too much the charger would just allow it to discharge and effectively hold it at 4.2V
You don't want to float it at 4.2V - it won't last long if you do. 4.1V sacrifices little capacity but dramatically boosts service life. 4V boosts it even more and is preferred for a large, expensive pack. Going even lower gets into diminishing returns and the cost of extra cells to make up for the unused capacity will outweigh the improvements in service life at some point.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline IonforbesTopic starter

  • Contributor
  • Posts: 48
  • Country: gb
Re: UPS - Charging a Li-ion battery whilst also powering a load?
« Reply #7 on: March 22, 2020, 11:18:07 am »
I guess I'll just go for the second circuit that switches the output, seems like a safer bet
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9323
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: UPS - Charging a Li-ion battery whilst also powering a load?
« Reply #8 on: March 22, 2020, 01:25:29 pm »
I guess I'll just go for the second circuit that switches the output, seems like a safer bet
Hint: a non synchronous boost converter already has a diode. All you need is another schottky diode and set the converter so that it does not operate under normal conditions. It helps to add a resistor to the feedback divider (keep it close to the converter to minimize capacitance) so that the setpoint is lowered with the input high.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15802
  • Country: fr
Re: UPS - Charging a Li-ion battery whilst also powering a load?
« Reply #9 on: March 22, 2020, 02:48:04 pm »
Not 100% sure of what exactly you envisioned, but basically constantly trickle-charging a Li-ion battery (unlike with other chemistries) is a big no-no.
It works perfectly fine if the voltage is limited to 4.1V/cell or less.

Nope. This would be called float charging rather than trickle charging then, and should anyway be done with a lot of extra care with Li-ion batteries. You should definitely limit the voltage to less than the max voltage (typically 4.1V for std li-ion and 4.2V for typical LiPo). Significantly less. Otherwise even if the remaining charge current is very low, it will just build up over time and the battery will keep inflating. Guaranteed. Tried and tested. Can be a matter of just a few tens of mV.

Even if you limit the float voltage to less (like 4.0V or less), it will reduce the life of the battery significantly. An UPS use case is typically very close to a battery just being stored unused (most of the time). You don't store a Li-ion battery at more than ~3.8V usually if you want it to last.

Li-ion batteries are still a relatively poor choice for UPSs these days, and there's a reason Lead-acid batteries still predominate for that application. And I would certainly strongly advise AGAINST it for a beginner or even someone that doesn't fully grasp all the subtleties of Li-ion. Just my 2 cents.

« Last Edit: March 22, 2020, 02:49:43 pm by SiliconWizard »
 

Online magic

  • Super Contributor
  • ***
  • Posts: 7458
  • Country: pl
Re: UPS - Charging a Li-ion battery whilst also powering a load?
« Reply #10 on: March 22, 2020, 03:49:38 pm »
I wonder how laptops maintain their batteries?

I have an over 10 y.o. laptop which must have accumulated a few years of total uptime by now being almost constantly plugged in. It still manages more than half of its original battery life on the odd occasion that power goes out.

edit
Partly answering my own question: current battery voltage reported by ACPI is 15.415V. I suppose that means four cells in series and 3.85V per cell.
« Last Edit: March 22, 2020, 03:58:59 pm by magic »
 

Offline Buriedcode

  • Super Contributor
  • ***
  • Posts: 1718
  • Country: gb
Re: UPS - Charging a Li-ion battery whilst also powering a load?
« Reply #11 on: March 22, 2020, 04:25:27 pm »
I wonder how laptops maintain their batteries?

I have an over 10 y.o. laptop which must have accumulated a few years of total uptime by now being almost constantly plugged in. It still manages more than half of its original battery life on the odd occasion that power goes out.

edit
Partly answering my own question: current battery voltage reported by ACPI is 15.415V. I suppose that means four cells in series and 3.85V per cell.

Because the battery isn't always charging.  And when plugged in the laptop is powered by the DC input, so the battery is effectively only powering its support circuitry.  Laptop batteries' life is based on charge/discharge cycles, as well as whatever limit the BMS has set.  Often the limits are set so that the battery pack stops allowing charge, so the user replaces the pack before performance degrades badly, or just so the user replaces the pack every few years for safety purposes.   If your laptop spends the majority of its time plugged in, then that isn't very many charge/discharge cycles used.
 

Offline Buriedcode

  • Super Contributor
  • ***
  • Posts: 1718
  • Country: gb
Re: UPS - Charging a Li-ion battery whilst also powering a load?
« Reply #12 on: March 22, 2020, 04:31:33 pm »
To the OP, I may be missing something here but aren't you just talking about load sharing?

https://ww1.microchip.com/downloads/en/appnotes/01149c.pdf

Most, if not all lithium chemistry chargers use current draw at constant voltage for charge termination.  SO it charges at constant current, then when maximum cell voltage is reached, it holds that voltage, allowing the cell(s) to determine the current.  As the cell charges, this current decreases, and "end of charge" is usually when this current is C/10 or C/20 where C is the charging current.

The upshot of that is, any load on the system also draws current, and if this is larger than C/10 - say you charge at 500mA.  C/10 = 50mA, so any load greater than 50mA will mean the charger never stops, and could mean, that you're constantly putting energy into the battery even when it is at max capacity.  Whilst this current may be small, and would probably just cause slight heating, it is still generally a bad idea.
So it is best to keep the charger circuit directly connected to the battery, but isolate the load with a MOSFET, so when charging, the only thing the charging circuit "sees" is the battery.
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15802
  • Country: fr
Re: UPS - Charging a Li-ion battery whilst also powering a load?
« Reply #13 on: March 22, 2020, 04:51:55 pm »
I wonder how laptops maintain their batteries?

I have an over 10 y.o. laptop which must have accumulated a few years of total uptime by now being almost constantly plugged in. It still manages more than half of its original battery life on the odd occasion that power goes out.

edit
Partly answering my own question: current battery voltage reported by ACPI is 15.415V. I suppose that means four cells in series and 3.85V per cell.

Because the battery isn't always charging.  And when plugged in the laptop is powered by the DC input, so the battery is effectively only powering its support circuitry.  Laptop batteries' life is based on charge/discharge cycles, as well as whatever limit the BMS has set.  Often the limits are set so that the battery pack stops allowing charge, so the user replaces the pack before performance degrades badly, or just so the user replaces the pack every few years for safety purposes.   If your laptop spends the majority of its time plugged in, then that isn't very many charge/discharge cycles used.

Yup. Laptops just charge the batteries when they are under a certain level too. For instance, if you're on DC supply, it will provide power to the laptop AND will charge the battery ONLY when it is under a certain level (depends on the laptop and configuration - can be anything from 80% to 95% or even 100%) There's always some kind of "hysteresis" implemented with usually two thresholds (the battery's state under which the charging kicks in, and the state over which it stops charging.) If you constantly leave your laptop on DC adapter, the battery will recharge only when it has self-depleted to a given state as I just said, and since a Li-ion battery in good shape has a relatively low self-discharge, it doesn't happen very often.

So it requires some kind of "intelligence" - granted it's pretty simple overall, but it will still require some logic to do this. If you're trying to build a PSU, you should definitely control the charging in a similar way probably with some MCU controlling the charging circuit.
 

Online magic

  • Super Contributor
  • ***
  • Posts: 7458
  • Country: pl
Re: UPS - Charging a Li-ion battery whilst also powering a load?
« Reply #14 on: March 22, 2020, 06:36:57 pm »
Yup. Laptops just charge the batteries when they are under a certain level too. For instance, if you're on DC supply, it will provide power to the laptop AND will charge the battery ONLY when it is under a certain level (depends on the laptop and configuration - can be anything from 80% to 95% or even 100%) There's always some kind of "hysteresis" implemented with usually two thresholds (the battery's state under which the charging kicks in, and the state over which it stops charging.)
I have noticed it too. Normally the "charged" LED is lit, but sometimes the "charging" one lights up for a short time. I just set up a script which logs battery voltage on that laptop so I will see what the thresholds are.

At any rate, laptops are proof that with proper techinque a perfectly viable UPS can be built around Li-ion.

update
Charging kicked it an 3.81V per cell and got it up to 4.17V per cell, although I don't know the exact algorithm and termination condition used.
« Last Edit: March 29, 2020, 09:46:12 am by magic »
 

Online magic

  • Super Contributor
  • ***
  • Posts: 7458
  • Country: pl
Re: UPS - Charging a Li-ion battery whilst also powering a load?
« Reply #15 on: August 26, 2020, 08:57:00 pm »
I just set up a script which logs battery voltage on that laptop so I will see what the thresholds are.
Time to dig this thread from its grave :)

The script ended up running for over three months before I killed it. And today I plotted the result, prompted by another Li-ion thread.

So this is how my laptop manages its battery. I testify that it spent probably tens of hours permanently on mains power over many years. The battery has been discharged no more than 10 to 20 times. It still holds enough juice for maybe 75% or more of the run time I remember this laptop having when new. This doesn't take into account hardware and software upgrades.

Drumroll... :popcorn:
 

Offline aheid

  • Regular Contributor
  • *
  • Posts: 245
  • Country: no
Re: UPS - Charging a Li-ion battery whilst also powering a load?
« Reply #16 on: August 28, 2020, 07:08:43 pm »
Thanks for providing real data, not unexpected but still very interesting!
 

Online magic

  • Super Contributor
  • ***
  • Posts: 7458
  • Country: pl
Re: UPS - Charging a Li-ion battery whilst also powering a load?
« Reply #17 on: August 28, 2020, 07:34:32 pm »
BTW, I forgot to add: time scale is in days and I only posted two weeks.

The rest wasn't any different, so :=\
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf