A low-cost passenger safety protection system based on laser ranging

In 2021, the total number of motor vehicles in China has exceeded 370 million. In the process of getting off the car, avoiding accidents between passengers and non-motor vehicles is of great significance for reducing casualties and economic losses. Therefore, this paper designs a low-cost passenger safety protection system based on laser ranging. Following the principle of easy integration and miniaturization, the hardware design and software design of the system have been completed. The mathematical model of arrival time-distance of non-motor vehicle under various speeds is established. Laser-ranging data is used to build the map, and the map can be used for non-motor vehicle identification and speed estimation. The function and precision of the system are tested. The experimental results show that 1) the established model can automatically determine whether passengers can get off the car safely and close the door in dangerous situations; 2) the mapping method based on laser ranging can effectively distinguish between non-motorized vehicles and roadsides. The accuracy of non-motor vehicle speed measurement is about 90%. The designed passenger safety protection system has high practicability.


Introduction
In 2021, the total number of motor vehicles in China has exceeded 370 million, and the increase in vehicles has also brought more traffic accidents. How to use the power of technology to reduce accidents is an important topic.
Due to the limitation of the body structure, there are unavoidable blind spots around the vehicle [1]-[2]. More and more vehicles are equipped with detection devices on the side and rear, including visual detection [3]- [4], radar detection [5]- [7], and ultrasonic detection [8]. The development of artificial intelligence has led to the development of vision-based automatic inspection systems [9], but there are 2 problems with missed inspections, false inspections, and large amounts of data. The 360° panoramic image system [10]- [11] is a good way to eliminate blind spots in the field of vision, but most vehicles do not have such a hardware system. The use of lidar for real-time driving environment detection [12] is one of the future development directions, and there is also a difficult problem in building maps in complex environments. Through the ultrasonic sensor installed at the rear of the car, several fixed-point blind spots can be detected [13]. A safety detection device that is easy to integrate with existing vehicles and is miniaturized is a preferred method to solve automobile safety problems.
Aiming at the situation that passengers suddenly open the door and non-motor vehicles cause accidents due to untimely response, this paper proposes a low-cost passenger safety protection device based on laser ranging. This paper is organized as follows. In the Section 2, the system hardware of the system is introduced. In the Section 3, the system's work flow chart and the model for passengers to get off safely are established. In the Section 4, a series of experiments were carried out. Finally, the system is summarized.

System hardware
According to the above requirement, the overall design of the passenger safety protection device is shown in the figure 1. The system mainly includes four units: acquisition unit (laser ranging sensor), processing unit (Arduino Nano development board); display and executive unit (servo, OLED, motor of car door), power supply unit (battery).

Laser ranging sensor
VL53L1X is an advanced laser ranging sensor. It is the fastest miniature ToF (Time of flight) sensor on the market, with a fast ranging frequency up to 50 Hz and wide ranging range. It integrates SPAD receiving array, 940nm invisible Class Ⅰ laser transmitter, physical infrared filter and optical devices to achieve the best ranging performance under various environmental lighting conditions. The small size makes it easy to integrate into the device. Unlike traditional IR sensors, VL53L1X uses latest generation ToF technology of STMicroelectronics, which can measure the absolute distance regardless of the target's color and reflectivity. The ROI (region of interest) on the receiving array can be programmed to reduce the sensor's FoV (field of view).

Microprocessor
Arduino Nano is a microcontroller board based on ATmega328P. It has 14 digital input/output pins (6 of which can be used as PWM outputs), 6 analog inputs, and 16MHz crystal oscillator clock. Use it to receive the information of the laser sensor through the I 2 C, and process and save the various data when the system is running.  figure 2, it is the flowchart of the whole system. First, the modules (laser ranging module, OLED module, servo) are initialized, and then the laser ranging module starts ranging, and the servo starts to rotate a small angle. Then, the distance of the non-motor vehicle is collected and the speed of the non-motor vehicle is calculated. If the speed and distance are within the safe range, the device will turn on the green light and passengers can get off directly. If it is not safe, the door will be forced to close.

Linear distance measurement
As shown in the figure 3, the laser generator emits laser light in a certain direction and starts timing at the same time. When the laser encounters an obstacle during propagation, it returns immediately, and the laser receiver immediately stops timing when it receives the reflected wave. There is a relationship: Where, ( ) is the distance between the measured object and the laser ranging sensor, (s) is the measured time, and (m· s -1 ) is the speed of the laser in air.

