Tigthen cellvoltage warnings on batteries

This commit is contained in:
Daniel Öster 2025-02-09 19:21:03 +02:00
parent fee857f2ab
commit b3b5f9299c
10 changed files with 14 additions and 15 deletions

View file

@ -7,7 +7,7 @@
#define MAX_PACK_VOLTAGE_DV 4150 //5000 = 500.0V #define MAX_PACK_VOLTAGE_DV 4150 //5000 = 500.0V
#define MIN_PACK_VOLTAGE_DV 2500 #define MIN_PACK_VOLTAGE_DV 2500
#define MAX_CELL_DEVIATION_MV 500 #define MAX_CELL_DEVIATION_MV 150
#define MAX_CELL_VOLTAGE_MV 4250 //Battery is put into emergency stop if one cell goes over this value #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 MIN_CELL_VOLTAGE_MV 2700 //Battery is put into emergency stop if one cell goes below this value

View file

@ -6,7 +6,7 @@
#define BATTERY_SELECTED #define BATTERY_SELECTED
#define MAX_PACK_VOLTAGE_DV 3696 //5000 = 500.0V #define MAX_PACK_VOLTAGE_DV 3696 //5000 = 500.0V
#define MIN_PACK_VOLTAGE_DV 3160 #define MIN_PACK_VOLTAGE_DV 3160
#define MAX_CELL_DEVIATION_MV 500 #define MAX_CELL_DEVIATION_MV 250
#define MAX_CELL_VOLTAGE_MV 4150 //Battery is put into emergency stop if one cell goes over this value #define MAX_CELL_VOLTAGE_MV 4150 //Battery is put into emergency stop if one cell goes over this value
#define MIN_CELL_VOLTAGE_MV 2750 //Battery is put into emergency stop if one cell goes below this value #define MIN_CELL_VOLTAGE_MV 2750 //Battery is put into emergency stop if one cell goes below this value

View file

@ -5,7 +5,7 @@
#define BATTERY_SELECTED #define BATTERY_SELECTED
#define MAX_PACK_VOLTAGE_DV 4546 //5000 = 500.0V #define MAX_PACK_VOLTAGE_DV 4546 //5000 = 500.0V
#define MIN_PACK_VOLTAGE_DV 3370 #define MIN_PACK_VOLTAGE_DV 3370
#define MAX_CELL_DEVIATION_MV 500 #define MAX_CELL_DEVIATION_MV 250
#define MAX_CELL_VOLTAGE_MV 4250 //Battery is put into emergency stop if one cell goes over this value #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 MIN_CELL_VOLTAGE_MV 2700 //Battery is put into emergency stop if one cell goes below this value

View file

@ -6,7 +6,7 @@
#define BATTERY_SELECTED #define BATTERY_SELECTED
#define MAX_PACK_VOLTAGE_DV 4040 //5000 = 500.0V #define MAX_PACK_VOLTAGE_DV 4040 //5000 = 500.0V
#define MIN_PACK_VOLTAGE_DV 2600 #define MIN_PACK_VOLTAGE_DV 2600
#define MAX_CELL_DEVIATION_MV 500 #define MAX_CELL_DEVIATION_MV 150
#define MAX_CELL_VOLTAGE_MV 4250 //Battery is put into emergency stop if one cell goes over this value #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 MIN_CELL_VOLTAGE_MV 2700 //Battery is put into emergency stop if one cell goes below this value

View file

@ -10,7 +10,7 @@
#define MIN_PACK_VOLTAGE_DV 1500 #define MIN_PACK_VOLTAGE_DV 1500
#define MAX_CELL_VOLTAGE_MV 4250 //Battery is put into emergency stop if one cell goes over this value #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 MIN_CELL_VOLTAGE_MV 2700 //Battery is put into emergency stop if one cell goes below this value
#define MAX_CELL_DEVIATION_MV 500 #define MAX_CELL_DEVIATION_MV 150
void setup_battery(void); void setup_battery(void);
void transmit_can_frame(CAN_frame* tx_frame, int interface); void transmit_can_frame(CAN_frame* tx_frame, int interface);

View file

