Skip to main content
Firmware Stable

CAPRA: set up a BMS for its battery

Applies to​

A BMS running CAPRA (swid contains _CAPRA_) before its first use, connected over USB without the battery (getting started playbook). It follows prerequisites and basic configuration.

Before you start​

  • The rules of the general method apply. Writes, save -y and reboot need Allow writes. Propose each change and run it after the user's yes.
  • Tell the user before the battery is connected: the BMS's USB is galvanically connected to the battery pack. Any battery potential reaching the PC case destroys the PC and the BMS; CAN is the safe connection.
  • A wrong balancing connector damages the BMS, and an unconfigured BMS must not stay on the battery for long.

Steps​

1. State​

/driver/stateMachine/state (INIT expected while unconfigured) and /driver/hw_error (state, readings).

2. Battery data​

Ask, from the battery and cell datasheets: cells in series and in parallel, cell capacity (mAh), chemistry (Li-ion or LiFePO4), the NTC type and its B constant, how many NTCs are fitted, and the peak current of the motor controller the battery feeds. The cell count must not exceed the BMS's cell inputs, and the full pack voltage must be within its voltage variant.

3. Minimum configuration (USB only)​

  • /driver/balancing/Scount = cells in series; it takes effect after the reboot in step 5.
  • /driver/temp/ts1Conf/Bconst and /driver/temp/ts2Conf/Bconst = the NTC's B constant (temperature inputs). Only one NTC fitted: /driver/temp/ts2Conf/conf = 0, otherwise the empty input raises a temperature protection.
  • save -y.

4. Connect the battery​

The user connects the pack in the order of connecting the pack - the balancing connector before the main plus, the main plus last - with the pinout from pinout. Remind them of the USB warning above.

5. Reboot and check​

reboot, then search_devices if the BMS is gone from list_devices. Check:

  • /driver/hw_error 0 (a negative value: series count or NTC not set);
  • /driver/stateMachine/state: STBY until something switches the BMS on (step 6), IDLE once on;
  • /driver/balancing/cellVoltages plausible and /driver/balancing/badCells 0 (balancing states);
  • /driver/balancing/cellVoltSum within 1 V of /driver/voltage;
  • /driver/temp/ts1 (and ts2) plausible temperatures;
  • /driver/currentf under 0.1 A.

6. Further settings​

Propose each, with its page, then save -y:

  • /ctlmode = 192 when no accessory switches the BMS on (it then switches on by itself) (control mode);
  • /dispmode: 0 none, 1 LEDs, 2 OLED; needs a reboot (display);
  • /driver/best/P = cells in parallel and /driver/best/Cc = cell capacity in mAh, then breset (state estimation);
  • /driver/balancing/limiter/cellMinVoltage and cellMaxVoltage (mV): the defaults suit Li-ion, not LiFePO4 - take the datasheet values (cell limits);
  • /driver/ishrt (A) above the controller's peak current;
  • the clock, as on basic configuration.

Hand back​

save -y, reboot, and the checks of step 5 once more; the state is IDLE.

Report​

  1. Device: name, serial number, swid.
  2. Series and parallel cells, NTC setup, the values set.
  3. The checks of step 5 with their values; what was saved.

Escalate​

hw_error stays negative, a cell reads wrong, or the state goes to PROTECT or ERROR: read the state page and send a diagnostic report.