The anti-collision alarm uses ultrasonic waves and integrated Hall elements to measure the distance and speed of the car, and uses the real-time control and data processing functions of the single-chip microcomputer to complete the control of the system. The article gives the hardware circuit principle and software design of the car anti-collision alarm.
With the acceleration of the pace of modern life, the frequency of traffic accidents is also increasing. In order to improve the safety of car operation, this article introduces a car anti-collision alarm system controlled by a single-chip microcomputer. The device combines the real-time control and data processing functions of the single-chip microcomputer with the ultrasonic ranging technology and sensor technology. It can detect the distance between the rear obstacle and the car and the speed of the car during the operation of the car, display the distance through the digital display device, and the sound circuit issues a warning sound according to the distance.
1 Principle of ultrasonic ranging
The principle of ultrasonic ranging is to continuously detect the echo reflected by the obstacle after the ultrasonic wave is emitted, so as to measure the time difference T between the emission of the ultrasonic wave and the reception of the echo, and then calculate the distance S=C×T/2, where C is the ultrasonic wave speed, which is 344m/s at room temperature. After the sound speed is determined, the distance can be calculated as long as the round-trip time of the ultrasonic wave is measured.
2 Speed measurement principle
The speed of a car is measured by a Hall integrated sensor. That is, the input shaft of a turntable equipped with a permanent magnet is connected to the rotating shaft of the wheel. When the wheel rotates, the turntable rotates accordingly. At this time, the permanent magnet on the turntable will pass through the Hall integrated sensor, thereby obtaining a magnetic signal at the input end of the Hall integrated sensor. If the turntable keeps rotating, the Hall integrated sensor will output a speed signal. It can be said that the measurement of the speed of a car is essentially the measurement of the frequency of the speed signal.
3 Functions and features of the controller AT89C2051
AT89C2051 is a low-power, high-performance CMOS 8-bit microprocessor, compatible with the MCS-51 series instruction set and pins, with the following features: 128 bytes of internal RAM, 2Kbytes EPROM, 15 I/O lines, 2 16-bit timers/counters, 5 two-level interrupt sources, 1 full-duplex serial port, an on-chip precision analog comparator and on-chip oscillator, low-power idle and power-down modes. The operating voltage range is 4.25V to 5.5V, and the operating frequency is 12MHz.
The two 16-bit timer/counter registers T0 and T1 in AT89C2051 can count machine cycles when used as timers, and the counting frequency is 1/12 of the oscillation frequency; when used as counters, they can increase by 1 when the external input pins P3.4/T0 and P3.5/T1 change from 1 to 0, and the counting frequency is 1/24 of the oscillation frequency.
4 Hardware System Design
The alarm is composed of a control system, an ultrasonic transmitting circuit, a receiving circuit, a speed measuring circuit, an alarm circuit, and an LED display circuit. The circuit principle block diagram is shown in Figure 1.
The ultrasonic transmitting circuit is composed of the CC7555 time base circuit and the ultrasonic transmitting probe. The P1.7 pin of the single-chip microcomputer AT89C2051 controls the CC7555 time base circuit to generate a 40kHz frequency signal to the ultrasonic generator, and the ultrasonic wave emitted by the ultrasonic probe is directed to the obstacle. The ultrasonic ranging has the following characteristics: high measurement sensitivity, strong penetration, fast measurement speed, large measurement angle, and can detect objects within a large range.
The ultrasonic receiving circuit is composed of an ultrasonic receiving probe, an amplifier and a shaper. The ultrasonic wave reflected by the obstacle is converted into an electrical pulse signal by the receiving probe, and then amplified and shaped by the amplifier and shaper and sent to the P3.2 pin of the single-chip microcomputer AT89C2051. The amplifier should be a broadband amplifier with sufficient gain and low noise to keep the pulse signal, especially the leading edge, from being distorted, so as to improve the accuracy of ranging.
Previous article:Automobile anti-collision system based on nRF24E1 and TMC2023
Next article:Design of vehicle multi-way switch detection interface circuit based on MC33993
- 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
- I would like to know if there are any microcontroller models with high-speed USB interface, ultra-high-speed I2C 1Mhz or above
- μCOS-II Programming Basics
- We spent 2 days to make a small 104 capacitor
- Understanding of Hyperlink Interface in TMS320C6678
- Sell various protocols car ecu
- For this four-tube synchronous boost topology, under what input voltage conditions is the input current the largest?
- Does anyone know the official website of Bluetooth Nordic? Please send WeChat or SMS: 13570814011. Thank you!
- CH224K evaluation and solution application
- Wireless sensor node power supply solution
- Animation analysis of the working principles of various electric motors