A system and method for preventing falling and avoiding danger when getting off a vehicle by using a single-chip microcomputer and a relay to control a central locking system based on ultrasonic ranging

By introducing ultrasonic distance measurement and relay control to the vehicle, the problem that the existing technology cannot effectively ensure the safety of getting off the vehicle is solved, and the accurate judgment and early warning of the ground conditions of the door-to-door landing area is achieved, which reduces the Risk of falling.

CN115016350BActive Publication Date: 2024-11-29NANJING TECH UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202210682986.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-16
Publication Date
2024-11-29
Estimated Expiration
2042-06-16

AI Technical Summary

Technical Problem

The existing vehicles lack effective anti-fall and risk avoidance system when traveling, and cannot accurately judge the ground conditions, resulting in the risk of falling and spraining when people get off the vehicle. The existing ranging technology is only aimed at obstacles around the door and cannot be guaranteed. Safety of ground conditions.

Method used

Design a central control lock-off-risk system based on ultrasonic ranging and relay control, and the anti-fall-avoiding system of central control lock-off-risk-avoiding is expanded by combining ultrasonic sensors and PM-type stepper motors to expand the measurement range and improve data accuracy. The microcontroller performs signal processing and data analysis. , determine the difference in the depth relative to the horizontal height of the door landing area. If it exceeds 10cm, an alarm will be issued and the door will be locked.

Benefits of technology

Accurate judgment on the ground conditions of the door area where the car door is settled, timely warnings are issued and protective measures are taken to reduce the risk of falling and spraining when getting off the car, and improve travel safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115016350B_ABST
    Figure CN115016350B_ABST
Patent Text Reader

Abstract

A system and method for preventing falling when getting off a vehicle and avoiding danger by controlling a central locking system with a single-chip microcomputer and a relay based on ultrasonic ranging, belonging to the field of vehicle safety. Due to the existence of potholes on the road, and the existing vehicle ranging technology only assists the driver in operating the vehicle during driving or parking, it does not fully consider the risk of people not paying attention to the ground conditions when getting off the vehicle, causing tripping and spraining. In this regard, the present invention proposes a system and method for preventing falling when getting off a vehicle and avoiding danger by controlling a central locking system with a single-chip microcomputer and a relay based on ultrasonic ranging, including two subsystems, a single-chip microcomputer control system and a central locking avoidance control system. While using the single-chip microcomputer and the relay for combined control, the ultrasonic sensor is matched with a half-step drive PM type stepper motor to convert the measurement range, thereby expanding the measurement range and improving the data accuracy, that is, the system can accurately judge whether the ground conditions in the landing area are prone to causing people to trip or sprain their feet, and make corresponding avoidance measures and early warning prompts.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a method for controlling a vehicle-getting-off anti-falling and risk-avoiding system of a central locking system by a single-chip microcomputer and a relay based on ultrasonic distance measurement, and belongs to the field of vehicle safety. Background Art

[0002] According to the various news collected and summarized about safety hazards during vehicle travel, we know that due to unclear road conditions, uneven ground, potholes and other road problems, people often fall and get injured when getting off the vehicle. In addition, the distance measurement technology currently used in daily vehicles only focuses on real-time distance measurement for reversing and other operational assistance to the driver during vehicle driving or parking, and does not fully consider the risk of people in the car not paying attention to the ground conditions in time when getting off the car and tripping or spraining due to deep pits or convex slopes. Therefore, there is an urgent need for a fall prevention and risk avoidance system for getting off the vehicle that can respond to the ground conditions of the car parking place automatically according to the situation, thereby expanding the scope of safety protection for people during vehicle travel.

[0003] At present, the application of distance measurement technology in daily vehicle travel on the market is still insufficient, and it cannot effectively solve the problem of preventing falls and avoiding risks when getting off the vehicle. For example, CN201420763744.4 is a vehicle door opening warning device, which uses an ultrasonic ranging sensor, a buzzer and an LED light to connect to a single-chip computer, and can determine whether the distance between the door and the obstacle outside the door is a safe distance, so that the driver and passengers in the car can be given a safety warning when opening the door and getting off the car. However, this warning device only considers the situation of obstacles on a certain plane around the door and the door, and the analysis range is one-sided. It does not have the conditions to measure the height difference between the ground condition and the relative horizontal plane, and cannot ensure the safety of people getting off the car; for example, CN202021330204.9 is a safety warning system for vehicle door opening. The system uses an ultrasonic ranging and speed measurement module located on the vehicle to monitor the surroundings of the vehicle. When a vehicle or pedestrian passes near the vehicle, the warning unit can remind the driver, so that the driver can observe the situation around the vehicle before opening the vehicle. However, this warning system only reminds the driver during the vehicle startup process, and does not take into account the safety judgment of the ground condition when people get off the vehicle.

[0004] The present invention designs a method for controlling a vehicle-exiting anti-fall and risk avoidance system of a central locking system using a single-chip microcomputer and a relay based on ultrasonic ranging. The system uses a combination of a single-chip microcomputer and a relay for control, and a central locking control circuit of a vehicle door and a relay work in coordination, which is centrally controlled by the single-chip microcomputer to ensure that the system works quickly. The system matches an ultrasonic sensor with a half-step driven PM stepper motor to convert the measurement range, expands the measurement range and improves data accuracy as needed, so that the results obtained by the single-chip microcomputer through signal processing and data analysis are more in line with the actual situation, that is, the system can accurately judge whether the depth (height) of a door landing area relative to the surrounding horizontal height reaches the risk of causing a person to trip or twist his foot due to not paying attention to the ground conditions of the landing area, and accordingly make corresponding avoidance measures and early warning prompts, thereby more comprehensively ensuring people's travel safety. Summary of the invention

[0005] The present invention provides a method for controlling a central locking vehicle anti-fall avoidance system based on ultrasonic ranging using a single-chip microcomputer and a relay, which is composed of two parts: a single-chip microcomputer control system and a central locking vehicle avoidance control system.

[0006] The single-chip control system is composed of an ultrasonic emission and echo circuit, a steering circuit, a clock circuit, an early warning circuit, a self-starting circuit, and an automatic and manual reset circuit; an ultrasonic sensor 21 and a PM type stepping motor 30 are externally connected, and the GND port 4 of the single-chip computer 9 is grounded;

[0007] The ultrasonic emission and echo circuit is composed of an ultrasonic sensor 21, a single-chip computer 9, a pulse transformer 12, a Q2 transistor 11, a D1 diode 20, a D2 diode 19, a D3 diode 15, a D4 diode 16, a C3 capacitor 22, an R2 resistor 10, an R3 resistor 18, an R4 resistor 17, an R5 resistor 13, an ultrasonic amplification and shaping circuit 23, a 5V power supply 28, and a 12V power supply 14; the single-chip computer P3.3 port 2 is connected through the R2 resistor 10, the Q2 transistor 11 and the pulse transformer 12, and the Q2 The emitter of the transistor 11 is grounded, the right coil of the pulse transformer 12 is connected to the 12V power supply 14 through the R5 resistor 13, the left coil of the pulse transformer 12 is connected to the IN interface 24 of the ultrasonic amplifying and shaping circuit 23 through the parallel D3 diode 15 and D4 diode 16, the R3 resistor 18, the R4 resistor 17, the parallel D2 diode 19 and D1 diode 20, and the C3 capacitor 22, the OUT interface 26 of the ultrasonic amplifying and shaping circuit 23 is connected to the P3.4 port 3 of the single-chip computer, the VCC interface 27 of the ultrasonic amplifying and shaping circuit 23 is connected to the 5V power supply 28, and the GND interface 25 of the ultrasonic amplifying and shaping circuit 23 is grounded;

[0008] The steering circuit is composed of a single chip microcomputer 9 and a PM type stepper motor 30; the single chip microcomputer P3.3 port 2 is connected to the PM type stepper motor 30 through a pulse modulation 29;

