Engineering

Smart Accident Alert System Using ESP32 with Impact–Tilt Detection and GPS–GSM Emergency Notification

D. Sowndarya1, A S. Vaishnavi1, Rakesh1, G. Satheesh Kumar2

1Department of Computer Science and Engineering, City Engineering College, Bengaluru, Karnataka, India

2Project Guide, Department of Computer Science and Engineering, City Engineering College, Bengaluru, Karnataka, India

Published December 2026

Abstract

Delayed reporting is a major factor that can hinder emergency response after road accidents, particularly when a victim is unable to call for help. This paper presents a low-cost, vehicle-mounted accident alert prototype built around an ESP32 microcontroller. An MPU6050 inertial sensor supplies three-axis acceleration and orientation data; the firmware computes resultant acceleration and estimates tilt, declaring a suspected accident when acceleration exceeds 2.5 g or tilt exceeds 45°. A buzzer and red LED then provide a 15 s cancellation window. If the driver does not cancel the alert, a NEO-6M GPS receiver supplies the position and a SIM800L GSM modem sends an SMS containing a Google Maps link to a registered contact. A Blynk IoT event provides an additional cloud notification over Wi-Fi. The prototype was evaluated on a four-wheel model test rig using simulated impact, tilt and normal-motion cases. It produced 38 correct outcomes in 40 trials (95% accuracy), while the mean SMS receipt time was approximately 7.5 s across three measurements. The hardware bill of materials was ₹1,374. These results demonstrate the feasibility of integrating low-cost sensing, positioning and cellular messaging in a retrofit prototype. The evaluation is preliminary: no real vehicle crashes were conducted, the sample size was small, and deployment would require vehicle-specific calibration and further reliability testing.

Keywords: Accident detection; ESP32; MPU6050; GPS; GSM; SMS alert; Blynk IoT; vehicle safety

1Introduction

Road accidents can create a time-critical need for medical assistance. When a crash occurs on an isolated road, at night, or when the driver is unconscious, emergency contacts may not be informed promptly. Manual reporting depends on the availability of a witness or an alert victim. Built-in emergency-call systems are not available in every older vehicle or two-wheeler, while smartphone-based applications depend on the phone remaining powered, connected and usable.

This work develops a low-cost retrofit prototype that combines inertial sensing, GPS positioning and GSM-based SMS messaging. The central controller is an ESP32. An MPU6050 detects abnormal acceleration and tilt; a short audible and visual pre-alarm allows the driver to cancel a false trigger. If the alarm is not cancelled, the system sends a location link by SMS and logs an event to the Blynk IoT platform.

The contributions are: (i) integration of an ESP32, MPU6050, NEO-6M GPS and SIM800L GSM module; (ii) threshold-based impact and tilt detection with a 15 s cancellation interval; (iii) dual alerting through SMS and Blynk; and (iv) an initial evaluation using 40 simulated test trials and three SMS delivery-time measurements.

2Related work

Prior accident-notification approaches include GPS/GSM reporting, multi-sensor embedded devices, cloud and machine-learning systems, and vehicle-infrastructure or vehicular-network solutions. GPS/GSM systems offer a relatively direct way to communicate location, but approaches based on a single cue such as speed reduction may not reliably distinguish a collision from ordinary driving [3]–[6]. Some embedded designs combine accelerometers with other sensors and include a user-operated switch to suppress unnecessary messages [7].

Fog- and cloud-based approaches have explored reducing response delay and classifying crash events using telematics, collision sensors, cameras or machine-learning models [8]–[12]. Cooperative vehicle-infrastructure and VANET approaches use communication among vehicles and roadside infrastructure [13], [14]. These approaches can provide richer context but may depend on connectivity, infrastructure or additional hardware. Multi-function vehicle and helmet systems have also been reported [15]–[17].

The design presented here focuses on a compact, low-cost prototype that combines impact and tilt thresholds, a driver cancellation window, and a cellular SMS path that does not require the driver's smartphone or mobile data connection. Blynk is included as a supplementary notification channel.

3Proposed system

