Integrated Smart Bike Safety System with Accident Detection

DOI : 10.17577/IJERTV13IS040305

Download Full-Text PDF Cite this Publication

Text Only Version

Integrated Smart Bike Safety System with Accident Detection

Bayana Azeez

Electronic and Communication Engineering

Amal Jyothi College of Engineering Kottayam, India

Devajith Sathyan

Electronic and Communication Engineering, Amal Jyothi College of Engineering Kottayam, India

Aliya Kathoon

Electronic and Communication Engineering

Amal Jyothi College of Engineering Kottayam, India

Rosamma Sebastian

Assistant Professor

Amal Jyothi College of Engineering Kottayam, India

Fathima Sunil

Electronic and Communication Engineering

Amal Jyothi College of

Engineering Kottayam, India

Indu Reena Varughese

Assistant Professor Amal Jyothi College of


Kottayam, India

Abstract This research paper proposes an integrated smart bike safety system that prioritizes both reactive accident response and proactive preventative measures. The system utilizes advanced sensors to detect crashes in real-time, triggering emergency response protocols including location sharing with pre-designated contacts. It further integrates a YOLOv8-based helmet detection system, ensuring bike operation only when a helmet is worn.

Thiscombination of reactive and proactive features aims to minimize accident occurrence and mitigate consequences, enhancing individual cyclist safety and promoting cycling as a safer mode of transportation. Additionally, the system offers increased peace of mind for cyclists and their loved ones while improving visibility in emergencies. Overall, this paper presents a comprehensive approach to cyclist safety by leveraging cutting- edge technology, making cycling a more secure and attractive transportation option.


    The increasing popularity of motorcycles in urban and rural areas offers a convenient and fuel-efficient mode of transportation. However, this rise in motorcycle usage is unfortunately accompanied by a significant safety concern: their vulnerability on the road compared to enclosed vehicles [1]. Statistics reveal a disproportionately high number of motorcycle fatalities and injuries in accidents [2]. This critical disparity in safety necessitates the exploration of innovative technological solutions.

    This paper presents the "Integrated Smart Bike Safety System with Accident Detection," a cutting-edge system that takes advantage of developments in sensor and artificial intelligence (AI) technologies. By providing a wider variety of functionalities, this comprehensive system goes beyond existing research on motorcycle accident detection and smart helmets [3, 4].

    KeywordsEmergency response, Accident detection, Smart bike, helmet detection, Yolov8

    The Integrated Smart Bike Safety System with Accident Detection functions through a two-part processing and sensor network. The Raspberry Pi 5, a powerful single-board computer (SBC), acts as the system's brain, handling image processing and running the YOLO v8 algorithm for helmet detection. Meanwhile, an Arduino UNO, a single-board microcontroller (SBM), bridges the gap between various sensors and the Raspberry Pi 5. It manages communication with GPS for location tracking, the MPU-6050 Inertial Measurement Unit (IMU) for gathering movement and orientation data, Bluetooth for wireless connectivity, and two ultrasonic sensors for proximity detection. Utilizing the PySerial module, the Arduino UNO establishes serial communication with the Raspberry Pi 5, ensuring seamless data exchange and real-time analysis of crucial sensor information.

    This integrated system claims to revolutionize motorcycle safety by providing riders with proactive information and enabling a quicker response in the event of an accident. The goal

    of this research is to make riding safer and more responsible by exploring the features, design, and possible effects of this cutting-edge system.


    Various Accident Detection and Reporting Systems (ADRS) have been proposed to enhance road safety and emergency response.

    Rajvardhan Rishi [5] proposed a system to solve the critical problem of road accidents, the so-called Automatic Message System (AMS). The system uses GPS and GSM modules for tracking real-time location of the vehicle and sends notifications to pre-defined contacts and immediately medical response. In the event of an accident, the system uses accelerometer sensors detects an accident and sends the coordinates of the accident location along with the identification details to the cloud server. The system flow involves an Arduino microcontroller (ATMEGA16) detecting sudden changes in threshold values through an accelerometer sensor. When an accident is detected, the microcontroller activates the GSM module to send a pre- stored SMS notification to the predefined mobile number of the accident victim's friend and other contacts. The effectiveness of the system was tested in rural areas, showing successful detection traffic accidents.

    Saad Ur Rehman [6] designed AMS (Accident Messaging System) for security motorcycle riders. The system mainly uses microelectromechanical systems (MEMS) especially MEMS accelerometers with IoT (Internet of Things) technology. The AMS aims to detect accidents by tracking the lean of motorcycles and sending alerts emergency contacts with exact location coordinates. The AMS prototype includes an MPU- 6050 accelerometer, Arduino Nano microcontroller, SIM800L GSM module and battery management system. The system regularly monitors the angle of inclination of the motorcycle and triggers alerts if the tilt angle exceeds a predetermined limit. The data is then sent via SMS and uploaded to the server for further analysis. The authors conducted experiments with ten different motorcycles to determine the optimal lean angle for accident detection, also performed a crash test, recording a detection rate of 97.33%.

    Shoeb Ahmed Shabbeer [7] designed a smart helmet system to solve two-person safety problems cyclists. The system uses a combination of hardware components, including Arduino Microcontroller, Accelerometer MPU6050, GSM module Sim900, GPS module NEO6M V2, and web server. The architecture involves interfacing the microcontroller with accelerometer and GSM module along with integration of cloud services for comprehensive accident detection and notification. Jesudoss A [8] proposed a smart helmet system as a solution to many safety problems bikers. It is integrated with various advanced technologies such as alcohol detection using a throttle sensor, load monitoring with load sensor and automatic accident detection with a vibration sensor. In addition, it ensures that the user puts on a helmet before starting to ride the bike, using an infrared sensor for compliance. The integration of MEMS sensors makes it possible identifying cases of reckless driving with corresponding fines charged to individuals Bank account. In addition, the system uses GPS technology to transmit accident details to nearby hospitals immediately, which

    facilitates a faster response to emergencies. The system aims to significantly reduce the likelihood of bicycle accidents.

    Dr.D.Selvathi [9] designed a system aimed at accident prevention and detection. The Primary components include smart helmet, alcohol detection system, accelerometer, relay, Bluetooth module, Liquid Crystal Display (LCD) and Arduino ATMEGA-328 microcontroller. The smart helmet includes an air pressure switch that detects whether it is the rider is wearing a helmet. Ifyou are not wearing a helmet, a warning message will appear and the motor relay remains inactive. The alcohol detection system uses the MQ-3 gas sensor for this monitor the rider's breath for alcohol content. The system ensures that only the engine it is activated if the alcohol concentration is below the permissible level. For accident detection, an accelerometer is used to continuously measure acceleration forces in three axes. Sudden changes in these forces are interpreted as potential crashes. In the event of an accident, the system uses a Bluetooth module to transmit emergency data, including accelerometer values and location information obtained from the smartphone's GPS to a predefined contact. The Arduino ATMEGA-328 microcontroller serves as the central processing unit that organize smart helmet functions, alcohol detection and accident detection components. The LCD display provides real-time information on alcohol concentration, accelerometer values, and helmet condition for user comfort.

    Nataraja N [10] proposed a system aims to reduce accidents and save lives by ensuring helmet use and implementing accident detection. The proposed architecture includes vehicle, sign board, accident detection, helmet communication, and switch systems. The system involves a sensor module in helmets, transmitting signals to the bike's module for ignition. Sign board detection alerts riders about obstacles through voice and display output. An Android app enables bike ignition in case of helmet loss.

    In summary, these innovative systems leverage technology to detect and report accidents promptly, aiming to improve road safety and emergency response mechanisms.


    Fig 1: Block Diagram

    Following components are involved in implementing the framework:

    1. Arduino UNO

      The Arduino UNO, a versatile microcontroller board, serves as the sensory hub. It efficiently collects raw data from various sensors like GPS (location tracking), the MPU-6050 IMU (movement and orientation), and ultrasonic sensors (proximity

      detection). This raw sensor data forms the foundation for accident detection. The Arduino UNO can perform basic pre- processing on this data, such as filtering or scaling.

    2. Inertial Measurement Unit (IMU)

      The MPU6050 Inertial Measurement Unit (IMU) is a compact device that measures the motorcycle's acceleration (linear movement) and gyroscopic data (rotational movement). By examining this combined data, the system learns about the bike's motion and stability, which helps the Arduino UNO recognize sudden changes that can result in accidents or dangerous actions.

    3. GPS

      Neo-6M GPS module for real-time location tracking; this device continuously records the position of the motorcycle (latitude, longitude), facilitating data analysis for safety

      enhancements and emergency response.

    4. Ultrasonic sensors

      A pair of ultrasonic sensors (HC-SR04) serves as the motorcycle's "eyes," detecting surrounding obstructions. To calculate the distance to objects in the riders near surroundings, these sensors send out ultrasonic waves and determine the time it takes for the echoes to return. In addition to contributing to the system's overall safety net, this real-time data on surrounding cars or obstructions helps avoid possible collisions.

    5. Bluetooth module

      The HC-05 Bluetooth module functions as a wireless bridge that connects the Arduino UNO to other devices, such as mobile devices. This makes it possible to use features like getting data out of the system to monitor it or even send out emergency notifications.

    6. Raspberry Pi 5

      The system's central processing unit is a robust Raspberry Pi 5 computer capable of doing image detection, which is essential to preventing accidents. The Raspberry Pi 5 can execute YOLOv8, an advanced object detection algorithm, if it has an inbuilt camera. To improve overall safety, the system uses YOLOv8 to analyse camera data for helmet detection.

    7. Picamera

      A Picamera was integrated into the system to record live footage of the rider's image. The Raspberry Pi 5, the system's powerful image processing module, receives this visual input immediately. The Raspberry Pi 5 has the potential to execute YOLOv8, a complex object detection algorithm, by utilizing its processing power. Through real-time visual analysis, YOLOv8 may identify whether the rider is wearing a helmet or not.

    8. Relay

      Relay function as switches; if a helmet is identified by the detection algorithm, they activate the relay, allowing the vehicle to start; otherwise, they stay inactive.

    9. Serial Interface (Pyserial)

    The serial interface lies in a Python library called Pyserial, which exchanges data between the Arduino UNO and Raspberry Pi 5.


    This system explores the complex operation of the two-part accident detection and prevention system that prioritizes rider safety. The system consists of multiple electronic components that work together to achieve its goals.

    1. Helmet Detection System using Raspberry Pi 5 (Accident Prevention)

      Fig 2: Helmet Detection System

      In fig 2 Raspberry Pi is connected to a Raspberry Pi camera module with a cable, allows to take pictures and videos. With a relay, the Raspberry Pi could use the camera to trigger actions. The Raspberry Pi 5, a potent minicomputer, is the brains behind the helmet detection system. Utilizing YOLOv8, a pre-trained deep learning model, it performs exceptionally well in real-time object recognition in photos. The rider is recorded as they mount the bike via a mounted camera. This live footage is analyzed using YOLOv8, which looks for helmet characteristics. A relay enables the motorcycle to start if YOLOv8 recognizes a helmet with a high degree of confidence. On the other hand, low-confidence detection or no helmet recognition keeps the relay inactive, preventing engine startup, for the safety of the rider.

      Fig 3: R-C Curve Fig 4: F1 C Curve


      Fig 5: C Matrix

      Fig 6: Overall Result

      These figures provide the effectiveness of YOLOv8 in helmet detection for this system. By analyzing these various employed metrics along with the overall training results, we can assess YOLOv8's suitability for real-world helmet detection in the motorcycle safety system.

      Fig 3 is a recall-confidence curve, the graph shows how the model's assurance (confidence) in identifications and helmet memory are traded off. The optimum results include a high recall (detecting most helmets) and high confidence (making accurate detections).

      Fig 4 is a F1 Confidence Curve, the figure displays the confidence curve for the helmet detection system. The X-axis shows confidence levels, and the Y-axis counts the number of photographs that were captured and classified as either "with helmet" or "without helmet." This indicates the level of confidence the model has in its detections.

      Fig 5 shows a confusion matrix that indicates the effectiveness of the helmet detection system. Columns show the model's predictions, and rows indicate the actual labels ("with helmet" or "without helmet"). Values in the matrix indicate the number of photos that fall into each category.

      Fig 6 shows the confusion matrix values in graphs, driven by the YOLOv8 model, which illustrates the effectiveness of helmet detection system. The breakdown is as follows: Columns show the model's predictions, while rows show the actual labels ("with helmet" or "without helmet"). The numbers in the matrix represent the number of photos that belong to each categoryTrue Negatives, False Negatives, True Positives, and False Negatives. Overall, the system performs well with high True Positives and True Negatives, but there is still opportunity to reduce False Positives and False Negatives.

    2. Accident Detection System (Arduino Uno as Central Unit)

      Fig 7: Accident Detection System

      The accident detection system's central processing unit is the Arduino Uno. It manages the whole process, collecting information from several sensors (like IMU, GPS, Ultrasonic sensors, Bluetooth module) handling necessary processing, and enabling alert transmission.

      1. Sensor Data Acquisition

        The Arduino Uno acts as the central hub, receiving data from the following sensors:

        • MPU6050 IMU (Inertial Measurement Unit): This important sensor records the orientation and motion of the vehicle. The system can identify abrupt changes in motion, hard braking, and sharp turns due to its measurement of acceleration (g-force) and gyroscope data.

        • Neo-6M GPS: In an emergency, being able to determine the location of an accident quickly is crucial. This function is performed by the Neo-6M GPS, which provides precise latitude and longitude coordinates.

        • A pair of ultrasonic sensors (HC-SR04): These sensors, which are installed strategically on both sides of the bike, measure the distances to neighbouring objects by both emitting and detecting ultrasonic waves. This information is crucial for anticipating possible collisions with other cars or objects.

      2. Threshold Setting

        To optimize accident detection, the system can configure sensor reading thresholds. A quick increase in g-force above a predetermined threshold may indicate potentially dangerous movement.

      3. Accident Detection Algorithm

      The aggregate data collected from all the sensors is analyzed by an accident detection algorithm made especially for the Arduino Uno. This algorithm plays a crucial role in calculating the likelihood of an accident by considering multiple factors. Using well-defined logical principles, such as exceeding thresholds for many sensors within a predetermined duration, the program calculates the probability of an accident.

      When an accident occurs, the HC-05 Bluetooth module and Arduino Uno communicate quickly to send vital information for emergency assistance. This transfer combines sensor information into a logical data structure, including important elements like GPS location, the incident's timestamp, acceleration measurements, gyroscope readings, and ultrasonic sensor information. This carefully selected data payload is wirelessly transferred to a pre-configured mobile device via Bluetooth, guaranteeing prompt notice on the user's smartphone. A system like this makes it easier to respond quickly and provide aid, greatly improving safety precautions in dire circumstances.

    3. Serial Interface-Pyserial module

    PySerial is a Python library that provides support for serial communication between Python and devices connected through serial ports.

    The system is made to be even more successful by communicating with the Arduino Uno in the accident detection system, and the Raspberry Pi 5 works independently for helmet detection. Data sharing between the two units is made possible by the PySerial interface, which facilitates this communication. For motorcyclists, this integrated approach provides a complete safety solution.

    Fig 8: Accident Detection System with Helmet detection

    An Arduino serves as the centre hub of the accident detection system depicted in Figure 8, which gathers data from sensors like an accelerometer (used for crash detection) and maybe a gyroscope. Utilizing a YOLOv8 model on a different camera, a Raspberry Pi performs helmet detection and transmits the findings back to the Arduino via Pyserial. The system has the ability to initiate emergency alerts, activate bike alerts, or even connect with the electrical system of the bike for improved safety measures based on the combination of sensor data and helmet usage.


    1. Accident Detection

      Fig 9: Real-Time Accident Detection System

      The terminal output shows important data from an Arduino- based accident detection system that is paired with a mobile device via HC05 Bluetooth. The lines followed by "15:28:32 TL" denote setup operations, and the displayed data comprises accelerometer readings that most likely correspond to the X, Y, and Z-axis g-force measurements. The notification "@Accident Detected" indicates that there may have been an accident at 15:28:32. Furthermore, latitude and longitude are given as numerical values, which allows for location tracking using mapping services such as Google Maps (available at With the help of these coordinates, it is simple to locate the accident and provide quick assistance.

      To further enhance this motorcycle safety system, advanced algorithms leveraging machine learning could analyze sensor data more intelligently, improving accident detection accuracy and reducing false positives. Also, can develop a user-friendly mobile app offering personalized safety recommendations and real-time feedback would further improve overall safety protocols and promote safe riding habits among motorcycle enthusiasts.

      Fig 10: GPS Location

      GPS Link: The clickable link that provided, when opened on a smartphone with internet access, would directly show the location on Google Maps. This would be incredibly helpful for emergency services to respond quickly.

    2. Helmet Detection

    Fig 11: Helmet Detection (with & without)

    After analysing the image and its frames, the YOLOv8 model recognizes objects(helmet) and their bounding boxes. If a helmet is detected in the image/frame then Display a bounding box around the helmet on the image/frame trigger the relay and enables the vehicle to start. If no helmet is detected, the relay remains inactive.


In conclusion, a strong motorcycle safety system is created by combining an Arduino Uno with sensors and GPS data extraction with a Raspberry Pi 5 with YOLOv8 for helmet detection. The device significantly reduces the risk of accidents by imposing helmet use through photo recognition technology and continuously monitoring the state of the bike. Furthermore, the system's capacity to quickly locate the location using GPS coordinates allows for a quick response in the tragic event of a crash. PySerial's ability to provide smooth communication between components guarantees effective operation. By combining preventative measures with quick reaction times, this multi-layered strategy highlights a proactive approach to motorcycle safety and improves rider protection.


  1. World Health Organization. (2020). Global status report on road safety 2018. redirect/9789241565684

  2. National Highway Traffic Safety Administration. (2023). Motorcycle safety. work/motorcycle-safety.

  3. Srinivasa Gupta, S., Nandini, N., Sowjanya, N., Pardha Sai, N., & Sai,

    K. (2016). Smart System for Rider Safety and Accident Detection. International Journal of Engineering Research and Technology (IJERT), 5(3), 180-184.

  4. Dang, T. T., Truong, X. D., & Phung, D. Q. (2019). Smartphone-based fall detection using K-nearest neighbors classification. Journal of Ambient Intelligence and Humanized Computing, 10(3), 1321-1330.

  5. Ravardhan Rishi, Sofiya Yede, Keshav Kunal, Nutan V. Bansode Automatic Messaging System for Vehicle Tracking and Accident Detection Proceedings of the International Conference on Electronics and Sustainable Communication Systems (ICESC 2020).

  6. Saad Ur Rehman, Shaheryar Ahmad Khan, Arshia Arif, Umar S. Khan IoT-based Accident Detection and Emergency Alert System for Motorbikes.

  7. Shoeb Ahmed Shabbeer, Merin Meleet Smart Helmet for Accident Detection and Notification2nd IEEE International Conference on Computational Systems and Information Technology for Sustainable Solutions 2017.

  8. Jesudoss A, Vybhavi R, Anusha B Design of Smart Helmet for Accident Avoidance International Conference on Communication and Signal Processing, April 4-6, 2019, India.

  9. Dr.D.Selvathi ,P.Pavithra , T.Preethi Intelligent Transportation System for Accident Prevention and Detection International Conference on Intelligent Computing and Control Systems ICICCS 2017.

  10. Nataraja N ,Mamatha K S, Dr. Keshavamurthy, Dr. Shivashankar SMART HELMET 2018 3rd IEEE International Conference on Recent Trends in Electronics, Information & Communication Technology (RTEICT-2018), MAY 18th & 19th 2018 .