Author Topic: Intelligent BMS (Battery Management System)  (Read 3178 times)

0 Members and 1 Guest are viewing this topic.

Offline JohnnyBergTopic starter

  • Frequent Contributor
  • **
  • Posts: 474
  • Country: de
Intelligent BMS (Battery Management System)
« on: November 08, 2019, 12:36:15 pm »
I started a new project, a intelligent BMS (Battery Management System). It is a max. 7S system, that can be stacked to any number of cells. The system is able to monitor any chemistry that is in the range 2.5 ~ 4.6 Volt

My objective is to enhance the live of the batteries. That is done by not charging them to the maximum voltage, and not discharging them to the minimum voltage. I aim for over 2000 cycles, instead of the usual 500 or less.

This is what it is supposed to do:

- Measure voltage of each cell, with a accuracy under +/- 0.1% with a resolution of < 1 mV. Max. voltage 4.6 Volt, min Voltage 2.5 Volt.
- Measure the in-going / out-going current, maximum 50A, with a accuracy under +/- 0.2% with a resolution of < 25mA.
- Cell balance, with a maximum current of 2A, fine tuned over PWM.
- Auto detect the configuration, anything from 2S to 7S.
- Accurate state of charge/discharge over Coulomb counting, in combination with monitoring cell voltage.
- Switch of the load with a maximum of 200A, under programmable conditions:
  - over voltage
  - under voltage
  - over current
  - and any combination of the above
- Quiescent current from each cell < 40 uA, except cell 1, maximum 300uA
- Bluetooth low energy connection in master and slave, to stack units. Over the Bluetooth interface, a Android or PC app can monitor the state of the BMS, like total voltage, condition of each cell, state of charge and so on. When the cells are charged/discharged with a variable load, the internal resistance of each cell can be calculated.

I plan to post regular updates on project progress. The PCB is being manufactured and assembled, in the meanwhile I start working on the software.

« Last Edit: November 08, 2019, 12:39:03 pm by JohnnyBerg »
 

Offline aiq25

  • Regular Contributor
  • *
  • Posts: 241
  • Country: us
Re: Intelligent BMS (Battery Management System)
« Reply #1 on: November 08, 2019, 02:08:53 pm »
Interesting project.

Are you looking to use a battery management IC along with a microcontroller or do it all using a micro?

 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8455
  • Country: fi
Re: Intelligent BMS (Battery Management System)
« Reply #2 on: November 08, 2019, 05:27:46 pm »
Sounds like a numerical overspecification. 0.1% voltage measurement accuracy is hard to reach reliably, or will be expensive, and won't deliver any benefit whatsoever regarding SoC estimation or cell life. Since li-ion capacity and lifetime is limited by the cells and specifically cell cost, build a lower-cost BMS and use the saved budget on more cells, to build a better performing battery (as a whole).

Another example, 2A balancing current requires careful thermal analysis, heatsinking design, will add clearly non-zero cost and weight, while provides no benefit whatsoever, unless your packs are truly massive (1000Ah+?). There is a reason why commercial BMS's tend to limit to around 0.2-0.5A, and why I designed mine to balance at 40mA, using an intelligent algorithm dividing the balancing time instead of brute-forcing it.

I would try to dedicate all efforts primarily to make they system as robust and fail-safe as possible (simplicity is one of the keys), and secondarily, study (by literature research, or own measurements) which mechanisms are important for cell aging, and which aren't. This depends on the actual cell, as well, so it's best to choose a few you "support" best, and study how they perform.

Example points regarding robustness:
Look for stuck-on balancing, possible heat generation and thermal fusing in worst case firmware/logic failure.

Example points regarding cell aging:
Tapering charging current before the CV voltage may easily increase the cell life by 10x (say, from 100 cycles to 1000 cycles), with only small impact on total charging time.

Similarly, adjusting charging current based on temperature, or heating/cooling battery properly, may easily increase the cell life by 10x (Say, from 100 cycles to 1000 cycles). And no, this may mean you need to heat the battery above room temp, instead of cooling, in certain conditions.
« Last Edit: November 08, 2019, 05:56:19 pm by Siwastaja »
 

