# Airbag Protection and Alerting System for Elderly People
## 2 Methodology  
Figure 1 displays the flowchart for how the system operates. It starts with Bluetooth initialization, and then the gravity sensor values of the acceleration on the x, y, and z-axes will be read by the Arduino Nano. The Arduino will decide if the measured values indicate a fall case according to a threshold value. We used the mean square root method to determine the threshold since it requires larger readings for such an application. The gravitational acceleration on the three axes is based on the sensor's specs and configuration, rather than using a single axis or the simple averaging method. The root mean square was utilized to establish the threshold as follows:  
\[\overset{\rightarrow}{a}=\sum_{i}\overset{\rightarrow}{a}_{i}= \begin{pmatrix} a_{x}\\ 0\\ 0\end{pmatrix} + \begin{pmatrix}0\\ a_{y}\\ 0\end{pmatrix} + \begin{pmatrix}0\\ 0\\ a_{z}\end{pmatrix} = \begin{pmatrix}a_{x}\\ a_{y}\\ a_{z}\end{pmatrix}  \tag{1}\]  
\[\left|\overset{\rightarrow}{a}\right|=\sqrt{a_{x}^{2}+a_{y}^{2}+a_{z}^{2}} \tag{2}\]  
If a fall is not detected, it continues reading the gravity sensor values. If a fall is detected, then the Arduino turns the valve on and sends a Bluetooth signal to the mobile application connected to the system. After that, the user's location will be determined  
Figure 1: System working flowchart. using the Android mobile's GPS and will be sent to the user's emergency contact number as an SMS. Figure 2 illustrates the system block layout. The system works as follows:  
1. The system is worn across the waist and is turned on. 2. The Bluetooth module is then connected to his/her mobile phone. 3. The system will detect a fall using a gravity sensor that is connected to an Arduino board. 4. When a fall is detected by the gravity sensor, the system will activate an air valve and inflate an airbag from an air tank. 5. The system also sends a warning notification to the elderly person's mobile application via Bluetooth. 6. Then, the GPS location will be determined from his/her mobile phone and an SMS will be transmitted to the mobile phone belonging to the person of the user's choice (his/her emergency contact). The charge controller is used to safeguard the battery from charging excessively and releasing limits; it switches off attached loads when the battery is low and turns them back on when the battery is charged again; in addition, it stops the flow of charge to the battery once the battery is full when attached to the charger. The switch is placed after the charge controller so that it can cut the power from the residual components of the system. The boost converter will step up the battery voltage from 3.7 v to 12 v to supply the Arduino and the valve (through the transistor), and the Arduino will supply the sensor (ADXL345) and the Bluetooth module (HC-06) with 5 volts. The system components are listed below:  
* Arduino Nano: It has a built-in programmer and USB port on the board [20]. * Accelerometer (gravity sensor): This is a type of wearable sensor that is widely used in fall detection systems. An accelerometer sensor measures the acceleration of objects in their instantaneous rest position. It indicates the object's accelerations in three directions including the gravity effect [21]. It has low power consumption, and it suits devices that have outdoor applications. The chosen accelerometer is ADXL345; it is a 3-axis MEMS accelerometer which has a high resolution (13-bit) magnitude at up to \(+/-16\) g, is compact, thin, and consumes low power [22]. * The solenoid in the air valve: It controls the valve's opening and closing. A solenoid is made up of a coil of wire that induces a magnetic field when current flows through it; the shaft inside the coil moves because of this magnetic field, the shaft moves up when the solenoid is activated, opening the valve. When the solenoid is turned off, the shaft descends once more, closing the valve. The solenoid can operate with 6 to 12 volts,  
Figure 2: Proposed system block layout.