The prototype is organized around five functional blocks: sensing, processing, location acquisition, communication and driver interaction. The MPU6050 communicates with the ESP32 over I²C. The NEO-6M GPS receiver supplies NMEA data over a UART, and the SIM800L sends SMS messages over a second UART. A buzzer, green LED, red LED and push button provide local status and cancellation. The ESP32 also connects to Blynk over Wi-Fi.

4Detection and alert method

The MPU6050 raw acceleration values are converted to g using the configured ±2 g scale factor of 16,384 LSB/g:

a x = A c X 16384 , a y = A c Y 16384 , a z = A c Z 16384 (1)
A = a x 2 + a y 2 + a z 2 (2)

Pitch and roll are estimated from the accelerometer measurements. The tilt indicator is the larger absolute angle:

pitch = atan2 ( a y , a x 2 + a z 2 ) × 180 π (3)
roll = atan2 ( − a x , a z ) × 180 π (4)
θ = max ( | pitch | , | roll | ) (5)

An accident is suspected when A > 2.5 g OR θ > 45°. The firmware then activates the buzzer and blinking red LED for 15 s. A button press during this interval cancels the alert. Otherwise, the GPS position is converted into a Google Maps link and sent through the SIM800L using SMS text mode (AT+CMGF=1 and AT+CMGS). The Blynk accident_triggered event is then logged.

5Implementation

The firmware was developed in Embedded C/C++ using the Arduino framework and Arduino IDE. The Wire library supports I²C communication with the MPU6050; TinyGPS++ decodes NMEA sentences from the NEO-6M; HardwareSerial supports the GPS and GSM UART links; and BlynkSimpleEsp32 provides the cloud connection. The Serial Monitor was used for debugging.

The MPU6050 is connected to GPIO21 (SDA) and GPIO22 (SCL). The GPS UART uses GPIO16 for RX and GPIO17 for TX. The GSM UART uses GPIO4 for RX and GPIO2 for TX through a level-shifting arrangement. The buzzer is connected to GPIO25, the active-low cancel button to GPIO26, the green LED to GPIO27 and the red LED to GPIO14. The SIM800L is supplied from a separate regulated supply because of its transmit-current demand.

During initialization, the firmware configures the sensor and serial ports, sets the GSM modem to SMS text mode and connects to Blynk. In the monitoring loop, it reads acceleration, computes the resultant acceleration and tilt, and checks the thresholds. A trigger starts the pre-alarm. If not cancelled, the firmware obtains the latest GPS coordinates, constructs a Google Maps URL and sends an SMS using the SIM800L AT command sequence. It then logs the accident_triggered event to Blynk.

When GPS data is invalid, the current prototype uses a preset fallback coordinate (12.9716, 77.5946). This behavior is retained here as implemented, but it is not suitable for operational emergency deployment because it may not represent the actual accident location.

6Experimental setup and testing

Testing was performed in the City Engineering College laboratory using the ESP32 prototype mounted on a four-wheel model chassis. GPS acquisition was also checked outdoors. The ESP32 was powered over USB and the SIM800L from a separate regulated supply. Testing included module-level checks, integration checks, simulated impact and tilt events, normal-motion cases, cancellation, GPS-unavailable operation and network-unavailable operation. No real crash or public-road vehicle test was conducted.

The configured impact threshold was 2.5 g, the tilt threshold was 45°, and the cancellation interval was 15 s. The monitoring loop was configured for approximately 10 ms polling. The cancellation button was sampled during the countdown; the buzzer pulsed and the red LED blinked during the pre-alarm.

7Results and discussion

The evaluation included 40 trials: 10 impact simulations, 10 tilt simulations and 20 normal-motion trials. All 10 impact simulations were detected. Nine of the 10 tilt simulations were detected; one slow rotation was missed. Nineteen of 20 normal-motion trials correctly produced no alarm; one heavy drop of the test rig caused a false trigger. The resulting counts were TP = 19, TN = 19, FN = 1 and FP = 1.

