Battery Management System for Large Lifepo4 Cells

Solar Mike

New Member
I have a collection of 40AH Lifepo4 cells removed from a 100V bank, some of the cells are at the end of their life and start to swell whenever they are charged, many are ok with approx 50% capacity but definitely on the way out. So I am going to build up a number of 28V (8 cell) banks and use for various projects, because they are so mismatched a BMS that can be set to limit each cell to 3.47v is really required.

I also have a 400AH 100V bank that also requires a management solution, so to keep costs down have designed my own. A main controller board with 8 cell sensing that is expandable in groups of 8, using a Picaxe 20M2 as the CPU. A common floating switchable voltmeter is used, using Optimos dual switches to select any individual cell in the bank. The measured voltage is isolated by a ACPL-C87A optically isolated voltage sensor, filtered, then read by the CPU, having a common voltmeter for all cells makes for easier calibration and only a single CPU to program.

The big 400AH cells have charge currents approaching 100 amps, so currents near 5 - 15 amps are not uncommon as the cells approach their sharp voltage rise around the 3.45 volt mark; means for balancing a load between 1 - 5 amps are required for short periods. This design uses large ceramic power resistors that can be switched across each cell as required. Some heat there but in a stationary pack not really an issue.

Added relays for external processes to tell that balancing has started, over\under voltage etc.

Here are the PCB's for controller and extenders.

24538
24539

Extender:
24540
24541


The 20X2 CPU sits on a small plugin pcb, so I can experiment with different CPU's in the future; there is no schematic dia for this at the moment as I rushed this design out to include with some other boards to save on shipping costs; but I will create a schematic or parts of it and publish here once I have got it going.


Cheers
Mike
 
Revisiting this design, yes its been a few years...
The original whilst works, is not optimal, the existing load power resistors get very hot at high balance currents, when the battery cells are extremely unbalanced as it may take some hours to achieve full balance. I have gotten some more rescued cells taken from failed 48v battery packs, so thought about a new design to use with them.

This new design allows the load resistors be mounted by their leads on the board edge, so can be clamped to an alloy heatsink for better heat dissapation. PCB is 215 x 83mm and split into 2 working areas, top edge with the individual cell balance loads and the lower half with the array of optimos DPST solid state optical relays for reading each cells voltage. Each pcb can connect to 8 battery cells, with a ribbon IDC linking extra boards to accommodate larger banks; two boards for 48v Lifepo4, 16 cells.

The load mosfets are driven by optical to voltage mosfet drivers, these are quite slow switching (approx 1mSec) due to their low drive currents; they in turn are driven from a TLC5916 serial constant current led driver; another TLC5916 sharing a common serial input, drives the optimos relays; each of these has an output enable control input for directing which chip is active.
In order to read each cells voltage, the loads are briefly turned off, so removing any voltage drops in the cell balance wires connecting to each battery (cell) in the bank, a cell is then selected and its voltage appears on the common Cell +- output to be read by the controller.

I am working on a simple control board at the moment, as each cell is selected, a small capacitor is charged to the cell voltage, this is then isolated from the cell by another optimos switch and connected to the cpu adc. After all cells are read, a decision is made as to which cells have their loads turned on to syphon away some ofthe charge current; it takes approx 10 mSec to read each cell.

Here is the balance pcb:
CellBoard_Top.PNG
CellBoard_Bottom.PNG

More later...

Cheers
Mike
 
Nice work!

I'm not (Yet?) dealing with anything that big but would like to eventually have a 12 volt LiFePO4 bank of about 1000 AH. Good to have your ideas for working with the higher power banks before I commit to a specific design.

Thanks for sharing your research.
 
I do have an existing design that works ok with 4 cells, it uses a switched voltage divider to measure the summed voltage, then subtract the previous to get an individual cells voltage, see Link
If the cells are reasonably matched, large balance currents are not normally required, there are many low cost active balancers on AliExpress, noting the balance currents advertised do not match reality when the cell differential voltages get smaller. Where as with a resistive load balancer, the currents are known and can be easilly set to any desired value.

Here is the layout for the controller pcb 100 x 100mm
BMSController_Top.png

BMSController_bottom.png

Will send these off to get made, note the text on lower side is reversed in this image, its fine in the gerber file. Havent drawn up any schematics as yet.
 
Thanks for sharing, but I am curious:
You mentioned that you haven’t drawn the schematics yet.

Yet you do have a board artwork. How did you manage to draw it without a netlist and component footprints, which are generated by the schematic editor?
 
Thanks for sharing, but I am curious:
You mentioned that you haven’t drawn the schematics yet.

Yet you do have a board artwork. How did you manage to draw it without a netlist and component footprints, which are generated by the schematic editor?
The PCB design editor (DipTrace) has thousands of components, each with a schematic and PCB footprint, you do not need to have the schematic drawn up in the design package in order to layout a PCB.

For relatively less complex boards like this, I generally go straight to PCB to save time, the schematic is in my head or a few notes scribbled on a sheet of paper, if I can visulise the requirement, I dont need to refer to a schematic in order to layout the board; guess having worked 1000's of hours professionaly in this field in the past, helps a lot.

The disadvantage being without a schematic, there is no pre-defined connection net list, so its easier to make a mistake in the pcb layout as the editor doesnt know what connects where. If the board is going to be complicated then its a different story, drawing up the schematic becomes almost mandatory.
 
Last edited:
I do admire your capabilities!
I also have the rough guidelines of the circuit in my head, but drawing the actual schematic allows me to think the circuit’s strategy.
 
When I built the Orrey I too did not draw a schematic.

The hundreds of LEDs were Charlieplexed, so even drawing a schematic would have been a nightmare to verify.

Instead, I wrote some Visual Basic code to generate the netlist, then ran it though an autorouter. ( That took 24 hours to run ! )

The VB also generated the pad layout for the LEDs to equally space them around each 'orbit', and the pins themselves orientated on radial lines.

So the only part of the pcb that was manually drawn was the stuff around the 40X2, and that circuit was in my head.

Orrey_LEDs_routed.JPG
 
Last edited:
Wow, that looks impressive, especially writing code to perform the layout.

I have found auto routers pretty useless or hopeless at best, when laying out the sort of PCB's I make for PV charge controllers, switching power supplies etc. With high power digital switching etc, wires have to be short, low inductance, sized to carry high currents ... the list goes on and auto routers always seem to mess it up, so to this day I have never used them. Perhaps on those expensive cad systems with high power rules engine, things are a lot better.

Diptrace is pretty good for rotating a bunch of components into a circle, here I created 60 random Leds, then told diptrace to radially align each at 6 degrees in a circle 50mm wide, and rotate the pad footprints to match, here is the result.

60 Leds Radial Arrangement.PNG

Cheers
Mike
 
Wow, I didn't know DipTrace could do that !.
( Maybe it couldn't back then. I did try a lot of free PCB layout tools, but none could do what I needed. )

The VB was a real labour of love. It probably took longer to write the code than do the layout manually. However, because I wrote the code, I knew it did exactly what I wanted. The layout was nine circles like yours, that was the easy part. The main VB was the part that created the Charlieplexed netlist. I then 'imported' the layout and netlist into my pcb programme, added the manual bits, and ran the autorouter.

I agree with you that autorouters are not good with chunky high current circuits or radio frequency stuff. There are, as you say, probably expensive high-end packages that can do these things. If you look at a PC motherboard closely you may find some traces that follow 'wiggly lines' to equalise high freqency clock timings. I'm sure they are not done by hand !.
 
Back
Top