Offline JohnnyBergTopic starter

  • Frequent Contributor
  • **
  • Posts: 474
  • Country: de
Re: Intelligent BMS (Battery Management System)
« Reply #3 on: November 08, 2019, 07:46:08 pm »
Interesting project.

Are you looking to use a battery management IC along with a microcontroller or do it all using a micro?

It is based on a a microcontroller.

 

Offline JohnnyBergTopic starter

  • Frequent Contributor
  • **
  • Posts: 474
  • Country: de
Re: Intelligent BMS (Battery Management System)
« Reply #4 on: November 08, 2019, 07:59:27 pm »
Sounds like a numerical overspecification. 0.1% voltage measurement accuracy is hard to reach reliably, or will be expensive, and won't deliver any benefit whatsoever regarding SoC estimation or cell life. Since li-ion capacity and lifetime is limited by the cells and specifically cell cost, build a lower-cost BMS and use the saved budget on more cells, to build a better performing battery (as a whole).

hmm .. limiting cell loading at 4.10V with a measuring accuracy of +/- 0.1% gives a range of a little more than 8 mV. So voltage is between 4.096 and 4.104 V
For me a compromise ;)

Quote
Another example, 2A balancing current requires careful thermal analysis, heatsinking design, will add clearly non-zero cost and weight, while provides no benefit whatsoever, unless your packs are truly massive (1000Ah+?). There is a reason why commercial BMS's tend to limit to around 0.2-0.5A, and why I designed mine to balance at 40mA, using an intelligent algorithm dividing the balancing time instead of brute-forcing it.

Brute force seems a bad idea ;)
Cell balance current is max 2 A, and can be adjusted over PWM. Furthermore, the intelligent part can determine a algorithm for balancing, mixing thermal considerations versus time and number of cells to be balanced.


As you said, reducing the cell end loading voltage with 0.1V has a dramatic increase on the life time. So has discharging voltage, charge current and discharge current. So to achieve the actual life time enhancement, one must be able to do measurements with a certain accuracy.

Anyway, I start working on the firmware and app next week, after doing some basic tests in the last weeks.

I already played with Bluetooth Low Energy, which give some nice high end features. Besides monitoring and logging, one could think of firmware updates and in case of automotive and e-e-bike/e-motor/e-scooter operations a unlock code, to prevent usage in case of theft.
The Bluetooth module can operate in master or slave mode. The app connects with the master, and in a network of BMS-es als slaves report to the master, giving a opportunity to build many different configurations, in series or parallel.

I thought of a GPS module for tracking, and locking on distance. Perhaps in a next version ..
« Last Edit: November 09, 2019, 01:55:41 pm by JohnnyBerg »
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8455
  • Country: fi
Re: Intelligent BMS (Battery Management System)
« Reply #5 on: November 09, 2019, 04:27:31 pm »
Balancing resistors as shown on the PCB layout have no way of dissipating 4.2V*2A=8.4W. You are an order of magnitude high here, 1W might be possible but even then several neighbour cells shunting at the same time could be a problem. 2A balancing current requires actual heatsinking, and I fail to see the thermal design. Thermal design cannot be added with software.

Note that you need to have a physical thermal cutoff (like a PTC, or thermal fuse) in case of stuck-on balancer caused by a software bug. I have seen at least one total loss EV fire very likely caused by too high balancing current on a home-brew BMS.

Max 50A current suggests a small battery system (tens of Ah, maybe 100Ah max?). Industry standard balancing currents in range of about 20-100mA are working just fine for such small packs, and greatly simplify thermal design, especially during edge cases such as software bugs.

Large (say 200-500Ah) EV packs sometimes use balancers up to maybe 500mA, and even that tends to be unjustified. I showed 40mA is enough with a 250Ah battery consisting of leaky, overdischarged, second life cells (originally killed by an overengineered BMS, by the way).

