You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/divert.cpp
+21-8Lines changed: 21 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -23,10 +23,17 @@
23
23
// Or modulate charge rate based on on excess power (if grid feed (positive import / negative export) is available) i.e. power that would otherwise be exported to the grid is diverted to EVSE.
24
24
// Note: it's Assumed EVSE power is included in grid feed e.g. (charge rate = gen - use - EVSE).
25
25
26
-
// If EVSE is sleeping charging will not start until solar PV / excess power > min chanrge rate
27
-
// Once charging begins it will not pause even if solaer PV / excess power drops less then minimm charge rate. This avoids wear on the relay and the car
28
-
29
-
#defineGRID_IE_RESERVE_POWER100.0
26
+
// It's better to never import current from the grid but because of charging current quantification (min value of 6A and change in steps of 1A),
27
+
// it may be better to import a fraction of the charge current and use the next charging level sooner, depending on electricity buying/selling prices.
28
+
// The marginal fraction of current that is required to come from PV is the divert_PV_ratio. The requiring a pure PV charge is obtained by
29
+
// setting divert_PV_ratio to 1.0. This is the best choice when the kWh selling price is the same as the kWh night buying price. If instead the night tarif
30
+
// is the same as the day tarif, any available current is good to take and divert_PV_ratio optimal setting is close to 0.0. Beyond 1.0, the excess of
31
+
// divert_PV_ratio indicates the amount of power (in kW) that OpenEVSE will try to preserve. A value of 1.1 will start charging only when the
32
+
// PV power - 100 W (reserve) reaches the minimum charging power (reproducing the legacy behavior of OpenEVSE).
33
+
34
+
// If EVSE is sleeping, charging will start as soon as solar PV / excess power exceeds the divert_PV_ratio fraction of the minimum charging power.
35
+
// Once charging begins it will not pause before a minimum amount of time has passed and this even if solar PV / excess power drops less then minimum charge rate.
36
+
// This avoids wear on the relay and the car.
30
37
31
38
// Default to normal charging unless set. Divert mode always defaults back to 1 if unit is reset (divertmode not saved in EEPROM)
32
39
byte divertmode = DIVERT_MODE_NORMAL; // default normal mode
0 commit comments