Skip to content

About

IoT-enabled ESP32 smart helmet for construction worker safety with fall detection, environmental sensing, and real-time mobile + server alerts.

Topics

Resources

Contributing

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

ESP32 Smart Helmet – IoT Safety System for Construction Workers

πŸ“‹ Overview

A pragmatic IoT-enabled smart helmet system designed specifically for enhancing occupational safety on Bangladeshi construction sites. The system integrates essential sensors for fall detection, environmental monitoring, and real-time alerts through a mobile app and centralized supervisor dashboard.

Key Philosophy: "Workers are not asking for more features; they are asking for a tool they can trust with their lives."

  • βœ… Low-Cost: ~BDT 2,324 per unit (scalable to mass production)
  • βœ… Durability-First: Designed for harsh construction environments
  • βœ… Real-Time Monitoring: Centralized server dashboard for supervisors
  • βœ… Multi-Modal Alerts: Sound, vibration, LED, and push notifications
  • βœ… Worker-Centric: Built with worker feedback and ergonomics in mind

Smart Helmet overview

πŸ—οΈ Project Structure

esp32-smart-helmet/
β”œβ”€β”€ Smart_Helmet_KiCad_Design/        # PCB design files (KiCad)
β”‚   β”œβ”€β”€ 498R_design/                  # Main schematic & PCB layout
β”‚   β”œβ”€β”€ Gerber Files/                 # Manufacturing-ready files
β”‚   β”œβ”€β”€ Design PDFs/                  # Documentation
β”‚   └── Important Libraries/          # Component libraries & 3D models
β”‚
β”œβ”€β”€ Smart_Helmet_ESP32_Code/          # ESP32 Firmware (Arduino)
β”‚   └── Smart_Helmet_Code/
β”‚       β”œβ”€β”€ Smart_Helmet_Code.ino    # Main firmware
β”‚       └── pitches.h                # Audio definitions
β”‚
β”œβ”€β”€ Smart_Helmet_App/                 # Mobile App (Flutter)
β”‚   β”œβ”€β”€ lib/
β”‚   β”‚   β”œβ”€β”€ main.dart
β”‚   β”‚   β”œβ”€β”€ home_page.dart
β”‚   β”‚   β”œβ”€β”€ sensor_data_page.dart
β”‚   β”‚   β”œβ”€β”€ bluetooth_devices_page.dart
β”‚   β”‚   └── notification_service.dart
β”‚   β”œβ”€β”€ android/
β”‚   └── pubspec.yaml
β”‚
β”œβ”€β”€ Smart_Helmet_App_Backend/         # Server (Node.js/Express)
β”‚   β”œβ”€β”€ backend/
β”‚   β”‚   └── server.js
β”‚   β”œβ”€β”€ public/
β”‚   β”‚   └── index.html
β”‚   └── package.json
β”‚
β”œβ”€β”€ Collected Data/                    # Real-world test data (CSV)
β”œβ”€β”€ docs/                              # Documentation
└── LICENSE

πŸ”§ Hardware Components

Component Part Purpose Cost (BDT)
Microcontroller ESP32 NodeMCU WiFi/BLE, sensor processing 449
Accelerometer MPU6050 6DOF IMU Fall detection 250
Temperature/Humidity DHT22 Heat stress monitoring 260
Gas Sensor MQ-2 Toxic gas detection 146
Battery 18650 Li-ion 600mAh Power supply 390
Charger TP4056 Battery management 40
Alerts Active Buzzer + Vibration Motor + LED Multi-modal warnings 48
Others Button, wires, PCB, case Integration 101
TOTAL (Compact) 2,324

Sensor Thresholds

  • Fall Detection: Jerk magnitude > 650,000 (acceleration change rate)

  • Temperature: > 50Β°C

  • Humidity: > 90%

  • Gas Level: > 1000 ppm (with deviation: 900)

  • Gas Level: > 1000 ppm (with deviation: 900)

πŸ› οΈ Hardware Visuals

KiCad schematic PCB top and bottom
PCB with sensors 3D circuit design
---

πŸ“± System Architecture