Voltage vs. lifetime correlations are complex and sometimes surprising. If you want to take the challenge, don't focus on increasing measurement accuracy - study the actual relations first. For example, some cells age faster when charged to 4.1V, than when charged to 4.2V. And many benefit from decreasing the charging current already starting at 4.0V, in a slowly decreasing curve, not suddenly at 4.200000V. Understanding these effects do not benefit from extreme accuracy. +/- 0.2% to 0.3% tends to be enough, but yeah, of course extra accuracy won't hurt. Just try to avoid fixation on that, I have seen it happen.
« Last Edit: November 09, 2019, 04:37:51 pm by Siwastaja »
 

Offline JohnnyBergTopic starter

  • Frequent Contributor
  • **
  • Posts: 474
  • Country: de
Re: Intelligent BMS (Battery Management System)
« Reply #6 on: November 09, 2019, 06:46:50 pm »
Balancing resistors as shown on the PCB layout have no way of dissipating 4.2V*2A=8.4W. You are an order of magnitude high here, 1W might be possible but even then several neighbour cells shunting at the same time could be a problem. 2A balancing current requires actual heatsinking, and I fail to see the thermal design. Thermal design cannot be added with software.

I did not show the back of the PCB ;)
For each cell, there is a TO252 power transistor that does the heavy lifting. All the power transistors  are mounted against a aluminium sheet, that is used as a heatsink. The power resitors disipate 1.2 W max, well under the spec. of 2 W.

Quote
Note that you need to have a physical thermal cutoff (like a PTC, or thermal fuse) in case of stuck-on balancer caused by a software bug. I have seen at least one total loss EV fire very likely caused by too high balancing current on a home-brew BMS.

That is a good point, thanks for that.

Quote
Max 50A current suggests a small battery system (tens of Ah, maybe 100Ah max?). Industry standard balancing currents in range of about 20-100mA are working just fine for such small packs, and greatly simplify thermal design, especially during edge cases such as software bugs.

This boards initially will be used for a e-scooter, running at 60V with 50Ah nominal, giving a 3 kWh battery.
The batteries that I've got from my customer are not that great (Chinese no name 18650 cells) and there are huge differences in capacity.
The balancing current is max 2A, but can be adjusted via PWM to any value between 0 and 2A, if 20 mA is needed, no problem ;)

Quote
Large (say 200-500Ah) EV packs sometimes use balancers up to maybe 500mA, and even that tends to be unjustified. I showed 40mA is enough with a 250Ah battery consisting of leaky, overdischarged, second life cells (originally killed by an overengineered BMS, by the way).

Voltage vs. lifetime correlations are complex and sometimes surprising. If you want to take the challenge, don't focus on increasing measurement accuracy - study the actual relations first. For example, some cells age faster when charged to 4.1V, than when charged to 4.2V. And many benefit from decreasing the charging current already starting at 4.0V, in a slowly decreasing curve, not suddenly at 4.200000V. Understanding these effects do not benefit from extreme accuracy. +/- 0.2% to 0.3% tends to be enough, but yeah, of course extra accuracy won't hurt. Just try to avoid fixation on that, I have seen it happen.

I've build pretty good voltage references in the past, so measuring a DC voltage with a accuracy of +/- 0.1% wasn't a challenge. With a few tricks a 12 bit ADC can achieve that.
« Last Edit: November 09, 2019, 06:51:01 pm by JohnnyBerg »
 

Offline ealex

  • Frequent Contributor
  • **
  • Posts: 318
  • Country: ro
Re: Intelligent BMS (Battery Management System)
« Reply #7 on: November 10, 2019, 03:09:53 pm »
Hello

I'll join  this thread as I'm working on something similar.
I've decided to use an BQ76920 AFE for a 3-5S pack, and will use BQ76930 for a 10S pack.
I'm currently using an ESP32 in BT mode as a controller - but I will ditch it because of it's high current draw.

I've seen that small balance currents are usually enough - I've force a pack out of balance and it was back in 2 or 3 cycles with 20mA balance current.

The next batch of boards will use a STM32L0 series MCU that will be powered by the BQ's 3V supply and will handle the management part on board.