[0009] The clock circuit is composed of a single-chip computer 9, a Y1 quartz crystal oscillator 31, a C1 fine-tuning capacitor 32, and a C2 fine-tuning capacitor 33; the two ends of the Y1 quartz crystal oscillator 31 are connected across the XTAL2 port 7 and the XTAL1 port 6 of the single-chip computer 9, the C1 fine-tuning capacitor 32 and the C2 fine-tuning capacitor 33 are connected to the two ends of the Y1 quartz crystal oscillator 31 respectively, and the XTAL1 port 6 of the single-chip computer 9 is grounded;

[0010] The early warning circuit is composed of a single-chip microcomputer 9, an R1 resistor 35, a Q1 transistor 36, an MK1 buzzer 38, and a 5V power supply 37; the P3.7 port 5 of the single-chip microcomputer 9 is connected to the base of the Q1 transistor 36 through the R1 resistor 35, the collector of the Q1 transistor 36 is connected to the MK1 buzzer 38, the emitter of the Q1 transistor 36 is connected to the 5V power supply 37, the P3.7 port 5 of the single-chip microcomputer 9 is connected to the A1 circuit interface 34, and the MK1 buzzer 38 is grounded;

[0011] The self-starting circuit is composed of a single-chip microcomputer 9, a SPDT1 single-pole double-throw switch 39, a K1 relay 43, a D5 diode 44, a Q3 transistor 46, an R6 resistor 47, a 5V power supply 45, and a 5V power supply 49; the VCC port 8 of the single-chip microcomputer 9 is connected to the moving end 40 of the SPDT1 single-pole double-throw switch 39, the fixed end ②41 of the SPDT1 single-pole double-throw switch 39 is connected to the 5V power supply 49, the fixed end ①42 of the SPDT1 single-pole double-throw switch 39 is grounded, the K1 relay 43 is connected in parallel with the D5 diode 44 and connected to the collector of the Q3 transistor 46, the cathode of the D5 diode 44 is connected to the 5V power supply 45, the base of the Q3 transistor 46 is connected to the A2 circuit interface 48 through the R6 resistor 47, and the emitter of the Q3 transistor 46 is grounded;

[0012] The automatic and manual reset circuit is composed of a single-chip microcomputer 9, a C4 capacitor 50, an R13 resistor 51, an R7 resistor 70, an R8 resistor 67, an R14 resistor 100, an SPDT2 single-pole double-throw switch 52, an SPDT3 single-pole double-throw switch 56, a K2 relay 62, a D6 diode 63, a Q4 transistor 65, a Q5 transistor 66, an S1 reset switch 69, a 5V power supply 49, a 5V power supply 64, and a 5V power supply 68; the 5V power supply 49 is connected to the RST port 1 of the single-chip microcomputer 9 through the C4 capacitor 50, the lower end of the R13 resistor 51 is grounded, the left end of the C4 capacitor 50 is connected to the moving end 53 of the SPDT2 single-pole double-throw switch 52, and the right end is connected to the fixed end ① 55 of the SPDT2 single-pole double-throw switch 52, and the SPDT2 single-pole double-throw switch 52 is grounded. The fixed end ②54 of the double-throw switch 52 is grounded, the moving end 57 of the SPDT3 single-pole double-throw switch 56 is connected to the A3 circuit interface 61, the fixed end ②58 is connected to the A4 circuit interface 60, and the fixed end ①59 is grounded, the SPDT2 single-pole double-throw switch 52, the SPDT3 single-pole double-throw switch 56 and the K2 relay 62 are connected, the K2 relay 62 is connected in parallel with the D6 diode 63 and connected to the collector of the Q4 transistor 65, the cathode of the D6 diode 63 is connected to the 5V power supply 64, the emitter of the Q4 transistor 65 is grounded, the 5V power supply 68 is connected to the base of the Q5 transistor 66 through the S1 reset switch 69 and the R7 resistor 70, the 5V power supply 68 is connected to the emitter of the Q5 transistor 66, the collector of the Q5 transistor 66 is connected to the base of the Q4 transistor 65 through the R14 resistor 100, and is grounded through the R8 resistor 67;

[0013] The central lock avoidance control system consists of a door lock steering circuit and a avoidance steering control circuit;

[0014] The door lock steering circuit is composed of a DC power supply 71, a SPDT5 single-pole double-throw switch 76, a SPDT6 single-pole double-throw switch 73, and a DC motor 80; the positive pole of the DC power supply 71 is connected to the moving end 72 of the SPDT6 single-pole double-throw switch 73, the negative pole is connected to the moving end 77 of the SPDT5 single-pole double-throw switch 76, the fixed end ②74 of the SPDT6 single-pole double-throw switch 73 is connected to the upper part of the DC motor, the fixed end ①75 of the SPDT6 single-pole double-throw switch 73 is connected to the lower part of the DC motor, the fixed end ②79 of the SPDT5 single-pole double-throw switch 76 is connected to the lower part of the DC motor 80, and the fixed end ①78 of the SPDT5 single-pole double-throw switch 76 is connected to the upper part of the DC motor 80;

[0015] The pre-danger steering control circuit is composed of K3 relay 81, K4 relay 95, D7 diode 82, D8 diode 97, Q6 transistor 90, Q7 transistor 83, Q8 transistor 98, R9 resistor 93, R10 resistor 94, R11 resistor 85, R12 resistor 99, SPDT4 single-pole double-throw switch 86, S2 central locking switch 92, 5V power supply 84, 5V power supply 91, and 5V power supply (96); K3 relay 81 is connected in parallel with D7 diode 82 and connected to the collector of Q7 transistor 83, 5V power supply 84 is connected to the cathode of D7 diode 82, 5V power supply 91 is connected to the base of Q6 transistor 90 through S2 central locking switch 92 and R9 resistor 93, 5V power supply 91 is connected to the emitter of Q6 transistor 90, and the collector of Q6 transistor 90 is connected to A2 circuit interface 48, SPDT4 The moving end 89 of the single-pole double-throw switch 86 is connected and grounded through the R10 resistor 94, the fixed end ①87 of the SPDT4 single-pole double-throw switch 86 is grounded, the fixed end ②88 of the SPDT4 single-pole double-throw switch 86 is connected to the Q7 transistor 83 through the R11 resistor 85, and the emitter end of the Q7 transistor 83 is grounded, the SPDT4 single-pole double-throw switch 86 is connected to the K4 relay 95, the K4 relay 95 is connected in parallel with the D8 diode 97 and connected to the collector of the Q8 transistor 98, the 5V power supply 96 is connected to the cathode of the D8 diode 97, the A4 circuit interface 60 is connected to the base of the Q8 transistor 98 through the R12 resistor 99, and the emitter of the Q8 transistor 98 is grounded, and the A1 circuit interface 34 is connected to the A3 circuit interface 61.

[0016] The ultrasonic sensor 21 is a sealed ultrasonic sensor EFR40RS that integrates transmission and reception.

[0017] The model of single chip computer 9 is AT89C2151.

[0018] The ultrasonic amplifying and shaping circuit 23 is an integrated circuit CX20106A, which is used to amplify ultrasonic electrical signals.

[0019] The Y1 quartz crystal oscillator 31 has an accuracy of 12 MHz.

[0020] The Q1 transistor 36 , the Q5 transistor 66 , and the Q6 transistor 90 are of PNP type, and the Q2 transistor 11 , the Q3 transistor 46 , the Q4 transistor 65 , the Q7 transistor 83 , and the Q8 transistor 98 are of NPN type.

[0021] In the clock circuit, the oscillation signal of the Y1 quartz crystal oscillator 31 is sent from the XTAL2 port (7) of the single-chip microcomputer 9 to the internal clock circuit of the single-chip microcomputer 9, generating a two-phase clock signal P1, P2 for use by the single-chip microcomputer.

