Skip to content

Commit

Permalink
Add HVIL safety
Browse files Browse the repository at this point in the history
  • Loading branch information
dalathegreat committed Sep 17, 2023
1 parent dd95705 commit 1bf651a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Software/TESLA-MODEL-3-BATTERY.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ void update_values_tesla_model_3_battery()
stillAliveCAN--;
}

if (hvil_status == 3){ //INTERNAL_OPEN_FAULT - Someone disconnected a high voltage cable while battery was in use
bms_status = FAULT;
Serial.println("High voltage cable removed while battery running. Opening contactors!");
}

if(cell_max_v >= MAX_CELL_VOLTAGE){
bms_status = FAULT;
Serial.println("CELL OVERVOLTAGE!!! Stopping battery charging and discharging. Inspect battery!");
Expand Down

0 comments on commit 1bf651a

Please sign in to comment.