Enable / Disable dc relays for 1,2,3 phase connection#53
Conversation
There was a problem hiding this comment.
Assuming 3 Phase based on DC Relays Enabled/Disabled is not possible. Many users in split phase countries (US, Canada, Japan, Mexico, etc.) use either 2 x Singe Pole - Single Throw (SPST) Relays or 1 x Double Pole Single Throw (DPST).
I would reccomend this PR focus on adding the ability to Enabling and Disable each relay including the AC_Relay as well. The feature is good and could be usefull for many use cases. The juicebox replacement boards do not even have the AC relay driver installed.
There was a problem hiding this comment.
I'm not sure what you mean. The 'assuming 3 phase' is selected in the GUI.
There was a problem hiding this comment.
// Multiply calculation by 3 to get 3-phase energy.
// Typically you'd multiply by sqrt(3), but because voltage is measured to
// ground (230V) rather than between phases (400 V), 3 is the correct multiple.
mws *= 3;
if (relay1Enable && relay2Enable){mws *= 3;}
else if (relay1Enable || relay2Enable){mws *= 2;}
else {mws *= 1;}
I am not a programmer but to me that looks like. If relay 1 AND 2 are enabled the multiplier is 3. If relay 1 OR 2 is enabled multiply by 2 and if none multiply my 1.
Note Split Phase (US, Canada, Japan, Mexico, etc.) does not need to multiply current by 2, that already happens on the voltage Single Phase is 120v and Split is 240. Multiplying both current and voltage would be correct for Europe but 2X for Split Phase countries.
There was a problem hiding this comment.
Yes, but that is only done if
#ifdef THREEPHASE
// Multiply calculation by 3 to get 3-phase energy.
// Typically you'd multiply by sqrt(3), but because voltage is measured to
// ground (230V) rather than between phases (400 V), 3 is the correct multiple.
if (relay1Enable && relay2Enable){mws *= 3;}
else if (relay1Enable || relay2Enable){mws *= 2;}
else {mws *= 1;}
#endif // THREEPHASE
which is selected in the GUI edit- no at compile. (GUI sets calculations in openevse_esp32_firmware)
|
I commited to the linco-work branch, we are about to push it out as 9.0.0. Add per-relay enable/disable control via RAPI ($SR/$GR commands) GR - get relay enable status SR n 0|1 - enable/disable relay output (saved to EEPROM, applied at boot) Firmware is built here: |
|
Thanks that looks nice. edit noticed you say "Settings are persisted to EEPROM (offset 39)" which I can understand. Just wondering how that will work when I was looking to change relay states during charging as PV power increases / decreases and would that degrade chip? |
To enable 2 other contractors to be added and to be controlled by the 2 DC relays for 1,2,3 phase charging using rapi $SR and $SS and energy calculation.