[0022] The main flow of the system is that in the single-chip control circuit, the single-chip 9 system is initialized, the internal T0 timer of the single-chip 9 works, and the T0 timer is set to 3ms, that is, the total duration of the ultrasonic sensor 21 measuring the ground depth (height) within an angle range is 3ms. The single-chip 9 transmits 58 groups of pulse excitations with a time interval of 3ms to the commutation circuit and the ultrasonic emission and echo receiving circuit, driving the ultrasonic sensor 21 to emit and receive ultrasonic waves, and the commutation device PM type stepper motor 30 changes the measurement range of the ultrasonic sensor 21. The measurement range of the ultrasonic sensor 21 is initially determined to be a rectangular area 2m away from the door, and the rectangular area 0.75m away from the door is the passenger foothold range; after calculation, the PM stepper motor 30 realizes two ranges of steering angles, the total steering angle θ1 of the foothold range is 25.2°, and the total steering angle θ2 of the ultrasonic sensor 21 measurement range is 51.35°, so that the PM stepper motor 30 works with half-step drive, that is, the number of steerings to reach the steering angle θ1 is i=28, and the number of steerings to reach the steering angle θ2 is i=58; and the height of the general car body H=1.6m; the emitted ultrasonic wave forms a reflected wave after hitting the ground, and is transmitted back through the transceiver-integrated enclosed ultrasonic sensor 21 The echo signals are transmitted to the single chip control circuit through the ultrasonic amplification and shaping circuit 23 for signal processing and data analysis, and the return time t and the number of pulses m of each pulse received in each group are calculated respectively. i , and calculate the depth (height) of each pulse return position relative to the horizontal plane, and then calculate the average depth (height) of each group of data and store it in the single-chip microcomputer 9; when 58 groups of measurement work are completed, read and process the data stored in the single-chip microcomputer 9, take the foothold range, i.e. the first 28 groups, and the measurement range, i.e. the total 58 groups of average depth (height) data H1, H2, if the absolute value of the difference between the two is greater than or equal to 10cm, the foothold area is in a depth (height) difference with the horizontal plane where the vehicle is located. It is determined that the ground condition of the door foothold area has the risk of people tripping easily, and the single-chip microcomputer control circuit sends a signal to connect the sound alarm circuit and the vehicle central locking circuit controlled by the relay, so that the buzzer sounds an alarm and locks the door; when the personnel are aware of the hidden dangers of the foothold area, the S1 reset switch 69 can be used to control the relay to control the buzzer alarm to close and open the door.

[0023] The coordinated control of AT89C2151 single chip microcomputer and relay is used.

[0024] When the K1 relay 43 is not energized, the moving end 40 of the SPDT1 single-pole double-throw switch 39 and the fixed end ②42 are normally closed and the fixed end ①41 is normally open; when the K2 relay 62 is not energized, the moving end 53 of the SPDT2 single-pole double-throw switch 52 and the fixed end ②54 are normally closed and the fixed end ①55 is normally open, and the moving end 57 of the SPDT3 single-pole double-throw switch 56 and the fixed end ②58 are normally closed and the fixed end ①59 is normally open; when the K3 relay 81 is not energized, the moving end 77 of the SPDT5 single-pole double-throw switch 76 and the fixed end ②79 are normally closed and the fixed end ①78 is normally open, and the moving end 72 of the SPDT6 single-pole double-throw switch 73 and the fixed end ②74 are normally closed and the fixed end ①75 is normally open; when the K4 relay 95 is not energized, the moving end 89 of the SPDT4 single-pole double-throw switch 86 and the fixed end ②88 are normally closed and the fixed end ①87 is normally open;

[0025] When the S2 central lock switch 92 is closed, the 5V power supply 91 outputs a low level at the collector of the Q6 transistor 90 through the level conversion circuit composed of the R9 resistor 93, the Q6 transistor 90, and the R10 resistor 94. The low level is respectively input to the A2 circuit interface 48 and to the base of the Q7 transistor 83 through the SPDT4 single-pole double-throw switch 86 and the R11 resistor 85. The R11 resistor 85 is a current limiting resistor. The Q7 transistor 83 is turned on, the K3 relay 81 is energized, and the moving end 77 of the SPDT5 single-pole double-throw switch 76 is immediately disconnected from the fixed end ②79 and closed with the fixed end ①78. S The moving end 72 of the PDT6 single-pole double-throw switch 73 is immediately disconnected from the fixed end ②74 and closed with the fixed end ①75, and the positive and negative poles of the DC motor 80 are reversed. The upper end of the DC motor 80 is connected to the negative pole and the lower end is connected to the positive pole. The DC motor 80 turns and the door is in the open state; the low level is transmitted from the A2 circuit interface 48 to the base of the Q3 transistor 46 through the R6 resistor 47. The R6 resistor 47 is a current limiting resistor. The Q3 transistor 46 is turned on, and the K1 relay 43 is energized. The moving end 40 of the SPDT1 single-pole double-throw switch 39 is immediately closed with the fixed end ①41 and disconnected from the fixed end ②42. The 5V power supply 49 is turned on with the VCC port 8 of the single-chip microcomputer, and the single-chip microcomputer starts to work;

[0026] The P3.3 port 2 of the single-chip microcomputer outputs a series of 40kHz pulse voltages, which are sent to the ultrasonic emission and echo circuit and the steering circuit, and the T0 timer works at the same time; in the steering circuit, the 40kHz pulse voltage is converted into 400Hz through pulse modulation 29, so that the PM stepper motor 30 works with half-step drive, and the P3.3 port emits a pulse every 3ms, and the PM stepper motor 30 rotates 0.9° every 3ms, that is, the ultrasonic sensor 21 connected to the PM stepper motor switches the measurement range every 3ms; in the ultrasonic emission and echo circuit, the 40kHz pulse voltage is added to the base of the Q2 transistor 11 through the R2 resistor 10, and is boosted to about 100VP-P through the pulse transformer 12, driving the EFR40RS ultrasonic sensor 21 to emit ultrasonic waves, the R3 resistor 18 is a current limiting resistor, and the R4 resistor 17 is a pull-down resistor; the reflected ultrasonic wave passes through the original transceiver-integrated enclosed ultrasonic sensor 21 The signal is converted into a series of pulse signals of millivolt level, and the D3 diode (15) and the D4 diode 16 are cut off. The signal will not form a short circuit through the secondary coil of the pulse transformer 12. The D1 diode 20 and the D2 diode 19 are also cut off. The R3 resistor 18, the D1 diode (20) and the D2 diode 19 form a bidirectional limiting circuit to prevent the large signal during transmission from blocking or even damaging the ultrasonic electric signal amplifying and shaping circuit 23. The echo pulse signal is transmitted to the IN port 24 of the ultrasonic electric signal amplifying and shaping circuit 23 through the R3 resistor 18 and the C3 capacitor 22. After the echo pulse signal is amplified and shaped, its OUT port 26 outputs a negative pulse voltage to the P3.4 port 3 of the single chip computer 9; at the same time, the internal program of the single chip computer 9 accumulates the number of pulses m i (i=58) and calculate the return time t of each negative pulse voltage, through Calculate the position of each pulse return and the depth (height) relative to the horizontal plane, and store them in the RAM memory of the single-chip microcomputer 9; when the P3.4 port 3 of the single-chip microcomputer 9 does not receive any more negative pulse voltage, the total number of times i is accumulated by 1, and the current m in RAM is retrieved. i depth (height) data S, and through The average depth (height) of the position measured at each measuring angle is obtained and stored in the RAM memory of the single-chip microcomputer 9; when the number i accumulates to 58, the T0 timer ends its work, and the first 28 groups of average depth (height) data of the internal RAM memory of the single-chip microcomputer 9 are retrieved, and based on Take the average depth (height) of the first 28 groups of measurement ranges, i.e. the landing area, and retrieve 58 groups of average depth (height) data from the internal RAM memory of the single chip computer 9, and calculate the average depth (height) of the foothold according to the following formula: Take all 58 groups of measurement ranges, that is, the average depth (height) of the measurement area of ​​the ultrasonic sensor 21. If |H1-H2|≥10cm, the P3.7 port 5 of the single-chip microcomputer 9 outputs a low level; otherwise, it outputs a high level.

