Smart helmet using internet of things

ABSTRACT


INTRODUCTION
There are a lot of accidents which happen every day on the roads. Many reasons are responsible for it such as driver's fault, bad road, and pedestrian mistakes. Many researchers' discuses road traffic and death rates from many prospective [1][2][3][4][5][6]. These reasons may lead to body injures, these injuries ranging between simple, moderate, or sever injuries according to condition of each accident. The most dangerous injury which happen after head trauma, may lead to concussion or brain haemorrhage. In all cases it is necessary to manage these cases as early as possible because early dealing may save lives in such cases.
The two-wheeler is considered from the major reasons behind road accidents. So, due to lack of safety gear, when the people are riding the two-wheeler without wearing helmet they may met with some sort of accident, since the two wheelers have balancing on the two wheels hence after hitting the two-wheeler get unbalanced and the rider fall down hitting his head with the solid surface and if helmet is not there then the head might have serious injuries (e.g. brain haemorrhage). Now these injuries can be minimized by use of the Helmet [1]. This paper aims to increase the safety of the two-wheeler riders and bikers against road accidents. Technologies such as short-range wireless communications, radio-frequency identification@(RFID) and wireless sensor networks@(WSN) have permitted the Internet to dive into embedded computing [7][8][9][10].
Numerous keywords were utilized such as "web of things", "internet", "mobile computing", "web" and concatenation of them. Current surveys on the WoT/IoT and mobile sensing [11][12][13][14][15][16] were also studied for related efforts. The proposed helmet has a microcontroller loaded with the proper code to execute various functions. The piezoelectric sensor is considere as the main sensor at the helmet to check the degree of trauma. So, the sensor will work continuously to check the present state of the helmet. In case of emergency (e.g., an accident), the Piezoelectric sensor will decide if the rider is in risk or not based on the trauma degree.
In case of accident, the GPS will globally trace the rider's present location. An urgent message will be sent to the rider local authorities, family members, in addition emergency contacts includes the position of the accident. The Helmet is linked to the mobile app through the Bluetooth module (HC-05). The helmet Android application have various activities and database design which will be considered in the following sections. The Helmet will execute the various functions without Intteruppting the rider during the biker way. This paper is sectioned into four sections; Section 1 discuss the introduction; Section 2 explain the research method; Section 3 comprises results and discussion. Finally, Section 4 display conclusion and future work.
Smart helmet prospective is discussed in many papers, most of research target methodology to increase the safety of the two-wheeler biker. R. P. Raj, et al., [17] designed a prototype for accident detection and linked the circuit with GPS module to determine the biker location preciously, but the design need external power supply source and need to replace the microcontroller with smaller one to integrate the system into the helmet. A. Jesudoss, et al., [18] proposed a scheme for alcohol detection and accident avoidance placed into the helmet, authors utilized gas sensor for alcohol detection and controlling the bike motor ignition, in addition vibration sensor utilized to distinguish the accident occurrence. S. Nanda, et al., [19] utilized Raspberry Pi with the assistance of diverse sensors to distinguish and avoid accident by detecting the traffic red light in addition to detection of drunken driver and check validity of biker driving license. D. K. P. Gudavalli, et al., [20] utilized RFID to turn engine lock off/on as a 1st safety function in addition sensor located into the helmet control engine start as a 2 nd safety system. S. R. Rupanagudi, et al., [21] utilized a camera integrated in a helmet and formed an algorithm to sense rear collision.
Two main contributions in this paper. First, it increases biker safety by removing any physical connections between helmet and the smart phone, which increase the biker flexibility. The Helmet permit detection for the trauma degree according to predefined threshold instantaneously. Therefore, system request urgent help or the biker still safe. System can used as helmet owner tracker, which useful in some circumstances e.g., industrial, mining, hiking, riding. the proposed helmet cost only 50$ which considered less than any other helmet with similar functionalities.

