-
Notifications
You must be signed in to change notification settings - Fork 90
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
Don't stop solar charging if it leads to immediate restart #70
base: master
Are you sure you want to change the base?
Conversation
I am trying to find a test case that this PR solves.... So my settings are StartCurrent = -4A and ImportCurrent = 0A, StopTimer = 1min; so now I am simulating: So in what scenario do you experience "immediate restarts" after solar charging stops? |
Set StartCurrent to -1A |
It depends on your definition of "immediate". In this case it means 1 minute. |
Ok, so this is your proposed change:
to
The formula you propose as an extra condition to block charging doesnt take into account the number of charging ActiveEVSEs; this would make the line:
Now experience learns these kind of changes introduce new bugs because everybody looks at it from his own configuration; are we missing any other configuration dependencies? |
Ok another one: this formula assumes 1 phase charging, to also incorporate 3 phase charging it should read:
|
That is the reason why I make StartCurrent configurable per phase in V2 SmartEVSE/SmartEVSE-2@6da500b |
The StartCurrent should be also multiplied by the number of charging phases, My version in V2 is |
AFAIK Startcurrent was always implemented as the sum of all phases; it is even defined in the documentation: START set the current on which the EV should start Solar charging: |
"It makes no senso to use the sum current for StartCurrent, because every car would act different" ; IMHO, Solar Charging is all about how much you draw from the grid, and how much you deliver to the grid. AFAIK all P1-meters and all electric providers measure and calculate over the sum of all phases. |
The original comment for StartCurrent in evse.h is // Start charging when surplus current on one phase exceeds 4A (Solar) |
Configuring the number of phases is not a good idea; on a 3phase wired EVSE it depends on the EV that is connecting, and even if you would know the capabilities of the EV, it decides dynamically what phases it uses and how much of the advertised current it is actually taking. E.g. some Tesla's start single phase and after a minute or so decide to add the other two phases. In the v3 code we try to derive the nr of phases from the settings, and if that is not possible, measure it through the EVMeter, if present. |
Yes, the number of used phases is detected automatically in V2 branch, either with EV electric meter measurement after 40 seconds of charging, or with alternating between 6 A and 8 A charging current multiple times and mains measurement. I have a Tesla (M3), it uses all phases immediatly. But nevertheless when the detection fails (e.g. detecting one phase instead of three) it is the same behaviour as without this patch: Charging until StopTimer ends, wait one minute and charge again... |
Ok I, is this the same piece of detection code that was in the v3 dev branch in December 2023, or is that some other development? " StartCurrent is a signed int and negative" ; we are in the v3 repo here, so lets not confuse v2 variables with v3: Back to the original PR: lets agree to disagree on the definition of StartCurrent; I committed the change: @bobosch and all others in this thread, could you test please? |
I tested the PR for few days before submitting and it works as expected. |
@TFleury Thx for your input, appreciated! Now waiting for the guys with multiple 3 phase chargers connected :-) |
Sorry, can't test, I have only V2 running here :-) |
Avoid start / stop cycles when using solar charging.