Author Topic: Circuit to help balance batteries, feedback/advice requested  (Read 1148 times)

0 Members and 1 Guest are viewing this topic.

Offline gnifTopic starter

  • Administrator
  • *****
  • Posts: 1699
  • Country: au
  • Views and opinions are my own
    • AMD
Hi All,

I am looking to build a simple circuit to help me when I need to do my annual battery maintenance of an array of 200AH 12V AGM batteries in series. The idea is to limit the charge voltage to a threshold and then dump it into a resistive load if it exceeds a set voltage but in a gentle manner. I want to have a device for each battery, which will only be connected for the maintenance cycle.

Here is what I have come up with, however, I am not sure yet of several factors, or if this should be done differently.

What MOSFET should I use? (I am pretty new to them)
What would be the best way to generate the reference voltage and power the opamp?
My input options are 12-14V from the battery itself, or 48-60V from the battery array.
Seeing as I don't need rail to rail, would a ua741 opamp cut it for this application?

https://www.falstad.com/circuit/circuitjs.html?ctz=CQAgjCAMB0l3BWK0BsB2AnADgEwI5gMw6SFZYQKQhJU0CmAtGGAFABuIALMdyl915c4UEIXAjxYHKJgJWAQxAoEKMVgFoEMsgKzgk1MPHjhC0Qikt4ueCjjAbwOaGBSksBFCkddpa4xNWAHdlVTEUfX5qS31IEOVhCKik4mp40OixEmU0HRyMkC0dJ2Ls9NYAJ1z86jK00UC4BKzYmgwdSKgW8OFqLL7uzKTB-BlB+OqBkQH+RpNC+qcKNV1ugCUaLgE2hG2xS1luIy5oNCO5BJ5xudmBSfbO-T2drqN4Ksfj6hfv+eaAGYgFbqPRzNa8MDQQywHAJX6DLgYNQTK7Iv5ItQ4PJDbjo7EyFA4AQE3FYOak8mvOKsYQCa4Y9ETZCQHziFBncTUAEKAA2AGd6J8iSScXlqKT3gkqX8ZVw5oU5bcRgrWAAPMRI7jSY4YbVIARgQ04ABqAB1+QBBADiAFl1dw9mIMBAuGgIIQMPTwCTLQ6VOccB1lFgkEGDT6QCQAOoJcVRnEyyWsAD2jVEwgweoKsHgXlUeFEUggRg9qajRgzkCzFfAqHAYlrUlWrCAA

Thanks in advance... and be kind :)
SMTS Software Development Engineer @ AMD
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 13006
Re: Circuit to help balance batteries, feedback/advice requested
« Reply #1 on: July 04, 2021, 12:00:14 pm »




The easiest option would be to draw power from the battery, so you can make four identical modules and don't have to worry so much about IC and MOSFET voltage ratings.

You *CAN* use a 741, but you probably shouldn't. In fact the whole approach is flawed.  If you were going to proceed with it, divide the battery voltage with two resistors and use a reference voltage of half the target voltage and *ANY* OPAMP that can withstand the max. battery voltage when equalizing would do.  However you've still got the problem of providing a fixed reference voltage to it.  Good Zeners have 5% tolerance so you either end up having to tweak the threshold of each unit with a preset or need an $expen$sive$ precision reference IC.

You'd probably be better off with a TL431 precision shunt regulator operating as a comparator, which also gives you the precision reference in the same package, and in a 12V battery application, tolerates gross overvoltage.  Its a simple high impedance resistor divider to set the threshold, and as its abs. max. reference input current is only 4uA and its off state quiescent current 1uA,  you can get better than 1% accuracy with under a milliamp through the divider chain, which is less than 10% of the typical equivalent self-discharge current for a 200AH lead acid battery, so you could leave the balancers connected all the time if you wanted to. 

The TL431 output goes low when its over the threshold voltage, so you either need a P-MOSFET on the high side of the dump load, or a PNP transistor (or small signal P-MOSFET) to invert its output and drive a low side N-MOSFET.   Fit a high value feedback resistor from the load (or the PNP collector) to the Ref pin to provide hysteresis to guarantee the MOSFET is kept fully on or fully off so it doesn't cook it!
« Last Edit: July 04, 2021, 12:23:54 pm by Ian.M »
 
The following users thanked this post: sandalcandal

Offline sandalcandal

  • Supporter
  • ****
  • Posts: 641
  • Country: au
  • MOAR POWA!
Re: Circuit to help balance batteries, feedback/advice requested
« Reply #2 on: July 04, 2021, 12:08:29 pm »
My first thought for the simplest and most idiot proof implementation of "top balancing" would be to just use some power zeners and current limiting resistors with sufficient resistance to limit current to the maximum power of the zeners. Unless you use massive and expensive very high power zeners, the current should be low enough that you don't have to worry about arcing or inrush when you throw it on. For 200AH batteries however the required currents for balancing would be impractical.

For applications like this where you want a comparator output regulating voltage against a reference the jelly bean IC of choice with be the TL431 rather than a separate comparator and reference (I think). I found some MOSFET based example circuits that might work for you here: https://archive.ednasia.com/www.ednasia.com/ART_8800525561_1000007_AN_3c4ce53a.HTM Would probably want to add a power resistor to the MOSFET drain to help take the drop. Interesting to think about how one might ensure the MOSFET only operates in a fully on or off state to avoid excessive power dissipation however. [Just add feedback hysteresis as Ian suggests, would do the PNP collector/MOSFET gate instead the "load"]

I think a variation could be to instead place a zener on the TL431 anode and have the MOSFET gate follow that. The voltage of the zener would be selected to match a sufficient Vgs(th) for turing on the MOSFET fully. The reference voltage the TL431 regulates to with then be bumped up the the zener voltage. However, this loses the typical voltage precision of the TL431 to that of the zener. Perhaps two TL431 in series? or you could go the other way and use two zeners in series but that will likely cause issues with a soft turn-on. It would probably be cheaper and more reliable to just use a PNP as shown in the second schematic in the above link.

For the power supply for each active shunt, you want to use the battery it is balancing across, the MOSFET needs to be driven with a gate voltage relative to its source pin so if your circuit used the whole array then that would not work unless you added the complication of making floating gate drive supplies for each stunt. You can effectively have floating voltages for each shunt by just powering off each battery itself. The only issue there could be if your shunt circuitry requires a higher voltage than the battery pack voltage at shunting to operate but I don't think that's the case here.

[Damnit Ian M beat me to it]
« Last Edit: July 04, 2021, 12:13:17 pm by sandalcandal »
Disclosure: Involved in electric vehicle and energy storage system technologies
 

Offline Emo

  • Regular Contributor
  • *
  • Posts: 132
  • Country: nl
Re: Circuit to help balance batteries, feedback/advice requested
« Reply #3 on: July 04, 2021, 01:03:17 pm »
Hi,

Not sure if you want to built and design everything yourself, however there are module specifically targeted at lead acid batteries (AGM) for solar etc.

https://nl.aliexpress.com/item/1005002259168531.html?spm=a2g0o.productlist.0.0.4066a5c1p2Gebc&algo_pvid=77f0ff05-de01-4bda-adb6-dd06c35b241f&algo_exp_id=77f0ff05-de01-4bda-adb6-dd06c35b241f-2

Regards,

Eric
 
The following users thanked this post: ogden

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 13006
Re: Circuit to help balance batteries, feedback/advice requested
« Reply #4 on: July 04, 2021, 01:09:58 pm »
As to choice of MOSFET, you've got some electrical specs that are hard constraints:

  • Id_max > Iload (a factor of three safety margin is good here, or at least x20 for a highly capacitive or incandescent bulb load, due to its inrush current)
  • Vds_max > Vbatt_max (a factor of two is good here)
and others that are softer constraints e.g. you *can* use a MOSFET with Vgs_max<Vbatt, but it complicates the circuit so you are better off using ones with a Vgs_max > Vbatt_max, or you can use a higher Rds_on MOSFET if its well enough heatsinked.

Also you don't want an excessively low threshold voltage as that makes it harder to guarantee turnoff in this application and is only of value when driving the gate with logic level signals.  >1.5V is probably suitable, as any cheap and nasty drive circuit should be able to get the gate within two diode drops of the source!