RESEARCH METHOD
The proposed system (i.e. smart helmet) contain hardware and software sections:. To launch this helmet (Android, Firebase, and Arduino) tools were utilized; the functionality of helmet are accident detection in addition to track the helmet holder. Piezoelectric Sensor which utilized to determine changes in temperature, acceleration, pressure, force, or strain by altering them into an electrical charge. This adaptation done by connecting a 1-megohm resistor into parallel connection with Piezo sensor to limit the current and voltage generated by the piezo element in addition to protect the analog source.
Android mobile application is intiated and connected to the proposed helmet through Firebase realtime database (DB). As shown in Figure 1 with the overall architecture. DB work as a hub for both hardware and software sections. DB utilized by the Android application to save the users data acquired from the app. Also, it facilitates in the following conditions: − When the user change his current location. − When the user save the emergency and relevant contacts using Android application. − When user intiating a new account.
The Firebase Realtime Database stands for a cloud-hosted database. Information and Data is kept in JSON tree form in addition updating each connected client instantenously. By utilizing application Android SDKs to build cross-platform application, clients applications share automatically and instance the same Realtime Database by receiveing the updates with the latest information and data.
Firebase utilized in this application due to it's low-latency, flexibility, and efficient solution for mobile applications that needes synchronize conditions across users in real time. The main target of implementation of tracking system is to help users in finding their location in addition to support traching facility for user locations according to his/her source and destination based on the latitude and longitude of mobile GPS. By utilizing this functionality, relevant users can determine where is the biker location. Also, users can recive the SMS and notification in emergency conditions. The proposed mobile application permit the helmet owner to share exact location with application users and another bikers via SMS. This done by matches SMS contents with predefined keyword. This implementation of system design introduce a tracking system utilizing (GPS plus Arduino). Two java classes are connected to XML layouts to run the tracking system correctly. The first class is PhoneAuthActivity, and the second class is MapsActivity. By utilizing the java classes@PhoneAuthActivity which is connected to activity_phone_auth.xml, as the application user has to write his friend (biker) mobile number in the first field in his app, followed by his/her mobile number in the second field, as shown in Figure 2. The tracking system supplies the capability of performing phone number authentication. Therefore, neither you nor biker can track each other randomly. So, authentication method needed to perform biker location tracking performed after biker permission.
Add friends is a function in the proposed application which utilized to list persons who have permission to track the biker location instantly without needing permission every time they want to track the biker, that permission includes the following: − Authority to open location and GPS. − Authority to biker's phone contact list. − Authority to make a CALL. − Authority to send SMS.

