Thursday, January 6, 2022

Design of Ultrasonic Reversing Radar Monitoring and Alarm System Based on MSP430 Single-chip Microcomputer

At present, both domestic and overseas are studying how to use advanced technology, namely, car collision avoidance technology, to assist car drivers in real-time monitoring of people, cars, and road environments that affect road traffic safety. In critical situations, the system will actively intervene in driving control, Assist the driver in emergency handling and prevent the occurrence of car collision accidents. As people's requirements for the ease of use of car driving assistance systems increase, as well as the small drop in the price of single-chip microcomputers and the requirements for the networked development of automotive Electronic systems, the new reversing radars are all intelligent ranging sensing systems with single-chip microcomputers as the core.This article introduces an ultrasonic reversing radar monitor based on MSP430 single chip microcomputer.

Preface

According to preliminary survey statistics, 75% of car accidents are caused by car reversing “rear-view” Xiaoliang. Therefore, many non-professional car drivers hope to have a car reversing alarm, which continuously measures the distance between the rear of the car and the obstacles behind it when reversing, and displays the distance at any time, and sends out different alarm signals in different distance ranges. In order to improve the safety of the car when reversing. Enhancing the rear vision ability of automobiles, especially the rear vision ability of large and heavy vehicles, is very important for improving driving safety and reducing the labor intensity and psychological pressure of drivers.

At present, both domestic and overseas are studying how to use advanced technology, namely, car collision avoidance technology, to assist car drivers in real-time monitoring of people, cars, and road environments that affect road traffic safety. In critical situations, the system will actively intervene in driving control, Assist the driver in emergency handling and prevent the occurrence of car collision accidents. As people's requirements for the ease of use of car driving assistance systems increase, as well as the small drop in the price of single-chip microcomputers and the requirements for the networked development of automotive electronic systems, the new reversing radars are all intelligent ranging sensing systems with single-chip microcomputers as the core. This article introduces an ultrasonic reversing radar monitoring and warning system based on MSP430 single-chip microcomputer.

1 System ranging principle

The ultrasonic transmitter emits ultrasonic waves in a certain direction, and starts timing at the same time as the transmitting time. The ultrasonic waves propagate in the narrow air and return immediately when encountering obstacles on the way. The ultrasonic receiver immediately stops timing when the reflected waves are received. The ultrasonic waves are in the air. The propagation speed in the middle is 340m/S. According to the timing t, the distance S between the launching point and the obstacle can be calculated, namely

S=340×t/2 (1)

This is the time difference ranging method. This system uses a single-chip microcomputer to control the ultrasonic transmitter to emit ultra-Lubo pulses, and at the same time uses a counter in the single-chip to start timing. When the ultrasonic wave reaches the obstacle behind, it will be reflected back. After the receiving device receives the echo signal, the external comparison circuit generates a high level to cause the single-chip microcomputer to generate an external interrupt. The single-chip microcomputer runs the interrupt service subroutine (ISR) to calculate the distance and send it to the LCD for Display to the driver. At the same time, there is a comparison module in the program. If the distance between the vehicles is less than 5 m, the measured distance is displayed while the single-chip microcomputer outputs a high level Make the buzzer alarm, if the vehicle distance is greater than 5m, U will be displayed. U, the buzzer does not alarm, so the driver can reliably give alarm information in two ways, sound and light, to ensure the safety of reversing or driving.

2 System hardware design

2.1 Main controller selection and hardware composition

Compared with the commonly used 51 series single-chip microcomputers, the MSP430 series single-chip microcomputers are powerful, low power consumption, and highly integrated. Its main disadvantage is that the price is slightly higher. In order to get a suitable price-performance ratio, I chose the MSP430F101 produced by TI in the early stage. The price of this type of single-chip microcomputer is relatively low. Although the function is not powerful, it is 110 enough to meet the requirements of this system. The main disadvantage of F 1 is that there is no LCD 162 driver. This problem can be solved by choosing a reasonably priced LCD driver chip HT 1.

The system hardware circuit is based on the MPS430F1101 single-chip microcomputer. As shown, it is mainly composed of an ultrasonic transmitter circuit, an ultrasonic receiver circuit, a power supply circuit, and an alarm circuit.

Design of Ultrasonic Reversing Radar Monitoring and Alarm System Based on MSP430 Single-chip Microcomputer
Figure 1 Block diagram of system hardware composition

2.2 Ultrasonic transmission signal

