isolation support

This commit is contained in:
2026-03-11 16:29:13 +03:00
parent 7893e7aa0c
commit 0e9b352db7
16 changed files with 25253 additions and 25068 deletions

View File

@@ -246,6 +246,17 @@ void GBT_ChargerTask(){
if(GBT_StateTick()>5000){
GBT_SwitchState(GBT_S4_WAIT_PSU_OFF);
}
if(ISO.isolationResistance < (ISO.voltageComm/2)){ // *100/1000
CONN.chargingError = CONN_ERR_INSULATION;
log_printf(LOG_WARN, "Isolation warning\n");
} // 500 Ohm/V
if(ISO.isolationResistance < (ISO.voltageComm/10)){ // *100/1000
CONN.chargingError = CONN_ERR_INSULATION;
log_printf(LOG_WARN, "Current leakage, insulation error, stopping...\n");
GBT_StopEVSE(GBT_CST_OTHERFALUT);
} // 100 Ohm/V
break;
case GBT_S4_WAIT_PSU_OFF:
@@ -401,9 +412,14 @@ void GBT_ChargerTask(){
log_printf(LOG_WARN, "Connector overheat %d %d, stopping...\n", GBT_ReadTemp(0), GBT_ReadTemp(1));
break;
}
if(ISO.isolationResistance < (ISO.voltageComm/10)){ // *100/1000
CONN.chargingError = CONN_ERR_INSULATION;
log_printf(LOG_WARN, "Current leakage, insulation error, stopping...\n");
} // 100 Ohm/V
if(CONN.chargingError != CONN_NO_ERROR){ // --> Suspend EVSE
GBT_StopEVSE(GBT_CST_OTHERFALUT);
// log_printf(LOG_WARN, "Isolation error\n");
}
//GBT_ChargerCurrentStatus.chargingPermissible = 0b1111111111111100;//NOT PERMITTED