-
Notifications
You must be signed in to change notification settings - Fork 167
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
Feature: Add forced Tesla LFP balancing functionality #718
base: main
Are you sure you want to change the base?
Conversation
|
||
// During forced balancing request via webserver, we allow the battery to exceed normal safety parameters | ||
if (datalayer.battery.settings.user_requests_balancing) { | ||
datalayer.battery.status.real_soc = 9900; //Force battery to show up as 99% when balancing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the soc forced to 99%? As far as I can see, it is not used programmatically?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incase the battery shows 100%, charging would stop in the Safety.cpp file. So we need to ensure it does not.
Could also be solved with an if == 100, then 99 check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it make more sense to have the safety check take the user_requests_balancing into account? And have safety then also look at he max charge power for instance? Only if the combination is satisfied may charging continue.
if (millis() - datalayer.battery.settings.balancing_start_time_ms >= datalayer.battery.settings.balancing_time_ms) { | ||
datalayer.battery.settings.user_requests_balancing = false; | ||
datalayer.battery.settings.balancing_start_time_ms = 0; // Reset the start time | ||
//TODO, raise info event? Balancing time elapsed. Turning off... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps a logging.println("TESLA: Balancing time finished"); ?
What
This PR implements forced balancing functionality for Tesla LFP batteries (Model 3/Y)
Why
To help keep LFP batteries balanced outside of a Tesla vehicle. This mimics more how the batteries would be commanded in a vehicle.
How
The forced balancing mode can be enabled via the Webserver. It is recommended to run this once per month on Tesla LFP batteries. Before enabling, make sure battery is close to full, and you have enough sun or grid power to continue charging and forcing the balance!
When enabling the
Manual LFP balancing
, the balancing runs for the specified amount of time, set inBalancing max time
. The balancing parameters, Balancing float power , Max battery voltage , Max cell voltage and Max cell voltage deviation can also be adjusted from here.