Here's a Mouser parametric search for P-MOSFETS suitable for the simple version of the TL431 circuit:
in stock, Vds>30V, Vgs>20V, Rds_on<0.2 ohm, Id>4A, Vgs_th>1.5V
https://mou.sr/3hCSN6X

Rds_on is picked to keep the dissipation under 500mW passing 1.5A so you can get away without heatsinking apart from enough copper area on the PCB/
« Last Edit: July 04, 2021, 01:25:51 pm by Ian.M »
 

Offline nuclearcat

  • Supporter
  • ****
  • Posts: 382
  • Country: lb
Re: Circuit to help balance batteries, feedback/advice requested
« Reply #5 on: July 04, 2021, 01:20:56 pm »
I am thinking about something similar, i guess it is called passive balancing.
Most likely mcu with bandgap, resistor divider, opamp, dumping mosfet with massive heatsink and maybe basic thermal protection, and some initial calibration. Still should be cheap enough.
But i plan to leave the device connected and send telemetry (voltage of each battery) using optocouplers to some esp32 board, because if battery lost significant capacity it might become a problem during discharge cycle as well.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 13006
Re: Circuit to help balance batteries, feedback/advice requested
« Reply #6 on: July 04, 2021, 01:42:54 pm »
Its possible to drive an input pin of a MCU 'above'  another by using a NPN transistor, base connected to the 'Vcc' as a level shifter.  Use a pullup to 'upper' Vcc on the collector, and control the output swing by controlling the pulldown current by choice of resistor between the emitter and the MCU output pin, so 'upper' Gnd (local) can be significantly above 'lower' 'Vcc'.  (Similarly a PNP with its base connected to Gnd can be used for downwards level shifting).   That's two resistors and a jellybean BJT to 'daisychain' a logic level async serial signal up the stack from the base (or downwards towards the base), with significantly less current drain and cost than reliably driving  optocouplers.  However it isn't as robust as a failed cell will rob one of the MCUs of power and break the chain.
 

Offline nuclearcat

  • Supporter
  • ****
  • Posts: 382
  • Country: lb
Re: Circuit to help balance batteries, feedback/advice requested
« Reply #7 on: July 04, 2021, 02:07:23 pm »
Its possible to drive an input pin of a MCU 'above'  another by using a NPN transistor, base connected to the 'Vcc' as a level shifter.  Use a pullup to 'upper' Vcc on the collector, and control the output swing by controlling the pulldown current by choice of resistor between the emitter and the MCU output pin, so 'upper' Gnd (local) can be significantly above 'lower' 'Vcc'.  (Similarly a PNP with its base connected to Gnd can be used for downwards level shifting).   That's two resistors and a jellybean BJT to 'daisychain' a logic level async serial signal up the stack from the base (or downwards towards the base), with significantly less current drain and cost than reliably driving  optocouplers.  However it isn't as robust as a failed cell will rob one of the MCUs of power and break the chain.
I prefer to make them as optoisolated independent modules, since i have batteries setup where total voltage is over 300V.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 13006
Re: Circuit to help balance batteries, feedback/advice requested
« Reply #8 on: July 04, 2021, 02:28:24 pm »
Good point.  A 300V chain is a *LOT* of batteries so any daisychain would  be excessively vulnerable to single point failures, there is a possibility of rather energetic failure if a battery gets reverse charged during discharge with 300V driving it  and the cost of doing it right with bidirectional comms with optocouplers is not that significant compared to the total installation cost.     You only need to Muntz it if trying to balance small LiPOs in longer strings than off-the-shelf balancing chips can handle, for aggressively cost reducing, and safety ignorant project manglement!
 
The following users thanked this post: nuclearcat

Offline nuclearcat

  • Supporter
  • ****
  • Posts: 382
  • Country: lb
Re: Circuit to help balance batteries, feedback/advice requested
« Reply #9 on: July 04, 2021, 03:40:10 pm »
I just did quickly something... sure no LDO yet for MCU, and many other things, but as concept, for comments.
Optocouplers also TBD, but still thinking how to arrange properly RX part, seems either lot of wires on 25 battery setup or i must use galvanically isolated RS485 (expensive).

