Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Other Resources:
FWXIV BMS Carrier notes

BMS AFE Description

Components:

AFEs

The AFEs (analog front end) handle interactions with the main battery pack. There are multiple AFEs (LTC6811 chips) which handle reading cell voltages, reading thermistors to determine cell temperatures, and doing load balancing for the cells. These multiple AFE units are daisy-chained through one SPI interface. This SPI interface is interacted with the same as normal spi, but through hardware is translated to isoSPI and back to SPI for improved reliability.

...

LTC AFE Driver FSM Structure:

States:

  • LTC_AFE_IDLE (TBD)

    • Only needed if we need to execute error functionality while not running commands on the ltc6811

  • LTC_AFE_TRIGGER_CELL_CONV

    • Trigger conversion of voltage values

    • Output:

      • Send command to start conversion of cell voltage values

    • Input func:

      • Check to see if 10ms has passed

      • Transition to read cells

  • LTC_AFE_READ_CELLS

    • Output function:

      • SPI exchange to read/store all cell values, take any immediate actionstore in results array

      • Check for faults in readings

      • Input function transitions to aux conversion assuming no faults

  • LTC_AFE_TRIGGER_AUX_CONV

    • Output:

      • Send command to start read temperature values of a cell (we should maybe change to set of cells)

    • Input

      • Transition to read aux if 6 ms have passed

  • LTC_AFE_READ_AUX

    • Output:

      • Read current cell, increment cell number

    • Input

      • if cell number == number of cells, aux is done reading → transition to complete

      • else transition back to trigger aux conversion for next conversion

  • LTC_AUX_COMPLETE

...

Just transition to Idle for now. We will signal main BMS if an error occurs

Transitions:

LTC_AFE_IDLE → LTC_AFE_TRIGGER_CELL_CONV , LTC_AFE_IDLE → LTC_AFE_TRIGGERREAD_AUX_CONV

We would like to transition from the idle state whenever one of the exposed API functions is called (trigger_read_conv or trigger_aux_conv), and the calling of these functions would trigger a transition to the relevant state.

LTC_AFE_TRIGGER_CELL_CONV → CELLS

LTC_AFE_READ_CELLS , LTC_AFE_TRIGGER_CELLAUX_CONV → LTC_AFE_IDLE

Once in this state most of the time we would like to trigger a read after a soft timer has run. However, if the trigger_cell_conv operation fails (SPI fails, etc), then we return to the idle state.

LTC_AFE_READTRIGGER_CELLS → LTC_AFE_IDLE, LTC_AFE_READ_CELLS AUX_CONV → LTC_AFE_READ_CELLSOnce in this state, the read operation will be run and data from the AFEs will be returned allowing us to stay if we would like more data or go back to idle to start the process from scratch.AUX

LTC_AFE_TRIGGERREAD_AUX _CONV LTC_AFE_READ_AUX, LTC_AFE_TRIGGER_AUX_CONV → LTC_AFE_IDLE

Similar to the trigger_cell state.

LTC_AFE_READ_AUX → LTC_AFE_AUX_COMPLETE,

LTC_AFE_READ_AUX → LTC_AFE_READ_AUX, LTC_AFE_READ_AUX _COMPLETE → LTC_AFE_TRIGGER_AUX_CONV, CELL_CONV

Transitions continue in this loop format for the entirety of the time that BMS is operational.

The states should also be able to transition to and from LTC_AFE_READ_AUX → LTC_AFE_IDLE

Similar to the read_cells state, but here, we can also go back to the trigger or go to the complete state.

LTC_AFE_AUX_COMPLETE → LTC_AFE_IDLE

When complete, we will go to idle and start the FSM from scratch.STATE_IDLE if this is how we decide to operate our error states.

AFE Discharge/Load Balancing

Based on the results received, we iterate through and determine what the minimum and maximum voltage values are per cell. We are checking for a difference