Hubei Hannas Tech Co.,Ltd-Professional Piezoceramic Elements Supplier
News
You are here: Home / News / Ultrasonic Transducer information / principle of ultrasonic distance measurement and high-precision liquid level measurement system

principle of ultrasonic distance measurement and high-precision liquid level measurement system

Views: 5     Author: Site Editor     Publish Time: 2020-11-04      Origin: Site

Inquire

facebook sharing button
twitter sharing button
line sharing button
wechat sharing button
linkedin sharing button
pinterest sharing button
whatsapp sharing button
sharethis sharing button

Ultrasonic distance measurement sensor has a series of advantages, but there are many factors that affect measurement accuracy, so it is difficult to achieve higher accuracy. Based on the principle of ultrasonic distance measurement, temperature, and humidity compensation program of ultrasonic transducer is single, which cannot achieve high-precision distance measurement in a changeable and harsh environment, and a standard baffle compensation program for dual ultrasonic transducers .The cost is high and cannot be widely applied to defects in various fields. A single standard baffle compensation scheme of piezoelectric ultrasonic sensor is designed that uses a steering gear to control the direction of the ultrasonic transducer. In response to the requirement that the first echo front cannot be accurately captured, a programmable gain amplifier is proposed to capture the return front of the echo at different distances. The experimental results show that in the range of 7 m, when air is used as the propagation medium and the reflective surface is water with good emission properties, the measurement error is controlled within 0.4%. This improved method can achieve low-cost under the harsh and changeable environment.

 

introduction

At present, there are many methods of liquid level measurement, such as float level measurement, input pressure-assisted level measurement, microwave radar level measurement, infrared level measurement, laser level measurement and ultrasonic level measurement. Among them, the pressure sensor is represented by contact measurement ,which will be contaminated when used in scenes such as heavy sediment, and then cause large errors. For non-contact ranging systems, microwave radar liquid level measurement is technically difficult and costly; infrared liquid level measurement is low in cost and easy to implement, but has poor directivity and low accuracy; while ultrasonic liquid level measurement can be done without contacting the liquid surface,which avoids the influence of liquid pollution and corrosion on the measuring equipment,it is not subject to light, smoke, electromagnetic interference, and has the advantages of high resolution, simple system structure, convenient installation, and low cost.

Ultrasonic ranging methods mainly include phase detection method, acoustic wave amplitude detection method and transit time detection method. Although the phase detection method has high accuracy, the measurement range is limited, so it is less applied; the acoustic wave amplitude detection method has low accuracy and is easily affected by reflected waves; while the transit time method is between the first two methods, with higher accuracy and measurement It has a wide range and is widely used.

In practical applications, the design of the ranging system has a great influence on the ranging accuracy. Therefore, analyzing the working principle and process of ultrasonic ranging, improving the methods and methods of ranging, and improving the accuracy of ultrasonic ranging transducer has attracted more and more attention. According to the specific environment of the ranging system, the method of improving the accuracy is slightly different. This article focuses on reducing the influence of the external environment, the choice of ultrasonic transducer is combined with the realization of the specific system, to improve the accuracy of ultrasonic level measurement.

 

Principle of ultrasonic ranging

Ultrasonic waves used for distance measurement are usually generated by the piezoelectric effect of piezoelectric ceramics. This piezoelectric ceramic sensor has two piezoelectric wafers and a resonance plate. When the frequency of the two-level external pulse signal is equal to the inherent piezoelectric wafer At the oscillation frequency, the piezoelectric wafer will resonate and drive the resonance plate to vibrate, thereby generating ultrasonic waves; when the resonance plate receives ultrasonic waves, it will press the piezoelectric wafer to vibrate and convert mechanical energy into electrical signals.

The principle of ultrasonic ranging transducer is shown. Using the known propagation velocity v of ultrasonic waves in the air, the ultrasonic transducer emits ultrasonic waves vertically to the liquid surface, and the sound waves are reflected at the interface between the water surface and the gas and transmitted back to the ultrasonic transducer, and the propagation time t is recorded, that is, from The time from transmitting the ultrasonic signal to receiving the ultrasonic echo signal, the distance between the transducer and the liquid level L=0.5vt, and then the actual liquid level is:

S=H-L=H-0.5vt(1)

 

Influencing measurement factors and solutions

