Introduction
With the rapid development of the national economy, the number of cars in China has increased significantly, causing road congestion and frequent traffic accidents, which has caused huge losses to people's lives and property safety. Safe driving has become the focus of everyone's attention, among which the design and demand of the car collision avoidance system (CAS) are very important and urgent. In view of this situation, it is imperative to design a car collision avoidance alarm system with fast response, high reliability and relatively economical.
Ultrasonic waves are a mechanical wave with a frequency exceeding 20 kHz. They have strong directivity, slow energy consumption, and long propagation distance in the medium. Therefore, ultrasonic ranging is the most common distance measurement method. Using ultrasonic waves to detect distance, the design is relatively convenient, the calculation and processing are relatively simple, and the accuracy is also high. This design uses AT89C52 microcontroller as the main controller, combined with the ultrasonic ranging principle, to design a car reversing collision avoidance alarm system. The system adopts a combination of software and hardware, and has the characteristics of modularization and versatility.
1 Ultrasonic ranging principle
This system uses a piezoelectric ultrasonic sensor. There are two ways to measure the ultrasonic ranging principle: resonance and pulse reflection. Because the application requirements of the resonance type are complex, the pulse reflection type is used here. The principle of ultrasonic distance measurement is shown in Figure 1.
In Figure 1, the measured distance is H, half of the distance between the centers of the two probes is represented by M, and the distance traveled by the ultrasonic wave in one way is represented by L. From the relationship in the figure, we can get:
In the formula: v is the propagation speed of the ultrasonic wave; t is the propagation time, that is, the time from the emission to the reception of the ultrasonic wave.
Substituting formula (4) into formula (3) we can get:
It can be seen that in order to measure the distance H, we only need to measure the propagation time t of the ultrasonic wave. [page]
According to the design requirements and comprehensive factors, the AT89C52 single-chip microcomputer can be used as the main controller, dynamic scanning can be used to realize LCD digital display, and the ultrasonic drive signal can be completed by the timer of the single-chip microcomputer. The specific system block diagram is shown in Figure 2.
The system mainly consists of a single-chip microcomputer system and a display circuit, an ultrasonic transmitting circuit, and an ultrasonic detection receiving circuit. AT89C52 is used to control the CX20106A infrared receiving chip and the TCT40-10 series ultrasonic conversion module.
The ultrasonic receiving circuit uses the integrated circuit CX2-0106A, which can be used to complete signal amplification, limiting, bandpass filtering, peak detection and waveform shaping. The display device uses an LCDl2864 display, and the D18820 temperature sensor is used
for temperature detection and temperature compensation. The main controller AT89C52 single-chip microcomputer is a low-power, high-performance CMOS 8-bit microcontroller with 8 KB of system programmable FLASH memory. It is fully compatible with AT80C51 pins and instructions. It has an 8-
bit CPU, an on-chip oscillator and clock circuit, three 16-bit timers/counters, 21 special function registers, four 8-bit parallel I/O ports, a total of 32 programmable I/O lines, one programmable full-duplex serial port, and eight 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 occasions such as car reversing to remind the driver to effectively avoid obstacles and pedestrians that may cause harm to the reversing when reversing. This system strengthens the software and hardware processing measures for the common anti-interference problem. In terms of hardware, for example, the ultrasonic receiving circuit is shielded with a metal shell to improve the system's anti-interference ability; in terms of software, the system combines the use of the DS18820 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 LCDl2864 with font function is used to display the distance in real time. When the distance condition is met, the buzzer will sound to remind the driver. It has strong practicality, simple hardware structure, small size and easy use. However, the measurement distance of this system is limited and it is only effective within a distance of 10 to 300 cm, which needs further improvement and enhancement.
Previous article:Design of electric vehicle seesaw based on 51 single chip microcomputer
Next article:Liquid Level Detection System Based on AT89C52 Single Chip Microcomputer
Recommended ReadingLatest update time:2024-11-16 16:01
- Popular Resources
- Popular amplifiers
- 西门子S7-12001500 PLC SCL语言编程从入门到精通 (北岛李工)
- Siemens Motion Control Technology and Engineering Applications (Tongxue, edited by Wu Xiaojun)
- MCU C language programming and Proteus simulation technology (Xu Aijun)
- 100 Examples of Microcontroller C Language Applications (with CD-ROM, 3rd Edition) (Wang Huiliang, Wang Dongfeng, Dong Guanqiang)
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
- Professional embedded software development: moving towards high-quality and efficient programming
- Recruitment: Ningbo listed auto parts company - motor control software development engineer
- Today at 10:00 AM, there will be a live broadcast with awards [Fujitsu empowers automotive electronics technology transformation]
- ESP32-Cam Programmer
- NXP Rapid IoT Review] + ⑤ Full Interpretation of NXP Rapid IoT Code, Finding Traces of RTC
- Request: Recommend a PHY chip for stm32f407!
- 【EasyARM-RT1052 Review】+ Unboxing Experience
- Practical RF training course sharing 2
- Looking for books that explain basic circuits?
- 60W Sensorless BLDC Motor Driver Reference Design