[0027] If the P3.7 port 5 outputs a high level, the high level is respectively input to the A1 circuit interface 34 and to the base of the Q1 transistor 36 through the R1 resistor 35, the Q1 transistor 36 is not conducting, and the MK1 buzzer 38 does not work; the high level is input from the A1 circuit interface 34 to the base of the Q8 transistor 98 through the R12 resistor 99, the Q8 transistor 98 is not conducting, the K4 relay 95 is in a non-energized state, the moving end 89 and the fixed end ②88 of the SPDT4 single-pole double-throw switch 86 are still in a closed state, and the K3 relay 81 is still in a powered state, that is, the upper end of the DC motor 80 is connected to the negative pole and the lower end is connected to the positive pole, the DC motor 80 is turned, and the car door is still in an open state;

[0028] If the P3.7 port 5 outputs a low level, the low level is respectively input to the A1 circuit interface 34 and to the base of the Q1 transistor 36 through the R1 resistor 35. The R1 resistor 35 is a current limiting resistor. The Q1 transistor 36 is turned on, the buzzer is powered on, starts working, and generates a buzzer; the low level is input from the A1 circuit interface 34 to the base of the Q8 transistor 98 through the R12 resistor 99. The R12 resistor 99 is a current limiting resistor. The Q8 transistor 98 is turned on, the K4 relay 95 is energized, the moving end 89 of the SPDT4 single-pole double-throw switch 86 is immediately closed with the fixed end ①87 and disconnected with the fixed end ②88. At this time, the K3 relay 81 changes from energized to non-energized state, the moving end 77 of the SPDT5 single-pole double-throw switch 76 is reset and closed with the fixed end ②79 and reset and disconnected with the fixed end ①78, and the SPDT6 The moving end 72 of the single-pole double-throw switch 73 and the fixed end ②74 are reset and closed, and the fixed end ①75 is reset and disconnected, and the positive and negative poles of the DC motor 80 are reversed. The upper end of the DC motor 80 is connected to the positive pole and the lower end is connected to the negative pole. The DC motor 80 is turned, and the door is locked;

[0029] When the S1 reset switch 69 is closed, the 5V power supply 68 outputs a low level at the collector of the Q5 transistor 66 through the level conversion circuit composed of the R7 resistor 70, the Q5 transistor 66, and the R8 resistor 67. The low level is transmitted to the base of the Q4 transistor 65 through the R14 resistor 100. The R14 resistor 100 is a current limiting resistor. The Q4 transistor 65 is turned on, the K2 relay 62 is energized, the moving end 53 of the SPDT2 single-pole double-throw switch 52 is immediately disconnected from the fixed end ②54 and closed with the fixed end ①55, the moving end 57 of the SPDT3 single-pole double-throw switch 56 is immediately disconnected from the fixed end ②58 and closed with the fixed end ①59, the 5V power supply 49 is connected to the PST port (1) of the single-chip computer 9, the system is reset, the P3.7 port 5 of the single-chip computer 9 outputs a high level again, and the MK1 buzzer 38 The circuit interface A3 and the circuit interface A4 are disconnected, the transistor Q8 and the transistor 98 are not conducting, the relay K4 and the relay 95 are changed from energized to de-energized state, the moving end 89 and the fixed end ②88 of the SPDT4 single-pole double-throw switch 86 are reset and closed and the fixed end ① 87 is reset and disconnected, the low level of the 5V power supply 91 is sent through the level conversion circuit and is re-input to the base of the transistor Q7, that is, the relay K3 and the relay 81 are changed from de-energized to energized state, the moving end 77 and the fixed end ②79 of the SPDT5 single-pole double-throw switch 76 are immediately disconnected and closed with the fixed end ①78, the moving end 72 and the fixed end ②74 of the SPDT6 single-pole double-throw switch 73 are immediately disconnected and closed with the fixed end ① 75, the positive and negative poles of the DC motor 80 are reversed, the upper end of the DC motor 80 is connected to the negative pole and the lower end is connected to the positive pole, the DC motor 80 is turned, and the door is in the open state;

[0030] When a person presses the S2 central locking switch 92 of the vehicle, the system connects the power supply of the central locking pre-risk system within the time unit of ms to make it work, and determines the depth (height) of the door landing area through signal processing and data analysis; if the situation is determined to be a risk of tripping, the system will sound an alarm and the door will be locked immediately; when the person knows that there is a risk in the landing area through the system, he presses the S1 reset switch 69, the alarm stops, and the door opens;

[0031] With the assistance of this system, people can improve the condition of the landing area when getting off the vehicle, and can promptly avoid the risk of falling or spraining the ankle due to failure to pay attention to deep pits and bumps, thereby ensuring travel safety. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 It is the main flow chart of the system of the present invention.

[0033] Figure 2 It is a flow chart of the system data processing link of the present invention.

[0034] Figure 3 The schematic diagram of the single chip microcomputer control system circuit of the present invention.

[0035] Figure 3 The label names are as follows: 1. MCU RST port, 2. MCU P3.3 port, 3. MCU P3.4 port, 4. MCU GND port, 5. MCU P3.7 port, 6. MCU XTAL1 port, 7. MCU XTAL2 port, 8. MCU VCC port, 9. MCU, 10. Resistor R10, 11. Transistor Q2, 12. Pulse transformer, 13. R5 resistor, 14. +12V power supply, 15. D3 diode, 16. D4 diode, 17. R4 resistor, 18. R3 resistor, 19. D2 diode, 20. D1 diode, 21. Ultrasonic sensor, 22. C3 capacitor, 23. Ultrasonic amplification and shaping circuit, 24. Ultrasonic amplification and shaping circuit IN interface, 25. Ultrasonic amplification and shaping circuit GND interface, 26. Ultrasonic amplification and shaping circuit OUT interface, 27. Ultrasonic amplification and shaping circuit VCC interface, 28. +5V power supply, 29. Pulse modulation, 30. PM stepping motor, 31. Quartz crystal oscillator Y1, 32. C1 capacitor, 33. C2 capacitor, 34. A1 circuit interface, 35. Resistor R1, 36. Transistor Q1, 37. +5V power supply, 38. Buzzer MK1, 39. Single-pole double-throw switch SPDT1, 40. Single-pole double-throw switch SPDT1 moving end, 41. Single-pole double-throw switch SPDT1 fixed end ①, 42. Single-pole double-throw switch SPDT1 fixed end ②, 43. Relay K1, 44. Diode D5, 45. +5V power supply, 46. Transistor Q3, 47. Resistor R6, 48. A2 circuit interface, 49. +5V Power supply, 50. C4 capacitor, 51. Resistor R13, 52. Single-pole double-throw switch SPDT2, 53. Moving end of single-pole double-throw switch SPDT2, 54. Fixed end ② of single-pole double-throw switch SPDT2, 55. Fixed end ① of single-pole double-throw switch SPDT2, 56. Single-pole double-throw switch SPDT3, 57. Moving end of single-pole double-throw switch SPDT3, 58. Fixed end ② of single-pole double-throw switch SPDT3, 59. Fixed end ① of single-pole double-throw switch SPDT3, 60. A4 circuit interface, 61. A3 circuit interface, 62. Relay K2, 63. Diode D6, 64. +5V power supply, 65. Transistor Q4, 66. Transistor Q5, 67. Resistor R8, 68. +5V power supply, 69. Reset switch S1, 70. Resistor R7, 100. Resistor R14.

[0036] Figure 4 The schematic diagram of the central locking risk avoidance control system of the present invention is shown in FIG.

[0037] Figure 4The label names in the code are: 34. A1 circuit interface, 60. A4 circuit interface, 61. A3 circuit interface, 71. DC power supply, 72. Moving end of single-pole double-throw switch SPDT6, 73. Single-pole double-throw switch SPDT6, 74. Fixed end ② of single-pole double-throw switch SPDT6, 75. Fixed end ① of single-pole double-throw switch SPDT6, 76. Single-pole double-throw switch SPDT5, 77. Single-pole double-throw switch SPDT5 , 78. The fixed end of the single-pole double-throw switch SPDT5 ①, 79. The fixed end of the single-pole double-throw switch SPDT5 ②, 80. DC motor, 81. Relay K3, 82. Diode D7, 83. Transistor Q7, 84. +5V power supply, 85. Resistor R11, 86. Single-pole double-throw switch SPDT4, 87. The fixed end of the single-pole double-throw switch SPDT4 ①, 88. The fixed end of the single-pole double-throw switch SPDT4 ②, 89. The moving end of the single-pole double-throw switch SPDT4, 90. Transistor Q6, 91. +5V power supply, 92. Central locking switch S2, 93. Resistor R9, 94. Resistor R10, 95. Relay K4, 96. +5V power supply, 97. Diode D8, 98. Transistor Q8, 99. Resistor R12. DETAILED DESCRIPTION