3-Tier Stack:

  1. ESP32 Helmet (Embedded Layer)

    • Real-time sensor polling (~83.33 Hz)
    • Local threshold detection
    • BLE data transmission
    • Multi-modal alert actuation
  2. Mobile App (Client Layer)

    • Flutter + Dart
    • BLE device pairing & data reception
    • Interactive alerts & notifications
    • Wear OS smartwatch support
    • GPS location capture for emergencies
  3. Backend Server (Business Logic Layer)

    • Node.js/Express REST API

    • MongoDB data persistence

    • Server-Sent Events (SSE) for real-time updates

    • Supervisor dashboard with map visualization

    • Supervisor dashboard with map visualization

System architecture and thresholds

πŸš€ Quick Start

Prerequisites

  • Hardware: ESP32, sensors, breadboard/PCB
  • Firmware: Arduino IDE with ESP32 boards installed
  • Mobile: Android device or emulator
  • Backend: Node.js v16+, MongoDB instance

Step 1: Set Up Hardware

# See: Smart_Helmet_KiCad_Design/README.md
# 1. Assemble components using KiCad schematic
# 2. Flash ESP32 with firmware
# 3. Test sensors individually

Step 2: Flash ESP32 Firmware

# See: Smart_Helmet_ESP32_Code/README.md
cd Smart_Helmet_ESP32_Code/Smart_Helmet_Code/
# 1. Open in Arduino IDE
# 2. Install required libraries (BLE, DHT, MPU6050)
# 3. Configure WiFi credentials
# 4. Upload to ESP32

Step 3: Install Mobile App

# See: Smart_Helmet_App/README.md
cd Smart_Helmet_App/
flutter pub get
flutter run

Step 4: Start Backend Server

# See: Smart_Helmet_App_Backend/README.md
cd Smart_Helmet_App_Backend/
npm install
npm start
# Server runs on http://localhost:3000

πŸ“– Detailed Documentation


πŸ“Š Key Features

Real-Time Data Transmission

  • BLE for helmet β†’ mobile app
  • HTTPS for mobile app β†’ backend server
  • SSE for backend β†’ supervisor dashboard

Sensor Testing Results

  • Temperature Accuracy: Β±2-3Β°C (improved in compact design)
  • Humidity Accuracy: RH consistency verified across conditions
  • Gas Detection: Stable threshold response with cross-ventilation testing
  • Fall Detection: Reliable jerk magnitude calculation

Sensor Readings & Validation

Stable sensor readings Triggered thresholds Gas sensor readings
DHT22 comparison rainy day
Figure: Sensor stability and DHT22 comparison (rainy conditions)

Multi-Modal Alerts

  • πŸ”Š Audible buzzer (3100 Hz tone)

  • πŸ“³ Haptic vibration (3x 1-second pulses)

  • πŸ’‘ LED indicator (including SOS Morse code)

  • πŸ“² Push notifications (phone + smartwatch)

  • πŸ—ΊοΈ Location-based emergency escalation

  • πŸ—ΊοΈ Location-based emergency escalation

Mobile App Screenshots

App screenshot 1 App screenshot 2 App screenshot 3

πŸ§ͺ Testing & Validation

Test Data

Real-world sensor readings available in:

  • Collected Data/Morning.csv – Morning site conditions
  • Collected Data/Afternoon Rainy.csv – Rainy conditions
  • Collected Data/Gas test.csv – Gas sensor validation

Validation Methodology

  • 300,000 samples per hour (10ms intervals)
  • Hourly comparisons against weather app benchmarks
  • Closed-environment gas accumulation/dispersal testing
  • Individual sensor trigger isolation testing

πŸ”’ Security Considerations

⚠️ Current Implementation (Development):

  • BLE communication (unencrypted for simplicity)
  • HTTP endpoints (should use HTTPS in production)
  • No authentication on supervisor dashboard (local network only)

For Production Deployment:

  1. Implement BLE encryption
  2. Add HTTPS/TLS to all API endpoints
  3. Add role-based access control (RBAC) on dashboard
  4. Implement JWT authentication
  5. Add audit logging for all alerts
  6. Encrypt sensitive data in MongoDB

πŸ› οΈ Customization & Extension

