How to charge and discharge a battery simultaneously? ..#2

Thread Starter

neel4udude

Joined Nov 21, 2020
1
Last edited by a moderator:

Vytas Klyvis

Joined Dec 5, 2016
75
Don't overthink it. If the supply is able to supply is 2A of current and the load of the devices is 1.5A. The remaining 0.5A can be used for charging. Similuarly if the load is 2.5A then the battery will supply the remaining 0.5A. (discharging). So the battery is either charging or discharging.
 

jpanhalt

Joined Jan 18, 2008
11,087
Don't overthink it. If the supply is able to supply is 2A of current and the load of the devices is 1.5A. The remaining 0.5A can be used for charging. Similuarly if the load is 2.5A then the battery will supply the remaining 0.5A. (discharging). So the battery is either charging or discharging.
So, it is not simultaneous. And yes, there are many battery management chips that will allow doing that. Check out some of the TI chips that presumably allow a battery to be charged while in system. The bq21040 is just one example of many. I do not know whether it will work if the drain is more than the maximum charge current. I suspect it may not.
 

DNA Robotics

Joined Jun 13, 2014
647
Your car does that any time the engine is running. The alternator is charging the battery while the ignition, lights & fan are using power.
 

MrChips

Joined Oct 2, 2009
30,714
If current is flowing into the battery then the battery is being charged.
If current is flowing out of the battery then the battery is being discharged.
You cannot have both happening at the same time.
 

jpanhalt

Joined Jan 18, 2008
11,087
I think what the TS wants is described in his post #3.

The problem that I see with it is that effectively the charger and battery are in parallel. Typically, the charger will be at a higher voltage than the battery or the battery won't charge. He then asks whether the charger can provide 2A to a load while the battery provided 0.5A at the same time to the load.

The main problem I see with that is a battery cannot discharge into a higher voltage.

Edit:
Let's look at an example:
Assume a 2.5A load at 4V. The effective load resistance is 1.6Ω. Further, assume the battery is "discharged" to 4V and is in parallel with a charger that has a nominal voltage of 4.5V and series resistance of 0.25Ω. Thus, it cannot provide more than 2A before its voltage falls below that of the battery.

1605975095847.png

Unfortunately, I am not adept at LT Spice enough to sweep a resistance, so I used some discrete values:

--- Operating Point --- R2 = 0.00Ω
V(p001): 4.5 voltage
V(p002): 4 voltage
I(R3): 2.5 device_current
I(R1): -2 device_current
I(V2): -0.5 device_current
I(V1): -2 device_current

--- Operating Point --- R2 = 0.1Ω (common for lithium batteries)*
V(p001): 4.5 voltage
V(p002): 4 voltage
V(n001): 3.96581 voltage
I(R3): 2.47863 device_current
I(R2): -0.34188 device_current
I(R1): -2.13675 device_current
I(V2): -0.34188 device_current
I(V1): -2.13675 device_current

--- Operating Point --- R2 = 0.01Ω
V(p001): 4.5 voltage
V(p002): 4 voltage
V(n001): 3.99522 voltage
I(R3): 2.49701 device_current
I(R2): -0.477897 device_current
I(R1): -2.01912 device_current
I(V2): -0.477897 device_current
I(V1): -2.01912 device_current


The only way to get a 2A/0.5A division of current is if the battery has 0Ω series resistance, which is not possible. Moreover, while the charger may be considered constant voltage, a discharged battery's voltage will continue to drop as it is further discharged, which will bias the current more for the charger..

*Source: Battery University
 
Last edited:

Tonyr1084

