Zephyr API Documentation 4.3.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

Main header file for battery-related constants to be used in devicetree. More...

Go to the source code of this file.

Macros

Default Battery OCV curves

Default Open-Circuit Voltage curves for different battery chemistries.

The following open-circuit voltage curves have been extracted from the datasheets of the listed battery parts. They will not be 100% correct for all batteries of the chemistry, but should provide a good baseline. These curves will also be affected by ambient temperature and discharge current.

Each curve is 11 elements representing the OCV voltage in microvolts for each charge percentage from 0% to 100% inclusive in 10% increments.

These curves are typically used when describing battery characteristics in the devicetree.

#include <zephyr/dt-bindings/battery/battery.h>
fuel_gauge: fuel_gauge {
compatible = "zephyr,fuel-gauge-composite";
source-primary = <&vbatt>;
device-chemistry = "lithium-ion-polymer";
ocv-capacity-table-0 = <BATTERY_OCV_CURVE_LITHIUM_ION_POLYMER_DEFAULT>;
charge-full-design-microamp-hours = <1350000>;
};
#define BATTERY_OCV_CURVE_NICKEL_CADMIUM_DEFAULT    800000 1175000 1207000 1217000 1221000 1226000 1233000 1245000 1266000 1299000 1366000
 Default open-circuit voltage curve for nickel-cadmium (NiCd) batteries.
#define BATTERY_OCV_CURVE_NICKEL_METAL_HYDRIDE_DEFAULT    1004000 1194000 1231000 1244000 1254000 1257000 1263000 1266000 1274000 1315000 1420000
 Default open-circuit voltage curve for nickel-metal hydride (NiMH) batteries.
#define BATTERY_OCV_CURVE_LITHIUM_ION_POLYMER_DEFAULT    2502000 3146000 3372000 3449000 3532000 3602000 3680000 3764000 3842000 3936000 4032000
 Default open-circuit voltage curve for lithium-ion polymer (Li-ion) batteries.
#define BATTERY_OCV_CURVE_LITHIUM_IRON_PHOSPHATE_DEFAULT    2013000 3068000 3159000 3194000 3210000 3221000 3229000 3246000 3256000 3262000 3348000
 Default open-circuit voltage curve for lithium iron phosphate (LiFePO4) batteries.
#define BATTERY_OCV_CURVE_LITHIUM_MANGANESE_DEFAULT    1906000 2444000 2689000 2812000 2882000 2927000 2949000 2955000 2962000 2960000 2985000
 Default open-circuit voltage curve for lithium manganese (LiMn2O4) batteries.

Detailed Description

Main header file for battery-related constants to be used in devicetree.