1 Structural features of the detector
The detector uses a single-chip microcomputer to control a reflective infrared sensor to detect the position of the driver's head. By detecting the relative position of the driver's head and the seat headrest in a normal sitting position, it automatically determines whether the driver is in a fatigue driving state.
If the driver is in a fatigue driving state, the head must deviate from the normal position and the time exceeds the set value, then an alarm and brake control signal are output. The reflective infrared sensor in the detector consists of an infrared emitting diode and two infrared receiving heads. The infrared emitting diode emits a modulated 38 kHz infrared beam and is installed on the front of the seat headrest facing the driver's head. The infrared emitting diode is placed in the middle and the two infrared receiving heads are placed symmetrically on the left and right sides.
2 Analysis of the driver's head position
During driving, the driver's head position is different when normal and when fatigued. The side view is shown in Figure 1. Figure 1 (a) shows that when the driver is driving the car normally, his head position is a few centimeters away from the seat headrest, rather than completely close to the headrest, because driving close to the headrest will make the eyes feel very uncomfortable and inconvenient to observe the road conditions close to the car.
Figure 1 (b) shows the most common sleeping posture when the driver is driving a car while fatigued. It is also the driver's initial fatigue sleeping posture. At this time, the driver's head is generally more than 15 cm away from the seat headrest. In this case, an alarm should be sounded in time. If it lasts for 2 seconds, the brake system should be activated to brake automatically. However, other short-term non-fatigue actions, such as leaning over to operate the switch on the dashboard, looking back, and other short-term actions, also have similar distance changes. At this time, time can be used to distinguish. Returning to the normal position within 2 seconds is not considered as fatigue driving.
Figure 1 (c) shows the posture of the driver when he consciously takes a short rest and closes his eyes while driving, but has not yet fallen asleep. However, this is a prelude to complete sleep. His head is close to the seat headrest and the distance is 0. In this case, an alarm should be sounded in time. If it continues to develop, it will evolve into the situation in Figure 1 (b).
Figure 1 Side view of the driver's head position
FIG2 is a top view of the driver's head, in which the circle represents the driver's head and the arrow represents the route of infrared emission and reflection. FIG2 (a) is a schematic diagram of the relative position of the driver's head and the infrared sensor during normal driving. The distance traveled by the infrared from the infrared emitting diode in the middle to the two infrared receiving heads on the left and right reflected by the driver's head is basically the same. FIG2
(b) shows the position of the driver's head after fatigue, which is tilted to the left or right. This is different from the typical position of FIG1 (b). It is an intermediate transition fatigue form and will eventually transform to the position of FIG1 (b). At this time, the infrared sensor will detect different distances on the left and right, and an alarm or brake signal should be output in time.
FIG2 (c) shows the position of the driver's head after fatigue. The infrared receiving head on one side can no longer receive the reflected infrared light. The result of infinite distance is obtained in the computer program, which indicates that the driver's fatigue level has further increased and an alarm or brake signal should be output in time.
Figure 2 Top view of the driver's head position
3 Hardware design of the detector
The hardware circuit diagram of the detector is shown in Figure 3, where LED is an infrared emitting diode, IC3 and IC4 are infrared receiving heads, and MCU is an ATMaga8 microcontroller.
Figure 3 Detector hardware circuit
LED emits a 38 kHz infrared modulated beam, which will be reflected by the driver's head and irradiate the receiving window of IC3 and IC4. IC3 and IC4 demodulate the received signal, and after amplification, send it to the input line of the single-chip microcomputer MCU in a high or low level manner. The computer program sends the value of the line to the memory for storage, which is used as a basis for judgment by the subsequent program. [page]
The effective detection distance of the infrared light emitted by the infrared emitting diode LED corresponds to the current passing through the infrared emitting diode. The current of the infrared emitting diode LED is determined by the output voltage of the three-terminal integrated voltage regulator IC2, and the output voltage of the three-terminal integrated voltage regulator IC2 is controlled by the control word output by the computer program.
The maximum value of the control word is binary 11111111d. At this time, R1~R8 are all grounded, the comprehensive resistance of R12 is the smallest, the output voltage Vout of the three-terminal integrated voltage regulator IC2 is also the smallest, and the effective distance of the infrared light beam emitted by the LED is also the smallest. By properly adjusting the values of R1~R8, the effective distance of the infrared light beam emitted by the LED can be adjusted to about 1 cm. When the minimum value of the control word is binary 00000000d, all resistors R1 to R8 are suspended, the comprehensive resistance of R12 is R12, the output voltage Vout of the three-terminal integrated regulator IC2 is the maximum, and the effective distance of the infrared beam emitted by the infrared emitting diode LED is also the maximum. By properly adjusting the value of R12, the effective distance of the infrared beam emitted by the infrared emitting diode LED can be adjusted to about 20 cm. The effective detection distance of 1 to 20 cm can meet the actual needs. [page]
4 Detector software design
4. 1 Distance detection method The
effective distance detection corresponds to the control word issued by the single-chip microcomputer. The distance detection method is: gradually reduce the intensity of infrared emission until the reflected infrared beam is not received. The distance value corresponding to the control word at this time is the distance between the current driver's head and the seat headrest.
4. 2 Automatic calibration of the driver's head position
The single-chip microcomputer program flowchart is shown in Figure 4. The program for automatically calibrating the normal position of the head runs after the car starts the engine and then delays for a period of time, because fatigue driving will not occur during this period of time. When driving on the main road, the head movement gradually stabilizes, and this is the right time to calibrate the head to its normal position. Recalibration is required every time because the driver may change, and the position of each person's head is not exactly the same, so the calibration results will also be different.
Figure 4 Flow chart of automatic calibration of normal head position
The procedure for automatically calibrating the normal position of the head is to gradually reduce the current intensity of the infrared emitting diode from strong to weak, and at the same time detect the output status of IC3 and IC4 to determine whether it has reached the critical point where it cannot be received. This is the limit for stopping the reduction of the emission current intensity, and at the same time read the control word value at this moment as the distance calibration. When the signal levels output by the left and right two infrared receiving heads IC3 and IC4 are consistent and can remain unchanged for a considerable period of time, the control word at this time can be used as the standard distance calibration. Each control word corresponds to an actual distance.
4. 3 Detection of the driver's head deviating from the normal position
If an infrared receiving head does not receive the infrared signal, it is determined that the distance between this infrared receiving head and the driver's head is greater than the distance associated with the control word at this time.
The information output by the two infrared receiving heads respectively reflects the distance between the driver's head and the two infrared receiving heads at the same time. By comparing with the standard distance, it can be determined whether the driver's head is in the normal position or tilted forward, sideways, or backward. Whether to output the alarm and brake control level is determined by the computer program according to the duration after the driver's head deviates from the normal position.
5 Experimental results analysis
The detector was installed on cars such as Jetta and Swift and a large number of experiments were conducted. The normal driving state and fatigue driving state of 5 drivers were tested. The test data are shown in Table 1. It can be seen that the detector can track and judge the fatigue state of the tester in real time, and also serve as a warning for the improper sitting posture of drunk driving.
6 Conclusion
The detector completes the recognition of whether the driver's head position is normal or not, and then judges whether the driver is driving fatigued. It is an intelligent application of simple technology. The detector can be equipped with existing cars at a low cost, improve the safety probability, and facilitate large-scale promotion. The market demand potential is huge.
Previous article:AVR learning air conditioner infrared remote control code
Next article:Design of Taxi Dispatch Center System Based on ATmega128
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Have fun at work!
- What are the integrated development environments that support RISC-V?
- How to rotate components and modules in Allegro software?
- I would like to ask about the phase relationship of the all-pass response
- 【Chuanglong TL570x-EVM】HELLO_WORLD of python!
- Help!!! Insufficient stall current!
- Operational amplifier stability analysis problem
- 【NXP Rapid IoT Review】+ My Review Summary
- VHDL Introduction. Questions and Answers. Classic Examples. Experience Summary
- ROM and RAM How does the microcontroller execute step by step after power is turned on?