Table 1. Detection outcomes over the 40 simulated trials.
Scenario Trials Correct outcome Error
Impact simulation 10 10 detected 0 missed
Tilt simulation 10 9 detected 1 missed
Normal motion / braking / bumps 20 19 no-alert 1 false alarm
Total 40 38 correct 1 FN; 1 FP

Accuracy = (TP + TN) / (TP + TN + FP + FN) = 38/40 = 95%. Precision, recall and specificity were each 95% under the reported trial classification. The SMS receipt times in three measurements were 6.8 s, 7.4 s and 8.2 s, giving a mean of approximately 7.5 s. One of these measurements used the preset fallback coordinate rather than a live GPS fix.

Table 2. Reported performance of the prototype.
Metric Value
Accuracy 95%
Precision 95%
Recall 95%
Specificity 95%
Mean SMS receipt time 7.5 s (3 measurements)
Hardware BOM ₹1,374

The cancellation test demonstrated that pressing the button during the 15 s interval stopped the alarm and prevented SMS transmission. The Blynk event was also observed in the cloud notification history. The hardware bill of materials was ₹1,374; the report separately lists a development-cost allocation of ₹8,550, giving a total project expenditure estimate of ₹9,924.

The measured performance should be interpreted cautiously. Forty trials are insufficient to establish field reliability, and the three SMS timing measurements are only indicative. The accelerometer operated at its default ±2 g range, and the thresholds were selected for a small model rig. A real vehicle installation would require a wider measurement range, vehicle-specific calibration, robust mounting and extensive validation.

8Limitations and future work

The prototype depends on GSM coverage and GPS availability. It does not retry SMS transmission when the network is unavailable. When there is no GPS fix, the current firmware sends a preset coordinate. The firmware also waits for Wi-Fi/Blynk connection during startup, so the SMS path is not fully independent of cloud initialization. The GSM serial connection uses GPIO2, an ESP32 boot-related pin that should be reconsidered in a production design. The system does not estimate injury severity or communicate directly with ambulance or hospital services.

Future work includes configuring the MPU6050 for a wider range (±8 g or ±16 g), adding filtering and time-window logic, tuning thresholds for different vehicle classes, checking network registration and SMS delivery with retries, reporting GPS-unavailable status rather than a default location, and making cloud connectivity non-blocking. Larger controlled datasets, road tests and safety validation are necessary before practical deployment.

9Conclusion

A low-cost ESP32-based accident alert prototype integrating impact and tilt sensing, GPS positioning, GSM SMS and Blynk notification was implemented and tested. The system provides a 15 s cancellation window and sends a Google Maps link to a registered contact when a suspected accident is not cancelled. In 40 simulated trials, it achieved 95% accuracy; the mean SMS receipt time was approximately 7.5 s across three measurements. The hardware cost was ₹1,374. The results support the feasibility of the prototype concept, but they do not establish readiness for real-vehicle deployment. Broader testing, sensor-range improvements, communication-failure handling and vehicle-specific calibration remain essential.