[0038] like Figure 3 , Figure 4 As shown, a method for controlling a central locking system for preventing falling when getting off a vehicle based on a single-chip microcomputer and a relay for ultrasonic ranging is mainly composed of two parts: a single-chip microcomputer control system and a central locking system for avoiding falling. The following example of the vehicle and personnel getting off the vehicle after encountering safety risks and taking emergency measures by the system when there is no risk for personnel is used to illustrate the method of the present invention.

[0039] When the personnel presses the central lock switch 92 of the car door S2, the 5V power supply 91 outputs a low level at the collector of the Q6 transistor 90 through the level conversion circuit, and the low level is respectively input to the A2 circuit interface 48 and the base of the Q7 transistor 83 through the SPDT4 single-pole double-throw switch 86 and the R11 resistor 85. The Q7 transistor 83 is turned on, and the K3 relay 81 is energized. Through the SPDT5 single-pole double-throw switch 76 and the SPDT6 single-pole double-throw switch 73, the positive and negative poles connected to the DC motor 80 are reversed, and the upper end of the DC motor 80 is connected to the negative pole and the lower end is connected to the positive pole. The DC motor 80 turns, and the car door is in the open state; the low level is input from the A2 circuit interface 48 to the base of the Q3 transistor 46 through the R6 resistor 47. The Q3 transistor 46 is turned on, the K1 relay 43 is energized, and through the SPDT1 The single-pole double-throw switch 39 connects the 5V power supply 49 to the VCC port 8 of the microcontroller, and the microcontroller starts to work;

[0040] The P3.3 port 2 of the single-chip microcomputer 9 outputs a series of 40kHz pulse voltages, which are transmitted to the ultrasonic emission and echo circuit and the steering circuit to drive the EFR40RS ultrasonic sensor 21 to emit ultrasonic waves. After the ultrasonic waves contact the measuring ground, echo pulse signals are formed, which are amplified and shaped by the ultrasonic electrical signal amplification and shaping circuit 23 and then transmitted to the P3.4 port 3 of the single-chip microcomputer 9. At the same time, the internal program of the single-chip microcomputer 9 performs signal processing and data analysis on each echo pulse transmitted back from each measuring range. When the analysis is completed within the measuring range, the first 28 groups of average depth (height) data of the internal RAM memory of the single-chip microcomputer 9 are retrieved to obtain the average depth (height) H1 of the landing area, and the whole 58 groups of average depth (height) data of the internal RAM memory of the single-chip microcomputer 9 are retrieved to obtain the average depth (height) H2 of the measuring area of ​​the ultrasonic sensor 21. If |H1-H2|≥10cm, the P3.7 port 5 of the single-chip microcomputer 9 outputs a low level; otherwise, it outputs a high level.

[0041] If the P3.7 port 5 outputs a high level, it indicates that the landing area is not much different in depth (height) from the horizontal plane where the vehicle is located, and the ground conditions of the door landing area are within a safe range that is not easy to cause people to trip, and the system does not need to take emergency measures. The high level is respectively input to the A1 circuit interface 34 and to the base of the Q1 transistor 36 through the R1 resistor 35, the Q1 transistor 36 is not conducting, and the MK1 buzzer 38 does not work; the high level is input from the A1 circuit interface 34 to the base of the Q8 transistor 98 through the R12 resistor 99, the Q8 transistor 98 is not conducting, the K4 relay 95 is in a non-powered state, the moving end 89 and the fixed end ②88 of the SPDT4 single-pole double-throw switch 86 are still in a closed state, and the K3 relay 81 is still in a powered state, that is, the upper end of the DC motor 80 is connected to the negative pole and the lower end is connected to the positive pole, the DC motor 80 is turned, and the door is still in an open state, and people can get on and off the vehicle normally;

[0042] If the P3.7 port 5 outputs a low level, it indicates that the landing area is at a large depth (height) difference compared to the horizontal plane where the vehicle is located. The ground conditions in the door landing area are prone to tripping, and the system needs to take emergency measures. The low level is input to the A1 circuit interface 34 and to the base of the Q1 transistor 36 through the R1 resistor 35. The R1 resistor 35 is a current limiting resistor. The Q1 transistor 36 is turned on, and the buzzer is powered on and starts to work, producing a buzzer; the low level is input from the A1 circuit interface 34 to the base of the Q8 transistor 98 through the R12 resistor 99. The R12 resistor 99 is a current limiting resistor. The Q8 transistor 98 is turned on, and the K4 relay 95 is energized. The moving end 89 of the SPDT4 single-pole double-throw switch 86 is immediately closed with the fixed end ①87 and disconnected from the fixed end ②88. At this time, K3 The relay 81 changes from the energized state to the de-energized state, the moving end 77 of the SPDT5 single-pole double-throw switch 76 and the fixed end ②79 are reset and closed, and the fixed end ①78 is reset and disconnected, the moving end 72 of the SPDT6 single-pole double-throw switch 73 and the fixed end ②74 are reset and closed, and the fixed end ①75 is reset and disconnected, and the positive and negative poles of the DC motor 80 are reversed, the upper end of the DC motor 80 is connected to the positive pole, and the lower end is connected to the negative pole, the DC motor 80 is turned, and the door is locked; when the personnel know the safety risks in the landing area through the warning made by the system and the measures that force the door to be tightened and thus increase their physical alertness, they can open the S1 reset switch 69, so that the 5V power supply 68 passes through the level conversion circuit and is connected to the collector of the Q5 transistor 66 The electrode outputs a low level, which is transmitted to the base of the Q4 transistor 65 through the R14 resistor 100. The Q4 transistor 65 is turned on, the K2 relay 62 is energized, the moving end 53 of the SPDT2 single-pole double-throw switch 52 is immediately disconnected from the fixed end ②54 and closed with the fixed end ①55, the moving end 57 of the SPDT3 single-pole double-throw switch 56 is immediately disconnected from the fixed end ②58 and closed with the fixed end ①59, the 5V power supply 49 is connected to the PST port 1 of the single-chip microcomputer 9, the system is reset, the P3.7 port 5 of the single-chip microcomputer 9 outputs a high level again, the MK1 buzzer 38 does not work; the A3 circuit interface 61 is disconnected from the A4 circuit interface 60, the Q8 transistor 98 is not turned on, and the K4 relay 95 changes from the energized state to the unenergized state. The moving end 89 of the SPDT4 single-pole double-throw switch 86 is reset and closed with the fixed end ②88 and reset and disconnected with the fixed end ①87. The low level emitted by the 5V power supply 91 through the level conversion circuit is re-input to the base of the Q7 transistor 83, that is, the K3 relay 81 changes from an unpowered state to an energized state. The moving end 77 of the SPDT5 single-pole double-throw switch 76 is immediately disconnected from the fixed end ②79 and closed with the fixed end ①78. The moving end 72 of the SPDT6 single-pole double-throw switch 73 is immediately disconnected from the fixed end ②74 and closed with the fixed end ①75. The positive and negative poles of the DC motor 80 are swapped. The upper end of the DC motor 80 is connected to the negative pole and the lower end is connected to the positive pole. The DC motor 80 turns, the car door is reopened, and people can get off the car normally.

Claims

