foxBMS
1.4.1
The foxBMS Battery Management System API Documentation

Configuration of the battery cell (e.g., minimum and maximum cell voltage) More...
#include "general.h"
Go to the source code of this file.
Data Structures  
struct  BC_LUT_s 
Variables  
uint16_t  bc_lginr18650mj1SocLutLength 
const BC_LUT_s  bc_lginr18650mj1SocLut [] 
uint16_t  bc_lginr18650mj1SoeLutLength 
const BC_LUT_s  bc_lginr18650mj1SoeLut [] 
Configuration of the battery cell (e.g., minimum and maximum cell voltage)
SPDXLicenseIdentifier: BSD3Clause
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
We kindly request you to use one or more of the following phrases to refer to foxBMS in your hardware, software, documentation or advertising materials:
This files contains basic macros of the battery cell in order to derive needed inputs in other parts of the software. These macros are all depended on the hardware.
Definition in file lg_inr18650mj1.h.
#define BC_CAPACITY_mAh (3500u) 
the cell capacity used for SOC calculation, in this case Ah counting
Definition at line 208 of file lg_inr18650mj1.h.
#define BC_CURRENT_MAX_CHARGE_MOL_mA (9000u) 
Maximum charge current limit. When maximum safety limit (MSL) is violated, error state is requested and contactors will open. When recommended safety limit (RSL) or maximum operating limit (MOL) is violated, the respective flag will be set.
Definition at line 200 of file lg_inr18650mj1.h.
#define BC_CURRENT_MAX_CHARGE_MSL_mA (10000u) 
Maximum charge current limit. When maximum safety limit (MSL) is violated, error state is requested and contactors will open. When recommended safety limit (RSL) or maximum operating limit (MOL) is violated, the respective flag will be set.
Definition at line 198 of file lg_inr18650mj1.h.
#define BC_CURRENT_MAX_CHARGE_RSL_mA (9500u) 
Maximum charge current limit. When maximum safety limit (MSL) is violated, error state is requested and contactors will open. When recommended safety limit (RSL) or maximum operating limit (MOL) is violated, the respective flag will be set.
Definition at line 199 of file lg_inr18650mj1.h.
#define BC_CURRENT_MAX_DISCHARGE_MOL_mA (9000u) 
Maximum discharge current limit. When maximum safety limit (MSL) is violated, error state is requested and contactors will open. When recommended safety limit (RSL) or maximum operating limit (MOL) is violated, the respective flag will be set.
Definition at line 185 of file lg_inr18650mj1.h.
#define BC_CURRENT_MAX_DISCHARGE_MSL_mA (10000u) 
Maximum discharge current limit. When maximum safety limit (MSL) is violated, error state is requested and contactors will open. When recommended safety limit (RSL) or maximum operating limit (MOL) is violated, the respective flag will be set.
Definition at line 183 of file lg_inr18650mj1.h.
#define BC_CURRENT_MAX_DISCHARGE_RSL_mA (9500u) 
Maximum discharge current limit. When maximum safety limit (MSL) is violated, error state is requested and contactors will open. When recommended safety limit (RSL) or maximum operating limit (MOL) is violated, the respective flag will be set.
Definition at line 184 of file lg_inr18650mj1.h.
#define BC_TEMPERATURE_MAX_CHARGE_MOL_ddegC (350) 
Maximum temperature limit during charge. When maximum safety limit (MSL) is violated, error state is requested and contactors will open. When recommended safety limit (RSL) or maximum operating limit (MOL) is violated, the respective flag will be set.
Definition at line 107 of file lg_inr18650mj1.h.
#define BC_TEMPERATURE_MAX_CHARGE_MSL_ddegC (450) 
Maximum temperature limit during charge. When maximum safety limit (MSL) is violated, error state is requested and contactors will open. When recommended safety limit (RSL) or maximum operating limit (MOL) is violated, the respective flag will be set.
Definition at line 105 of file lg_inr18650mj1.h.
#define BC_TEMPERATURE_MAX_CHARGE_RSL_ddegC (400) 
Maximum temperature limit during charge. When maximum safety limit (MSL) is violated, error state is requested and contactors will open. When recommended safety limit (RSL) or maximum operating limit (MOL) is violated, the respective flag will be set.
Definition at line 106 of file lg_inr18650mj1.h.
#define BC_TEMPERATURE_MAX_DISCHARGE_MOL_ddegC (500) 
Maximum temperature limit during discharge. When maximum safety limit (MSL) is violated, error state is requested and contactors will open. When recommended safety limit (RSL) or maximum operating limit (MOL) is violated, the respective flag will be set.
Definition at line 77 of file lg_inr18650mj1.h.
#define BC_TEMPERATURE_MAX_DISCHARGE_MSL_ddegC (600) 
Maximum temperature limit during discharge. When maximum safety limit (MSL) is violated, error state is requested and contactors will open. When recommended safety limit (RSL) or maximum operating limit (MOL) is violated, the respective flag will be set.
Definition at line 75 of file lg_inr18650mj1.h.
#define BC_TEMPERATURE_MAX_DISCHARGE_RSL_ddegC (550) 
Maximum temperature limit during discharge. When maximum safety limit (MSL) is violated, error state is requested and contactors will open. When recommended safety limit (RSL) or maximum operating limit (MOL) is violated, the respective flag will be set.
Definition at line 76 of file lg_inr18650mj1.h.
#define BC_TEMPERATURE_MIN_CHARGE_MOL_ddegC (0) 
Minimum temperature limit during discharge. When maximum safety limit (MSL) is violated, error state is requested and contactors will open. When recommended safety limit (RSL) or maximum operating limit (MOL) is violated, the respective flag will be set.
Definition at line 122 of file lg_inr18650mj1.h.
#define BC_TEMPERATURE_MIN_CHARGE_MSL_ddegC (0) 
Minimum temperature limit during discharge. When maximum safety limit (MSL) is violated, error state is requested and contactors will open. When recommended safety limit (RSL) or maximum operating limit (MOL) is violated, the respective flag will be set.
Definition at line 120 of file lg_inr18650mj1.h.
#define BC_TEMPERATURE_MIN_CHARGE_RSL_ddegC (0) 
Minimum temperature limit during discharge. When maximum safety limit (MSL) is violated, error state is requested and contactors will open. When recommended safety limit (RSL) or maximum operating limit (MOL) is violated, the respective flag will be set.
Definition at line 121 of file lg_inr18650mj1.h.
#define BC_TEMPERATURE_MIN_DISCHARGE_MOL_ddegC (100) 
Minimum temperature limit during discharge. When maximum safety limit (MSL) is violated, error state is requested and contactors will open. When recommended safety limit (RSL) or maximum operating limit (MOL) is violated, the respective flag will be set.
Definition at line 92 of file lg_inr18650mj1.h.
#define BC_TEMPERATURE_MIN_DISCHARGE_MSL_ddegC (200) 
Minimum temperature limit during discharge. When maximum safety limit (MSL) is violated, error state is requested and contactors will open. When recommended safety limit (RSL) or maximum operating limit (MOL) is violated, the respective flag will be set.
Definition at line 90 of file lg_inr18650mj1.h.
#define BC_TEMPERATURE_MIN_DISCHARGE_RSL_ddegC (150) 
Minimum temperature limit during discharge. When maximum safety limit (MSL) is violated, error state is requested and contactors will open. When recommended safety limit (RSL) or maximum operating limit (MOL) is violated, the respective flag will be set.
Definition at line 91 of file lg_inr18650mj1.h.
#define BC_VOLTAGE_DEEP_DISCHARGE_mV (BC_VOLTAGE_MIN_MSL_mV  100u) 
Deepdischarge cell voltage limit. If this voltage limit is violated, the cell is faulty. The BMS won't allow a closing of the contactors until this cell is replaced. a replacement of the cell is confirmed by sending the respective CAN debug message
Definition at line 171 of file lg_inr18650mj1.h.
#define BC_VOLTAGE_MAX_MOL_mV (4100u) 
Maximum cell voltage limit. When maximum safety limit (MSL) is violated, error state is requested and contactors will open. When recommended safety limit (RSL) or maximum operating limit (MOL) is violated, the respective flag will be set.
Definition at line 137 of file lg_inr18650mj1.h.
#define BC_VOLTAGE_MAX_MSL_mV (4200u) 
Maximum cell voltage limit. When maximum safety limit (MSL) is violated, error state is requested and contactors will open. When recommended safety limit (RSL) or maximum operating limit (MOL) is violated, the respective flag will be set.
Definition at line 135 of file lg_inr18650mj1.h.
#define BC_VOLTAGE_MAX_RSL_mV (4150u) 
Maximum cell voltage limit. When maximum safety limit (MSL) is violated, error state is requested and contactors will open. When recommended safety limit (RSL) or maximum operating limit (MOL) is violated, the respective flag will be set.
Definition at line 136 of file lg_inr18650mj1.h.
#define BC_VOLTAGE_MIN_MOL_mV (2100u) 
Minimum cell voltage limit. When maximum safety limit (MSL) is violated, error state is requested and contactors will open. When recommended safety limit (RSL) or maximum operating limit (MOL) is violated, the respective flag will be set.
Definition at line 159 of file lg_inr18650mj1.h.
#define BC_VOLTAGE_MIN_MSL_mV (2000u) 
Minimum cell voltage limit. When maximum safety limit (MSL) is violated, error state is requested and contactors will open. When recommended safety limit (RSL) or maximum operating limit (MOL) is violated, the respective flag will be set.
Definition at line 157 of file lg_inr18650mj1.h.
#define BC_VOLTAGE_MIN_RSL_mV (2050u) 
Minimum cell voltage limit. When maximum safety limit (MSL) is violated, error state is requested and contactors will open. When recommended safety limit (RSL) or maximum operating limit (MOL) is violated, the respective flag will be set.
Definition at line 158 of file lg_inr18650mj1.h.
#define BC_VOLTAGE_NOMINAL_mV (3650u) 
nominal cell voltage according to data sheet
Definition at line 146 of file lg_inr18650mj1.h.

extern 
SOC lookup table starting with 100%
Definition at line 67 of file lg_inr18650mj1.c.

extern 
length of the SOC lookup table bc_lginr18650mj1SocLut
Definition at line 105 of file lg_inr18650mj1.c.

extern 
SOE Lookup table in 1% steps starting with 100%
Definition at line 86 of file lg_inr18650mj1.c.

extern 
length of the SOE lookup table bc_lginr18650mj1SoeLut
Definition at line 107 of file lg_inr18650mj1.c.