References

  1. [1]Ministry of Road Transport and Highways, Government of India, “Road Accidents in India – 2022,” Transport Research Wing, New Delhi. [Online]. Available: https://morth.nic.in
  2. [2]European Parliament and Council of the EU, “Regulation (EU) 2015/758 concerning type-approval requirements for the deployment of the eCall in-vehicle system based on the 112 service,” Official Journal of the European Union, Apr. 2015.
  3. [3]M. S. Amin, J. Jalil, and M. B. I. Reaz, “Accident detection and reporting system using GPS, GPRS and GSM technology,” in Proc. Int. Conf. Informatics, Electron. Vision (ICIEV), Dhaka, Bangladesh, 2012, IEEE Xplore document 6317382.
  4. [4]S. A. Bankar, A. V. Kale, and S. R. Jagtap, “Intelligent system for vehicular accident detection and notification,” in Proc. Int. Conf. Commun. Signal Process. (ICCSP), Melmaruvathur, India, Apr. 2014, pp. 1238–1240, doi: 10.1109/ICCSP.2014.6950048.
  5. [5]N. R. Vatti, P. L. Vatti, R. Vatti, and C. Garde, “Smart road accident detection and communication system,” in Proc. Int. Conf. Current Trends towards Converging Technologies (ICCTCT), 2018, doi: 10.1109/ICCTCT.2018.8551179.
  6. [6]R. Rishi, S. Yede, S. Yede, and N. V. Bansode, “Automatic messaging system for vehicle tracking and accident detection,” in Proc. Int. Conf. Electron. Sustain. Commun. Syst. (ICESC), 2020, doi: 10.1109/ICESC48915.2020.9155836.
  7. [7]“Smart Automatic Accident Detection & Information System,” IEEE Xplore, document 9844371, 2022.
  8. [8]B. K. Dar, M. A. Shah, S. U. Islam, C. Maple, S. Mussadiq, and S. Khan, “Delay-aware accident detection and response system using fog computing,” IEEE Access, vol. 7, pp. 70975–70985, 2019, doi: 10.1109/ACCESS.2019.2910862.
  9. [9]W.-J. Chang, L.-B. Chen, and K.-Y. Su, “Deep Crash: A deep learning-based Internet of vehicles system for head-on and single-vehicle accident detection with emergency notification,” IEEE Access, vol. 7, pp. 148163–148175, 2019, doi: 10.1109/ACCESS.2019.2946468.
  10. [10]“Vehicle Accident Detection & Alert System using IoT and Artificial Intelligence,” IEEE Xplore, document 9544940, 2021.
  11. [11]“Intelligent Accident Detection and Alerting System based on Machine Learning over the IoT Network,” IEEE Xplore, document 10094513, 2023.
  12. [12]“IoT-Based Road Accident Rescue System Implementation for Smart City Applications,” in Proc. IEEE 2nd Int. Symp. Sustain. Energy, Signal Process. Cyber Security (iSSSC), 2022, doi: 10.1109/iSSSC56467.2022.10051547.
  13. [13]D. Tian, C. Zhang, X. Duan, and X. Wang, “An automatic car accident detection method based on cooperative vehicle infrastructure systems,” IEEE Access, vol. 7, pp. 127453–127463, 2019, doi: 10.1109/ACCESS.2019.2939532.
  14. [14]C. Nandagopal, P. Anisha, K. G. Dharani, and N. Kuraloviya, “Smart accident detection and rescue system using VANET,” in Proc. Int. Conf. Sustain. Comput. Data Commun. Syst. (ICSCDS), 2022, doi: 10.1109/ICSCDS53736.2022.9760714.
  15. [15]“A Smart Vehicle Alert System with Intelligent Vehicle Safety,” IEEE Xplore, document 10627771, 2024.
  16. [16]“Vehicle Accident Prevention and Detection System Based on Mobile Application,” IEEE Xplore, document 11064507, 2025.
  17. [17]“Smart Helmet for Alcohol Detection and Engine Locking, using GPS and GSM Alert System,” in Proc. 1st Int. Conf. Innovation & Growth in Next-Gen Intelligent Technology & Engineering (IGNITE), Pune, India, Jun. 2026, IEEE Xplore document 11705952.
  18. [18]SIMCom Wireless Solutions, “SIM800L Hardware Design,” datasheet.
  19. [19]InvenSense Inc., “MPU-6000 and MPU-6050 Product Specification, Revision 3.4,” 2013.
  20. [20]Espressif Systems, “ESP32 Series Datasheet.” [Online]. Available: https://www.espressif.com/en/support/documents/technical-documents
  21. [21]u-blox AG, “NEO-6 u-blox 6 GPS Modules,” data sheet.
  22. [22]Espressif Systems, “Arduino core for the ESP32.” [Online]. Available: https://github.com/espressif/arduino-esp32
  23. [23]M. Hart, “TinyGPSPlus Arduino Library.” [Online]. Available: https://github.com/mikalhart/TinyGPSPlus
  24. [24]Blynk Inc., “Blynk IoT Documentation.” [Online]. Available: https://docs.blynk.io
  25. [25]SIMCom Wireless Solutions, “SIM800 Series AT Command Manual.”
  26. [26]Google, “Google Maps URLs.” [Online]. Available: https://developers.google.com/maps/documentation/urls/get-started