# Smartphone Sensors in Motion: Advancing Traffic Safety with Mobile Technology
## 2 Materials and Methods
### Measuring Equipment
#### 2.1.2 Smartphones  
An alternative measurement method is smartphones, which use a combination of two sensors, a gyroscope and an accelerometer, to record acceleration. The gyroscope, a key element in any modern smartphone, is electronically designed to improve accuracy and minimize dimensionality and is typically used in the range of 1 to 1000 \(\upmu\)m. In practice, MEMS gyroscopes (microelectromechanical systems) are often used. This sensor measures the tilt of the device, but for accurate acceleration recording it must be complemented by an accelerometer. The accelerometer effectively detects changes in acceleration, vibration, and tilt of the device in a three-dimensional space, allowing accurate tracking of positional changes of the smartphone (see Figure 2).  
In papers [35; 36; 37], the authors point out the versatility of smartphone sensors in monitoring driver behavior and human activities. Using machine learning algorithms such as artificial neural networks and K-nearest neighbors, researchers have effectively detected abnormal driving patterns and classified physical activities. These applications range from improving road safety to improving health monitoring, demonstrating the significant potential of mobile sensor technology.  
Three smartphones from different price segments were analyzed in this study. The 2018 Huawei Mate 20 represents the lower price range and is equipped with Android 9 along with an 8-core processor. This model symbolizes accessible smartphones that are affordable and easy to obtain on the market. The mid-range smartphone, Xiaomi Redmi 5G, which was launched in 2020, runs on the Android 11 operating system and also features an 8-core processor. A significant improvement is the use of six Cortex A-55 cores clocked at 2.0 GHz, which is an upgrade over the weaker cores in the lower-end category. At the top of the range is the 2021 Xiaomi 11T, representing the highest price range. This model features the same Android 11 operating system, but its processor uses more powerful Cortex cores at 3.0 GHz and 2.6 GHz, making it one of the most technologically advanced smartphones on the market.  
The use of these three smartphones (Figure 2) was not only to compare whether they can be used as a replacement for a calibrated measuring device but also to compare whether it is necessary to provide a more expensive version to perform the measurements or whether a cheaper version can also do the job.  
For the measurement, an accelerometer analyzer app was used to record acceleration using the accelerometer on the smartphone. This app, unlike the XL Meter, records acceleration in the three axes x, y, and z. Before the measurement, the smartphone was fixed in a holder on the windscreen of the vehicle and the settings of the app were checked, which were as follows:  
Figure 2: Smartphones (**left**) [38; 39; 40] and Smartphone accelerometer (**right**).  
* sensor speed--fastest;
* sensor units--meters;
* writing setting--number separator--space.  
The smartphone was fixed in an upright position using the best-level app, which serves as a digital spirit level. This app uses the smartphone's built-in gyroscope to determine the position and tilt of the device, allowing both graphical and numerical displays of the tilt angle. Once the smartphone was attached, measurements began to be taken. Similar to the XL Meter, data logging was started, a driving test was performed, and the resulting data were saved to a text file.