There's one thing that I'm still trying to implement - a secondary watchdog - if the AFE IRQ is not serviced by the MCU in 200ms or something like that I want to force the BQ chip in shutdown mode - I think I can do that by making it think a cell is discharged, but I'll have to check.

I've attached the current schematic - and if you need I can share the current code as well
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 27521
  • Country: nl
    • NCT Developments
Re: Intelligent BMS (Battery Management System)
« Reply #8 on: November 10, 2019, 03:43:30 pm »
The AFE chips from TI are a good start. No need to re-invent the wheel. Where things get interesting is to calibrate the coulomb counter to the cell chemistry in order to get an accurate prediction of available charge in the pack. TI also has solutions for that but I'm not sure you can get to those without an NDA.

Other considerations are safety. It is nice to have current limiting in hardware. For example: the current sensing chip can disable the load switch. That way the safety doesn't rely purely on the microcontroller.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline ealex

  • Frequent Contributor
  • **
  • Posts: 318
  • Country: ro
Re: Intelligent BMS (Battery Management System)
« Reply #9 on: November 10, 2019, 04:37:33 pm »
I've tested the BQ's protection features  - it's very fast - I have some tiny mosfets and it's able to handle straight output short.
Also, OV and UV are working properly - it saved the pack several times when the main MCU was not doing it's job

The only annoying thing is the lack of a watchdog in the way I want it, and from the datasheet the only way to disable it is to kill one of it's supply lines, is the MCU is not active.

The scenario I'm thinking of: cell balance is enabled and the MCU dies for some reason.
The AFE will discharge that cell until it reaches the under-voltage threshold.
It's still safe, but it can be annoying (too many FMEA's and ISO26262 related meetings)
I'll try to handle this with the MCU's watchdogs.
 

Offline JohnnyBergTopic starter

  • Frequent Contributor
  • **
  • Posts: 474
  • Country: de
Re: Intelligent BMS (Battery Management System)
« Reply #10 on: November 22, 2019, 10:54:28 am »
The boards arrived today, at first sight they look ok.
 

Offline ealex

  • Frequent Contributor
  • **
  • Posts: 318
  • Country: ro
Re: Intelligent BMS (Battery Management System)
« Reply #11 on: November 22, 2019, 11:58:48 am »
it looks interesting
how are you shifting the cell voltage to the MCU's adc ?

will you publish a schematic ?
 

Offline JohnnyBergTopic starter

  • Frequent Contributor
  • **
  • Posts: 474
  • Country: de
Re: Intelligent BMS (Battery Management System)
« Reply #12 on: November 22, 2019, 08:45:54 pm »
There you go ;)

What this circuit does:
1. It ignores the first 2.5V of a cell as not being of interest.
2. It converts the cell voltage between 2.5 and 4.5 Volt to a current.
3. The current is then converted to a voltage, with 1.5 times amplification, giving a range of 0 to 3 Volt to the MCU.

Total current draw from a cell is < 50 uA

U6 = Output to MCU
B6 = Positive of cell 6
B5 = Positive of cell 5 = negative of cell 6

« Last Edit: November 22, 2019, 08:56:00 pm by JohnnyBerg »
 

Offline ealex

  • Frequent Contributor
  • **
  • Posts: 318
  • Country: ro
Re: Intelligent BMS (Battery Management System)
« Reply #13 on: November 22, 2019, 08:58:01 pm »
nice - never thought of that.
i've tried with resistor dividers, but the errors stack up quickly -> i've decided to go with the BQ chips.
 

Offline JohnnyBergTopic starter

  • Frequent Contributor
  • **
  • Posts: 474
  • Country: de
Re: Intelligent BMS (Battery Management System)
« Reply #14 on: November 22, 2019, 09:15:03 pm »
nice - never thought of that.
i've tried with resistor dividers, but the errors stack up quickly -> i've decided to go with the BQ chips.

Yaeh .. resistor dividers are a absolute no go. Not also do errors accumulate, resolution is lost also.

This circuit i.c.m. with a 12 bit ADC gives a resolution in the order of 500uV. And because the voltage does not change quickly, the MCU can do noise cancellation with a moving average.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf