2022-07-03 23:47:14 +02:00
|
|
|
#ifndef INC_SOC_ESTIMATION_H
|
|
|
|
#define INC_SOC_ESTIMATION_H
|
|
|
|
|
|
|
|
#include "SPI_Communication.h"
|
|
|
|
|
|
|
|
#define SOCE_SHUNT_CURRENT_OFF_THRESH 20 /* mA */
|
2022-07-18 16:56:38 +02:00
|
|
|
#define CELL_VOLTAGE_CONVERSION_FACTOR (5.0f / 65535) /* V/quantum */
|
2022-07-03 23:47:14 +02:00
|
|
|
#define BATTERY_CAPACITY (N_CELLS_PARALLEL * 2.5f * 3600) /* As */
|
|
|
|
|
|
|
|
extern uint8_t current_soc;
|
|
|
|
|
|
|
|
void estimate_soc();
|
|
|
|
float calculate_soc_for_ocv(float ocv);
|
|
|
|
|
|
|
|
#endif // INC_SOC_ESTIMATION_H
|