Check my reasoning about a charging a battery with the CC/CV algorithm, while attached to the load.

Thread Starter

dtbullock

Joined Sep 13, 2019
4
I'm a newbie - I know V=IR, and VI=P (after considering power-factor in practical circuits), and that's about it. I need to get something built, and I'd like comment on whether my reasoning here is 'on track' or not. I'm not asking for help with designing a circuit (yet) ... I'm more trying to understand what that circuit needs to do, and why. (And whether I need to build one, or could buy one). Sorry it is long.

I have a portable load I wish to power, from a battery if no other power source is available. If another power source is available, it should power the load and charge the battery. One arrangement of charger/battery/load is that the battery is 'attached' to the load while being charged (as opposed to being contained 'contained' or 'detached' when charged).

Something like this:


upload_2019-9-17_0-35-39.png

(I don't know if this 'attached' arrangement is the right way to skin the cat. Possibly it is not. Mobile phones have roughly the behaviour I am wanting, and I hear that they use a 'contained' arrangement ... either the battery is connected to the charger (charging, while the external power-source powers the load), or the battery is connected to the load (discharging)... the battery is never connected to both the load and the power source at the same time. Some kind of fancy switch chooses whether the battery or the external power supply is powering the load, without interrupting supply.)

But plunging ahead with this 'attached' arrangement:

The battery a FusionAGM V-LFP-12-10 (PDF spec) is LiFePO4 ... but has an on-board battery-management-system such its charging characteristic is allegedly like a Sealed Lead Acid battery. Its features are:

  • "Built in State of the Art BMS controls cell balancing, over and under voltage protection and short circuit protection"
  • "Charge using a regular lead acid charger with float mode that does not have auto rejuvination or auto pulse"

In any case, the battery expects a 'CC/CV charging algorithm'. I understand CC/CV thus:

  • The charger delivers a pre-set 'Constant Current' (eg. 1/5 of battery Capacity in Ah .. written as 0.2C) letting the voltage of the circuit be determined by whatever the battery can drive, until that voltage 'gets high enough'
  • The charger then changes modes: now it delivers a 'Constant Voltage'. As time progresses in this mode, it becomes less and less possible to jam coulombs into the battery, and so the current flowing into the battery at some point becomes so minimal, that it is time to stop.
  • The charger decides to 'stop' when the current demanded by the battery falls below a certain limit. It now gives a (lower) Constant Voltage called a 'float' which keeps the coulombs already in the battery jammed in there (but is not really so different from the voltage the battery itself such that there is any real effort to jam more coulombs in).
In my case, with the charger attached ONLY to this battery, that would look like this:

CC phase = 0.2C = 0.2 / 10Ah = 2A.
CC->CV trigger = voltage reaches 14.6V (being the 'cycle charge voltage' per the battery specs)
CV phase = to maintain 14.6V, keep dropping current as required
CV->Done trigger = current falls below 1.0A ('minimum charge current' per the battery specs)
Done phase = drop constant voltage to 13.8V (being the 'float charge voltage' per the battery specs ... 0.5V above the nominal voltage of the battery)

However, in my 'attached' scenario, the charger is NOT connected only to a battery - it is also connected to the load. This means that the charger:

  • In the CC phase, will have to provide additional Current for the load. But how much?
  • In the CV->Done transition, will have to deduct the Current that the load is using (but how much?) from the 'battery now only taking <1A of current' decision, or it will never transition!

Therefore, an important input into the behaviour of the 'charger' (for its CC phase, and to trigger the CV>Done transition) is a measurement of the current used by the load. And the charger is therefore at least a calculator.

And I can't buy one 'off the shelf' that does this (?). So I have to ... build a charger circuit of my own.

Or have I missed something? Thanks for helping me think this through.
 

crutschow

Joined Mar 14, 2008
34,420
In the CC phase, will have to provide additional Current for the load. But how much?
Ideally you would measure the load current and the battery current to determine the total charge current.
In the CV->Done transition, will have to deduct the Current that the load is using (but how much?) from the 'battery now only taking <1A of current' decision, or it will never transition!
Again you just measure battery current to determine the CC to CV transition point.
 

nsaspook

Joined Aug 27, 2009
13,265
You could setup the system like this. With a shunt (or hall current measurement device ) between the battery negative and the charger/load negative buss common.

The polarity of the voltage from the shunt current tells you the amount of charging current to or load current from the battery.
 

BobTPH

Joined Jun 5, 2013
8,952
You are overthinking this. As @crutschow says, only the battery current is relevant in the charging algorithm, you do not need to measure the load current. Of course, the power supply must be able to provide both the load and charging currents at the same time.

Bob
 

crutschow

Joined Mar 14, 2008
34,420
As Bob noted, you only need to measure the battery current, not the load current.
Just adjust the charger to give the desired battery charging current.
The load current will take care of itself.

If you want to use a commercial charger, you will have to hack into it so the load current bypasses the current sense resistor.
 
Last edited:

ag-123

Joined Apr 28, 2017
276
i'd think it would take some research about battery charging, but for lipo batteries
you can take a cue from how this low cost chinese li-po charger ic works
https://dlnmh9ip6v2uc.cloudfront.net/datasheets/Prototyping/TP4056.pdf
these lipo charger modules are widely available on ebay etc
https://www.ebay.com/sch/i.html?_from=R40&_nkw=TP4056&_sacat=0

there seem to be an implicit assumption about the load, i.e. the load is deemed small so that it would imply just charging the battery without the load.

if in your case the load is large, the scenario would change to one in which both the battery and the load are loads
and your 'battery charger' is literally a large power supply supplying both the battery *and* the load
 

Thread Starter

dtbullock

Joined Sep 13, 2019
4
Thanks everyone who replied.

I now know that using a shunt I can 'read' current by examining the voltage across the ends of the slightly-resistive shunt (thanks @nsaspook). A shunt is an 'Amps correlated as milliVolts' device ... awesome! (So that's how ammeters in a multi-meter work!) A shunt is more accurate than hall-effect device, Wikipedia tells me. I can buy shunts rated anywhere from 20A to 200A. OK, so I can measure the current no problem.

@crutschow and @BobTPH have me convinced that my charger need only measure the current flowing to/from the battery (via a shunt) ... so long as the charger has enough capacity to provide current to both the battery and the load at the same time, because:
  • in the CC phase, the charger only has to 'keep up with the battery' by going up/down ... the load draws whatever it wants, when it wants
  • in the CV->Done transition, the charger again only has to notice the current to the battery
So far so good. I now have pretty good specs for my charger. It does seem like I won't be able to use a commercial offering without modifying it though (to base its measurement of the current on an 'external' shunt/ammeter of my own choosing, rather than its own internal shunt/ammeter).

So that might bias me towards building one. I can't actually use the particular 'low cost chinese li-po charger ic' suggested by @ag-123 because it is only 1A for a single-cell li-po (and my battery is bigger), but I'll take a close look at what it does and 'take a cue' from it as suggested.

Thanks again everyone for your time. More questions in a later thread, I'm expecting :)
 

Thread Starter

dtbullock

Joined Sep 13, 2019
4
you can take a cue from how this low cost chinese li-po charger ic works
Thanks @ag-123 ... although it is too small for my application, it still gives me some language to search for bigger ones, and lets me see what is available 'on a chip' in terms of features.

if in your case the load is large, the scenario would change to one in which both the battery and the load are loads and your 'battery charger' is literally a large power supply supplying both the battery *and* the load
.
I agree, that could make things quite simple ... if a suitable pre-built charger can be found and you could disconnect the battery from the load 'at the same time' as you connected the external power supply to the load. That would require some sort of awesomely fast 'switch', I guess? That would be the 'contained' scenario I mentioned. I would want such a switch to activate automatically as soon as the external power is present, so that's another part of that circuit ... for which I can't name a suitable component.
 

nsaspook

Joined Aug 27, 2009
13,265
Thanks @ag-123
I agree, that could make things quite simple ... if a suitable pre-built charger can be found and you could disconnect the battery from the load 'at the same time' as you connected the external power supply to the load. That would require some sort of awesomely fast 'switch', I guess? That would be the 'contained' scenario I mentioned. I would want such a switch to activate automatically as soon as the external power is present, so that's another part of that circuit ... for which I can't name a suitable component.
The switching doesn't need to be fast if done correctly (I used relays and a PIC18 controller). I build an experimental system for charging and monitoring solar power battery banks (lead acid batteries) years ago that can track battery charging while connected to loads and/or monitor 4 batteries for control or load power then decide which battery to charge next.
https://forum.allaboutcircuits.com/...olled-battery-array.32879/page-3#post-1388083
 

crutschow

Joined Mar 14, 2008
34,420
It does seem like I won't be able to use a commercial offering without modifying it though (to base its measurement of the current on an 'external' shunt/ammeter of my own choosing, rather than its own internal shunt/ammeter).
If you can connect the load to bypass the internal shunt, then you wouldn't need to add an external shunt.
 

nsaspook

Joined Aug 27, 2009
13,265
Thanks everyone who replied.

I now know that using a shunt I can 'read' current by examining the voltage across the ends of the slightly-resistive shunt (thanks @nsaspook). A shunt is an 'Amps correlated as milliVolts' device ... awesome! (So that's how ammeters in a multi-meter work!) A shunt is more accurate than hall-effect device, Wikipedia tells me. I can buy shunts rated anywhere from 20A to 200A. OK, so I can measure the current no problem.
A high quality shunt is more accurate than most open-loop hall-effect devices but for this type of measurement even the open-loop devices are more than adequate for the job. Closed-loop sensors can be very accurate.

A hall-effect device:
does not affect the system at all since its just clamped around
does not care about the voltage and is isolated
can measure very very very big currents without issues.

Most Hall current modules have outputs that are directly readable on controllers without additional circuitry.
 

Thread Starter

dtbullock

Joined Sep 13, 2019
4
If you can connect the load to bypass the internal shunt, then you wouldn't need to add an external shunt.
Hmm, OK I get that ... good point. So the chances that a commercial controller uses a shunt internally, and will leave enough physical room to tap into the circuit before that shunt are ... high-ish? (Not that I've found a commercial charger that behaves as I've outlined, yet).
 

crutschow

Joined Mar 14, 2008
34,420
So the chances that a commercial controller uses a shunt internally, and will leave enough physical room to tap into the circuit before that shunt are ... high-ish?
Not sure, as I've always been weak on probability theory. ;)
But there should be a reasonable possibility that you can identify the shunt in the circuit and then determine how to bypass it for the load.
 

ag-123

Joined Apr 28, 2017
276
Thanks @ag-123 ... although it is too small for my application, it still gives me some language to search for bigger ones, and lets me see what is available 'on a chip' in terms of features.

.
I agree, that could make things quite simple ... if a suitable pre-built charger can be found and you could disconnect the battery from the load 'at the same time' as you connected the external power supply to the load. That would require some sort of awesomely fast 'switch', I guess? That would be the 'contained' scenario I mentioned. I would want such a switch to activate automatically as soon as the external power is present, so that's another part of that circuit ... for which I can't name a suitable component.
in a sense a battery charger is a power supply with a difference. for the normal power supply, normally it tries to keep the *voltage* at a particular level even if the load conditions vary (i.e. different currents). while a battery charger manages the battery charging and mostly is just purposed to prevent over charging.

one way though is you can have a power supply that feeds a battery charger and the battery in turn supplies the circuit through a diode. in that way the diode would prevent backflow of currents from the power supply back into the battery, and it would supply the circuit when power supply is turned off. but a rather large diode may be needed if the load is drawing rather high currents
Code:
power supply -> battery charger -> battery -> diode -> + -----
         +---------------------------------------------^
 
Top