FlexiBMS Lite - Flexible Configuration BMS w/ CAN-bus

It’s a high-side switch according to the product page. You should leave the GND on the CAN-connector un-connected in this case, as you already always have a strong GND connection to the VESC (BMS - pack - ESC, which is never disconnected)

3 Likes

Ok, I’m going to change the wiring. Thanks!

Same reason why non-plus/ultra samsung phones have plastic back and shit display, so that the most expensive option shines out as better. Only the flipshit plus esc models have canbus ports, along other features

Note, if you’re using an external NTC-probe to control the upper or lower temperature limits for charging.

There is a typo, that causes the measured NTC temperature to be compared against $7 (minPackVolt) and $8 (maxPackVolt), instead of the $13 (minNTCtemp) and $14 (maxNTCtemp) respectively.

Recommended quick fix for the moment:
Set parameters $7 and $8 to have same values as $13 and $14 ($7=$13 and $8=$14). If you’re using cell sensing ($0, packCellCount is not 0), then this shouldn’t affect anything else, as the pack voltages are not used if cell sensing is used

I’ll add this fix to the 0.18.

Report back if this fixed the issue and thanks for informing about it!

2 Likes

Is there not a easy way of using electronics to protect against this if some one makes a dule path for future versions?

Dual path?

There isn’t really one-implementation-fits-all solution, that wouldn’t compromise in some way. The isolated CAN transceiver that the DieBieMS uses is a good compromise overall, but you then need to provide external supply voltage to power the bus side block of the transceiver, which in the esk8 application the VESC can provide, but can become tricky to handle as more CAN-devices are added and how the supply power delivery should be handled for the bus side, especially if there is the need for different devices to provide the bus side power, if the VESC is un-powered for example.

The biggest pro of this implementation being pretty reliable immunity to any GND related fudgery.

The current Lite implementation is probably the simplest one, but there is the possibility of the GND reference problem.


What kind of bluetooth module does the VESC tool -phone app need? Does it work essentially with any bluetooth-UART bridges? I’d appreciate if you know or are using a dongle/module and could drop a link to it.

Just wondering, as I’m interested in trying to get the Lite FW to support directly relaying battery pack info directly to the VESC tool -app, by connecting a bluetooth dongle to the BMS and not going through the CAN-bus and VESC (standalone use, essentially).

I have had a discussion earlier with @rpasichnyk about connecting the Metr Pro directly to the BMS and just getting pack data to the phone app, but he stated (or the understanding I got was) that the app is so much integrated with the VESC being in the system and the BMS info being more tact on top of that, that it would essentially mean writing a whole new app just for the battery data.

This is why I’m looking into getting a bluetooth-module directly connected to the BMS and then sending the data directly to the VESC tool -app for display, so you can have access to the pack info on your phone even if you’re not using a Metr Pro or a Davega.

1 Like

@SimosMCmuffin Charging stopped working with my FlexiBMS today. I have already done a little bit of investigation. First, I checked if the charger is working correctly. It is. If I bypass the BMS, it does charge the pack.

I also checked that the fuse on my charger connector didn’t blow. It didn’t. I can measure 50.4V at the Flexi charger input as it should be.

I tried power cycling the Flexi. Didn’t help.

The Flexi still seems to work correctly in every other respect. It responds to CAN commands. USB connection also works.

