Ultrasonic distance measurement is a non-contact detection method. It has been widely used in recent years due to its simple and compact structure, high reliability, low price, strong real-time performance, etc., such as liquid level measurement, road surface flatness detection during road construction, car reversing radar, robot-assisted visual recognition system, etc. However, since ultrasonic waves are affected by ambient temperature, humidity, wind speed, etc. when propagating in the air, the accuracy of traditional ultrasonic distance measurement systems is generally low. Reference [4] adopted the method of adding a hardware temperature compensation module to the system, which can only avoid the measurement error caused by ambient temperature changes to a certain extent. The wavelet processing algorithms used in references [5, 6] cannot make up for the essential defects of the system. Therefore, a high-precision multi-channel synchronous ultrasonic distance measurement system with high control accuracy and wide application range is studied.
1 Working principle and structure of ultrasonic ranging
1.1 Working principle
Sound waves with a resonant frequency higher than 20 kHz are called ultrasonic waves. The basic working principle of ultrasonic ranging is: the transmitting probe emits ultrasonic waves, which propagate in the medium, encounter obstacles and reflect, and then return to the receiving probe through the medium. The time required for the ultrasonic wave to be transmitted and received is measured, and then according to the speed of sound in the medium, the distance from the probe to the obstacle can be calculated using the formula S=0.5ct, where: S is the measured distance, c is the propagation speed of ultrasonic waves in the medium, and £ is the time it takes for the ultrasonic wave to be transmitted and received.
1.2 General structure of ultrasonic ranging system
In general, the basic structure of ultrasonic ranging system is shown in Figure 1.
The system usually uses a square wave signal with a frequency of 40 kHz generated by the microcontroller. In order to avoid the influence of temperature on the propagation speed of sound waves, temperature compensation is used to meet the needs of normal operation in different environments. The precise measurement of time can be completed by a separate counter inside the microcontroller or by an external timing circuit.
2 Multi-channel synchronous ultrasonic ranging system
The system consists of a single-chip microcomputer, an FPGA module, 6 pairs of ultrasonic transducers with the same transmitter and receiver, a power amplifier circuit, an echo high-gain amplifier circuit, a bandpass filter circuit, and a comparison shaping circuit. The system block diagram is shown in Figure 2.
In this system, the single-chip microcomputer system and the FPGA system are the core components of the rangefinder, which are used to coordinate the work of various components. The single-chip microcomputer controller unit is mainly used to start the synchronization of ultrasonic emission and the start of the count of the timer counter, and to process the value of the timer counter after receiving the echo. The FPGA unit is mainly used to generate the ultrasonic emission pulse frequency of 125 kHz and the frequency of the timer counter (>170 kHz). The microcontroller MCU is used to start the ultrasonic emission. After the FPGA emits a certain number of pulse trains (here 8 to 10 are selected), it stops transmitting and starts the timer counter counting. The ultrasonic wave passes through the obstacle and returns. When the ultrasonic transducer receives the echo signal, its signal is sent to the FPGA to control the stop of the timer counter, and the obtained count value is sent to the single-chip microcomputer. The first to fifth ultrasonic transducers are used to measure the distance. The five ultrasonic transducers for measuring the distance are installed on the fixed plate of the rangefinder at equal intervals. The system uses a probe with the same body for transmission and reception, and its beam angle is very small, which effectively ensures the vertical measurement distance from each probe to the object being measured. The sixth ultrasonic transducer is installed on the left side of the rangefinder, and a standard baffle is installed on the right side of the rangefinder to more accurately measure the speed of sound in the environment at that time for temperature compensation. The control or display module is used to adjust the balance or output the measured distance.
2.1 Transmitter circuit
The transmitter circuit is shown in Figure 3(a). The transmitter circuit sends the received square wave pulse signal to the Class B push-pull amplifier circuit, drives the CMOS tube with its output signal, and then adds its pulse signal to the high-frequency pulse transformer for power amplification, increasing the amplitude to more than 100 volts. Finally, the amplified pulse square wave signal is added to the ultrasonic transducer to generate an ultrasonic wave with a frequency of 125 kHz and transmit it. [page]
The receiving circuit consists of a two-stage operational amplifier circuit composed of OP37, a second-order bandpass filter circuit composed of TL082, and a comparison circuit composed of LM393. Because the frequency of this system is relatively high, the echo signal is very weak, at the millivolt level, so it is designed as a two-stage amplifier circuit, the first stage amplifies 100 times, the second stage amplifies 50 times, and the total amplification is about 5,000 times.
In addition, considering that this system needs to adapt to various complex working environments, a high-precision bandpass filter circuit composed of TL082 is designed to further filter the echo signal after amplification. The filtered signal is input to the inverting input of the comparator composed of LM393, compared with the reference voltage, and its comparison output voltage is limited. Its voltage is connected to the D flip-flop. The comparator shapes the amplified AC signal into a square wave signal, which is connected to the FPGA. The receiving module counts and when the pulse train setting value is reached, the timing counter is turned off and the counting stops.
2.3 Design of each component module inside the FPGA
FPGA mainly realizes the transmission and reception of 125 kHz ultrasonic waves and the measurement of the time between the transmission and reception of six ultrasonic waves. Its internal structure is shown in Figure 4.
FPGA is mainly composed of five parts: transmitting module, sequential execution counter, data selector, timing counter and receiving module. Among them: the transmitting module completes the transmission of the pulse train and the start of the counter, and is mainly composed of three parts: 96 frequency divider, transmission pulse train counter and transmission pulse train controller. The sequential execution counter module is mainly composed of six NAND gates, counters and NOT gates.
After all the receiving modules receive the data, they output high level (FINISH port) through NAND gates and NOT gates to trigger the single-chip microcomputer to put the single-chip microcomputer in the state of receiving data. The single-chip microcomputer sends a signal to start counting the sequential execution counter. The count value is increased by 1 each time, and the output port is the corresponding timing counter. The single-chip microcomputer reads the count value from the corresponding timing counter. The data selector and the sequential execution counter complete the reading of the count value data.
The timing counter module mainly completes the measurement of the time interval from the pulse to the reception and the pulse counting. It is mainly composed of start and stop counter control, 12 frequency divider, 16-bit timing counter, two-choice data selector and 8-bit data latch (see Figure 5). The receiving module mainly receives the echo signal and turns off the counter. When the receiving module receives the signal, it starts counting. When the count value is reached, it outputs a high level to turn off the timing counter and stop counting. To prevent signal crosstalk, when the signal is transmitted, the CUAN terminal inputs a high level to shield its signal.
3 Results
After laboratory debugging, the multi-channel synchronous ultrasonic ranging system based on the combination of single-chip microcomputer and FPGA given in this paper has the following advantages over other systems:
(1) Strong ability to resist environmental factors. In the working environment, there are many factors that affect the speed of sound. Such as temperature, wind, humidity, etc. The system can accurately measure the speed of sound in the environment at that time by installing a standard correction plate, which can avoid errors caused by changes in various environmental factors.
(2) A frequency of 125 kHz is used, and multi-channel ultrasonic precise synchronous ranging is used at the same time. The measurement accuracy of the system is guaranteed.
(3) The solution of combining FPGA and AT89C51 is adopted. FPGA completes the precise measurement of the propagation time of multi-channel ultrasonic waves, and AT89C51 completes the signal startup and data processing. Compared with the conventional system, although the FP-GA hardware is added, the system also abandons some temperature compensation modules used by the system, which greatly improves the accuracy and flexibility of the system.
Previous article:Using NI PXI and SCXI hardware to build a test system for medical stents
Next article:Research on real-time dynamic monitoring of object weight using CCD
- Popular Resources
- Popular amplifiers
- Keysight Technologies Helps Samsung Electronics Successfully Validate FiRa® 2.0 Safe Distance Measurement Test Case
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Seizing the Opportunities in the Chinese Application Market: NI's Challenges and Answers
- Tektronix Launches Breakthrough Power Measurement Tools to Accelerate Innovation as Global Electrification Accelerates
- Not all oscilloscopes are created equal: Why ADCs and low noise floor matter
- Enable TekHSI high-speed interface function to accelerate the remote transmission of waveform data
- How to measure the quality of soft start thyristor
- How to use a multimeter to judge whether a soft starter is good or bad
- What are the advantages and disadvantages of non-contact temperature sensors?
- 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
- CC2640R2F BLE5.0 Bluetooth protocol stack GAP GATT service (GGS)
- 28335scififo interrupt receiving and sending
- 1. RS232 communication circuit
- macropad keyboard
- DSP Development Trend
- Regarding the built-in pull-up resistor when MSP430 IO is used as input!
- Help, where can I find a high frequency magnetic core that supports 300MHz
- LSM303AH Code and PCB Library
- [ATmega4809 Curiosity Nano Review] Unboxing
- [CY8CKIT-149 PSoC 4100S Review] + Use of Timer/Counter