FlexiBMS Lite - Flexible Configuration BMS w/ CAN-bus

This is something that happens in multi-parallel pack setups with independent BMS for each parallel pack. The problem is that the BMSs need to be able to communicate to each other and figure out how to behave based on the pack voltages and possible faults from the other BMSs.

Here’s an example of a such setup. We have 2 packs with each of their own BMS and they will be connected to the same charger. Note, the values used are arbitrary, but somewhat realistic.

  1. Both packs are at 45.0V, no charger connected.
  2. Charger is connected and pack #1 starts to charge first, it’s voltage rises to 46.0V with the 4Amp current.
  3. Pack #2 starts to charge also. This causes the current to pack #1 to drop as the current now is spread to also pack #2. At the moment of starting the charge pack #1 is also at a higher voltage than pack #2, so pack #1 will actually for a short moment drop in voltage, exaggerating the current “drop” (4.0A → 0.5A momentarily) it sees at this moment and this might cause the termination current limit to trigger. (this is what @philo is seeing)
  4. After a short moment the two packs will even out both in voltage and charging current.

The above explanation is a generalized description of why the behavior @philo was seeing is happening.

But there are other possible scenarios where bigger problems may happen, say both packs are even and charging, but the other pack triggers a fault (e.g. bad crimp on a sense wire that causes intermittent dropping of a sensed cell voltage for it) and it starts to spend a lot of time in a fault state. If it’s intermittent then it might see the step 3 described above a multiple times, but if the fault stays on then it might completely stop charging, now you might have one pack at 50.0V and the other at 46.5V and this will most certainly cause the BMS to start ping-pong behaving while charging (basically the higher voltage pack won’t charge and the lower pack will and then the roles reverse at the next charging event).

I have been thinking about “parallel mode” firmware feature to support exactly this use-case to make sure that these possible fault behavior can’t happen or at least is handled better (say one BMS has a fault, which then trigger all the other ones to stop charging as well, to not increase any imbalance between the packs), but it has been on the backlog for some time now, as I haven’t quite figured out the whole system level implementation plan, as there is quite a lot of complexity.

I think I would implement on a user configurable parameter level so that there would be a $-parameter for parallelPackCount, 0 would be normal one pack mode and then 1 would indicate that there is 1 parallel pack, 2 → two parallel packs, 3 → parallel packs and so on. CAN ID 10, would be the master BMS, parallel pack #1 would be 11, pack #2 12 and so on. That is essentially what the user would have to configure, the parallelPackCount to the correct amount on all the BMSs and then make sure the parallel packs have their CAN IDs set to sequentially 10, 11, 12, 13… based on how many there are of them.

The parallelPackCount being non-zero means that the BMSs would be either master or slave, depending if their CAN ID is 10 or not. The master BMS can then poll the slave BMSs for their pack statuses and voltages and can detect if they drop out and stop charging for all the packs. Similarly the slave BMSs can detect the master dropping out, if they don’t get any polling from the CAN ID 10 BMS and they can then stop charging independently after a polling time-out period expires.

Yes… This would feel like a good way to approach this at this moment… :thinking:

6 Likes

That makes a lot of sense. A slightly simpler approach would be this: As the BMS is charging, it broadcasts a heartbeat message on CAN. The BMS also listens for heartbeats and stops charging if it doesn’t hear the heartbeats from all other BMSes for more than X seconds.

You would just have a single type of message and you wouldn’t need to worry about master/slave.

2 Likes

@SimosMCmuffin Thanks for the detailed explanation.
Yes the current drop was exactly that what i could see in the Terminal and then the charging termination message. At the end of charging (98%) I could also see that pingpong between the 2 Flexis even with $2=10. With my new 4A charger it is working better and I could charge both batteries to 100% but my battery packs are both new and so both on the same voltage and charging level.

I’ll start looking into implementing the “parallel mode” feature and figure out what approach I’m gonna have for it. At this point from a system level perspective should it be centralized master-slave system that I described or a distributed system with heartbeat messages like @janpom described.

paralle mode sounds great :slight_smile:

But for now i’am pretty happy how it works. Flexibms and davega x are really nice little pieces of hardware. props to @SimosMCmuffin and @janpom :clap:

3 Likes

Exactly, think it would give a good visual balance.

I like this idea!
I think though that using “1” for a single pack, “2” for two in parallel, etc., might help to reduce confusion and accidentally incorrect settings.

Yes, each user should take the time and effort to carefully do the correct setup but I’m a big fan of doing anything that can help prevent the inevitable mistakes. It can also reduce the number of people contacting you to say something isn’t working right. :slightly_smiling_face:

4 Likes

