microcontrollers for high voltage BMS - Page 1
Forum section: electronics / general

author: NiHaoMike
author_rank: Super Contributor
timestamp: March 20, 2020, 04:48:23 am
content: For my home solar power system, I'm looking to build a high voltage battery pack, on the order of 50 or so lithium cells in series for about 200V. Obviously, I will need a BMS for such a pack. I'm planning on a 32 bit microcontroller that takes care of the main system control - charge level estimation and fault protection. There will be some hardware providing another level of fault protection. There's only one central unit for the whole pack so cost is not that significant.Where things get interesting are the cell level microcontrollers. The requirements are very basic - serial UART in and out for communications, ADC to measure the cell voltage, and a GPIO for an indicator LED. Optionally, there would also be another GPIO to switch in a balancing load, but good quality cells should need very little balancing current so I'll probably have the indicator LED double as a balancing load. There needs to be one for each series cell so the cost quickly adds up. (For reference, the cells I'm looking at are under $4 each in bulk, pretty cheap for 8Ah.)What microcontroller would be a good fit for that? It must operate on a supply voltage of 3-4.1V (so no 3.3V only parts) and must be able to measure that supply voltage accurately. (How accurate must it be to make a decent BMS?) Its internal oscillator must be reasonably accurate to allow to UART (bitrate of 2400bps or less) to work properly. It does not, however, need to be high performance with a reading every few seconds being good enough. I would prefer PIC since I have done many projects based on them but I'm open to other choices if there are significant advantages.The UART connections will be in a "Token Ring" like configuration with optoisolators for isolation. I'll have to design the protocol to allow the central unit to initialize the ring and allow the individual microcontrollers to be identified. In case of a fault that breaks the ring, the central unit can send a command that flashes the indicator LEDs up to the break to allow easy debugging. I plan to have a spare board or two (each containing multiple cell monitoring circuits in a chain) to allow an easy swap in case one breaks down.

author: digsys
author_rank: Unknown
timestamp: March 20, 2020, 06:36:28 am
content: I have designed this years ago for Solar EV Battery packs. I allow EV clubs to copy / redesign as needed. I also have a few populated PCBs that I sell at cost.The 2 "Perfect fit" parts I use are the - Silicon Labs C8051F504 MPU, which has an awesome amount of 12bit adcs and comms channels, all flexible, and the LT1990 Instrument op-amp, which accepts up to +/- 250V Inputs and has incredible accuracy. The pcb I made is "wafer thin", so it can just "stick" to a lid / side surface. Also has all the minimal I_sense, Temp sense and IO for base functions. Feel free to use any parts you think suitable, or contact me for parts or anything else.Note: I run twisted pair to EVERY cell, I do NOT run a single wire and rely on the cell next door for Ref. I've seen too many "failures" due to Interconnects / cabling. Also - For an I_sense, I just pick off ~0.5M of main BaTT cable length and cal to suit. It is close enough, and doesn't vary much at all. IF your pack is getting so hot that itdoesaffect the accuracy, you're running it TOO HOT :-) .. This measure removes the necessity of a bulky Shunt and extra connections.https://pbase.com/digsys/projects

author: fchk
author_rank: Frequent Contributor
timestamp: March 20, 2020, 07:42:29 am
content: You should have a look at:https://www.analog.com/en/parametricsearch/11532#/These are multicell battery monitor chips with isolated SPI that are specifically designed for the things you are doing. They can be cascaded, and you only have got a single SPI interface (even for multiple monitor chips) that can go to a microcontroller or a raspberry pi or anything else. Everything is handled within these chips.Take this for example:https://www.analog.com/media/en/technical-documentation/data-sheets/LTC6813-1.pdffchk

author: NiHaoMike
author_rank: Super Contributor
timestamp: March 21, 2020, 04:58:09 am
content: Quote from: digsys on March 20, 2020, 06:36:28 amThe LT1990s seems to be more expensive than individual microcontrollers, then you still need something to switch the balancing loads. I suppose it does have the advantage of making the software development a lot easier than dealing with many microcontrollers. In my case, developing the software is part of the learning process.I'm actually planning to use ribbon cable connectors (similar to IDE cables) with a lot more pins than needed so I can parallel them for redundancy and have individual circuits for each microcontroller, to ensure no overvoltage problems regardless of what order the pins mate.Are you willing to share how you did the SOC estimation? My understanding is that's one of the hardest parts of the BMS to get right.Quote from: fchk on March 20, 2020, 07:42:29 amI'm aware of those, but I'm really looking to see how they compete with individual microcontrollers in terms of total system cost.

author: digsys
author_rank: Unknown
timestamp: March 21, 2020, 06:50:42 am
content: Quote from: NiHaoMike1/Surprising you think these are expensive. The cells will cost a few? 1000$ and you'd want the best monitoring for them. Wiring them this way also means they don't need to be successive, in fact each one can be +/- 250V from the next. There were 2 other ICs in that group with lower DiffV in, maybe they would suit? In my case, I rarely ever design for price, but if that's important, this may still give you ideas.2/ INEVERadd balancing circuits toANYBMS I design. I've seen the after effects of what happens when they fail, and with all the switching noise / currents that exist, it is a risk. 2nd- IF you ever were to transport the pack, you wouldn't be allowed on any airline or most carriers with active" devices as part of the pack. Finally - In all the years I've played with packs, I rarely ever need to balance them frequently, even in our race packs. IF they need balancing more than once a year or so, depending on usage, you've done something wrong with the design !! I do provide a balancing connector in the pack for when the BMS "tells" me one or two of the cells need "trimming". I just plug in a 4-8 channel bi-dir charge unit and let the BMS select which cell to fix up.I've looked at all thosefancyBMS ICs that have been coming out, and regard them the same way I do with thebloated / never use most functions everWin10 :-) and like your comment, prefer to roll my own code.Not sure why you'll be using a micro for every cellSurely that is more expensive and overly complicated with no advantages?? Not criticizing, just a mention.For SOC - When I first put a "fresh" pack together, it HAS to be conditioned, usually 2-3 FULL charge / discharge cycles. The way I do the current pick-off is actually quite accurate enough doesn't drift much with time anyway. It is also easy to check / re-calibrate if required.We start with aflat pack- say 1.5 - 2.0V in our case, making sure each cell is exactly the same voltage. Then we charge at 1-4 different rates, and LOG each cells voltage and start creating a load-line profile. Halt charge at say 4.2V, and for the conditioning process, manually trim-up any that are lower. Do discharge the same way, run 3-4 loads and log all the cells. By the end we have a nice load-line image of the pack and how each cell behaves. Also do a full "Energy calculation" using the Current / pack Voltage inputs. Once in use, we cancheckthe SOC against what weexpect, and if necessary reset it at either the Top or Bottom end (or near to). Unless we're in a race, we don't need to push the pack past 4.0V, as there is only a few % Energy left anyway, or below 2.8-3.0V. Naturally, if one cell looks like it may exceed the safe limits, we terminate the charge / discharge cycle. The BMS will tell us how well each cell is tracking, and how much it is drifting over time. I run a - mean / median / peak database for every cell, at least 4 charge / discharge currents, so have excellentpack conditionstatus.One HUGE positive design implementation is - we always run 5+ cells in parallel rather than singles. It provides excellent redundancy and reliability, and rarely ever see a complete pack failure, even if one cell totally fails (and they almost ALWAYS fail O/C thankfully :-) ) I do wire a separate polyfuse to each cell in the rare case it goes short.Some (all?) of these measures may be an overkill for you, but may give you ideas.