Model of security protection
For a specific speed ( ), the relationship between the arrival time ( ) and distance ( ) of a non-motor vehicle changes in a linear relationship: According to (2), if the time for passengers to complete getting off ( ) is considered, the relationship between the arrival time ( ) and the distance ( ) of non-motor vehicles is shown in the figure 4 (a). The results of the model analysis are as follows: 1) the space above the red surface, where the nonmotor vehicle will pass the vehicle before the passenger gets off, is a safe area; 2) the space between the two curved surfaces, where non-motor vehicle collide with passenger, is a dangerous area;3) the space under the green curved surface, where the passenger can open the door and get off, is a safe area. The passenger safety protection device can be fixed to the rear of the car, and the distance and speed of the non-motor vehicle can be measured in real-time, and the position in figure 4 (b) can be found to determine whether it is safe to get off the car.

Experiments and results
The entire model was built using Soloidwork, and all the housings were processed by laser cutting, and finally all the electronic modules were connected. The prototype of the designed project is shown in the figure 5, and a series of related tests have been completed.

Accuracy test of laser ranging sensor
In order to measure the accuracy of the laser ranging sensor, an experimental setup as shown in figure 6 (c) was built. The sliding table is used to simulate non-motor vehicles, and the laser ranging sensor and the lead screw sliding table are in the same line. By changing the position and speed of the sliding table, the accuracy of the laser sensor is measured in both cases of static and uniform motion. The calculation formula of the speed of the screw slide: Where, is the pitch of the lead screw, is the pulse number of one revolution of the stepper motor, and is the pulse period of the stepper motor.

Protection function test
In order to verify the protection model and the working effects of each component, an overall functional test was carried out. By setting the safe speed and dangerous speed, observe whether the three-color LED module and the door protection lock in the protection device can work normally.

Figure 7.
In the safe state, the green light is displayed in (a) and (b). In the dangerous state, the red light is displayed in (c) and (d), and the motor rotates In figure 7 (a) and (b), the speed-distance of the non-motor vehicle is within a safe range, and passengers can get off safely, the LED is green, and the door protection lock is closed. In figure 7 (c) and (d), the speed-distance of the non-motor vehicle is within the dangerous range, passengers cannot get off safely, the LED is red, and the door is forcibly closed (the motor rotated). It is proved that the designed system can complete the functions of ranging and safety protection.

Speed estimation of non-motor vehicles based on mapping
Completing the mapping based on the distance measurement data can distinguish the environment and non-motor vehicles, and estimate the speed of non-motor vehicles. We built the test bench in the figure 8 (a), using cardboard as an obstacle on the side of the road, and changing the position of the sliding table. The laser ranging sensor will continuously rotate in the range of 48°-110°, and build an environmental map based on the measured data.  (d), the range of laser ranging is between Oa-Od. When the laser sensor is between Oa-Ob, the value of the laser sensor changes in segment 1 (red number and black square). When the laser sensor is between Ob-Oc, the value of the laser sensor changes in segment 2. When the laser sensor is between Oc-Od, the value of the laser sensor changes in segment 3-4.
In figure 8 (c) and (e), the mapping results of non-motor vehicles in position 3 are larger. According to the corresponding part of the non-motor vehicle between position 1 and position 3, the speed of the non-motor vehicle can be calculated: Where, L n is the distance between non-motor vehicle and car, L 1 = 600 mm, L 2 = 500 mm, L 3 = 420 mm, t = 20 s. The calculated speed is 9 mm/s. Compared with the set speed of the screw sliding table of 10 mm/s, there is an error of 10%.

Conclusion
The contributions of this paper include the following aspects: 1). Designed a low-cost passenger safety protection device based on laser ranging, including the choice of mechanical hardware and sensors; 2). Established a mathematical model of arrival time-distance of non-motor vehicles at various speeds. According to this mathematical model, it is possible to distinguish the safe distance-time space at which passengers can get off at real-time speed; 3). In the experiment of estimating the speed of non-motor vehicles based on mapping, it can distinguish between non-motor vehicle and roadside; it can measure the speed of non-motor vehicle with an accuracy of about 90%.