1 Introduction
As we all know, to detect whether there is an obstacle between the two ends, the general approach is to send a signal at one end and determine whether the signal is received at the receiving end. If the signal is received, it means there is no obstacle in the middle; if not, it means there is an obstacle. However, in the design of the car reversing anti-collision alarm system, since the car is a moving object, it is impossible to install the receiving or transmitting device at a specific location. This determines that the system's transmitting and receiving devices must be installed together. Therefore, how to design an object detection device that installs the transmitting and receiving devices together is our research direction.
2. Introduction of Ultrasonic Distance Measurement System
In principle, ultrasonic ranging can be divided into two types: resonance type and pulse reflection type. Due to the application requirements, the pulse reflection type is used here, which uses the reflection characteristics of ultrasonic waves.
The principle of ultrasonic ranging is to transmit ultrasonic waves in a certain direction through an ultrasonic transmitting sensor, and start timing at the same time as the transmission. The ultrasonic wave propagates in the air, and returns immediately when it encounters an obstacle on the way. The ultrasonic receiver stops timing when it receives the reflected wave. At normal temperature, the propagation speed of ultrasonic waves in the air is C=340m/s. According to the time t recorded by the timer, the distance (S) from the transmitting point to the obstacle can be calculated, that is:
S=C*t/2 (1-1)
It can be seen that its main parts are: (1) a pulse generator (transmitting circuit) that supplies electrical energy; (2) a switch part that isolates reception and transmission; (3) a transmitting sensor that converts electrical energy into acoustic energy and transmits the acoustic energy into the medium; (4) a receiving sensor that receives reflected acoustic energy (echo) and converts the acoustic energy into an electrical signal; (5) a receiving amplifier that can amplify weak echoes to a certain amplitude and cause the echoes to stimulate a recording device; (6) a recording/control device that usually controls the electrical energy transmitted to the sensor, controls the time for recording echoes, stores the required data, and converts time intervals into distances.
3. Overall system design
The system mainly uses electromagnetic output and input oscillation circuits. The input signal is amplified and sent directly to the single-chip microcomputer AT89C2051 for processing. It can be automatically controlled through programming. The specific principle block diagram of the system is shown in Figure 3.1:
The system is mainly composed of the following three functional blocks: ultrasonic sensor T/R40-16, ultrasonic transmission and reception consisting of transceiver system; central control processor AT89C2051 composed of the host system; control alarm output system.
The main system circuits include: power supply circuit, ultrasonic transmitting circuit, ultrasonic receiving circuit, signal amplification circuit, DC control circuit, display circuit, detection distance selection circuit, alarm circuit, single-chip microcomputer control circuit, etc.
4. Selection of main components
4.1 Selection of Ultrasonic Sensors
This system uses ultrasonic sensor T/R40-16, which is a paired transmitter and receiver sensor with excellent performance.
The basic characteristics of ultrasonic sensors are frequency characteristics and directional characteristics.
(1) Frequency characteristics
Figure 4.1 is the frequency characteristic curve of the ultrasonic emission sensor. Among them, f=40kHz is the center frequency of the ultrasonic emission sensor. Here, the ultrasonic mechanical wave generated by the ultrasonic emission sensor is the strongest, that is, the ultrasonic sound pressure energy level generated is the highest. On both sides, the sound pressure energy level decays rapidly. Therefore, the ultrasonic emission sensor must be excited by an AC voltage very close to the center frequency.
(2) Directional characteristics
The piezoelectric chip in the actual ultrasonic sensor is a small disc, which can treat each point on the surface as an oscillation source, radiating a hemispherical surface wave (sub-wave), which has no directivity. However, the sound pressure at a certain point in the space away from the ultrasonic sensor is the result of the superposition of these sub-waves (diffraction), which has directivity.
4.2 Selection of Central Controller
This system uses AT89C2051 microcontroller as the central controller.
AT89C2051 is the world's newest high-performance eight-bit microcontroller produced by Atmel Corporation of the United States.
The chip adopts FLASH storage technology , has 2kB bytes of internal flash memory, and adopts DIP packaging. It is currently the most popular microcontroller in small and medium-sized systems.
5. Software language selection
This system is based on a single-chip microcomputer. It is programmed in assembly language. Assembly language refers to a software language that uses mnemonics, symbolic addresses, labels and other symbols to write programs. It is an important tool for computer software design. It has an irreplaceable position in the fields of system software development, real-time control and real-time processing. Programming in assembly language can give full play to the functions of computer hardware and carry out high-quality design. The developed software has the characteristics of low memory overhead and fast computing speed. Moreover, it is not independent of the specific machine. It is a very general low-level programming language. Using assembly language programming, users can directly operate the working registers and on-chip RAM units inside the single-chip microcomputer, and the process of processing data is very specific.
6. System hardware design
The hardware design of this system adopts modular design method. According to the functions realized, it can be divided into the following parts.
6.1 Clock Circuit Design
All MCS-51 microcontrollers have an on-chip oscillator as the clock source for the CPU. However, the so-called on-chip oscillator is not actually an oscillator itself, but a high-gain inverting amplifier suitable for forming a feedback oscillator. To form a feedback oscillator, a reference frequency must be provided on its XTAL1 and XTAL 2 pins.
XTAL1 is the input of the inverting amplifier; XTAL2 is its output and also serves as the input of the internal clock generator. The reference frequency can be provided by a crystal, an inductor or an external clock source. The usual practice is:
A quartz crystal or ceramic resonator and two capacitors with one end grounded are connected across XTAL1 and XTAL2.
The quartz crystal here is an inductive element, which forms a parallel resonant circuit with the capacitor connected to it, providing positive feedback and the phase shift conditions necessary for oscillation for the on-chip oscillator, thereby forming a self-excited oscillator.
6.2 Design of reset circuit
The RST pin of AT89C2051 is the input pin of the external reset signal. Inside the MCS-51 device, RST is connected to the input of a Schmitt trigger. As we all know, the Schmitt trigger must have a certain input level to trigger, so it can filter out some noise interference signals.
Figure 6.2 shows the design of the reset circuit. The RST pin is connected to Vcc through a 10uF capacitor and grounded through a 10KΩ resistor to achieve automatic reset at power-on. It should be noted that for CHMOS devices, a 10KΩ resistor is not required, but the reset can be completed by keeping the reset pin high for more than 11ms after power-on, so it is okay to use a larger resistor.
6.3 Overall Circuit Design
(Click for larger image)
7.PCB design
8. Ultrasonic emission program flow
void send()
{
csb_in=1;
for(i=0;i<1;i++)
{
_nop_();
_nop_();
_nop_();
_nop_();
_nop_();
}
csb_in=0;
_nop_();
_nop_();
_nop_();
_nop_();
_nop_();
_nop_();
_nop_();
_nop_();
_nop_();
}
9. Conclusion
The reversing anti-collision alarm system designed in this scheme is a new exploration of the automobile anti-collision alarm system from passive anti-collision to active anti-collision. It is designed to target the insensitivity of some drivers to orientation and their lack of proficiency in reversing operations. Some main parameters of the system design are discussed, and on the basis of introducing the functions of the ultrasonic ranging system, the overall composition of the system design is proposed. This scheme will have an impact on the active anti-collision and even automatic driving of the automobile, and provide the driver with a reversing operation instruction.
Previous article:Design of wireless monitoring system for lithium-ion battery pack
Next article:Dormitory intelligent fire and theft alarm system designed with 51 single chip microcomputer
- Popular Resources
- Popular amplifiers
- Learning MCU Technology from Scratch (Liu Jianqing)
- Wireless doorbell alarm based on AT89C2051 single chip microcomputer
- Infrared remote control LED electronic clock using real-time clock chip DS1302+AT89C2051
- Infrared remote control LED electronic clock using real-time clock chip DS1302+AT89C2051.rar
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
- [Repost] A few simple steps to help you understand the MCU timing diagram
- Cadence Certus Closure Solution is a new generation chip-level convergence solution. Welcome to learn more!
- What is the progress of domestic NPU chips?
- How is JTAG used for chip testing?
- Talk about downloading the DSP28335 register manual
- 4W PLC Power Supply Reference Design with Wide Input Voltage Range
- [Gizwits Gokit3 Review] Device Access-Step 1: Create a New Solution Project
- Circuit Diagram
- Apple faces ultimatum! EU finalizes: Type-C interface will be fully adopted in 2024
- Running test code for mmWave chips on QSPI flash