fuel_gauge_calib - bruno-beloff/scs_mfr GitHub Wiki
docs > software repositories > scs_mfr > commands > calibration
DESCRIPTION
The fuel_gauge_calib utility is used to interrogate or update the fuel gauge parameters on an attached battery pack.
Parameters are found automatically though a learning process run by the fuel gauge throughout its lifetime. These values are saved to the file system by the PSU monitor every time the parameters change. The battery pack model incorporates a set of parameter values gained through this process on test systems, referred to as the default parameters.
When a new fuel gauge is put into use, it should be initialised with these values using the fuel_gauge_calib utility --initialise flag - this sets both the parameters and the fuel gauge configuration. If a max17055_params.json configuration file has been stored for this system, then it is used to initialise the parameters. Otherwise, the default parameters for the configured battery pack are used.
SYNOPSIS
fuel_gauge_calib.py { { -c | -d | -l | -r | -z { D | L } } | { -f | -s | -g | -p } [-i INTERVAL] } [-v]
Options | |
---|---|
--version | show program's version number and exit |
-h, --help | show this help message and exit |
-c, --gauge-conf | report fuel gauge configuration |
-d, --dflt-learned | report battery's default params |
-l, --host-learned | read params from host |
-r, --remove-learned | delete params from host |
-z INIT, --init=INIT | initialise gauge with configuration and Default or Learned params |
-g, --gauge-learned | read learned params from gauge |
-s, --save-learned | save learned params to host |
-f, --fuel | report fuel status |
-p, --psu | report psu status |
-i INTERVAL, --interval=INTERVAL | sampling interval |
-v, --verbose | report narrative to stderr |
EXAMPLES
./fuel_gauge_calib.py -cv
FILES
~/SCS/conf/max17055_params.json
DOCUMENT EXAMPLE - CONFIGURATION
{"des-cap": 3000, "sense-res": 0.01, "chrg-term": 10, "empty-v-target": 3.3, "recovery-v": 3.8, "chrg-v": 0, "batt-type": 0}
DOCUMENT EXAMPLE - LEARNED PARAMS
{"calibrated-on": "2021-01-03T09:25:52Z", "r-comp-0": 255, "temp-co": 9278, "full-cap-rep": 3000, "full-cap-nom": 3000, "cycles": 150}
DOCUMENT EXAMPLE - FUEL
{"in": false, "chrg": {"%": 1.0, "mah": 0}, "tte": null, "ttf": null, "v": 3.8, "curr": -486, "g-tmp": 25.5, "cap": 0, "cyc": 2.0}
DOCUMENT EXAMPLE - PSU
{"src": "Cv1", "standby": false, "in": false, "pwr-in": 0.1, "chgr": "TFFT", "batt": {"chg": 1, "tte": null, "ttf": null}, "prot-batt": 3.8}
SEE ALSO
RESOURCES
https://www.maximintegrated.com/en/design/technical-documents/userguides-and-manuals/6/6365.html