How to design the ultrasonic signal transmitting and receiving circuit based on AT89S52 single chip microcomputer?
Ultrasonic waves are mechanical waves with a frequency above 20 kHz and a propagation velocity in air of approximately 340 m/s (at 20 °C). Ultrasonic waves can be generated by ultrasonic sensors. Two types of ultrasonic sensors are commonly used: one is to generate ultrasonic waves electrically, and the other is to generate ultrasonic waves by mechanical means. Currently, piezoelectric ultrasonic sensors are commonly used. Because the ultrasonic wave has easy directional emission, good directionality, good strength control, insensitivity to color and illuminance, and high reflectivity, it is widely used in non-destructive testing, distance measurement, distance switch, automobile reversing collision avoidance, intelligent robot and other fields.
The overall block diagram of this design is shown in the figure, mainly consisting of ultrasonic transmission, ultrasonic reception and signal conversion, key display circuit and temperature sensor circuit. Ultrasonic ranging is to continuously detect the echo reflected by an obstacle after the ultrasonic wave is emitted, thereby measuring the time difference T between the transmitting and receiving echoes, and then finding the distance S=CT/2, where C is the ultrasonic wave velocity. At normal temperature, the speed of sound in the air is about 340 m/s. Since the ultrasonic wave is also a kind of sound wave, its propagation speed C is related to the temperature. When it is used, if the temperature does not change much, the sound speed can be considered to be substantially constant. Because the accuracy of the system's ranging accuracy is very high, the propagation speed of the ultrasonic wave is corrected by detecting the temperature. After the ultrasonic wave propagation speed is determined, the distance can be obtained by measuring the time of the ultrasonic wave back and forth. This is the basic principle of the ultrasonic ranging system.
Ultrasonic signal transmitting and receiving circuit
The transmitting part circuit is mainly composed of a pulse modulation signal generating circuit, an isolating circuit and a driving circuit for providing a transmitting signal for the ultrasonic sensor as shown in the figure. In the pulse modulation signal generating circuit, the reset (RESET) terminal of the 555 is controlled by the single chip microcomputer, so that the 555 timer works in time to generate a pulse modulation signal with a pulse frequency of 40 KHz and a period of 30 ms, and the signal waveform is as shown in FIG. 2 . In this design, 10 pulse signals are transmitted in one cycle. The isolation circuit is mainly composed of two NAND gates to isolate the output stage from the pulse generation circuit. The output stage consists of two general-purpose integrated operational amplifiers, the TL084CN. Since the ultrasonic sensor's emission distance is proportional to the voltage applied across it, the circuit is required to generate a sufficiently large driving voltage. The basic principle is a comparison circuit when input. When the signal is greater than 2.5V, the output voltage of the op amp A is VA=+12V, the output voltage of the op amp B is VB=-12V, and when the input signal is 2.5V, the output voltage of the op amp A is VA=“-12V”, the op amp The output voltage of B is VB=+12V, so two symmetric waveforms with opposite polarities are obtained at both ends of the ultrasonic sensor, namely VB=-VA, so the voltage applied across the ultrasonic sensor V=VA-VB=2VA, two of them The voltage at the terminal can reach 24V, which ensures that the ultrasonic wave can transmit a long distance and increase the measurement range.
The circuit of the receiving part is composed of an amplifying circuit, a band pass filtering circuit and a signal conversion circuit. Since the ultrasonic signal is greatly attenuated when it propagates in the air, the reflected ultrasonic signal is very weak and cannot be directly sent to the subsequent stage circuit for processing. The signal must be amplified to a sufficient amplitude to make the latter circuit pair It does the right thing. The preamplifier circuit is a bootstrap type non-inverting AC amplifier circuit composed of an integrated operational amplifier. It has a high input impedance. C5, C6, and C7 are DC blocking capacitors. R5, R6, and R7 are bias resistors. Static working point. The bandpass filter uses a second-order RC active filter to eliminate the effects of interfering signals received during ultrasonic propagation.
If you want to know more, our website has product specifications for the MCU, you can go to ALLICDATA ELECTRONICS LIMITED to get more information