Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Solar : Battery Cell Monitor
Author | Message | ||||
Solar Mike Guru Joined: 08/02/2015 Location: New ZealandPosts: 1138 |
I have a requirement to monitor battery cells in a large battery bank approx 24 volt @2400 AH comprised of 6 volt lead carbon cells, my old bms design wont work with cells above 5 volts so a new approach is required. Have decided to make up a quick trial test interface pcb that can link to a generic embedded cpu, that allows monitoring of the individual series cells in the bank. Have decided to use those OptiMos high voltage solid state switch chips, and using a simple multiplex arrangement(74HC4514) to switch in pairs of LAA127 switches across the battery monitoring wires. Each pair will briefly charge a low leakage capacitor then turn off leaving the cap isolated and floating, a second switch pair then turns on, connecting the cap to a high impedance buffer amp to CPU A/D inputs via a voltage divider to limit the A/D max cell voltage exposure. I wanted to be able to monitor any series cell voltage from say 2.0 to 12 volts. One pcb card can monitor 16 cells, two cards could be linked to allow upto 32 cells. All those little pin sized mosfets are inverting drivers for the optimos internal leds, only 1 chip is active at any one time. Comments welcome. Cheers Mike |
||||
Solar Mike Guru Joined: 08/02/2015 Location: New ZealandPosts: 1138 |
Hmm, realized the card cannot be turned off to float the capacitor holding the cell sense voltage, also the charge transfer on each card must be disabled when the card is not active; have re-arranged slightly. Process: Select the cell address, strobe the latch mux, disable the card, enable the sensing to transfer cap charge to A/D, discharge Cap a bit, disable the transfer sense... then repeat with a new address. Voltage sense cap has to be charged for > 5RC which will determine the overall speed. Mike |
||||
Tinker Guru Joined: 07/11/2007 Location: AustraliaPosts: 1904 |
I see you like doing this a bit more complex than my 16 lithium cell monitor/ equalizer. There is a double pole relay for each cell. Relays turn on sequentially. Cell voltage monitoring and equalizing happens during the 3 seconds the relay is on. I did mess around with capacitor charge transfer once but found it far too complicated and not nearly as good as relay contacts. The contacts are rated at 100K+ operations, have been running for over 2 years and there are many years life left as it takes more than a minute until the same relay turns on again. There is a dedicated 'off' time for the contacts. Switching current for equalizing is 0.5A max. For just monitoring the contacts would last very long. All controlled by a simple picaxe chip. Klaus |
||||
Solar Mike Guru Joined: 08/02/2015 Location: New ZealandPosts: 1138 |
Basically a solid state version of relays used here but taking an isolated voltage reading by use of sample and hold. I wanted all cells measured in less than 1 second, this would rule out anything mechanical. Note this isn't meant to do any equalization or bank balancing, nor would I suggest capacitors ever be used for that purpose as there wouldn't be sufficient charge transfer as the cell voltages merged. If the isolation wasn't employed an op amp with very high common mode rejection could be used, no relays, just a mux to select the battery to sample, that would be the simplest of all and perhaps I may try it. Cheers Mike |
||||
HankR Senior Member Joined: 02/01/2015 Location: United StatesPosts: 209 |
Mike, You might want to take a look at the LT6802 if you haven't already: LT6802 Hank |
||||
Solar Mike Guru Joined: 08/02/2015 Location: New ZealandPosts: 1138 |
Yes they do look good, but will not be suitable for cells > 5 volts. Really made for Li cells. |
||||
Warpspeed Guru Joined: 09/08/2007 Location: AustraliaPosts: 4406 |
I have just completed a 30 cell monitor in a very similar but slightly different way. Each cell has a circuit board bolted to the cell which contains a dual optically isolated switch LAA127. The small circuit board also has two 100mA fast blow fuses that definitely blow before the LAA127 if something goes wrong with the switching sequence.(software crash). I also use a flying capacitor galvanic isolator but it uses two dual isolators PVA33 that are much faster than the LAA127 and switch continuously at about 700 Hz with non overlapping drive. The cell selection boards are multiplexed 6 x 5 and the multiplex drive is decoded so that only one single column or one single row can be energized together. I can monitor 30 cells using only 11 wires for the multiplexing (5 + 6 wires) and two more wires for the common dc monitoring bus. I use two seven core trailer cables between my battery cart and the BMS circuit board. All these wires are protected by the two 100mA fuses at each cell so the wiring to the battery cart can never melt down. My greatest fear was that if one of the dual mosfet switches fails shorted, it would lead to a cascading failure of every other dual mosfet switch. My second greatest fear was for any thin wiring between each cell and some common remote monitoring board failing causing some burning wires. My third greatest fear was a software crash turning things on randomly creating massive damage. I did have a software crash (blame the dumb programmer) that blew about twelve of my sixty fuses, every mosfet switch survived that, and there was no other damage. These mosfet switches are sturdy but slow. If the software starts switching very fast, its possible to have some overlap in conduction which would be catastrophic. There are software delays to ensure plenty of off time when switching between cells, but if the software goes crazy, all bets are off as to what could happen. Other than that it is working brilliantly. A great deal of thought needs to go into possible failure modes and the consequences. Murphy's law definitely applies. Cheers, Tony. |
||||
Solar Mike Guru Joined: 08/02/2015 Location: New ZealandPosts: 1138 |
Thanks Warp, you seem to have it sussed, I thought about small fuses and decided in the end to use a small resistor leading to every battery connection, this will limit any current in the circuit should multiple devices turn on concurrently; thus the on period has to be greater than 5RC to fully charge up the flying cap. I personally don't like having flying cables leading to every cell as I have here, it presents greater chance of wiring meltdown. For a higher voltage bank > 100 volts it would be safer to do as you have done and place an isolated measuring device across each battery cell, I may do this in version two, thought about a small PIC CPU with digital data isolator chip and 4 wires running between all cell devices and a master unit, Data In/Out and 3.0 and 0 volts. Cheers Mike |
||||
Warpspeed Guru Joined: 09/08/2007 Location: AustraliaPosts: 4406 |
Its all been quite a saga, and this BMS has gone through quite a few changes in direction along the way. Attempt number one used relays, and the idea was to first monitor the voltage of each particular cell, then either charge the lowest, or discharge the highest voltage cell through the same relay contacts. The software balancing system worked fine with the relays, but my relay contacts provided a horribly unreliable initial voltage measurement as the contacts were not closing under power. Eventually I gave up on relay switching. Thirty high quality relays do not come cheap, so it was judged as too expensive to simply upgrade these relays. I wanted something that was going to be totally reliable for many years, and my relays caused trouble right from the very start. Attempt number two used the LAA127 as recommended by yourself, with truly excellent results, but I could no longer charge or discharge through the 16 or so series ohms of resistance that these mosfet switches have. Attempt number three kept the LAA127's but I included an individual cell top balancing discharger onto each cell circuit board, and abandoned overall software control of cell balancing. That is where I am now. All thirty new circuit boards are loaded except for one final component, which should be delivered any day now (I hope). One lesson from all this, the LAA127 can definitely be fully protected with a 100 mA fast blow M205 fuse in each leg, even with a 100 volt battery, which should also easily protect any wiring. Its all been a particularly interesting development project, and I am extremely pleased with how it has all finally turned out. [quote] thought about a small PIC CPU with digital data isolator chip and 4 wires running between all cell devices and a master unit, Data In/Out and 3.0 and 0 volts. [/quote] I thought of fully independent voltage measurement, even a bi directional infrared data link to each cell requiring no external monitor wiring. But the problem is accuracy and resolution. Its far more difficult to get stable repeatable millivolt cell to cell voltage matching. Even a single 1% resistor could introduce a 33mV error at 3.3v. It all becomes a lot simpler to use a single switched central voltmeter to measure ALL the cells sequentially, particularly if there are a large number of cells. I used a constantly clocked flying capacitor galvanic isolator, then feed the ground referenced cell voltage straight into the microcontroller ADC. By using a Vref low of 3.1v and a Vref hi of 3.5v I get excellent resolution and perfect cell to cell voltage matching with very few components. To get the full benefit, a fairly reasonable quality voltage reference is required to eliminate temperature drift, but that is pretty easy. One other refinement worth mentioning. To get millivolt cell to cell matching, its best to average many readings. I take 256 readings spaced out over 20mS so that any 50Hz inverter ripple or random noise will be averaged out. That gives excellent consistent noise free cell voltage readings without any jumping around or one bit ambiguity. Getting the dc accuracy is quite easy, the problem though is noise, especially with high power electronics running and connected to the battery. That can all be fixed with some software averaging. I don't want to totally hijack this thread, but I have spent several months developing something almost the same, and have learned quite a few lessons the hard way. But the few potential difficulties that there are, can very easily be worked around if they are known about and anticipated from the beginning. This is going to make a very nice and highly accurate measurement "front end" for any BMS, especially for higher voltage batteries with a very large number of cells. It can reliably and consistently see cell voltage differences of one millivolt without any thermal drift problems, or requiring any adjustment or calibration except for setting up of the initial measurement range max and min with only two potentiometers. Cheers, Tony. |
||||
Solar Mike Guru Joined: 08/02/2015 Location: New ZealandPosts: 1138 |
Yes my intention with the Lifepo4 50v bank is to put a similar independent PCB across each cell in the bank (at a later date) with a small step up fly back inverter, this will discharge the battery cell into the whole bank, rather than into a resistive load. These big cells are being charged at > 100 amps so top balancing currents around 10 amps are required to get the job done quicker. Meanwhile the circuit has had some minor changes, dispensed with the driver mosfets as the led current is 5ma and only one is ever active, thus the mux chip can handle that ok. Added an interlock (I think will work) so the flying capacitor isolator cannot be active concurrently with the active battery sense. Have made a test 2 layer PCB (150 x 100 mm), once that is built, will breadboard a controller with a Picaxe 28X2 chip. As this design will be used on both Lifepo4 cells and 6v Lead Carbon batteries, the controller will have a switched gain differential high impedance buffer op amp between the flying capacitor and the cpu's a/d converter. Cheers Mike |
||||
Warpspeed Guru Joined: 09/08/2007 Location: AustraliaPosts: 4406 |
[quote]With a small step up fly back inverter, this will discharge the battery cell into the whole bank, rather than into a resistive load.[/quote] Now that is a really clever idea. Looking good there Mike. I did quite a bit of preliminary breadboard testing of the flying capacitor circuit. Its difficult to design from first principles, but really easy to test and experiment with. I tried various combinations of capacitor values, switching frequencies and dead times to get the very lowest dc error between direct cell voltage measurement and what ended up right at the ADC input. Either very low or very high switching frequencies both run into problems, so the trick is to define the limits where things start to go wrong, and find a sweet spot near the middle. Its not the least bit critical, quite a wide frequency range will give <1mV of dc error which was the resolution of my cheap multimeter. I then connected a small lithium cell direct to the input of the flying capacitor circuit, and elevated this to various high common mode voltages -300v produced -3mV offset error, 0v gave 0mV offset, and +300v gave +3mv offset. A heat gun had no effect, and neither did changing various PVA3354 mosfet switches around from the same batch. It seems to be a fairly constant dc leakage through the mosfet switches when in the off condition. Its a pretty small dc error and can probably be ignored for lower voltage batteries. The purpose of R34 and R36 is to add -1mV of correction for each +100v of common mode input, and it works ! The cell voltage measurement dc errors are now unmeasurable, at least with the 1mV resolution of my multimeter. Probably overkill, but it has certainly been an interesting exercise. With the same small Lithium cell being measured thirty times across my VGA screen, I get a noise free dead straight line that does not move with pretty savage application of a heat gun to all the relevant parts. The above schematic was what I started out with when using relay switching and the central software driven cell balancer. The floating cell balancer part will be removed from the final circuit board. Cheers, Tony. |
||||
Solar Mike Guru Joined: 08/02/2015 Location: New ZealandPosts: 1138 |
More changes, the interlock that prevents possible concurrent reading and updating the flying capacitor had issues, now replaced by some logic gates. Card selection should also work correctly now, allowing 2 cards for 32 battery cells. Added pull down resistors on inputs, so the master can be unplugged and not leave floating inputs that could cause more than one switch to be active. Cheers Mike |
||||
Solar Mike Guru Joined: 08/02/2015 Location: New ZealandPosts: 1138 |
Hmm, havent done a lot with this project last few months, now back on to it... With the 50V house Lifepo4 bank in the garage bolted in a rack against a concrete wall and floor, makes it difficuilt for testing various BMS options, so have built a battery cell emulator for playing around with BMS design on my work bench. Simple resistor array with 100ma current and smoothing cap, has identical plugs that are connected to the cells in the bank via 1 amp fused wires. Added an isolated PSU for the BMS supply. I hate using veroboard so opted for single sided PCB, if anyone wants the gerbers send me a PM. For these one offs I laser print the pcb layout on to A4 Kinsten drafting film, gives excellent fine detail when used with the dry film resist pcb coating; that I apply wet to pcb and use a rubber squeegee to flatten prior to passing through warm laminator. Drafting Film Cheers Mike |
||||
Warpspeed Guru Joined: 09/08/2007 Location: AustraliaPosts: 4406 |
I faced very similar problems... In my case I have a battery "cart" that can be completely unplugged and wheeled around. But testing the BMS on a real battery can be a pain, and slightly dangerous if you have an Ooops with the wiring or anything else. I used a pile of small 18650 lithium cells and some LEDs for developing and safely debugging my software. I could also superimpose a bit of 50/100Hz ripple voltage to see the effects on measured cell voltages, and experiment with cell balancing strategies. All good fun, and a fair bit of work, but well worth the trouble when its all finally together and you have it working exactly how you want. The big advantage with home brewing you can tweak the software and hardware to make it do absolutely anything you want it to do, unlike a bought commercial black box BMS. Very happy with how mine has turned out. Cheers, Tony. |
||||
Print this page |