Good day all, hope you are well, Finally some time to test and write back with some feed back on a project that might not be developed so much … but still for learning im trying my best to understand.
AS it stands ive learnt about the current sensor shunt and the voltage in relation to the parameters of the protect1 register .
Ive tried to Change the Rsns = 1 to 0 and this causes the bms not to discharge at all .
Secondly i am still wondering how to go about resolving the issue with regards to discharge over current and short circuit protection no protecting the system .
At this stage i have confirmed the registers only change when UV and OV for cells is present as a flag.
I did see the 8 defines in the Registers.h related to the Scd_thresh and wonder if this is where the error is being generated .
There is mention on github of the array for this being out of bounds .
I quote as reference .
"
for (int i = sizeof(SCD_threshold_setting)-1; i > 0; i–) {
if (conf->dis_sc_limit * conf->shunt_res_mOhm >= SCD_threshold_setting[i]) {
protect1.bits.SCD_THRESH = i;
break;
}
}
In above snippet, sizeof(SCD_threshold_setting) is expected to give the array length. But in reality, sizeof() returns the array size in bytes. And because @SCD_threshold_setting is composed of uint16_t elements, sizeof(SCD_threshold_setting) returns 2 bytes * array length."
would this cause the system not to function as it should ?
Both over current discharge and Short circuit Detection are non function .
how would i make use of a more sensitive Rsns = 0 instead of =1 ?
And would i be able to correct the code above function as it should . Please assist as i always did think this was a code issue more so then hardware .