author: NiHaoMike
author_rank: Super Contributor
timestamp: March 21, 2020, 02:24:24 pm
content: Quote from: digsys on March 21, 2020, 06:50:42 amAs mentioned before, the cells I'm considering are less than $4 each. I'm also considering building multiple packs so that they can be removed to power stuff like power tools. (I'll have to design some way to quickly equalize the voltage before reconnecting if I go that route, so probably something for later on.)QuoteThe pack is going to be way bigger than the 100Wh or so limit for air travel. The balancing currents would also be quite small so I'm thinking I can just have the individual status LEDs double as balancing loads - quick flashes for status indicating and constant on for balancing.QuoteA quick search finds many microcontrollers with ADCs for under $1 each, some for less than 50c each.QuoteDischarging them to less than 2V/cell seems awfully low for most lithium cells?

author: digsys
author_rank: Unknown
timestamp: March 21, 2020, 10:58:48 pm
content: I assumed you were looking at a much higher energy system, so given your actual figures, you are completely justified in your selections. I had just assumed that it was a big-ass power system :-) and got carried away :-) sorry.Quote from: NiHaoMikeAs far as how low you can discharge LiIon .. we in fact have run them down to LESS than 0.5V !! with literally NO side effects whatsoever... BUT with one important power profile.With each new cell type, I run 2-3 in a destructive power profile curve, right down to near 0V, creating detailed impedance / temperature / recovery curves. These are then added to the BMS, which controls the discharge rates based on the SOC. The "usual" curve is ~0.3 - 0.25C when fully charged, dropping to 0.2 - 0.15C at ~3.2V, then 0.05 - 0.02C at ~2.2V. Given that our packs are usually designed for ~600Km+ normal range, this is quite easy to achieve. IF we really get down that low, our speed drops to ~50-20Km hr, to maintain these numbers, and all is fine. Running LiIon right down to near 0V at near trickle currents is quite safe. In our case, we run a destructive profile to find the MAX curve that we can get away with :-) .. as with any race event, you have set pack weights / total energy etc, so we need to be "smarter". :-)

author: nctnico
author_rank: Super Contributor
timestamp: March 21, 2020, 11:10:06 pm
content: Just use standard BMS chips. These are designed for the purpose (and also much more low power). If the cells go below their critical voltage you don't want to be drawing any current from them.