According to formula (1), the main factors that affect the accuracy of ultrasonic ranging are the ultrasonic propagation speed and ultrasonic propagation time. In addition, there are ultrasonic frequencies that affect the measurement range and accuracy. Here, the propagation time is not studied and discussed, only the errors in the other two aspects are studied and analyzed, and reasonable solutions are proposed.

 

Ultrasonic propagation velocity

Most of the literature proposes to use the temperature correction method to compensate the speed of sound, and the propagation speed formula is v=331.5+0.607T, where T is the temperature (℃). Then, a temperature and humidity dual compensation method was proposed, and the propagation speed formula is:

Among them, pw is the partial pressure of water vapor, p is the atmospheric pressure, T0 is the absolute temperature, t is the measured air temperature, and v is the ultrasonic wave velocity after compensation. The author believes that the actual air is not completely dry, and the average molar mass and specific heat ratio of the air are corrected. Although this method takes into account the influence of humidity on the speed of sound, the propagation speed is also related to the propagation medium, wind speed, and pressure under actual environmental conditions. Other factors are related, so the measurement results still have large errors.

 

Based on the influence of the environment on the propagation speed, some literature proposes a benchmark measurement method. The principle is to use a two-channel method. One channel is used to measure the ultrasonic propagation speed. A standard baffle with a known distance is placed in front of the ultrasonic transducer. Measuring the time difference of the ultrasonic wave reaching the baffle to calculate the propagation speed of the ultrasonic wave in the environment; the other channel still measures the distance according to the normal measurement method. Therefore, the standard baffle installation method shown is proposed. This method can achieve higher accuracy measurement and adapt to various complex environments. However, there are strict requirements for the installation of standard baffles. Therefore, the corresponding calculation is double.the installation position map of the ultrasonic transducer is complicated, and the uncertainty of the actual environment may cause the ultrasonic wave to reach the baffle to produce useless ultrasonic waves through multiple reflections, which affects the measurement accuracy. Therefore, a dual ultrasonic transducer is proposed.One is used to measure the propagation speed, and the other is used to measure the propagation time, without affecting each other. Although this method reduces computational complexity, eliminates useless ultrasonic waves, and improves measurement accuracy, the cost of the two transducers is relatively large, which is not conducive to popularization.

 

Based on the above research and analysis, this paper proposes a method of using a steering gear to control the direction of a single ultrasonic transducer, which not only takes into account the factors affecting the propagation speed, but also reduces the cost, which is beneficial to popularization in various fields. the standard baffle is placed vertically and placed on the same horizontal line as the ultrasonic transducer. The distance between the two is fixed and greater than the blind zone of the ultrasonic transducer; the steering gear controls the ultrasonic transducer In the direction, the single-chip microcomputer sends instructions to make the steering gear control the transducer to face the liquid surface vertically, and send ultrasonic waves to measure the propagation time, then control the transducer to rotate 90°, face the standard baffle vertically, and send ultrasonic waves to measure the propagation speed.

 

 

Ultrasonic frequency

The wave equation of ultrasonic propagation in the air, where A is the amplitude received by the ultrasonic transducer, A0 is the initial amplitude emitted by the ultrasonic transducer, x is the propagation distance of the ultrasonic wave, ω is the angular frequency of the ultrasonic wave, and t is the ultrasonic wave Propagation time, λ is the wavelength of ultrasound, α is the attenuation coefficient of ultrasound, the formula is α=bf2, where b is the dielectric constant and f is the frequency of ultrasound.

  According to equation (3), it can be seen that when the propagation distance of ultrasonic waves in the air reaches 0.5α, the amplitude of ultrasonic waves is attenuated to 1/e of the original. The higher the ultrasonic frequency, the more severe the attenuation and the smaller the detectable distance range, but the smaller the spread angle of the emitted ultrasonic wave, the thinner the beam and the better the directivity.

   proposes the use of dual comparator shaping to determine the front edge of the echo, but due to the uncertainty of the actual measurement environment, the two comparator thresholds may be set too small or too large, resulting in reduced measurement accuracy. Based on this, this article proposes to use the programmable gain amplifier PGA112 to improve the accuracy of capturing the front edge of the first echo through multiple gain corrections.

  

