Views: 1 Author: Site Editor Publish Time: 2020-05-29 Origin: Site
Ultrasonic ranging transducer is mainly used in the field of non-contact measurement. At present, the special ultrasonic system for distance measurement is difficult to be widely used in some small and medium-sized applications due to the high cost. With the development of automobile intelligence, it is necessary to develop new ultrasonic sensors that can measure distance with higher accuracy, and the cost is low. However, due to the requirement of high precision, the conventional ultrasonic sensor has a complicated structure and cannot be automatically adjusted according to different environments, which has high cost and poor adaptability. This article introduces the development of a low-cost, high-precision digital display ultrasonic rangefinder transducer with at89c2051 single-chip microcomputer as the core. Because this ultrasonic sensor can test the ambient temperature and adjust itself, the cost performance is better than some existing similar products. This ultrasonic sensor can be used in the temperature range of 0 ℃ ~ 40 ℃, ranging from 0.1m to 0.3m, with an accuracy of 1mm, so it can be used in some special occasions, such as self-service parking, smart suspension and headlights adjustment, etc.
Hardware design of ultrasonic distance measuring transducer
The working principle of stainless steel ultrasonic transducer is shown in Figure 1. The system consists of AT89C2051 single-chip microcomputer, ultrasonic transmission, receiving amplifier circuit, ambient temperature acquisition circuit and display circuit. AT89C205l MCU is the core component of the entire system, coordinating the work of each component. The oscillation source controlled by the single-chip microcomputer generates a frequency signal of 40 kHz to drive the ultrasonic sensor. Each transmission contains 10 pulses. After the first ultrasonic pulse is transmitted, the counter starts counting. At the moment when the first echo pulse is detected, the counter stops count, so that the time △ t from transmission to reception can be obtained; the temperature acquisition circuit also sends the ambient temperature data collection to the single-chip microcomputer to provide the correction of the ultrasonic propagation speed when is calculating the distance. Finally, the single-chip computer uses the formula to calculate the measuring distance, which is displayed on the display. The serial ports RXD and TXD of the single chip microcomputer are respectively connected to the RXD and TXD of the display circuit to form a serial static display circuit; the timer / counter T0 is connected to the output of the V / F converter to realize the frequency acquisition function; P1. 7 Connected to the control end of the CMOS multivibrator, through software to make the P1.7 port output high or low level, thereby controlling the transmission of ultrasonic waves; P1.6 is controlled by a switching diode IN4l48 and the reference voltage generation circuit of the comparator LM324 Terminal is connected, set P1.6 to "1" when transmitting ultrasonic waves, the output level can suppress the flipping of the comparator, which can effectively suppress the ultrasonic waves emitted by the transmitter to directly radiate to the receiver and cause erroneous detection; after the end of transmission , P1.6 is set to "0", at this time, by scanning the P1.2 121 connected to the output of the comparator, according to the input state of the P1.2 port to determine whether the echo is received. The ultrasonic emission and driving circuit are produced by the RC oscillator composed of CD4011, and the temperature sensor adopts AD590.
Time measurement
The period of the ultrasonic signal used in the time measurement is 25 μs, but an ultrasonic signal source equivalent to a wavelength of about 9 mm at 20 ° C is required. To ensure accuracy, a wavelength detector is required. The ultrasonic signal source is composed of a signal generator and a zero-crossing detector circuit. The arbitrary signal generator consists of a 16Kbyte EPROM that can store arbitrary waveforms, a 16-bit counter for scanning EPROM, and a DAC. The zero-crossing detector consists of a threshold value detector. The threshold value of the detector is a part of the peak value of the received signal, so that the detector can compare the received signal according to the reference zero potential. This allows the signal in the signal area to be detected to the greatest extent, thereby minimizing noise interference.
The optimal result mainly depends on the amplitude of the selected echo. The lower the echo, the lower the amplitude, and the lower the possibility of interference by a related noise amplitude. The best signal to use under any conditions depends on the actual amount of noise. The ultrasonic sensor also has a simple noise measurement system. The system can estimate the actual noise by monitoring the input signal during the echo-free phase. The output of this noise measurement system can be converted under low, medium and high noise conditions.
Temperature sensor and automatic error compensation
Air temperature is detected by a temperature sensor and processed by the circuit. It is installed in the probe, the error does not exceed 1 ℃. The automatic compensation of the error can be derived from the simple analog circuit shown in Figure 2. V is proportional to the measured distance.
Software design ideas
Because the ultrasonic transmitting sensor is very close to the ultrasonic receiving sensor, when transmitting ultrasonic waves, the receiving ultrasonic sensor will receive a strong interference signal. In order to prevent the system from misdetection, the delay receiving technology is adopted in the software to improve the anti-interference ability of the system. When the start button is pressed, the command to transmit ultrasonic waves is sent, and the control system begins to execute the program to complete the temperature collection; the time interval of sending and receiving ultrasonic waves is measured; finally, the measured distance is calculated by the numerical processing program and sent to the display for display . The system software adopts modular design, which is composed of main modules such as main program, distance measuring subprogram, temperature measuring subprogram and display subprogram. The main program block diagram is shown in .
Products | About Us | News | Markets and Applications | FAQ | Contact Us