Shopping Cart 0

Your shopping cart is empty! Please select the model you want to purchase first.
Product Name Manufacturer Unit Price Quantity Total
Quantity: 0 Total: $0.0

Design of Ultrasonic Reversing Radar System Based on AT89C2051 Microcontroller

Author: Release time:2020-04-20 Source: Font: Big Middle Small View count:47

Car Reversing Aid Systems (Car Reversing Aid Systems) is the full name of "reverse collision avoidance radar", also known as "parking assistance device", is a car parking safety assistance device, can use sound or more intuitive display to inform the driver of obstacles. The situation eliminates the trouble caused by the driver's front-to-back and left-right visits when parking and starting the vehicle, and helps the driver remove the defects of the blind spot and blurred vision, and improves safety.

How the system works

The reversing radar only needs to work when the car is reversing, providing the driver with information behind the car. Since the driving speed of the car is slower when reversing, it can be considered that the car is stationary compared to the speed of sound, so the influence of the Doppler effect can be ignored in the system. In many ranging methods, the pulse ranging method only needs to measure the round-trip time of the ultrasonic wave between the measuring point and the target, which is simple to implement, so this method is used in this system.

After the driver turns the handle to the reverse gear, the system starts automatically. The ultrasonic transmission module emits a 40-kHz ultrasonic signal backwards, reflected by the obstacle, collected by the ultrasonic receiving module, and amplified and compared. The single-chip AT89C2051 sends this signal to the display module At the same time, the voice circuit is triggered and a synchronous voice prompt is issued. When the distance from the obstacle is less than 1m, 0.5m, 0.25m, a different alarm sound is issued to remind the driver to stop.

Figure 1 Ultrasonic sending module circuit

Hardware design

1. Design of ultrasonic transmission module

The ultrasonic transmitter includes two parts: an ultrasonic generating circuit and an ultrasonic transmitting control circuit. The ultrasonic probe (also called "ultrasonic transducer") uses CSB40T, which can use software generation method and hardware generation method to generate ultrasound. The former uses software to generate an ultrasonic signal of 40 kHz, input it to the driver through the output pin, and drive the probe to generate ultrasonic waves after being driven by the driver. The characteristic of this method is that it makes full use of software and has good flexibility, but it needs to design a drive circuit with drive current above 100mA. The second method is to generate ultrasonic signals using a dedicated ultrasonic generating circuit or a universal generating circuit, and directly drive the transducer to generate ultrasonic waves. The advantage of this method is that there is no need to drive the circuit, but it lacks flexibility.

This design uses the first method to generate ultrasonic waves. The circuit design is shown in Figure 1. The 40kHz ultrasonic wave is generated by the oscillation of the 555 time base circuit. The calculation formula of its oscillation frequency is f = 1.43 / ((R 9 + 2 · R 10) · C 5). The purpose of designing R 10 as an adjustable resistor is to adjust the signal frequency so that it is consistent with the 40 kHz natural frequency of the transducer. In order to ensure that the 555 time base has sufficient driving capacity, a + 12V power supply should be used. CNT is the ultrasonic emission control signal, which is controlled by the single chip microcomputer.

Figure 2 Ultrasonic receiver module circuit

2. Design of ultrasonic receiving module

The ultrasonic receiver includes three parts: an ultrasonic receiving probe, a signal amplification circuit and a waveform conversion circuit. The ultrasonic probe must use the model corresponding to the transmitting probe. The key is that the frequency should be the same. This design uses CSB40R, otherwise it will affect the receiving effect due to the inability to produce resonance, or even unable to receive. Since the sine wave electrical signal transformed by the probe is very weak, it must be amplified by the amplifier circuit. The sine wave signal cannot be directly received by the single chip microcomputer, and the waveform must be transformed. According to the principles discussed above, the microcontroller needs only the moment of the first echo. The design of the receiving circuit can use a dedicated receiving circuit or a general-purpose circuit, as shown in Figure 3.

When ultrasonic waves propagate in the air, the energy attenuation is proportional to the distance, that is, the closer the distance, the stronger the signal, the farther the distance, the weaker the signal, usually between 1mV ~ 1V. Of course, there are differences in the output signal strength of different receiving probes. Due to the large range of the input signal, two requirements are placed on the gain of the amplifier circuit: first, the amplification gain must be large to meet the needs of small signals; second, the amplification gain must be able to change to meet the needs of the large signal change . In addition, since the input signal is a sine wave, the amplifier circuit must be designed as an AC amplifier circuit. In order to reduce the use of negative power supply, the amplifier circuit uses a single power supply, signal amplification and conversion uses a LM324 general-purpose operational amplifier, the first three stages are designed for the amplifier, the latter stage is designed for the comparator. LM324 can work with dual power supplies or single power supply, so it can meet the requirements of use. In order to meet the needs of the AC signal, each stage of the amplifier uses a resistor-capacitor circuit for level shifting, that is, C7, C21, C22, and C24 in Figure 3, with a capacity of 10 μF, which realizes the amplification of the AC signal under single power supply conditions . For AC signals, the capacitor is short-circuited, so the gains of the first three stages of amplifying circuits are all 10. When the distance is close, the gain of the two-stage amplification can output a signal of sufficient strength. The third stage may have signal saturation, but when the distance is farther, three-stage amplification must be used. Reasonable adjustment of potentiometer R27 and selection of comparison reference voltage can make the measurement more accurate and stable.

Figure 3 Voice circuit

3. Voice circuit design

Voice alarm means that when the distance detected by the reversing radar is less than the set safety value, a sound will be issued to remind the driver. The voice circuit design is shown in Figure 4. M3720 is a monophonic flashing light alarm sound effect integrated circuit. An alarm sound effect is stored in the chip, which can directly drive the buzzer to sound or push the speaker to play sound through an external power amplifier transistor, and can also drive an LED to blink. The functions of each pin of the chip are: 5 feet VDD; 1 pin VSS is the power input terminal and the negative terminal, VDD voltage is 3 ~ 3.5V; 8 pins X and 1 pin Y are external oscillation resistors of the chip; 6 pins TG are Trigger control terminal, low-level trigger is effective; 3-pin BZ and 2-pin BB are respectively alarm sound output terminals, which can be directly connected to piezoelectric ceramic buzzer, if the speaker is driven, it is led out from 3-pin BZ terminal; 4-pin L is flashing The output end of the lamp can directly drive the LED to emit light.

4. Software design

AT89C2051 single chip microcomputer and its development and application system have many advantages such as concise language, good portability, strong expression ability, structured design, direct control of computer hardware, high quality of generated code, easy to use and so on. The main program of the system is in the keying cycle working mode. When the handle is turned into the reverse gear, the main program starts to call the measurement subprogram, display subprogram and voice prompt subprogram to complete the entire detection prompt process.

5. Conclusion

The reversing radar system designed in this paper is an auxiliary system to ensure the safety of car reversing. Ultrasonic probes emit ultrasonic waves, use high-speed single-chip microcomputer to calculate the distance, and add a temperature compensation circuit to improve the accuracy of distance calculation. The liquid crystal display installed in the system can intuitively display the temperature and distance, which provides convenience to the driver. When reversing, when the distance between the car and the obstacle is less than the safety distance we set, the system will send an alarm through the voice integrated circuit to remind the driver to prevent the car from collision or bruise, which has a strong practicality.

Hot News