1. A method for controlling a central locking system for preventing falling when getting off a vehicle based on ultrasonic ranging using a single chip microcomputer and a relay, characterized in that: It consists of two parts: single chip microcomputer control system and central locking risk avoidance control system; The single-chip control system is composed of an ultrasonic emission and echo circuit, a steering circuit, a clock circuit, an early warning circuit, a self-starting circuit, and an automatic and manual reset circuit; an ultrasonic sensor (21) and a PM type stepping motor (30) are externally connected, and a GND port (4) of the single-chip computer (9) is grounded; The ultrasonic emission and echo circuit is composed of an ultrasonic sensor (21), a single chip computer (9), a pulse transformer (12), a transistor Q2 (11), a diode D1 (20), a diode D2 (19), a diode D3 (15), a diode D4 (16), a capacitor C3 (22), a resistor R2 (10), a resistor R3 (18), a resistor R4 (17), a resistor R5 (13), an ultrasonic amplification and shaping circuit (23), a first 5V power supply (28), and a 12V power supply (14); the single chip computer P3.3 port (2) is connected through the resistor R2 (10), the transistor Q2 (11) and the pulse transformer (12); the emitter of the transistor Q2 (11) is grounded, and the pulse transformer (12) The right coil is connected to a 12V power supply (14) through a resistor R5 (13); the left coil of the pulse transformer (12) is connected to an IN interface (24) of an ultrasonic amplifying and shaping circuit (23) through parallel diodes D3 (15) and D4 (16), resistors R3 (18), resistors R4 (17), parallel diodes D2 (19) and D1 (20), and capacitors C3 (22); the OUT interface (26) of the ultrasonic amplifying and shaping circuit (23) is connected to a P3.4 port (3) of a single-chip computer; the VCC interface (27) of the ultrasonic amplifying and shaping circuit (23) is connected to a first 5V power supply (28); and the GND interface (25) of the ultrasonic amplifying and shaping circuit (23) is grounded; The steering circuit is composed of a single chip microcomputer (9) and a PM type stepping motor (30); the single chip microcomputer P3.3 port (2) is connected to the PM type stepping motor (30) through pulse modulation (29); The clock circuit is composed of a single-chip computer (9), a quartz crystal oscillator Y1 (31), a fine-tuning capacitor C1 (32), and a fine-tuning capacitor C2 (33); two ends of the quartz crystal oscillator Y1 (31) are connected across the XTAL2 port (7) and the XTAL1 port (6) of the single-chip computer (9); the fine-tuning capacitor C1 (32) and the fine-tuning capacitor C2 (33) are connected to the two ends of the quartz crystal oscillator Y1 (31), respectively; and the XTAL1 port (6) of the single-chip computer (9) is grounded; The warning circuit is composed of a single chip microcomputer (9), a resistor R1 (35), a transistor Q1 (36), a buzzer MK1 (38), and a second 5V power supply (37); the P3.7 port (5) of the single chip microcomputer (9) is connected to the base of the transistor Q1 (36) through the resistor R1 (35), the collector of the transistor Q1 (36) is connected to the buzzer MK1 (38), the emitter of the transistor Q1 (36) is connected to the second 5V power supply (37), the P3.7 port (5) of the single chip microcomputer (9) is connected to the A1 circuit interface (34), and the buzzer MK1 (38) is grounded; The self-starting circuit is composed of a single-chip microcomputer (9), a single-pole double-throw switch SPDT1 (39), a relay K1 (43), a diode D5 (44), a transistor Q3 (46), a resistor R6 (47), a third 5V power supply (45), and a fourth 5V power supply (49); a VCC port (8) of the single-chip microcomputer (9) is connected to a moving end (40) of the single-pole double-throw switch SPDT1 (39), and a fixed end (2) of the single-pole double-throw switch SPDT1 (39) is connected to a VCC port (8) of the single-chip microcomputer (9). 41) is connected to a fourth 5V power supply (49), a fixed end ① (42) of a single-pole double-throw switch SPDT1 (39) is grounded, a relay K1 (43) is connected in parallel with a diode D5 (44) and connected to the collector of a transistor Q3 (46), a cathode of the diode D5 (44) is connected to a third 5V power supply (45), a base of the transistor Q3 (46) is connected to an A2 circuit interface (48) via a resistor R6 (47), and an emitter of the transistor Q3 (46) is grounded; The automatic and manual reset circuit comprises a single chip microcomputer (9), a capacitor C4 (50), a resistor R13 (51), a resistor R7 (70), a resistor R8 (67), a resistor R14 (100), a single pole double throw switch SPDT2 (52), a single pole double throw switch SPDT3 (56), a relay K2 (62), a diode D6 (63), a transistor Q4 (65), a transistor Q5 (66), a reset switch S1 (69), a fourth 5V power supply (49 ), a fifth 5V power supply (64), and a sixth 5V power supply (68); the fourth 5V power supply (49) is connected to the RST port (1) of the single-chip computer (9) through a capacitor C4 (50), the lower end of the resistor R13 (51) is grounded, the left end of the capacitor C4 (50) is connected to the moving end (53) of the single-pole double-throw switch SPDT2 (52), and the right end is connected to the fixed end ① (55) of the single-pole double-throw switch SPDT2 (52), and the single-pole double-throw switch SPDT2 (52) is connected to the moving end (53) of the single-pole double-throw switch SPDT2 (52). The fixed end ② (54) is grounded, the moving end (57) of the single-pole double-throw switch SPDT3 (56) is connected to the A3 circuit interface (61), the fixed end ② (58) is connected to the A4 circuit interface (60), the fixed end ① (59) is grounded, the single-pole double-throw switch SPDT2 (52), the single-pole double-throw switch SPDT3 (56) and the relay K2 (62) are connected, the relay K2 (62) is connected in parallel with the diode D6 (63) and connected to the collector of the transistor Q4 (65), the diode The cathode of the transistor D6 (63) is connected to the fifth 5V power supply (64), the emitter of the transistor Q4 (65) is grounded, the sixth 5V power supply (68) is connected to the base of the transistor Q5 (66) through the reset switch S1 (69) and the resistor R7 (70), the sixth 5V power supply (68) is connected to the emitter of the transistor Q5 (66), the collector of the transistor Q5 (66) is connected to the base of the transistor Q4 (65) through the resistor R14 (100) and is grounded through the resistor R8 (67); The central lock avoidance control system consists of a door lock steering circuit and a avoidance steering control circuit; The door lock steering circuit is composed of a DC power supply (71), a single-pole double-throw switch SPDT5 (76), a single-pole double-throw switch SPDT6 (73), and a DC motor (80); the positive electrode of the DC power supply (71) is connected to the moving end (72) of the single-pole double-throw switch SPDT6 (73), the negative electrode is connected to the moving end (77) of the single-pole double-throw switch SPDT5 (76), the fixed end ② (74) of the single-pole double-throw switch SPDT6 (73) is connected to the upper part of the DC motor, the fixed end ① (75) of the single-pole double-throw switch SPDT6 (73) is connected to the lower part of the DC motor, the fixed end ② (79) of the single-pole double-throw switch SPDT5 (76) is connected to the lower part of the DC motor (80), and the fixed end ① (78) of the single-pole double-throw switch SPDT5 (76) is connected to the upper part of the DC motor (80); The evasive steering control circuit comprises a relay K3 (81), a relay K4 (95), a diode D7 (82), a diode D8 (97), a transistor Q6 (90), a transistor Q7 (83), a transistor Q8 (98), a resistor R9 (93), a resistor R10 (94), a resistor R11 (85), a resistor R12 (99), a single-pole double-throw switch SPDT4 (86), a central locking switch S2 (92), a seventh 5V power supply (84), an eighth 5V The relay K3 (81) is connected in parallel with the diode D7 (82) and connected to the collector of the transistor Q7 (83). The seventh 5V power supply (84) is connected to the cathode of the diode D7 (82). The eighth 5V power supply (91) is connected to the base of the transistor Q6 (90) through the central locking switch S2 (92) and the resistor R9 (93). The eighth 5V power supply (91) is connected to the emitter of the transistor Q6 (90). The collector of the transistor Q6 (90) is connected to the emitter of the transistor Q6 (90). The electrode is connected to the A2 circuit interface (48) and the moving end (89) of the single-pole double-throw switch SPDT4 (86), and is grounded through a resistor R10 (94). The fixed end ① (87) of the single-pole double-throw switch SPDT4 (86) is grounded. The fixed end ② (88) of the single-pole double-throw switch SPDT4 (86) is connected to the transistor Q7 (83) through a resistor R11 (85). The emitter end of the transistor Q7 (83) is grounded. The single-pole double-throw switch SPDT4 (86) is connected to the relay K4. (95), the relay K4 (95) is connected in parallel with the diode D8 (97) and connected to the collector of the transistor Q8 (98), the ninth 5V power supply (96) is connected to the cathode of the diode D8 (97), the A4 circuit interface (60) is connected to the base of the transistor Q8 (98) through the resistor R12 (99), the emitter of the transistor Q8 (98) is grounded, and the A1 circuit interface (34) is connected to the A3 circuit interface (61); the model of the single chip computer (9) is AT89C2151.

