Back-up anti-collision warning system based on AT89C52 ultrasonic ranging

Back-up anti-collision warning system based on AT89C52 ultrasonic ranging

The number of cars in our country has increased significantly, causing road congestion and frequent traffic accidents, which have caused huge losses to people's lives and property safety. Safe driving has become the focus of everyone's attention, and the design and requirements of the Collision Avoidance System (CAS) are very important and urgent. In view of this situation, it is imperative to design a car collision alarm system with fast response, high reliability and relatively economical.

Ultrasound as a mechanical wave with a frequency exceeding 20 kHz has strong directivity, slow energy consumption, and long propagation distance in the medium. Therefore, ultrasonic distance measurement is the most common method of distance measurement. Using ultrasonic to detect the distance, the design is more convenient, the calculation processing is simpler, and the accuracy is also higher. This design uses the AT89C52 single-chip microcomputer as the main controller, combined with the principle of ultrasonic ranging, designed a car back-up anti-collision alarm system. The system uses a combination of software and hardware, which has the characteristics of modularity and multi-purpose.

1 Ultrasonic ranging principle

This system uses piezoelectric ultrasonic sensors. There are two ways of ultrasonic ranging principle: resonance type and pulse reflection type. Because the application requirements of the resonance type are complicated, the pulse reflection type is used here. The principle of ultrasonic ranging is shown in Figure 1.



In Figure 1, the measured distance is H, half of the center distance of the two probes is represented by M, and the distance traveled by the ultrasonic one-way is represented by L, which can be obtained from the relationship in the figure:



In the formula: v is the propagation speed of the ultrasonic wave; t is the propagation time, which is the time from the transmission to the reception of the ultrasonic wave.

Substituting formula (4) for formula (3) gives:


Therefore, to measure the distance H, it is only necessary to measure the propagation time t of the ultrasonic wave.

2 Implementation of the system

According to the design requirements and the integration of various factors, AT89C52 single-chip microcomputer can be used as the main controller to realize LCD digital display with dynamic scanning. The ultrasonic drive signal is completed with the timer of the single-chip microcomputer. The specific system block diagram is shown in Figure 2.



The system is mainly composed of a single-chip microcomputer system and a display circuit, an ultrasonic transmitting circuit and an ultrasonic detecting and receiving circuit. AT89C52 is used to control the CX20106A infrared receiver chip and the TCT40-10 series ultrasonic conversion module. Among them, the ultrasonic receiving circuit uses the integrated circuit CX20106A, which can be used to complete the functions of signal amplification, limiting, band-pass filtering, peak detection, and waveform shaping. The display device uses LCD12864 display, and selects D18B20 temperature sensor for temperature detection and temperature compensation. The main controller AT89C52 MCU is a low-power, high-performance CMOS 8-bit microcontroller with 8 KB of system programmable FLASH memory. Fully compatible with AT80C51 pins and instructions. It has one 8-bit CPU, one on-chip oscillator and clock circuit, three 16-bit timers / counters, 21 special function registers, four 8-bit parallel I / O ports, and a total of 32 programmable I / O terminals , 1 programmable full-duplex serial port, 8 interrupt sources.

The actual design is shown in Figure 3.


3 System software design

The system software part includes the main program, interrupt subroutine and other subroutines. The main program flow chart is shown in Figure 4, where the core code of the interrupt subroutine is as follows:


4 Conclusion

This reversing anti-collision alarm system can be used in situations such as car reversing, to remind drivers to effectively avoid obstacles and pedestrians that may cause harm to reversing when reversing. This system strengthens the software and hardware processing measures for the general anti-interference problem. For hardware, for example, the ultrasonic receiving circuit is shielded with a metal shell, which improves the anti-interference ability of the system; for software, the system uses a DS18B20 temperature sensor to achieve temperature compensation correction, so that the system can work normally at any temperature, and the error will not exceed the specified range. The LCD12864 with the font function is used to display the distance in real time. When the distance condition is met, the buzzer will beep to remind the driver. It has strong practicability, simple hardware structure, small size, and convenient use. However, the measurement distance of this system is limited, and it is only effective within a distance of 10 to 300 cm, and further improvement and improvement are needed.



To guarantee process quality control, Xunda has line leakage detecting system, line laser barcode system, Range Hoods appliances testing system, and apply finished product sample test, first article inspection and other complete spot testing systems.

Stainless steel+tempered glass

760m³/h air flow

3 speed electronic switch

6 layers washable aluminum grease filters

2x2LED lamps


Kitchen Range Hoods

Kitchen Range Hoods

Kitchen Range Hoods,Slim Hoods,Recirculating Range Hood,Stainless Steel Range Hood

xunda science&technology group co.ltd , https://www.gasstove.be