Skip to content

⛑️πŸ’₯ A speed-tracking and crash-detection system that uses real-time data for audio alerts, impact detection, and SMS response. Uses the ESP32, with Node.js + Express as backend.

Notifications You must be signed in to change notification settings

joelbaldapan/CRASHTech

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

49 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CRASHTech - Speed & Crash Detection System

CRASHTech Logo
⛑️πŸ’₯ ESP32-Based Smart Helmet with Piezoelectric Shock Tap Sensors: Enhanced Motorcycle Safety and Emergency Assistance System via Geolocation API and PhilSMS

πŸŽ“οΈ A Capstone Commission Project, for Bohol Wisdom School's Research Fair

Overview

CRASHTech is a speed-tracking and crash-detection system designed for motorcycles. It combines real-time speed monitoring, helmet impact detection, and automated SMS emergency alerts. The system uses an ESP32 microcontroller, piezoelectric sensors, a Node.js backend, and a modern web frontend.

System Architecture

[ESP32 Helmet] --(WiFi/HTTP)--> [Node.js Backend] <--(REST API)--> [Frontend Web App]
         |                                                   |
   Piezo Sensors                                      PhilSMS API
  • ESP32: Reads impact sensors, displays status on LCD, sends impact data to backend.
  • Backend: Receives impact data, exposes REST API for frontend, relays SMS via PhilSMS.
  • Frontend: Web app for monitoring, settings, and alert management.

Getting Started

1. ESP32 Firmware

  • Edit WiFi credentials and backend URL in esp32_code.c.
  • Flash code to ESP32.
  • Connect helmet sensors to GPIO pins as defined in the code.

2. Backend Server

  • Go to backend/ and run:

    npm install
  • Create a .env file in backend/ with:

    PHIL_SMS_API_TOKEN=your_philsms_api_token
    PHIL_SMS_SENDER_ID=your_sender_id
    
  • Start the server:

    npm start
  • The backend exposes:

    • POST /api/impact (from ESP32)
    • GET /api/latest-impact (for frontend)
    • POST /api/send-philsms (for SMS alerts)

3. Frontend Web App

  • Open index.html in your browser.
  • Configure settings (name, contacts, speed limit, backend URL, etc.).
  • Click Start Monitoring to begin.

File Structure

.
β”œβ”€β”€ esp32_code.c           # ESP32 firmware for helmet sensors
β”œβ”€β”€ index.html             # Main web UI
β”œβ”€β”€ main.js                # Frontend logic
β”œβ”€β”€ style.css              # Web UI styles
β”œβ”€β”€ Speed Alert.mp3        # Speeding alert sound
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ server.js          # Node.js backend server
β”‚   β”œβ”€β”€ package.json
β”‚   └── .gitignore
└── README.md

Configuration

  • Backend API URL: Set to your deployed backend (e.g., https://your-backend.onrender.com)
  • PhilSMS: Register at philsms.com for API credentials.

Usage

  1. Save your settings in the web app.
  2. Start monitoring.
  3. When a crash is detected (sudden deceleration + helmet impact), SMS alerts are sent automatically.
  4. Use the Test Send SMS Alert button to verify SMS delivery.

Credits

  • ESP32, Node.js, Express, PhilSMS, Google Maps, and open web APIs.

About

⛑️πŸ’₯ A speed-tracking and crash-detection system that uses real-time data for audio alerts, impact detection, and SMS response. Uses the ESP32, with Node.js + Express as backend.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published