2. The method of controlling the anti-fall and risk avoidance system for getting off a vehicle by using a single chip microcomputer and a relay based on ultrasonic ranging according to claim 1, characterized in that: The ultrasonic sensor (21) is a transceiver-integrated sealed ultrasonic sensor EFR40RS.

3. The method of controlling the anti-fall and risk avoidance system for getting off a vehicle by using a single chip microcomputer and a relay based on ultrasonic ranging according to claim 1, characterized in that: The ultrasonic amplification and shaping circuit (23) is an integrated circuit CX20106A, which functions to amplify ultrasonic electrical signals.

4. The method of controlling the anti-fall and risk avoidance system for getting off a vehicle by using a single chip microcomputer and a relay based on ultrasonic ranging according to claim 1, characterized in that: The quartz crystal oscillator Y1 (31) has an accuracy of 12MHz.

5. The method of controlling the anti-fall and risk avoidance system for getting off a vehicle by using a single chip microcomputer and a relay based on ultrasonic ranging according to claim 1, characterized in that: Transistor Q1 (36), transistor Q5 (66), and transistor Q6 (90) are of PNP type, and transistor Q2 (11), transistor Q3 (46), transistor Q4 (65), transistor Q7 (83), and transistor Q8 (98) are of NPN type.

6. The method of controlling the anti-fall and risk avoidance system for getting off a vehicle by using a single chip microcomputer and a relay based on ultrasonic ranging according to claim 1, characterized in that: In the clock circuit, the oscillation signal of the quartz crystal oscillator Y1 (31) is sent from the XTAL2 port (7) of the single-chip microcomputer (9) to the internal clock circuit of the single-chip microcomputer (9), generating a two-phase clock signal P1, P2 for use by the single-chip microcomputer.

7. The method of controlling the anti-fall and risk avoidance system for getting off a vehicle by using a single chip microcomputer and a relay based on ultrasonic ranging according to claim 1, characterized in that: The main flow of the system is as follows: in the single-chip control circuit, the single-chip (9) system is initialized, the internal T0 timer of the single-chip (9) works, and the T0 timer is set to time 3ms, that is, the total time length of the ultrasonic sensor (21) for measuring the ground depth within an angle range is 3ms; the single-chip (9) transmits 58 groups of pulse excitations with a time interval of 3ms to the commutation circuit and the ultrasonic emission and echo receiving circuit, drives the ultrasonic sensor (21) to emit and receive ultrasonic waves, and the commutation device PM type stepping motor (30) changes the measurement range of the ultrasonic sensor (21); the measurement range of the ultrasonic sensor (21) is initially set to be 2000 meters from the door. m, and the rectangular area 0.75m away from the door is the passenger foothold range; after calculation, the PM stepper motor (30) realizes two ranges of steering angles, the total steering angle θ1 of the foothold range is 25.2°, and the total steering angle θ2 of the ultrasonic sensor (21) measurement range is 51.35°, so that the PM stepper motor (30) works with half-step drive, that is, the number of steerings to achieve the steering angle θ1 is i=28, and the number of steerings to achieve the steering angle θ2 is i=58; and the height of a general car body H is 1.6m; the emitted ultrasonic wave forms a reflected wave after hitting the ground, and is transmitted back through the ultrasonic sensor (21) The echo signals are transmitted to the single chip control circuit through the ultrasonic amplification and shaping circuit (23) for signal processing and data analysis, and the return time t and the number of pulses m of each pulse received in each group are calculated respectively. i , and calculate the position of each pulse return and the depth relative to the horizontal plane, and then calculate the average depth of each group of data and store it in the single chip computer (9); when 58 groups of measurement work are completed, read and process the data stored in the single chip computer (9), take the foothold range, i.e. the first 28 groups, and the measurement range, i.e. the total 58 groups of average depth data H1, H2, if the absolute value of the difference between the two is greater than or equal to 10cm, the foothold area is in a depth difference with the horizontal plane where the vehicle is located, that is, it is determined that the ground condition of the door foothold area has the risk of people tripping easily, the single chip computer control circuit sends a signal, connects the sound alarm circuit and the vehicle central locking circuit controlled by the relay, so that the buzzer sounds an alarm and locks the door; when the personnel are aware of the hidden dangers of the foothold area, they can control the relay through the reset switch S1 (69) to control the buzzer alarm to turn off, and open the door.

