Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No hysteresis on cell overvoltage reported through Charge Enable over Canbus/RS485 #296

Open
delboy711 opened this issue Sep 1, 2024 · 1 comment

Comments

@delboy711
Copy link

Using diyBMS ver 16-08-24 427a56

I am using Pylon protocol over RS485 to regulate my battery charging from an AC power supply unit using a home built PSU regulator. It all works beautifully but while testing edge conditions I found there is an issue when a cell goes overvoltage.

The function Rules::IsChargeAllowed() tests for cell overvoltage using the variable mysettings->cellmaxmv from the Charge Settings page where it is described as "Charge target cell maximum voltage"

When any cell reaches that voltage the Pylon protocol reports the 'ChargeEnable' flag as false and charging stops.
But because there is no hysteresis on that test as soon as the cell voltage drops charging will immediately resume and charging will bounce off and on.

I suggest instead using Rule::ModuleOverVoltage as the test which allows the user to select an appropriate hysteresis value before resuming charging.

@ruza87
Copy link
Contributor

ruza87 commented Oct 29, 2024

Hi @delboy711 ,

You are right. I observed similar behavior when the battery pack was empty. When the mysettings->cellminmv condition was met, the result of IsDischargeAllowed() rendered as false. Inverter switched load to grid. Cell voltage without load went above mysettings->cellminmv, the inverter switched back to battery, cell voltage dropped and so on...

I would add another condition to Rules::IsChargeAllowed():

    ...
    // Cell over voltage alarm from rules
    if (ruleOutcome(Rule::ModuleOverVoltage))
        return false;

    return true;
}

and to the Rules::IsDischargeAllowed():

    ...
    // Cell under voltage alarm from rules
    if (ruleOutcome(Rule::ModuleUnderVoltage))
        return false;

    return true;
}

That would solve the issue (as long as the cellminmv <= value[Rule::ModuleUnderVoltage] and cellmaxmv >= value[Rule::ModuleOverVoltage]). What do you think @stuartpittaway ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants