The foxBMS 1 version 1.6.0 is available on GitHub.
We publish major software releases for our open source BMS platform every 3 to 6 months and interim bug fixes when solved in the News section. By subscribing to the foxBMS Newsletter, you will be informed when the new releases are available. Further, the foxBMS Roadmap and the Documentation are also updated regularly.
Warning: The foxBMS platform including the foxBMS hardware and the foxBMS software are under permanent development. The free and open research and development platform foxBMS as presented in the documentation hereafter is not provided to be used without any adaptions (e.g., to fulfill mandatory regulations) in consumer products, electric vehicles, production environments or any similar usages: the open source version of the foxBMS platform is only intended to be used by skilled professionals trained in designing battery system prototypes.
Based on all the feedback received during the last 2 years from foxBMS software partners and users, the embedded software and the computer software have been restructured to reduce the MCU hardware dependency and enable even more flexibility.
Hereafter is a summary of the changes provided in foxBMS 1 version 1.6.0.
Software:
- Toolchain:
- Updated to
waf-2.0.15
(fromwaf-2.0.14
) size
is now implemented as a waf-feature to speed up build times- foxBMS custom waf tasks displayed wrong information in the terminal about the running processes (e.g.,
Compiling
instead ofCreating hex file
) - fixed a task order constraint when building the elf file. For details see the updated build documentation (see section Build Process).
- added a simple test, that verifies that low level drivers do not relay on higher level modules (e.g., FreeRTOS, database, etc.). A project can be tested by running
python tools\waf build_primary_bare
orpython tools\waf build_secondary_bare
(see section Build Process). - removed unnecessary
run_always
attribute to reduce build time - rewrote the build of libraries. Now libraries can be build independent from the project configuration. Libraries can then later be added to the project as needed with the
configure --libs=...
command (see section Build Process). - fixed
clean_libs
command as it did not remove allbuild_libs
artifacts - if an include directory does not exist, an error is raised
- if a directory is included more than once, an error is raised
- some build attributes of
bld.env
inside thewscript
s haven been renamed (__inc_hal
tohal_dirs
,__inc_FreeRTOS
toFreeRTOS_dirs
,__bld_common
tocommon_dir
,__sw_dir
toes_dir
and__bld_project
tomcu_dir
- an error is raised if the path to the foxBMS project directory contains whitespace
- an error is raised if a comparison between signed and unsigned integers is used
- ensured compatibility with PyYAML v5.1 by supplying a Loader-parameter to calls of yaml.load()
- fixed generation of .hex file to only contain flash content
- raise the
switch
-warning to error in GCC - add a configuration for cppcheck to the repository
- raise the
type-limits
-warning to error in GCC - raise the
double-promotion
-warning to error in GCC
- Updated to
- Bugfixes:
- in the function
LTC_RX_PECCheck()
, the LTC PEC (packet error code) check of the last module in the daisy-chain was overriding the PEC check of all preceding modules. If the PEC of the last module was correct, all other PECs were detected as correct, even if some errors were present (ltc.c
) - fixed compile error, when setting define
MEAS_TEST_CELL_SOF_LIMITS
toTRUE
(bms.c
) - some variables used to store database content at the beginning of the
BMS_Trigger()
function were defined as local variables. This could lead to a stack overflow if a high number of modules was configured. These variables have been defined as static to solve this issue (bms.c
) - the
DIAG_GeneralHandler
has been removed. TheDIAG_Handler
must be used for all diagnosis instead, except for the diagnosis of the contactors, which is handled byDIAG_ContHandler
. DIAG_Handler
returned wrong value if it was called when an error has already been detected (diag.c
)- If more cell voltages or temperatures were defined for CAN transmission than for measurement in the battery system, during transmission, the array boundaries of the local variables storing database entries were violated. now boundary violations are checked and default values are sent for CAN signals not corresponding to existing measurements. (
cansignal_cfg.c/h
) - fixed incorrect array offset mapping CAN1 RX messages to respective CAN1 RX signals (
cansignal.c
) - moved fuse state error handling from
CONT
module toBMS
module to avoidCONT
state machine switching into error state withoutBMS
state machine transitioning into error state - fixed an implicit cast to uint that prevented working protection of the battery cells against overdischarge and -charge below zero degrees (
bms.c
) - moved checksum feature to main
wscript
- added initialization state flags to contactor-, BMS- and balancing-statemachine in order to fix race-conditions between these statemachines and the sys-statemachine (
sys.c/h
,bal.c/h
,bms.c/h
,contactor.c/h
) - fixed overlapping signals in dbc file for CAN message CAN_Cell_voltage_M2_0
- fixed function
BMS_CheckCurrent()
. If contactors opened in case of over-current, error flags remained set in spite of the current being back to zero. - allow for current thresholds in
BMS_CheckCurrent()
differing from the cell-limits and adaptable to both charge and normal powerline (bms.c
,contactor.c/h
)
- in the function
- Enhancements:
- reimplemented UART COM Decoder as a non-realtime background task for easier use
- removed direct register access in UART module to improve portability (
uart.c/h
) - added plausibility module to check pack voltage (
plausibility.c/h
) - added plausibility module to check cell voltage and cell temperature (
slaveplausibility.c/h
) - the Python wrapper and DLL needed to run the graphical user interface with a CAN-adapter from the company Peak are now redistributed with foxBMS. Before using them, the conditions in the file
readme.txt
intools\gui
must be read and accepted. - updated STM32 HAL to version 1.7.4 and CMSIS to version 2.6.2
- rewrote CAN driver to work with new HAL CAN module introduced in HAL version 1.7.0 (
can.c/h
,can_cfg.c/h
) - updated FreeRTOS to version 10.2.0 and adapted FreeRTOSConfig.h accordingly
- added dedicated datasheet files for EPCOS B57251V5103J060, EPCOS B57861S0103F045 and Vishay NTCALUG01A103G NTC sensors to calculate cell temperatures using either a look-up table or polynomial approximation
- the diagnosis modules of primary and secondary were unified and moved to mcu-common
- error and safe operating area flags are now written periodically (1ms) to prevent erroneous database operations due to concurrency effects
- moved #define to configure current sensor response timeout from
cansignal_cfg.h
tobatterysystem_cfg.h
- moved #define to select if current sensor is in cyclic or triggered mode from
can_cfg.h
tobatterysystem_cfg.h
- added simple diag-function that allows to track the call period of system tasks
- moved linker scripts from
src
togeneral\config\STM32F4xx
- moved FreeRTOS configuration headers from
src\general\config
tosrc\general\config\FreeRTOS
- removed
MCU_0_
andMCU_1_
from the pin defines inio_mcu_cfg
to increase the readability of the drivers - added deep-discharge flag that gets set if the deep-discharge voltage limit is violated. Flag is stored in non-volatile backup SRAM and can only be reset with CAN debug message. This prevents closing the contactors before the affected cell has been replaced
- added support for FreeRTOS runtime stats. The stats can be accessed by the new ‘printstats’ command in the COM module.
- added state transition functions for ltc-statemachine to reduce code size (
ltc.c
) - added stack overflow-handler that can be used for debugging and detecting stack overflows during development
- disabled dynamic allocation for operating system, removed heap-implementation and switched to static allocation for operating system components
- information about the git repository from which the binaries are built is included in the binaries. The define
BUILD_ALLOW_DIRTY_STARTUP
has been added ingeneral.h
to allow or disallow the startup of the BMS in case of a non clean repository. - set error flag if current flows in spite of all contactors being open (
bms.c
) - added support for TCA6408A port expander in
LTC
module (write output pins and read input pins) - added decoding for up to 18 cell voltages per module in foxBMS interface
Hardware:
- BMS-Slave 12-cell v2.1.7
- EMC layout improvements to fulfill the UN ECE R10 Revision 5
- added RC filters on the NTC temperature sensor inputs to improve EMC
- replaced linear regulators for LTC6811-1 5V power supply with DC/DC converters to reduce the thermal dissipation and avoid a hot spot (already implemented on the 18 cell BMS-Slave)
- added circuit for switching off 5V DC/DC converters in LTC sleep mode, thus
reducing the current consumption of a BMS-Slave to less than 20µA - all components used for the assembly of the board now exist in AEC-Qxxx automotive qualified versions
Documentation:
- added missing unit information for some CAN signals in section
Communicating with foxBMS
- added a section on how to configure
conda
to work behind a proxy
In case you encounter problems, please contact us.
The Fraunhofer IISB foxBMS Team