CD4053 is used as analog mux to calibrate resistor divider (R3,R4). Calibration reference is U2, TL431.
Also because divider is high impedance, i add U1 as voltage follower.
Then i drive on MCU by PB0 mosfet to discharge/drain this particular battery to equalize.

(Forgive me if i did something silly, i am noob :) )
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 13006
Re: Circuit to help balance batteries, feedback/advice requested
« Reply #10 on: July 04, 2021, 06:08:16 pm »
Well, presumably each slave module has a pair of optocouplers, one in each direction.   The main => slave MCU opto wiring is easy - Opto LEDs are highly reliable, so if all the modules have unique addresses, you just connect series strings of as many Opto LEDs as your max. available supply voltage supports, right at the modules, with only a pair of wires per string back to the main board. 

Slave => main MCU is harder - you need to be able to disable individual Optos in case a slave is jabbering.  There is therefore no way of getting away from one wire per slave + a common to all of them.  If you make the opto collectors common, wired straight to the main MCU UART RX pin (+ a pullup, and possibly clamping), you can simply wire the individual slave opto emitters to main board open drain outputs (or faked open drain with a schottky diode).  They are normally all logic '0' so all slaves can talk, but you can set one to logic '1' to disable it if its jabbering, or all except one to logic '1' so you can interrogate the slaves one by one by position in the battery string, to get their unique IDs so you can auto-assign and set short addresses  to poll them with based on their position.

Back to the original topic,  just for sh!ts & giggles, I've done a LTspice sim of Gnif's original OPAMP idea with my mods to use a Zener. and also of my suggested TL431 + PMOSFET idea.

Edit: clarified description of slave => main opto wiring.  Also note the sim has embedded the Eugene Dvoskin / AudioPerfection TL431 model, but in a comparator application, it seems to be a bit fussier than it should be.  It may be worth switching to Helmut Sennewald's model.
« Last Edit: July 05, 2021, 01:54:40 pm by Ian.M »
 
The following users thanked this post: nuclearcat

Offline gnifTopic starter

  • Administrator
  • *****
  • Posts: 1699
  • Country: au
  • Views and opinions are my own
    • AMD
Re: Circuit to help balance batteries, feedback/advice requested
« Reply #11 on: July 05, 2021, 01:37:13 am »
Wow, thanks for all the feedback, seems my idea is more complex then I had hoped, I might just go with the modules that @Emo pointed out on Aliexpress. In any case, this has given me a lot to think about.
SMTS Software Development Engineer @ AMD
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17013
  • Country: us
  • DavidH
Re: Circuit to help balance batteries, feedback/advice requested
« Reply #12 on: July 05, 2021, 02:26:31 am »
I am looking to build a simple circuit to help me when I need to do my annual battery maintenance of an array of 200AH 12V AGM batteries in series. The idea is to limit the charge voltage to a threshold and then dump it into a resistive load if it exceeds a set voltage but in a gentle manner. I want to have a device for each battery, which will only be connected for the maintenance cycle.

It seems like a two terminal shunt regulator would do exactly what you need.

Quote
What MOSFET should I use? (I am pretty new to them)

A bipolar transistor or Darlington could work just as well, but the limiting factor will be the needed power dissipation which will depend on the maximum charging current.

Quote
What would be the best way to generate the reference voltage and power the opamp?

The operational amplifier can be powered directly from the 12 volt lead acid battery that it is monitoring.  A low quiescent current reference will be needed for each one but that is no problem.  There are even some operational amplifiers which include both functions.

Quote
Seeing as I don't need rail to rail, would a ua741 opamp cut it for this application?

With some care, a 741 could do it, but I would look for a micropower operational amplifier and reference.  The idea would be to make a 13.8 or 14.2 volt or whatever micropower shunt regulator with enough power dissipation capability to handle the full charge current, or at least a good part of it.

At a first cut I would consider parts like the LT1636 operational amplifier and LT1004CZ-2.5 micropower shunt reference to keep the quiescent current below 100 microamps although much lower is possible if that is required.
 

Offline nuclearcat

  • Supporter
  • ****
  • Posts: 382
  • Country: lb
Re: Circuit to help balance batteries, feedback/advice requested
« Reply #13 on: July 06, 2021, 03:17:55 pm »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf