|
foxBMS
1.0.0
The foxBMS Battery Management System API Documentation
|
Go to the documentation of this file.
59 #ifndef FOXBMS__BATTERY_SYSTEM_CFG_H_
60 #define FOXBMS__BATTERY_SYSTEM_CFG_H_
86 #define POSITIVE_DISCHARGE_CURRENT (true)
89 #define BS_NR_OF_STRINGS (3u)
96 #define BS_NR_OF_MODULES (1u)
104 #define BS_NR_OF_CELLS_PER_MODULE (18u)
112 #define BS_NR_OF_PARALLEL_CELLS_PER_MODULE (1u)
114 #if BS_NR_OF_CELLS_PER_MODULE <= 12u
115 #define BS_MAX_SUPPORTED_CELLS (12u)
116 #elif BS_NR_OF_CELLS_PER_MODULE <= 15u
117 #define BS_MAX_SUPPORTED_CELLS (15u)
118 #elif BS_NR_OF_CELLS_PER_MODULE <= 16u
119 #define BS_MAX_SUPPORTED_CELLS (16u)
120 #elif BS_NR_OF_CELLS_PER_MODULE <= 18u
121 #define BS_MAX_SUPPORTED_CELLS (18u)
122 #elif BS_NR_OF_CELLS_PER_MODULE == 36u
123 #define BS_MAX_SUPPORTED_CELLS (36u)
125 #error "Unsupported number of cells per module, higher than 18 and not 36"
134 #define BS_BALANCING_RESISTANCE_ohm (100.0)
142 #if BS_MAX_SUPPORTED_CELLS == 12u
143 #define BS_NR_OF_GPIOS_PER_MODULE (5u)
145 #define BS_NR_OF_GPIOS_PER_MODULE (9u)
153 #define BS_NR_OF_TEMP_SENSORS_PER_MODULE (8u)
156 #define BS_NR_OF_BAT_CELLS (BS_NR_OF_MODULES * BS_NR_OF_CELLS_PER_MODULE)
158 #define BS_NR_OF_TEMP_SENSORS (BS_NR_OF_MODULES * BS_NR_OF_TEMP_SENSORS_PER_MODULE)
161 #define BS_NR_OF_TEMP_SENSORS_ON_ADC0 (3u)
163 #define BS_NR_OF_TEMP_SENSORS_ON_ADC1 (3u)
172 #define CURRENT_SENSOR_PRESENT (false)
174 #if CURRENT_SENSOR_PRESENT == true
178 #define CURRENT_SENSOR_ISABELLENHUETTE_CYCLIC
182 #define BS_CURRENT_MEASUREMENT_RESPONSE_TIMEOUT_MS (200u)
185 #define BS_COULOMB_COUNTING_MEASUREMENT_RESPONSE_TIMEOUT_MS (2000u)
188 #define BS_ENERGY_COUNTING_MEASUREMENT_RESPONSE_TIMEOUT_MS (2000u)
198 #define BS_MAXIMUM_STRING_CURRENT_mA (10000u)
206 #define BS_MAXIMUM_PACK_CURRENT_mA (10000u * BS_NR_OF_STRINGS)
213 #define CHECK_CAN_TIMING (false)
220 #define BALANCING_DEFAULT_INACTIVE (true)
237 #define BMS_CHECK_SOF_CURRENT_LIMITS (true)
245 #define BMS_OPEN_CONTACTORS_ON_INSULATION_ERROR (false)
253 #define BS_NR_OF_VOLTAGES_FROM_CURRENT_SENSOR (3u)
260 #define BS_NR_OF_VOLTAGES_FROM_MCU_ADC (2)
263 #define BS_NR_OF_CONTACTORS_OUTSIDE_STRINGS (1U)
266 #define BS_NR_OF_CONTACTORS ((2U * BS_NR_OF_STRINGS) + BS_NR_OF_CONTACTORS_OUTSIDE_STRINGS)
273 #define BS_SEPARATE_POWERLINES (1)
275 #if (BS_NR_OF_CONTACTORS > 3) && (BS_SEPARATE_POWERLINES == 0)
276 #error "Configuration mismatch: Can't use only one powerline with more than 3 contactors"
279 #if (BS_NR_OF_CONTACTORS < 4) && (BS_SEPARATE_POWERLINES == 1)
280 #error "Configuration mismatch: Can't use separate powerlines with less than 4 contactors"
287 #define BS_REST_CURRENT_mA (200)
293 #define BS_RELAXATION_PERIOD_10ms (60000u)
299 #define BS_CS_THRESHOLD_NO_CURRENT_mA (200u)
312 #define BS_MAX_VOLTAGE_DROP_OVER_FUSE_mV (500)
325 #define BS_CHECK_FUSE_PLACED_IN_NORMAL_PATH (true)
338 #define BS_CHECK_FUSE_PLACED_IN_CHARGE_PATH (false)
@ BS_STRING_WITH_PRECHARGE
enum BS_STRING_PRECHARGE_PRESENT BS_STRING_PRECHARGE_PRESENT_e
BS_STRING_PRECHARGE_PRESENT
BS_STRING_PRECHARGE_PRESENT_e bs_stringsWithPrecharge[BS_NR_OF_STRINGS]
@ BS_STRING_WITHOUT_PRECHARGE
enum BS_STRING_ID BS_STRING_ID_e