8. The method of controlling the anti-fall and risk avoidance system for getting off a vehicle by using a single chip microcomputer and a relay based on ultrasonic ranging according to claim 7, characterized in that: The AT89C2151 single-chip microcomputer and relay are used for coordinated control; When the relay K1 (43) is not energized, the moving end (40) of the single-pole double-throw switch SPDT1 (39) and the fixed end ② (42) are normally closed and the fixed end ① (41) is normally open; when the relay K2 (62) is not energized, the moving end (53) of the single-pole double-throw switch SPDT2 (52) and the fixed end ② (54) are normally closed and the fixed end ① (55) is normally open, and the moving end (57) of the single-pole double-throw switch SPDT3 (56) and the fixed end ② (58) are normally closed and the fixed end ① (59) is normally open. When the relay K3 (81) is not energized, the moving end (77) of the single-pole double-throw switch SPDT5 (76) and the fixed end ② (79) are normally closed and the fixed end ① (78) is normally open, and the moving end (72) of the single-pole double-throw switch SPDT6 (73) and the fixed end ② (74) are normally closed and the fixed end ① (75) is normally open; when the relay K4 (95) is not energized, the moving end (89) of the single-pole double-throw switch SPDT4 (86) and the fixed end ② (88) are normally closed and the fixed end ① (87) is normally open; When the central locking switch S2 (92) is closed, the eighth 5V power supply (91) outputs a low level at the collector of the transistor Q6 (90) through the level conversion circuit composed of the resistor R9 (93), the transistor Q6 (90) and the resistor R10 (94). The low level is respectively input to the A2 circuit interface (48) and the base of the transistor Q7 (83) through the single-pole double-throw switch SPDT4 (86) and the resistor R11 (85). The resistor R11 (85) is a current limiting resistor. The transistor Q7 (83) is turned on, the relay K3 (81) is energized, the moving end (77) of the single-pole double-throw switch SPDT5 (76) is immediately disconnected from the fixed end ② (79) and closed with the fixed end ① (78), and the single-pole double-throw switch SPDT6 (73) is turned on. The moving end (72) and the fixed end (74) are immediately disconnected and closed with the fixed end (75), and the positive and negative poles of the DC motor (80) are reversed. The upper end of the DC motor (80) is connected to the negative pole and the lower end is connected to the positive pole. The DC motor (80) turns to the opposite direction and the door is in the open state; the low level is transmitted from the A2 circuit interface (48) to the base of the transistor Q3 (46) through the resistor R6 (47). The resistor R6 (47) is a current limiting resistor. The transistor Q3 (46) is turned on, the relay K1 (43) is energized, the moving end (40) and the fixed end (41) of the single-pole double-throw switch SPDT1 (39) are immediately closed and disconnected from the fixed end (42), the fourth 5V power supply (49) is connected to the VCC port (8) of the single-chip microcomputer, and the single-chip microcomputer starts to work; The P3.3 port (2) of the single chip microcomputer outputs a series of 40kHz pulse voltages, which are transmitted to the ultrasonic emission and echo circuit and the steering circuit, and the T0 timer works at the same time; in the steering circuit, the 40kHz pulse voltage is converted into 400Hz through pulse modulation (29), so that the PM type stepper motor (30) works with half-step drive, and the P3.3 port transmits a pulse every 3ms, and the PM type stepper motor (30) rotates 0.9° every 3ms, that is, the ultrasonic sensor (21) connected to the PM type stepper motor switches the measurement range every 3ms; in the ultrasonic emission and echo circuit, the 40kHz pulse voltage is added to the base of the transistor Q2 (11) through the resistor R2 (10), and is boosted to 100V through the pulse transformer (12). PP, the ultrasonic sensor (21) is driven to emit ultrasonic waves, the resistor R3 (18) is a current limiting resistor, and the resistor R4 (17) is a pull-down resistor; the reflected ultrasonic waves are converted into a series of pulse signals of millivolt level by the ultrasonic sensor (21), and the diodes D3 (15) and D4 (16) cut off the signals, and the signals will not form a short circuit through the secondary coil of the pulse transformer (12), and the diodes D1 (20) and D2 (19) also cut off the signals, and the resistors R3 (18) and D1 (2 0) and diode D2 (19) form a bidirectional limiting circuit to prevent the large signal during transmission from blocking or even damaging the ultrasonic amplification and shaping circuit (23). The echo pulse signal is transmitted to the IN interface (24) of the ultrasonic amplification and shaping circuit (23) through the resistor R3 (18) and the capacitor C3 (22). After the echo pulse signal is amplified and shaped, its OUT interface (26) outputs a negative pulse voltage to the P3.4 port (3) of the single-chip microcomputer (9); at the same time, the internal program of the single-chip microcomputer (9) accumulates the number of pulses m i , where i = 58, and calculate the return time t of each negative pulse voltage, through where θ = θ i , calculate the return position of each pulse and its depth relative to the horizontal plane, and store them in the RAM memory of the single chip microcomputer (9); When the P3.4 port (3) of the single-chip computer (9) does not receive any more negative pulse voltage, the total number of times i is incremented by 1, and the current m in RAM is retrieved. i depth data S, and through The average depth of the position measured at each measuring angle is obtained and stored in the RAM memory of the single chip computer (9); when the number i is accumulated to 58, the T0 timer ends its work, and the first 28 groups of average depth data of the internal RAM memory of the single chip computer (9) are retrieved, and based on Take the average depth of the first 28 groups of measurement ranges, i.e. the landing area, and retrieve 58 groups of average depth data from the internal RAM memory of the single chip microcomputer (9), and then calculate the average depth of the foothold area according to the following formula: Take all 58 groups of measurement ranges, i.e., the average depth of the measurement area of ​​the ultrasonic sensor (21), if |H1-H2|≥10cm, the P3.7 port (5) of the single chip microcomputer (9) outputs a low level; otherwise, it outputs a high level; If the P3.7 port (5) outputs a high level, the high level is respectively input to the A1 circuit interface (34) and to the base of the transistor Q1 (36) through the resistor R1 (35), the transistor Q1 (36) is not conducting, and the buzzer MK1 (38) does not work; the high level is input from the A1 circuit interface (34) to the base of the transistor Q8 (98) through the resistor R12 (99), the transistor Q8 (98) is not conducting, the relay K4 (95) is in a non-energized state, the moving end (89) and the fixed end ② (88) of the single-pole double-throw switch SPDT4 (86) are still in a closed state, and the relay K3 (81) is still in a powered state, that is, the upper end of the DC motor (80) is connected to the negative pole and the lower end is connected to the positive pole, the DC motor (80) is turned, and the door is still in an open state; If the P3.7 port (5) outputs a low level, the low level is respectively input to the A1 circuit interface (34) and to the base of the transistor Q1 (36) through the resistor R1 (35). The resistor R1 (35) is a current limiting resistor, the transistor Q1 (36) is turned on, the buzzer is powered on, starts working, and generates a buzzer; the low level is input from the A1 circuit interface (34) to the base of the transistor Q8 (98) through the resistor R12 (99). The resistor R12 (99) is a current limiting resistor, the transistor Q8 (98) is turned on, the relay K4 (95) is energized, and the moving end (89) of the single-pole double-throw switch SPDT4 (86) is connected to the The fixed terminal ① (87) is immediately closed and disconnected from the fixed terminal ② (88). At this time, the relay K3 (81) changes from being energized to being de-energized. The moving terminal (77) of the single-pole double-throw switch SPDT5 (76) and the fixed terminal ② (79) are reset and closed, and are reset and disconnected from the fixed terminal ① (78). The moving terminal (72) of the single-pole double-throw switch SPDT6 (73) and the fixed terminal ② (74) are reset and closed, and are reset and disconnected from the fixed terminal ① (75). The positive and negative poles of the DC motor (80) are reversed, the upper end of the DC motor (80) is connected to the positive pole, and the lower end is connected to the negative pole. The DC motor (80) is turned, and the door is locked. When the reset switch S1 (69) is closed, the sixth 5V power supply (68) outputs a low level at the collector of the transistor Q5 (66) through the level conversion circuit composed of the resistor R7 (70), the transistor Q5 (66) and the resistor R8 (67). The low level is transmitted to the base of the transistor Q4 (65) through the resistor R14 (100). The resistor R14 (100) is a current limiting resistor. The transistor Q4 (65) is turned on, the relay K2 (62) is energized, and the single-pole double-throw switch is turned on. The moving end (53) of the switch SPDT2 (52) is immediately disconnected from the fixed end ② (54) and closed to the fixed end ① (55), the moving end (57) of the single-pole double-throw switch SPDT3 (56) is immediately disconnected from the fixed end ② (58) and closed to the fixed end ① (59), the fourth 5V power supply (49) is connected to the RST port (1) of the single-chip microcomputer (9), the system is reset, the P3.7 port (5) of the single-chip microcomputer (9) outputs a high level again, and the buzzer MK1 (38) does not work The A3 circuit interface (61) and the A4 circuit interface (60) are disconnected, the transistor Q8 (98) is not conducting, the relay K4 (95) changes from the energized state to the de-energized state, the moving end (89) and the fixed end ② (88) of the single-pole double-throw switch SPDT4 (86) are reset and closed, and the fixed end ① (87) is reset and disconnected, and the low level generated by the eighth 5V power supply (91) through the level conversion circuit is re-input to the base of the transistor Q7 (83), that is, the relay K3 (81) changes from the de-energized state to the de-energized state. When the power is turned on, the moving end (77) of the single-pole double-throw switch SPDT5 (76) is immediately disconnected from the fixed end ② (79) and closed to the fixed end ① (78), and the moving end (72) of the single-pole double-throw switch SPDT6 (73) is immediately disconnected from the fixed end ② (74) and closed to the fixed end ① (75), and the positive and negative poles of the DC motor (80) are reversed, the upper end of the DC motor (80) is connected to the negative pole and the lower end is connected to the positive pole, the DC motor (80) is turned, and the door is in the open state.

9. The method of controlling the anti-fall and risk avoidance system for getting off a vehicle by using a single chip microcomputer and a relay based on ultrasonic ranging according to claim 8, characterized in that: When a person presses the central locking switch S2 (92) of the car, the system connects the power supply of the central locking pre-risk system within a time unit of ms to make it work, and determines the depth of the footrest area of ​​the door through signal processing and data analysis; if the situation is determined to be a risk of tripping, the system will sound an alarm and the door will be locked immediately; when the person knows that there is a risk in the footrest area through the system, he presses the reset switch S1 (69), the alarm stops, and the door opens; With the assistance of this system, people can improve the condition of the landing area when getting off the vehicle, and can promptly avoid the risk of falling or spraining the ankle due to failure to pay attention to deep pits and bumps, thereby ensuring travel safety.

Citation Information

Patent Citations

  • Vehicle door opening early warning device

    CN204279230U

  • Safety warning system for vehicle door opening

    CN212500134U

  • System for guaranteeing safe opening of vehicle door

    CN101695910A

  • When opening door, car has pedestrians and vehicles reminder system behind car

    CN205256167U