Adjusting Thresholds

Edit in Smart_Helmet_Code.ino:

#define FALL_THRESHOLD 1.3
#define TEMP_THRESHOLD 50.0
#define HUMIDITY_THRESHOLD 90.0
#define GAS_THRESHOLD 1000

Adding New Sensors

  1. Add sensor library in Arduino IDE
  2. Add GPIO pin definition
  3. Initialize in setup()
  4. Add reading in loop() or handleWarnings()
  5. Update BLE characteristic data format

Changing Server URL

Update in sensor_data_page.dart:

final String serverUrl = "http://your-server-ip:3000/send-data";

πŸ“ˆ Performance Specifications

Metric Value
Sampling Rate ~83.33 Hz (10ms intervals)
BLE Range 10-100m (depending on obstacles)
Battery Life ~8-12 hours (continuous operation with WiFi on)
Response Time <200ms (sensor detection to alert)
Data Upload Frequency ~25 updates/second
Simultaneous Helmets Unlimited (server-side scaling)

🌍 Use Cases

  • βœ… Fall detection on multi-story construction sites
  • βœ… Heat stress monitoring in tropical climates
  • βœ… Toxic gas detection in confined spaces
  • βœ… Incident location tracking for emergency response
  • βœ… Workforce wellness analytics (post-incident review)

πŸ“ Research & References

This project was developed as a Directed Research (CSE498R) project at North South University, Department of Electrical and Computer Engineering, supervised by Dr. Nova Ahmed.

Key Papers Referenced:

  1. Choi & Kim - "Applications of Smart Helmet in Applied Sciences: A Systematic Review" (2021)
  2. Amrutha et al. - "SMART HELMET FOR CONSTRUCTION WORKERS" (2024)
  3. Campero-Jurado et al. - "Smart Helmet 5.0 for Industrial Internet of Things Using AI" (2020)
  4. Teizer et al. - "Real-time and Proactive Construction Safety Management" (2015)

Full Research Report: See Smart Helmet Report.pdf


🀝 Contributing

We welcome contributions! Please:

  1. Report Issues: Use GitHub Issues for bugs and feature requests
  2. Submit PRs: Follow code style and include tests
  3. Co-Design: Workers and safety managers – share your feedback!
  4. Testing: Real-world test data from your site is valuable

See CONTRIBUTING.md for guidelines.


πŸ“„ License

This project is licensed under the MIT License – see LICENSE for details.

Research Publication: The findings and design are documented in the official research report available upon request from North South University.


πŸ‘₯ Contributors

Core Team

Mostakim Hossain
Mostakim Hossain
NSU ID: 2131545042
Safat Mamun
Safat Mamun
NSU ID: 2132084042
Md. Musfiq Hossain
Md. Musfiq Hossain
NSU ID: 2132562642

Faculty Advisor

Dr. Nova Ahmed
Professor, Department of Electrical and Computer Engineering
North South University, Dhaka, Bangladesh


⚠️ Disclaimer

This is a research prototype and NOT a certified safety device. It is designed for academic purposes and proof-of-concept validation. Before industrial deployment:

  1. Conduct comprehensive safety testing
  2. Obtain relevant certifications (ISO, OSHA equivalents)
  3. Perform real-world effectiveness studies
  4. Ensure hardware durability testing for construction environments
  5. Implement proper IT security hardening

πŸ“ž Support

  • πŸ“– Documentation: See docs/ folder
  • πŸ’¬ Discussions: GitHub Discussions
  • πŸ› Issues: GitHub Issues

🎯 Future Roadmap

  • AI-based fall detection improvements
  • Multi-language support (Bangla, Hindi, English)
  • Offline-capable mobile app
  • 3G/4G fallback (no WiFi requirement)
  • Wearable smartwatch as standalone alert device
  • Integration with existing site management systems
  • Production-grade IP67+ hardware enclosure
  • Battery optimization (24+ hour runtime)

Last Updated: February 2026 | Status: Active Research Project

About

IoT-enabled ESP32 smart helmet for construction worker safety with fall detection, environmental sensing, and real-time mobile + server alerts.

Topics

Resources

Contributing

Stars

0 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages