mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-05 10:49:42 +02:00
✨ add a configurable low temperature limit to DALY BMS max power calculations
This commit is contained in:
parent
e122567c6b
commit
6f9b72ed85
2 changed files with 5 additions and 0 deletions
|
@ -37,6 +37,9 @@ void update_values_battery() {
|
|||
else if (SOC > 8000)
|
||||
adaptive_power_limit = ((10000 - (uint32_t)SOC) * POWER_PER_PERCENT) / 100;
|
||||
|
||||
if (temperature_min_dC < LOW_TEMP_POWER_LIMIT_START && adaptive_power_limit > LOW_TEMP_POWER_LIMIT)
|
||||
adaptive_power_limit = LOW_TEMP_POWER_LIMIT;
|
||||
|
||||
if (adaptive_power_limit < datalayer.battery.status.max_charge_power_W)
|
||||
datalayer.battery.status.max_charge_power_W = adaptive_power_limit;
|
||||
if (SOC < 2000 && adaptive_power_limit < datalayer.battery.status.max_discharge_power_W)
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
#define MAX_CELL_VOLTAGE_MV 4250 //Battery is put into emergency stop if one cell goes over this value
|
||||
#define MIN_CELL_VOLTAGE_MV 2700 //Battery is put into emergency stop if one cell goes below this value
|
||||
#define POWER_PER_PERCENT 50 // below 20% and above 80% limit power to 50W * SOC (i.e. 150W at 3%, 500W at 10%, ...)
|
||||
#define LOW_TEMP_POWER_LIMIT 800 // max power when temperature below limit
|
||||
#define LOW_TEMP_POWER_LIMIT_START 50 // start limiting when below 50 = 5.0 °C
|
||||
|
||||
/* Do not modify any rows below*/
|
||||
#define BATTERY_SELECTED
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue