Safety Interlocks & Voice Warning System
📌 What is this for? (Quick Summary for New Interns)​
In Simple Words:
A hyperloop vehicle carries high-voltage lithium batteries (364 Volts) and high-power motors capable of driving cargo at 60 km/h. If something overheats or a switch fails, serious damage could occur.This subsystem is our safety net:
- Battery Handshake: Clicking Enable Battery doesn't unlock the Launch button immediately. The software waits for the physical voltage sensors to confirm that voltage is above 48V before allowing a launch.
- Temperature Limits: If batteries or motors get too hot, alarms sound. If they hit 100°C, the system cuts power automatically and locks the controls for 1 hour to cool down.
- Spoken Voice Alarms: The dashboard speaks critical warnings out loud so operators on the track hear them instantly without needing to stare at the screen.
1. Safety Thresholds Table (POD_CONFIG)​
All safety numbers are stored in one single file: src/config/podConfig.js.
| Parameter | Value | What Happens If Reached? |
|---|---|---|
| Minimum Battery Voltage | 48.0 V | High-voltage switch must reach this within 5 seconds, or a contactor fault triggers. |
| Normal Pack Potential | 364.0 V | Full battery voltage when completely energized. |
| Battery Warning Temperature | 80.0 °C | Yellow alert banner on screen + voice warning: "Battery temperature high." |
| Inverter Warning Temperature | 90.0 °C | Yellow alert banner on screen + voice warning: "Inverter temperature high." |
| Emergency Shutdown Temp | 100.0 °C | Immediate shutoff. Battery contactors cut and controls lock for 1 hour. |
| Emergency Abort Countdown | 5 seconds | Gives the operator 5 seconds to abort a flight before physical contactors cut power. |
2. The Battery Turn-On Handshake​
stateDiagram-v2
[*] --> Standby: Vehicle Connected to Cloud
Standby --> Checking: Operator clicks "Enable Battery"
Checking --> Active: Voltage climbs above 48V (Confirmed within 5s)
Checking --> Fault: Takes longer than 5s (Switch didn't close)
Fault --> Standby: Reset & alert operator
Active --> Running: Operator clicks "Launch"
- You click "Enable Battery": The dashboard sends a message to the vehicle's electronic switch.
- The timer starts: The software watches incoming voltage readings for up to 5 seconds.
- Physical confirmation: When the voltage climbs past 48V (reaching ~364V), the system confirms the battery is physically connected.
- Voice confirms: The computer speaks out loud: "Battery Contactors Verified 364.0 Volts."
- Launch unlocked: The Launch button changes from disabled gray to active blue.
3. Voice Warning Priorities (speech.js)​
In speech.js, normal informational messages (like "Enabling battery") play in sequence.
However, if an Emergency Stop or Overheat happens:
- The code immediately cancels any sentence being spoken right now (
window.speechSynthesis.cancel()). - It clears out all queued background chatter.
- It immediately shouts: "🚨 Emergency Stop Activated!" so that life-safety warnings are never delayed by trivial notifications.