@ -6,11 +6,11 @@
#define BATTERY_SELECTED #define BATTERY_SELECTED
/* Change the following to suit your battery */ /* Change the following to suit your battery */
#define MAX_PACK_VOLTAGE_DV 5000 //TODO: Configure #define MAX_PACK_VOLTAGE_DV 5000 //TODO: Configure
#define MIN_PACK_VOLTAGE_DV 0 //TODO: Configure #define MIN_PACK_VOLTAGE_DV 0 //TODO: Configure
#define MAX_CELL_VOLTAGE_MV 4250 //Battery is put into emergency stop if one cell goes over this value #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 MIN_CELL_VOLTAGE_MV 2700 //Battery is put into emergency stop if one cell goes below this value
#define MAX_CELL_DEVIATION_MV 500 //TODO: Configure #define MAX_CELL_DEVIATION_MV 150
void setup_battery(void); void setup_battery(void);
void transmit_can_frame(CAN_frame* tx_frame, int interface); void transmit_can_frame(CAN_frame* tx_frame, int interface);

View file

@ -6,7 +6,7 @@
#define BATTERY_SELECTED #define BATTERY_SELECTED
#define MAX_PACK_VOLTAGE_DV 4150 //5000 = 500.0V #define MAX_PACK_VOLTAGE_DV 4150 //5000 = 500.0V
#define MIN_PACK_VOLTAGE_DV 2500 #define MIN_PACK_VOLTAGE_DV 2500
#define MAX_CELL_DEVIATION_MV 500 #define MAX_CELL_DEVIATION_MV 150
#define MAX_CELL_VOLTAGE_MV 4250 //Battery is put into emergency stop if one cell goes over this value #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 MIN_CELL_VOLTAGE_MV 2700 //Battery is put into emergency stop if one cell goes below this value
#define MAX_CHARGE_POWER_W 5000 // Battery can be charged with this amount of power #define MAX_CHARGE_POWER_W 5000 // Battery can be charged with this amount of power

View file

@ -5,7 +5,7 @@
#define BATTERY_SELECTED #define BATTERY_SELECTED
#define MAX_PACK_VOLTAGE_DV 579 // 57.9V at 100% SOC (with 70% SOH, new one might be higher) #define MAX_PACK_VOLTAGE_DV 579 // 57.9V at 100% SOC (with 70% SOH, new one might be higher)
#define MIN_PACK_VOLTAGE_DV 480 // 48.4V at 13.76% SOC #define MIN_PACK_VOLTAGE_DV 480 // 48.4V at 13.76% SOC
#define MAX_CELL_DEVIATION_MV 500 #define MAX_CELL_DEVIATION_MV 150
#define MAX_CELL_VOLTAGE_MV 4200 //Battery is put into emergency stop if one cell goes over this value #define MAX_CELL_VOLTAGE_MV 4200 //Battery is put into emergency stop if one cell goes over this value
#define MIN_CELL_VOLTAGE_MV 3400 //Battery is put into emergency stop if one cell goes below this value #define MIN_CELL_VOLTAGE_MV 3400 //Battery is put into emergency stop if one cell goes below this value

View file

@ -3,10 +3,9 @@
#include "../include.h" #include "../include.h"
#define BATTERY_SELECTED #define BATTERY_SELECTED
#define MAX_CELL_DEVIATION_MV 500
#define MAX_PACK_VOLTAGE_DV 4200 //5000 = 500.0V #define MAX_PACK_VOLTAGE_DV 4200 //5000 = 500.0V
#define MIN_PACK_VOLTAGE_DV 3000 #define MIN_PACK_VOLTAGE_DV 3000
#define MAX_CELL_DEVIATION_MV 500 #define MAX_CELL_DEVIATION_MV 150
#define MAX_CELL_VOLTAGE_MV 4250 //Battery is put into emergency stop if one cell goes over this value #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 MIN_CELL_VOLTAGE_MV 2700 //Battery is put into emergency stop if one cell goes below this value

View file

@ -5,7 +5,7 @@
#define BATTERY_SELECTED #define BATTERY_SELECTED
#define MAX_PACK_VOLTAGE_DV 4100 //5000 = 500.0V #define MAX_PACK_VOLTAGE_DV 4100 //5000 = 500.0V
#define MIN_PACK_VOLTAGE_DV 3000 #define MIN_PACK_VOLTAGE_DV 3000
#define MAX_CELL_DEVIATION_MV 500 #define MAX_CELL_DEVIATION_MV 150
#define MAX_CELL_VOLTAGE_MV 4250 //Battery is put into emergency stop if one cell goes over this value #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 MIN_CELL_VOLTAGE_MV 2700 //Battery is put into emergency stop if one cell goes below this value