8. Checking-up foxBMS

This section describes how to test the BMS-Master Board with one BMS-Slave Board connected. These tests show if the hardware and software components of the BMS-Master Board and BMS-Slave Board are working correctly:

8.1. Required Hardware

  • 1 * BMS-Master Board including a supply cable
  • 1 * BMS-Slave Board
  • 1 * Battery voltage simulation at the BMS-Slave Board (e.g., voltage divider)
  • 1 * CAN-Bus to PC adapter
  • 1 * Normally closed switch for opening the interlock (hereafter referred to as emergency off)
  • 3 * Contactors with normally open feedback (hereafter referred to as plus main contactor, plus precharge contactor, minus main contactor)
  • 1 * Debugger (optionally, but recommended)

8.1.1. Testing Without Debugger

It is also possible to get little information if the system is running correctly without variable checking on the debugger. When requesting the later described states to the BMS, the contactors opening and closing can be heard.

8.1.2. Testing With Debugger

This test procedure gives more detailed test information when a debugger is used. The following variables should be checked during the test:

  • os_timer
  • sys_state
  • bms_state
  • ltc_cellvoltage
  • cont_contactor_states
  • ilck_interlock_state

8.2. Required Software

8.3. Test Procedure

The test procedure consists of three steps:

  1. Preparing the hardware
  2. Building the software from source
  3. Requesting bms-states to BMS-Master Board and checking variable values on the debugger

If no debugger is available, only a partially test if all parts of foxBMS are running correctly can be performed. As mentioned above, it can be checked accoustically if the contactors are opening and closing. This is marked in the Test with (H) and the corresponding explanation if needed.

8.3.1. Hardware Setup

  1. Apply voltages to the BMS-Slave Board cell measurement inputs (e.g., voltage divider)
  2. Connect the daisy chain connector from the BMS-Slave Board to the BMS-Master Board.
  3. Connect the emergency off to the interlock of the BMS-Master Board.
  4. Connect the following contactors to the BMS-Master Board:
    1. contactor 0 the plus main contactor in the positive current path
    2. contactor 1 the plus precharge contactor in the positive current path
    3. contactor 2 the minus main contactor in the negative current path
  5. Connect the CAN-interface to the PC
  6. The debugger is connected from the PC to the JTAG-interface of MCU0 of BMS-Master Board (optional).

8.3.2. Software Setup

  1. Build the foxBMS binaries for both, MCU0 and MCU1.

8.3.3. Test

  1. Power BMS-Master Board

  2. Flash foxBMS MCU0 binaries on MCU0

  3. Flash foxBMS MCU1 binaries on MCU1

  4. Start CAN-communication viewer (e.g., PCAN-View when using PCAN-USB)

  5. Restart BMS-Master Board

  6. Send CAN message for Request Standby-state via CAN

  7. Check on the debugger if the system timer is running; variable: os_timer

  8. Check if BMS-Slave Board reads voltages; variable: ltc_cellvoltage

  9. Request Standby-state via CAN

    1. Check on the debugger if interlock is closed (variable: ilck_interlock_state with ilck_interlock_state.feedback=ILCK_SWITCH_ON)
  10. Request Normal-state via CAN

    1. Check on the debugger if contactors are closed in the correct order (variable: cont_contactor_states)
      1. close minus main contactor
      2. close plus precharge contactor
      3. close plus main contactor
      4. open plus precharge contactor

    (H): If this test is performed with no debugger, contactors can be clicking four times.

  11. Request Standby-state via CAN

    1. Check on the debugger if interlock is closed (variable: ilck_interlock_state)
    2. Check on the debugger if contactors are opened (variable: cont_contactor_states)

    (H): If this test is performed with no debugger, each contactor can be heard clicking one time.

  12. Request Normal-state via CAN

    1. Check on the debugger if contactors are closed in the correct order (variable: cont_contactor_states)
      1. close minus main contactor
      2. close plus precharge contactor
      3. close plus main contactor
      4. open plus precharge contactor

    (H): If this test is performed with no debugger, contactors can be heard clicking four times.

  13. Open interlock by pressing emergency off

    1. Check on the debugger if interlock is opened (variable: ilck_interlock_state)
    2. Check on the debugger if contactors are opened (variable: cont_contactor_states)

    (H): If this test is performed with no debugger, each contactor can be heard clicking one time.

  14. Request Normal-state via CAN

    1. BMS should switch to bms_state.state=BMS_STATEMACH_ERROR as the interlock is still open (variable bms_state)
  15. Close interlock by releasing emergency off

    1. Check on the debugger if interlock is still open (variable: ilck_interlock_state)
    2. BMS has to stay in error state (check variable bms_state)
  16. Request Standby-state via CAN

    1. Check on the debugger if interlock is closed (variable: ilck_interlock_state)
    2. Check on the debugger if contactors are still open (variable: cont_contactor_states)
  17. Request Normal-state via CAN

    1. Check on the debugger if contactors are closed in the correct order (variable: cont_contactor_states)
      1. close minus main contactor
      2. close plus precharge contactor
      3. close plus main contactor
      4. open plus precharge contactor

    (H): If this test is performed with no debugger, contactors can be heard clicking four times.

  18. Request Standby-state via CAN

    1. Check on the debugger if interlock is closed (variable: ilck_interlock_state)
    2. Check on the debugger if contactors are still open (variable: cont_contactor_states)
  19. done