Joined Sep 24, 2015
7,853
The main problem I see with that is a battery cannot discharge into a higher voltage.
There are circumstances where a load may be seeing (let's say) 13.8V (as in a cars electrical system) but be able to run on voltages down into the 11 volt range. And the car's computer runs on 5V (I assume) internally regulated. I'm not the expert on car computers. They may run on both 12 and 5 volts. Still, the charging system provides more than enough voltage AND current to run the electrics and to charge the battery.
 

jpanhalt

Joined Jan 18, 2008
11,087
There are circumstances where a load may be seeing (let's say) 13.8V (as in a cars electrical system) but be able to run on voltages down into the 11 volt range. And the car's computer runs on 5V (I assume) internally regulated. I'm not the expert on car computers. They may run on both 12 and 5 volts. Still, the charging system provides more than enough voltage AND current to run the electrics and to charge the battery.
See my edit.
 

Tonyr1084

Joined Sep 24, 2015
7,853
@jpanhalt
There are circumstances where a load may be seeing • • •
Didn't say in all cases. But in most battery powered circumstances the battery voltage is more than what is needed for a project. You wouldn't likely build a circuit that needed 6 volts minimum and power it from four AA batteries. The voltage would drop below 6V very quickly. If you put a charger on it to keep the batteries fresh, then the charger might deliver 7 volts (just making up numbers at this point). The 6 volt circuit should not be so sensitive that the extra volt would damage it. IF you built a circuit that required a very specific voltage as a reference then you would likely build something with a higher voltage and use a regulator to maintain the specific voltage needed. Batteries would likely be fairly higher in voltage than that specific voltage so that it can be regulated and controlled precisely.

But remember, I said "There are circumstances". Never said it was so in all cases. There are always exceptions to nearly everything. Even taxes. Death - that's another thing.
 

nsaspook

Joined Aug 27, 2009
13,087
I think what the TS wants is described in his post #3.

The problem that I see with it is that effectively the charger and battery are in parallel. Typically, the charger will be at a higher voltage than the battery or the battery won't charge. He then asks whether the charger can provide 2A to a load while the battery provided 0.5A at the same time to the load.

The main problem I see with that is a battery cannot discharge into a higher voltage.
Happens all the time in solar energy banks with parallel charge controllers directly connected to batteries. At high currents the measured voltage drops are tenths of volts from charger to battery.
https://forum.allaboutcircuits.com/...ic-controlled-battery-array.32879/post-744623



PV (charger) current 27.70A
Battery Current 25.50A

Load current 53.20A

The battery current sensor (hall or shunt) is in the battery neg to system return (ground) connection so it can change sensed polarity of current to determine charge or discharge of energy from the bank with another sensor in series to the PV current feed to the battery. With the two sensors we can do simple math to see if the system is discharging or charging the battery while the load receives power.

Current monitoring for my newest solar monitor uses three current sensors to measure MPPT transfers with battery charging.
https://forum.allaboutcircuits.com/...c-controlled-battery-array.32879/post-1488959
 
Last edited:

Tonyr1084

Joined Sep 24, 2015
7,853
In circumstance A, current is flowing into the battery. In circumstance B current is flowing out from the battery. Current never flows in two directions simultaneously. If you have a positive 2 amp current flowing in a wire and a negative 1 amp current flowing in the same wire, the two will push against each other. The total current will be in the direction of the higher current. If both A and B currents are equal then they cancel each other out and no current flows at all.
 
The real question is then: "how is load sharing accomplished between a battery and its charger?". I guess I've never actually thought about that.
I do know of an ic called tp4056 which I think has this feature. Maybe have a look at that?
 

Tonyr1084

Joined Sep 24, 2015
7,853
If the source voltage is higher than the battery voltage then the battery acts like a load. If the source voltage is lower than the battery voltage then the battery acts like a source. The actual load will draw the current needed to operate, assuming the battery and source both can provide sufficient current.
 

jpanhalt

Joined Jan 18, 2008
11,087
The real question is then: "how is load sharing accomplished between a battery and its charger?". I guess I've never actually thought about that.
I do know of an ic called tp4056 which I think has this feature. Maybe have a look at that?
If you put some sort of variable resistance (or voltage control) in series with the charger, you can shift current to come more from the battery. But why do that? More resistance in series with the battery shifts it the other way.
 
If the source voltage is higher than the battery voltage then the battery acts like a load. If the source voltage is lower than the battery voltage then the battery acts like a source. The actual load will draw the current needed to operate, assuming the battery and source both can provide sufficient current.
Yeah you are right.

I think the confusion comes from the fact that most mobile phones operate on a 3.7 volt battery. So there are circuits to handle the battery charging. You can't simply run the load of the battery voltage. I think a pair of diodes could be used to make sure that the load operates on the charger when its connected and when its disconnected the battery providers the current. Additionally a Buck/boost converter could be used to get the battery voltage to the appropriate operating voltage again.

https://electronics.stackexchange.c...o-charge-battery-while-load-remains-connected
 
Last edited:
The car is a simple example. The battery is nominally 12V or 2V per cell. See https://batteryuniversity.com/learn/article/confusion_with_voltages.

The car's electrical system is nominally 13.8V with the car running. The alternators rotors magnetic field is changed to keep the output voltage at 13.8V.

The lead acid battery does not need a sophisticated charging system and damage will be done to the battery if the voltage drops for a relatively short time, probably 10's of hours, actually unless the battery is a "deep discharge" type.
 
Top