93
A progress bar will appear on the lower part of the screen as soon as the client press on the Track Now switch. During the progress bar filling the processes of checking and authentication client phone number with the biker contact list were performed. Once the client phone number is in the biker contact list, the progress bar will be replaced with word 'Match', to emphazie checking/authentication process is done. Therefore, the client and biker phone numbers are identical at both sides.
After performing the checking/authentication, the client can track the biker location by opening the new windows named mapsActivity.Java, the biker's current location appears in the window as a red marker. Algorithm 1 shows the algorithm stages at the PhoneAuthActivity@class, and Algorithm 2 shows how the application acquires data from the Database algorithm: According to degree of trauma the android application wakes up the system from sleep mode turning the screen on and dismiss keyboard. If the trauma passed the determined threshold the screen converted into red color and 'ARE YOU HURT?' question appears for the biker and two choices 'yes' (i.e. the biker is hurt) and 'I`M OKAY' choice as presented in the Figure.  If the biker press on 'yes' button, it means the biker is faced a collision and needs a immediate assistant. Therefore, the launchAlert() method will be activated. The launchAlert() send the last known biker location to the biker relative persons, who chosen previously by the biker and send this message "HELP ME! I JUST MADE AN ACCIDENT \n MY LAST LOCATION:" Followed by the biker last location (i.e. current position). In addition the launchAlert() method send the same message to the emergency number, as presented in Algorithm 3.
If the biker clicks on 'I'M OKAY' button, which mean the biker is saved from the trauma in the moment shows toast message "Alert mode stopped by user " and finish the alert. If the biker don`t click on any button after the trauma, timer() method activated with the following sequences: − 30 second Countdown initiates instead of yes button. − launchAlert() method at the end of the counter down timer. At the hardware section the needed component: − Arduino Board for monitor the piezoelectric sensors status in addition transfer its value via Wi-Fi or Bluetooth. − Sensor utilized for trauma (or Knock) intensity. − Linking method between the android application and the helmet. − Suitable Helmet to fit all the components into the helmet. − Suitable power supply (e.g. battery cell) to start up the proposed system. − Compatible charging Board utilizing to charge the battery when required.
The ATtiny85 represent the microcontroller utilized in this helmet due to its size and sufficient capabilities for the system [22][23][24][25][26]. Figure 4 presents the USB Development Board ATtiny85. Board will receive signals from knock Sensor (i.e., Piezoelectric Sensor) then send these reading to Arduino application via Bluetooth module (HC-05) for accident detection purpose. Also, the size of components considered, to integrate components into the helmet. knock Sensor) which utilized to measure changes in force, strain, temperature, acceleration, or pressure by transforming them into an electrical charge [27][28][29][30][31][32][33]. Three piezoelectric sensors connected at three analog pins in ATtiny85. The piezoelectric sensor includes two wires, the red wire represents the higher voltage which is linked to analog pin 0 and the black wire represents the lower voltage which is linked to the ground. Additionally, a 1-megohm resistor is linked in parallel connection with the Piezoelectric sensor to limit the current and voltage resulted by the piezoelectric and to shield the analog input. Figure 6 presents the bluetooth Module HC-05. The HC-05 with full-duplex serialy communication, which used in many applications [34][35][36][37][38][39]. HC-05 used in this paper to send piezo reads to android application. presents the battery charger module which facilitate in many applications [40]. This module is utilized in this paper to recharge battery on demand to maintain the helmet system work properly. After that, the previously mentioned components were linked together to fix into the helmet as shown in Figure 8, where three Piezoelectric sensors distributed uniformly in addition, three sensors occupy three analog pins in ATtiny85. Also, Bluetooth module HC-05 relate to ATtiny85 board. Finally, the battery is latched to power up the helmet system. The battery linked with the battery charger module to reliable the helmet system, as presented in Figure 9. The battery charger is equipped with mini-USB adaptor. Figure 10 shows the hardware circuit diagram for the components integrated into helmet.

RESULTS AND DISCUSSION
After parallel connection between the piezoelectric sensors with one megaohm resistor for each. Then, integrate these sensors with Bluetooth and battery charger modules. All these components were fixed into the helmet as declared in Figure 8 and Figure 9. The proposed helmet cost only 50$ which considered less than any other helmet with similar functionalities. where the helmet user downloads the Android application from the play store application. Signing up for the first time. Therefore, signing in to select the proper operation if user need to track the helmet owner, as shown in Figure 2. Application user can turn on the application to let his/her relatives tracking the user locations instantaneously. In case of accident (i.e. sensors in the helmet detect a signal higher than the predefined threshold as shown in Figure 11), if the helmet owner okay, the helmet user can answer the application question "Are you hurt?" by pressing on the green button "I'm okay". If the other button (i.e. the red button "yes") pressed or no action occurred within the next 30 seconds as shown in Figure 3. An automatic message sent to the police station and hospital in addition to the user relatives.

CONCLUSION
This paper introduces a new model for tracking and accident detection system connected with Arduino mobile application through HC-05 module to evade interrupt to biker. This model may equip with accelerometer, Alcohol sensor and camera but more GPIO are needed to fullfill the new amendments, in other words another microcontroller with more GPIO and maintain the helmet size to fix the component into the helmet. All these amendments can integrate into IoT helmet application, to accommodate with different environments e.g., industrial, mining, hiking and riding.