Skip to main content
Firmware Stable

Protection and limitation

There are two ways how the BMS can protect the battery:

  • Turn off the BMS ports
  • Limitation - send a CAN message and ask the connected device to reduce the current

Limitation

The limitation concept is, that the connected device is listening to the BMS and reducing the current if the BMS asks for it. If the device listens to the BMS, the BMS is not forced to turn off the ports. This results in a better user experience, because the user can still use the device, but with reduced power.

The BMS can send a CAN message with a limitation request. This message is implemented on the application level - the BMS must send the message and the controller must react to it, otherwise, the BMS will turn off the ports and the limitation concept will not work.

VariableDescription
/driver/totalLimitPosAvailable relative current in positive direction
/driver/totalLimitNegAvailable relative current in negative direction

Both variables have a range from 0 - 1. If the value is 0, it means, that there is 0 current available. If the value is 1, it means, that the full current is available.

How the limiter works

Every limiter has a threshold (max or min), a margin and a slope (dec) parameter:

  • While the measured value is further than margin + dec from the threshold, no limitation is applied (limit = 1).
  • When the value enters the dec zone, the limit decreases linearly from 1 to 0.
  • When the value crosses into the margin zone (closer than margin to the threshold), the limit is 0 - no current is available in the affected direction.
  • When the value reaches the threshold itself, the BMS enters the PROTECT state and turns the ports OFF.

If more limiters are active at the same time, the lowest (most restrictive) value wins.

Limit word

If there is any limitation active, the BMS will indicate what is causing the limitation with state /driver/limit. Use the wtf command to see the reason for the limitation and check "Limiter state" section. More about diagnostic

limit is a bitwise state - multiple bits can be active at the same time.

limit bitReasonCondition to enterLimits
1BMS temperature too highAn internal BMS sensor (mcu, balmcu, ptcBal, switchptc) got closer than marginMax + decMax to its max threshold. See temperature limitation.Both directions
2Battery temperature too lowA battery TS input reading got closer than marginMin + decMin to its min threshold. See temperature limitation.Discharge
4Battery temperature too highA battery TS input reading got closer than marginMax + decMax to its max threshold. See temperature limitation.Discharge
16Cell voltage too lowThe lowest cell voltage cellMin got closer than cellMinMargin + cellMinDec to the cellMinVoltage threshold. See cell voltage limitation.Discharge
32Cell voltage too highThe highest cell voltage cellMax got closer than cellMaxMargin + cellMaxDec to the cellMaxVoltage threshold. See cell voltage limitation.Charge/regen
64Pack discharge current too highThe filtered pack current currentf got closer than iPosDec to the iPos threshold (see pack current limiter).Discharge
128Pack charge current too highThe filtered pack current currentf got closer than iNegDec to the iNeg threshold (see pack current limiter).Charge/regen
256DSC port current limiterThe DSC port current got close to the idscPos/idscNeg thresholds. See DSC port limiter. (BMS1 only)Both directions
512CHG port current limiterThe CHG port current got close to the ichgPos/ichgNeg thresholds. See CHG port limiter. (BMS1 only)Both directions
1024Battery too cold for chargingA battery TS input reading got closer than marginMinChg + decMinChg to its minChg threshold. See charging temperature limits.Charge/regen
2048Battery too hot for chargingA battery TS input reading got closer than marginMaxChg + decMaxChg to its maxChg threshold. See charging temperature limits.Charge/regen
32768State machineThe current state does not allow the current direction. E.g. in PROTECT/STANDBY both directions are forced to 0, in UNDERVOLTAGE and CHARGING discharge is forced to 0, in OVERVOLTAGE and CHG_OVERTEMP charge is forced to 0.State dependent

Pack current limiter configuration

info

Pack current limiter parameters are located in folder /driver/limiter/.

The pack-level current limiter sets the absolute overcurrent thresholds for the entire battery pack. The filtered pack current currentf is compared against the thresholds. The margin of the pack current limiter is fixed to zero - when the threshold itself is reached, the BMS enters the PROTECT state and turns the ports OFF.

ParameterUnitDescription
iPosAPack discharge overcurrent threshold
iPosDecdelta APack discharge current limit slope
iNegDecdelta APack charge current limit slope
iNegAPack charge overcurrent threshold
note

On BMS3, the hard overcurrent disconnect is performed by the balancer IC and is configured separately with the /driver/ocd_treshold and /driver/ocd_delay parameters (logged as "Current overload on DSC", value 0x0040 in protectLog). The short circuit disconnect is configured with /driver/idscShort and /driver/idscDelay (logged as "Shortcut", value 0x0002). See DSC port.

tip

In addition to the pack-level limiter, each port has its own independent current limiter. See CHG port limiter and DSC port limiter for details.

Protection - turn off the BMS ports

Turning the ports off is always the last resort. If the BMS turns off the ports, the user must turn them back on. The BMS will not turn the ports back on automatically.

If the ports are turned off due to the protection of the battery and BMS, the BMS will enter PROTECT state and log the exact reason into the protectLog permanent. Use the wtf command to see the reason for the protection. More about diagnostic