A compact IoT project using ESP32, MPU6050, GPS, and Piezo sensor for real-time crash detection with automatic fuel cutoff, buzzer alert, and Twilio SMS for alert reporting.
| Component | ESP32 Pin / Power | Purpose |
|---|---|---|
| MPU6050 | SDA → 21, SCL → 22 | Detects acceleration, jerk, tilt |
| NEO-6M GPS | TX → 16 (RX2), RX → 17 (TX2) | Location & speed |
| Piezo Sensor | Signal → 34 | Detects seat vibration / presence |
| Buzzer | + → 18 | Sounds alarm |
| IRFZ44N MOSFET + LED | Gate → 23 | Simulates fuel cutoff |
| ESP32 | USB | Main controller & data processor |
- MPU6050 samples acceleration & rotation at ~200 Hz.
- Removes gravity to extract pure linear motion.
- Piezo plate confirms driver presence before triggering.
- Accident triggers if:
a > 2 g,jerk > 8 g/s, orgyro > 300 °/s.
- Severity levels:
- Minor: ≥ 2 g
- Moderate: ≥ 3 g
- Severe: ≥ 5 g
- On crash → buzzer ON, fuel OFF, SMS.
- Dual-layer crash validation using motion + seat-presence sensing (piezo sensor)
- Physics-based crash modeling using acceleration, jerk, and angular rotation together
- Gravity-compensated IMU processing at 200 Hz for true linear acceleration
- Actual hardware safety action via MOSFET-based fuel cutoff simulation
The system consists of a wearable unit and a vehicle-mounted unit. Sensors like MPU6050, ADXL345, and piezo sensors capture motion and impact data. This data is processed using ESP32/Arduino to detect crash events and estimate severity. If a critical event is detected, GPS location is sent via alerts and a fuel cutoff mechanism is triggered.
- ESP32 / Arduino
- MPU6050, ADXL345, GPS, Piezo Sensors
- Embedded C++
- Connect sensors to ESP32/Arduino
- Upload the firmware code
- Power the system
- Monitor output via serial console or alert system
- Cloud-based alert system
- Mobile app integration
- Improved crash classification models
Contributions are welcome! Feel free to open issues or submit pull requests to improve the project.