software design

  3.1 Program design ideas and related points of attention

  In order to achieve high-precision liquid level measurement, the work to be completed by the software:

   (1) Generate 40 kHz ultrasound;

   (2) Measuring the propagation time of ultrasonic waves;

   (3) Control the steering of the steering gear to control the direction of the transmitting and receiving ends of the ultrasonic transducer;

   (4) Measure the propagation speed of ultrasonic waves;

  (5) Select the appropriate ultrasonic frequency as the test object according to the distance;

   (6) Calculate the height of the liquid level and perform corresponding actions such as data display. The 40 kHz pulse train of the device is generated by software; the measurement of the propagation time and speed of the ultrasonic wave, and the steering control of the steering gear are completed by the timing/counter of the single-chip microcomputer.

   While writing the system program, consider the hardware connection, but also consider setting the storage space, the use of registers and external interrupt pins. In addition, because of the existence of after-vibration and refracted wave diffraction, it takes a period of time to receive the echo after the end of the transmission of ultrasonic waves for corresponding processing.

  

Main program flow

  The system adopts modular programming, including main program module, ultrasonic propagation time measurement module, steering gear steering module, ultrasonic propagation speed measurement module, liquid level calculation module, data display and other corresponding ultrasonic module distance sensor. After the system is initialized, use the while(1) statement to achieve the following infinite loop: first call the ultrasonic propagation time measurement module, and at the same time transmit the ultrasonic, turn on the counter to start timing, and turn off the external interrupt. Delay 1 ms, then turn on the external interrupt and wait for the echo. When an echo is detected, stop the timer in the external interrupt program, store the value of the timer, and the echo reception flag is set to 1. Then call the steering module of the steering gear, turn on the counter to start timing, and control position 1, when the pulse width is greater than 2.5 ms, control position 0; when the count reaches 3 ms, the counter is cleared to make the steering gear 90°. Then call the ultrasonic propagation velocity measurement module, and calculate the sound velocity through the fixed distance of the standard baffle. In the steering module of the steering gear, set the pulse width to 1.5 ms to make the steering gear turn to 0°. Finally, the microcontroller calls the liquid level calculation program and performs corresponding actions such as data display.

 

Experimental results and analysis

  This system solidifies the software on the STC12C5A60S2 single-chip microcomputer. In order to verify the measurement effect of the ultrasonic liquid level measurement system, a water tank with a relatively stable flow rate was selected outdoors for measurement, and the water level was changed by controlling the valve. The system was installed 7 m from the bottom of the tank. The method of taking the average of 3 measurements is adopted to reduce the random error of the system.

   The measurement results of ultrasonic distance transducer are compared with the water gauge measurement data, as shown in Table 1. According to experimental measurement and error analysis, the system has a measurement blind zone of 30 mm, and the measurement error is basically controlled at 0.4%, achieving high-precision ranging, which can meet the measurement needs in industrial and agricultural production.

 

Concluding remarks

In the ultrasonic liquid level measurement system, based on the full analysis of the causes of the ultrasonic transducer sensor, for the measurement of the ultrasonic propagation speed, according to the influence of environmental factors and the consideration of cost issues, it is proposed to use a steering gear to control the direction of the ultrasonic transducer to achieve The baffle compensation correction method that saves costs, simplifies the design and fully considers environmental impact factors is a method and technical means that has not been mentioned in the relevant literature of liquid level measurement. For the precise capture of the first ultrasonic echo front edge, a gain programmable method is adopted to improve the capture of the first echo front edge, thereby improving the accuracy of ranging. In industrial and agricultural applications with the theme of energy saving, environmental protection and simplicity, this improved method has become a new idea for ultrasonic level measurement with its unique advantages.

 


Feedback
Hubei Hannas Tech Co.,Ltd  is a professional piezoelectric ceramics and ultrasonic transducer manufacturer, dedicated to ultrasonic technology and industrial applications.                                    
 

RECOMMEND

CONTACT US

Add: No.302 Innovation Agglomeration Zone, Chibi Avenu ,Chibi City, Xianning, Hubei Province,China
E-mail: sales@piezohannas.com
Tel: +86 07155272177
Phone: +86 +18986196674         
QQ: 1553242848 
Skype: live:mary_14398
​        
Copyright 2017  Hubei Hannas Tech Co.,Ltd All rights reserved. 
Products