These are my settings:
$0=12 (Pack cell count; number of series cells in the battery pack, set to 0 to disable cell sensing, Uint)
$1=6000 (Max charging current; mA (milliAmps), maximum current allowed to flow to battery, Uint)
$2=50 (Charging termination current; mA (milliAmps), stop charging when current drops below this, Uint)
$3=2000 (Minimum cell voltage; mV (milliVolts), minimum allowed cell voltage, no charging allowed if cell voltage below this, Uint)
$4=4160 (Maximum cell voltage; mV (milliVolts), maximum allowed cell voltage, no charging allowed if cell voltage above this, Uint)
$5=10000 (Minimum charger voltage; mV (milliVolts), minimum allowed charger voltage, no charging allowed if charger voltage below this, Uint)
$6=55000 (Maximum charger voltage; mV (milliVolts), maximum allowed charger voltage, no charging allowed if charger voltage above this, Uint)
$7=7000 (Minimum pack voltage; mV (milliVolts), minimum allowed pack voltage, no charging allowed if pack voltage below this, Uint)
$8=52000 (Maximum pack voltage; mV (milliVolts), maximum allowed pack voltage, no charging allowed if pack voltage above this, Uint)
$9=4150 (Charging cell termination voltage; mV (milliVolts), don't allow any cell to go above this voltage when charging, Uint)

$10=50400 (Charging pack termination voltage; mV (milliVolts), don't allow pack to go above this voltage when charging, Uint)
$11=4300 (Cell balancing voltage; mV (milliVolts), allow balancing once a cell goes above this voltage, Uint)
$12=10 (Allowed difference between cell groups; mV (milliVolts), maximum allowed voltage difference between cell groups, balance if difference bigger, Uint)
$13=0 (Minimum external NTC thermistor temperature; K (Kelvin), set to 0 to disable, if enabled, the minimum temperature above which charging is allowed, Uint)
$14=0 (Maximum external NTC thermistor temperature; K (Kelvin), set to 0 to disable, if enabled, the maximum temperature below which charging is allowed, Uint)
$15=260 (Minimum PCB temperature; K (Kelvin), the minimum temperature above which charging is allowed, Uint)
$16=330 (Maximum PCB temperature; K (Kelvin), the maximum temperature below which charging is allowed, Uint)
$17=0 (0/1, allow cell balancing outside of charging, Boolean)
$18=30 (Fault wait time; s (seconds), How long to wait after fault state before trying to start charging again, Uint)
$19=1.0000 (Gain for Battery voltage ADC conversion, Float)

$20=0.0 (Offset for Battery voltage ADC conversion, Float)
$21=1.0000 (Gain for Charger voltage ADC conversion, Float)
$22=0.0 (Offset for Charger voltage ADC conversion, Float)
$23=1.0000 (Gain for Current sense ADC conversion, Float)
$24=0.0 (Offset for Current sense ADC conversion, Float)
$25=1.0000 (Gain for External NTC temperature probe conversion, Float)
$26=0.0 (Offset for External NTC temperature probe conversion, Float)
$27=1.0000 (Gain for Internal MCU temperature conversion, Float)
$28=0.0 (Offset for Internal MCU temperature conversion, Float)
$29=3380 (External NTC probe Beta-value; external NTC sensor's beta value, Uint)

$30=16 (ADC's oversampling setting; allowed values (1, 2, 4, 8, 16), Uint)
$31=100 (h (Hours), how long to stay in active mode, Uint)
$32=1 (0/1, force 5V regulator always on when battery connected, Boolean)
$33=3 (balancing temperature ratio, dynamically adjusts the max allowed balancing resistors based on BMS temperature, set to 0 to use static maximum, Uint)
$34=3800 (Storage discharge voltage; mV (milliVolts), if storage discharge enabled, then pack will be discharged to this voltage, Uint)
$35=0 (h (Hours), how long to wait from last CHARGING event to start discharging the pack to the storage voltage, set to 0 to disable, Uint)
$36=0 (0/1, CAN activity status LED tick, good for testing that the BMS is receiving CAN traffic, Boolean)
$37=10 (CAN ID number for this BMS unit, if using multi-BMS setups, all BMS' need to have unique CAN ID, uint16_t)
$38=0 (0/1, if set to 1, keeps 5V regulator on even if USB, charger or Opto not active, Boolean)
Here's the log before and after connecting the charger:
State:3673:3682:3682:3682:3682:3684:3684:3631:3685:3685:3687:3684:43620:12137:3:298:305:0:chargingEnd:
State:3673:3682:3682:3682:3682:3684:3684:3631:3685:3685:3687:3684:43620:12137:0:298:305:0:chargingEnd:
State:3673:3682:3682:3682:3682:3684:3685:3631:3685:3685:3687:3684:43639:12137:0:298:305:0:chargingEnd:
State:3673:3682:3682:3682:3682:3684:3684:3631:3685:3685:3687:3684:43659:12137:3:298:305:0:chargingEnd:
State:3673:3682:3682:3682:3682:3684:3684:3631:3687:3685:3687:3684:43679:12137:3:298:305:0:chargingEnd:
State:3673:3682:3682:3682:3682:3684:3684:3631:3687:3685:3687:3684:43620:12137:0:298:305:0:chargingEnd:
State:3673:3682:3682:3682:3682:3684:3684:3631:3685:3685:3687:3684:43659:12137:3:298:305:0:chargingEnd:
State:3673:3682:3682:3682:3682:3684:3685:3631:3685:3685:3687:3684:43620:12137:0:298:305:0:chargingEnd:
State:3673:3682:3682:3682:3682:3684:3685:3631:3685:3685:3687:3684:43679:49453:3:298:305:0:chargingEnd:
State:3673:3682:3682:3682:3682:3684:3684:3631:3685:3685:3687:3684:43600:49433:0:298:305:0:chargingEnd:
State:3673:3682:3682:3682:3682:3684:3684:3631:3685:3685:3687:3684:43600:49453:0:298:305:0:chargingEnd:
State:3673:3682:3682:3682:3682:3684:3684:3631:3685:3685:3687:3684:43639:49453:3:298:305:0:chargingEnd:
State:3673:3682:3682:3682:3682:3684:3684:3631:3685:3685:3687:3684:43639:49453:0:298:305:0:chargingEnd:
State:3673:3682:3682:3682:3682:3684:3684:3631:3687:3685:3687:3684:43620:49453:0:298:305:0:chargingEnd:
State:3673:3682:3682:3682:3682:3684:3684:3631:3685:3685:3687:3684:43620:49453:3:298:305:0:chargingEnd:
State:3673:3682:3682:3682:3682:3684:3684:3631:3685:3685:3687:3684:43698:49453:3:298:305:0:chargingEnd:
State:3673:3682:3682:3682:3682:3684:3684:3631:3685:3685:3687:3684:43620:49433:0:298:305:0:chargingEnd:

Any ideas?

3 Likes

Increase $5 (minChgVolt) higher from 10V, as it looks like the charger side measured voltage doesn’t drop below ~12V (even if you disconnect the charger completely?) and that keeps the charging state machine from resetting back to “noChargerConnected” aka, starting/initial state and it keeps hanging in the chargingEnd-state.

Increase $5 to say 30V ($5=30000), which is high enough for 12S charger and test again, I’m also curious to what voltage the charger side voltage drops if you disconnect the charger completely, so try this and report back.

1 Like

The advantage of the metr pro vs VESC app is the support and multi platform use as well as a user friendly UI that the VESC app just refuses to support. It’s why metr pro is by fare more of the standard most of us use.

1 Like

Android only atm?

I’m more interested in having a standalone solution available for non-EV use cases, say like solar battery packs and you want to remotely check the pack’s state via your phone. Plus, it’s already an available app that exists and works, so I don’t need to start developing my own one (PC or phone app development is not my area of expertise/knowledge).

Thanks. I tried that. It only charged a for a blink of eye and then it stopped again (the LED on the charger went red for maybe 1 sec and then back to green).

Here’s the relevant part of the log:

State:3672:3681:3681:3681:3681:3682:3684:3630:3685:3684:3687:3682:43600:12298:0:299:306:0:notCharging:
State:3672:3681:3681:3681:3681:3682:3684:3630:3685:3684:3687:3682:43620:12278:0:299:306:0:notCharging:
State:3672:3681:3681:3681:3681:3684:3684:3630:3685:3684:3687:3684:43659:12298:0:299:306:0:notCharging:
State:3672:3681:3682:3681:3681:3684:3684:3630:3685:3684:3685:3684:43639:49534:0:299:306:0:charging:
State:3673:3681:3681:3682:3681:3684:3684:3630:3685:3684:3685:3682:43659:49413:3:299:306:0:chargingEnd:
State:3672:3681:3681:3682:3681:3682:3684:3630:3685:3684:3687:3684:43600:49413:0:299:306:0:chargingEnd:
State:3673:3681:3681:3682:3681:3682:3684:3630:3685:3684:3687:3682:43620:49413:3:299:306:0:chargingEnd:

Also, the 12V that the Flexi registers at the charger port is without anything connected, which is weird.

It stopped working pretty much out of nowhere. I haven’t changed anything about the setup.

I only changed the loop key on my board today. I can’t see how it could be related. The loop key is on the positive side.

Edit: I also tried updating the firmware from v0.13 to the latest v0.17c. Still the same behavior. Could there be any hardware failure? Anything I should check?

1 Like

Yes, I guess this is the case for VESC Tool app as well. If you want BMS-only app you could try mimic LLT BMS.

1 Like

And this is why you can’t call the CAN network a bus anymore with DieBieMS.
Even though the opto-isolator tends to bring more robustness to the design, it kills the ability to use the CAN as a real bus as the BMS is then isolated from the network if the external power source for the opto is shut down (one VESC in this case).

Therefore, you need to power the VESC on if you want the Metr CAN or any other CAN devices to retrieve BMS values while charging.
That sucks IMO.

However, the DieBieMS implementation of CAN can be a great base for making more reliable systems as it uses for instance ESD diodes on CANH and CANL.
VESCs don’t have these and it happens that sometimes CAN chips fry due to common GND loss.

Don’t you think that the ESD diodes and 120R GND resistor may be enough to protect the bus while keeping it flexible (= without having the opto) ?

3 Likes

Is the log you pasted with what FW version?

ESD diodes would certainly help from any possible transient voltage spikes, but not necessarily against GND loss. The 120R GND resistor is to protect/fuse from over current events, in case say battery negative is lost on the main battery leads to the ESC and the only path provided back to the pack is now through the CAN-connector GND.

Opto is only used to activate the BMS, it’s not directly related to the CAN-bus.

1 Like

The one I pasted was from 0.13 but I haven’t noticed any change after upgrading to 0.17c.

I can send you an oldschool module and a unity one which may be working, believe its the only thing that survived the sea water

2 Likes

One option in your case would be to have opto-isolated CAN IC with an isolated 5V power installed on the board…So you still have isolated CAN and you don’t need an external 5V or ESC connected to enable the BMS CAN bus. It would also be safe for any other device connecteds. Drawbacks are: more expensive & more components on the board. Would it be worth it? I don’t know

2 Likes

@SimosMCmuffin got a weird one here. I’ve tried to charge for the first time after config, when I plugged the charger in initially, there was a short green light, then nothing.
When I unplug the charger, the BMS starts flashing red, and green, video attached below.


Flashing lights only go away when balance connector unplugged. What am I looking at here? Thanks!

2 Likes

FW version and parameters?

1 Like