I would prefer a combination of both
0 disabled (to keep consistency acros all settings)
1 single BMS (migh send out the heart beet or also decabled the feature)
2 dule BMS
3 ect ect

I can see some one useing
2 BMS in to 1 pack to increas the charge currentor 2 separate chargers some one linking 2 packs and linking the balance leads but only useing 1 BMS

number of BMS would avoid confusion.

@SimosMCmuffin can I add another issue to think about for combining bms with 1 charger. I’m presuming the flexi doesn’t have any diode on the charge port

Say BMS 1 has stoped charging because of a temp or some other reason. BMS 2 keeps charging. Now BMS 1 is ready to continue charging.

Pack 2 back feeds down the charge port 10A in to pack 1, charger pushes 5A, Pack 1 sees 15A and cuts the charge port on BMS1. Now pack 2 keeps charging increasing the issue

How do you recover from this state with out splitting the packs?

Is there a way of checking the direction of current thro the charge port?

Weather has been improving and warming up, so I’ve been skating around a lot for the past week.

Progress on the Lite 12S is finished, but I haven’t ordered the boards yet, as I’m looking at what the component schedule is gonna look like.

Lite 18S is in the works. I think I might be able to keep the formfactor otherwise identical to the 12S, but the board has been stretched from 62mm length to 83mm to fit the additional balancing circuits for the extra 6 cells. I’m planning on keeping the JST XH-13 for the first 12 cells and then a JST XH-6 for the top 6 cells.
In addition I was looking at adding a USB-C -connector, but unfortunately it is bigger then a micro and as the pcb width is the same as before (26.5mm), it doesn’t neatly fit, so I’ll poll for opinion on this.

Balancing connector setup
  • XH-13 + XH-6 (as shown above) is good
  • I want something else (1 connector solution? comment below)
0 voters
USB-connector
  • Micro is fine
  • USB-C preferred, but I’d rather have a smaller pcb size
  • USB-C is a must, make it fit
0 voters

Isn’t this almost the exact situation I showed the example for?

Charging current measuring wise, the BMS can only measure current flowing into the battery, not out of it. Essentially any current <=0A just shows as 0A.

The way I have planned the implementation of the charging behavior for the parallel mode should stop the scenario you described from happening. Once a charger has been connected, all BMS heartbeat out their current pack voltages and then the lowest pack voltage starts the charging first. Then when the voltage rises to the level of the next lowest pack, then it also starts charging and so on. Fault on any BMS triggers all of them to stop charging and reset back to initial state, if the fault clears, then start again with the pack with the lowest voltage.

This behavior should stop all “back-feed” cases, so you could in theory throw 2 10S packs (with their own BMS’), one at 33V other at 40V together on the charger port side. The 33V one would start charging first and when it’s voltage reaches 40V, then the originally 40V pack would also start charging.

Now implementing this behavior into the code is a bit challenging, so it will take some time.

2 Likes

I have like 85mm of space length-wise to work with in my 16s build, so this is great news for me! :grinning_face_with_smiling_eyes:

1 Like

Levaling pack total voltage thro the large discharge cables when there conected. this one is with out the discharge comebed. is a self accumulating issue with results in a higher voltage potential and the added current back feeding thro the charge mosfets and smaller cables and a over charge current genarated.

The solution you taking sounds as tho it tackles both potential issues.

1 Like

I’ll take a few please.

2 Likes

Also, here’s a little detail about why I don’t feel comfortable promising any kind of time schedule at the moment, which I believe is related to the coof and the global chip shortage.

3 Likes

We all know what chip that is :eyes:

thx to @Darkie02 for the nice 3D Print file. FlexiBms fits perfect. Just added a smale led lightunnel :slight_smile:

5 Likes

IC shortage is very problematics for all of us, all STM32 are out of stock for upcoming months balancing IC as well. Components prices are going higher & higher :expressionless:

4 Likes

Hey @SimosMCmuffin any reason why when I try to set my $19 to the listed value of 1.0131, it reverts back to 1.0130?
Trying it a few times just jumps back to 1.0130. It will accept 1.0132 but not 1.0131 strangely.

Also while I got you, any recommendation for a part to use for external ntc probe?

Cheers

1 Like

@SimosMCmuffin do you know if I can use this?

https://www.jaycar.com.au/10k-epoxy-dip-ntc-thermistor/p/RN3440

Doesn’t have listed beta value?

I asked about this earlier, because I ran into the same issue. Apparently it has to do with the float conversion. When you send the value, it gets saved correctly so don’t worry about it.

Thanks man, sorry should have trawled but not sure what to search on that. I’ve done some testing and calculating on the ntc thermistor I boight and with my very inaccurate instruments it seems to have a calculated beta of approx 4000 so should be good.
Cheers