The block diagram of the ultrasonic transmitter hardware circuit is shown in Figure 2. The monostable trigger receives the voltage boost and pulse width control output from the P1.3 port of the S430F1101 from the P1.3 port of the 40ms trigger. , The period of the square wave is 40m s. This pulse signal is used as the set pulse of the 555 oscillator. During the setting period, 555 generates an oscillating signal of 40 at a timing, and the ultrasonic transmitter T40K 1 converts the electrical signal into ultrasonic and emits it. The ultrasonic transmitter emits a pulse train of 7 pulses (1/40kHz=0.25ms). The sound wave of the ultrasonic transmitter transmits the object, and then is reflected by the reflector to the receiver. The propagation distance is twice the measurement distance. Formula (1) can be seen.

Design of Ultrasonic Reversing Radar Monitoring and Alarm System Based on MSP430 Single-chip Microcomputer
Figure 2 Ultrasonic transmitter hardware circuit

2.3 Ultrasonic receiving circuit

The ultrasonic receiving circuit is shown in Figure 3. The echo signal received by the ultrasonic receiving UCM-R40 is converted into a voltage signal. After two-stage amplification and a voltage shaping circuit, the shaped DC voltage is not smooth, and a capacitor C5 is needed to filter it. , The filtered voltage range is basically stable. Use this voltage to drive the light-emitting diode of the photocoupler SFH65A-1. At this time, the phototransistor is turned on, and the level signal is output through an inverter, and then the voltage is turned on by an inverter. The flat signal is basically stable. The level signal is directly input to the external interrupt entry of the single-chip microcomputer. The high level is used as the interrupt signal of the external interrupt of the MSP430 to cause the single-chip microcomputer to generate an interrupt, stop the timing of the counter in the interrupt service routine, and calculate the relevant data.

Design of Ultrasonic Reversing Radar Monitoring and Alarm System Based on MSP430 Single-chip Microcomputer
Figure 3 Ultrasonic receiving circuit

2.4 Display circuit and alarm prompt design

This system requires two display of the measured distance and two alarm prompt messages of different distance values. The LED display circuit needs multiple ports to support, so choose the LCD driver HT1621, which can save ports and at an affordable price. The chip provides two audio formats at 2kHz and 4kHz at the same time, which meets the technical requirements of the system. The display drive circuit is shown in Figure 4.

Under the external 32.768kHz crystal frequency, you only need to select the HT1621 chip select CS signal line (low power active), write enable WR signal line (low power active) and serial data input line DATA three leads to complete. Chip Select. The LCD display has 10 electrodes, including 2 back electrodes and 8 segment electrodes, which are respectively connected to COM0~COM1 and SEG0~SEG7 of HTl621. Since each bit in the display RAM corresponds to a display segment, it is only necessary to sequentially write the segment codes that determine the display segment into the display RAM according to the command format to realize LCD display drive. The working voltage of the HT1621 is the same as that of the single-chip microcomputer. The 2.5V is obtained by stepping down the car battery voltage of 12V through the GM6639.

Design of Ultrasonic Reversing Radar Monitoring and Alarm System Based on MSP430 Single-chip Microcomputer
Figure 4 Wiring diagram between HTl621 and single-chip microcomputer

1 Connect Figure 4 HTl621 and the single-chip wiring diagram

Since the HTl621 chip provides two audio outputs BZ and BZ (effective), the two audio outputs are connected in parallel to an OR circuit and controlled by the program to select different audio outputs in different distances, so that different audio outputs can be selected according to different distances. Different alarms will be issued for the distance.

2.5 System main program design

Super Lubo reversing radar monitoring and warning system ranging system software mainly completes three tasks:

(1) Timer-A sends a pulse wave with a timing of 40ms, and starts the counter at the same time as each pulse is emitted, and assigns the initial value to the comparison unit CCRO;

(2) When there is an external interrupt, enter the interrupt service program. If the counter does not overflow before the interrupt comes, stop the calculation and enter the data processing unit. If the counter overflows before the interrupt, it will enter the error management, shield an interrupt source, and the accumulated measurement times will increase by one;

(3) Use a single-chip microcomputer to control the liquid crystal drive HT162l, and the calculated distance value is sent to the display chip through serial transmission, and its size is compared. When the distance is less than 0.5m, the strobe BZ (4knz audio output) distance is less than 2m When strobe BZ (2kHz audio output).

3 summary

The system uses the propagability of ultrasonic waves in the air, and based on the principle of multiplying time and speed to get the distance, designed an ultrasonic reversing radar monitoring and warning system based on MSP430, which is used to measure the distance between the rear of the car and the obstacle in real time. The distance value is displayed by LCD, and the distance value is provided to the driver. The maximum measurement distance of the system is 6.5m, and the accuracy is I5cm. It has low cost, non-contact, fast speed, high accuracy, strong reliability, and good adaptability. It is easy to operate and has a wide range of application prospects.

The Links:   1MBI50L-060 00-168-334

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.