Hi David. Assume job!
How I can modify charge and discharge over current? Useful, if using this bms not in vacuum cleaner...
Thanks!
Hey,
Good question - you can modify voltage limits for cells in the config.h file:
https://github.com/davidmpye/V10_Dyson_BMS/blob/main/V10_BMS/src/config.hAt present, I haven't moved the current limits to config.h, but that could certainly be done with a small amount of effort.
At present, they are hardcoded in:
Specifically, in the enable_discharge function:
https://github.com/davidmpye/V10_Dyson_BMS/blob/main/V10_BMS/src/bq7693.cvoid bq7693_enable_discharge() {
bq7693_write_register(SYS_CTRL2, 0x40); //CC_EN=1
bq7693_write_register(SYS_CTRL1, 0x18); //ADC_EN=1, TEMP_SEL=1
bq7693_write_register(PROTECT1, 0x9F);
bq7693_write_register(PROTECT2, 0x04);
uint8_t scratch;
bq7693_read_register(SYS_STAT, 1, &scratch);
bq7693_write_register(SYS_STAT, scratch); //Explicitly clear any set bits in the SYS_STAT register by writing them back.
//DSG_ON turns the discharge FET on.
bq7693_write_register(SYS_CTRL2, 0x42);//CC_EN, DSG_ON
bq7693_write_register(PROTECT2, 0x04);
bq7693_write_register(PROTECT1, 0x82);
}
The values written into PROTECT1 and PROTECT2 set the discharge overcurrent and short circuit delays and limits. I don't think there is actually a charge current limit - you can measure it using the charge count
You'd have to reference the BQ7653 datasheet (
https://www.ti.com/lit/ds/symlink/bq76920.pdf) and change the values appropriately for your application
David