0 Introduction
Liquid density is an important parameter in many industries. It can directly participate in the control and decision-making of the production process. Therefore, it is of great significance to quickly and accurately detect liquid density online. Especially in the fields of petroleum, chemical, food, medicine and other industries, the measurement of density is directly related to the national economy and the personal safety of consumers.
1 Working principle of ultrasonic liquid density meter
There are many ways to measure the density of liquids using ultrasound. With the rapid development of electronic technology, the method of measuring density with the help of sound velocity has been widely used. This is because when ultrasound propagates in liquid, its sound velocity and the density of the liquid follow the following relationship:
(1-1)
Where C is the speed of ultrasonic wave in liquid; ρ is the density of liquid; K is the compression coefficient. For a specific liquid, the compression coefficient K is a constant. As long as the speed of ultrasonic wave in liquid is measured, the density of liquid can be calculated. The speed measurement can be determined by the sound path and propagation time of ultrasonic wave in liquid.
2. Design of control and calculation circuit based on FPGA
Since the frequency of FPGA chips is very high, it is easy to design and implement clock circuits of tens of megahertz or even hundreds of megahertz, so it is very suitable for designing high-speed timing circuits. In this design, Altera's CycloneⅡ series chips are selected. The operating frequency of this series of chips can be as high as 400MHz, which is enough to meet the needs of this design. The software development platform is QuartusⅡ. The overall system block diagram of the circuit (including
Figure 1 System circuit schematic
2.1 Square Pulse Generation Module
The function of the square pulse generation module is to generate square pulses of a certain frequency to stimulate the operation of the transmitting probe. The selection range of the square pulse frequency should be 1/10 of the vibration frequency of the probe piezoelectric chip (2MHz in this design), so 200KHz is selected. Its generation is achieved by a square pulse signal generator based on FPGA [1]. Its external pin structure is shown in Figure 4, where the input signals are clk (clock) and en (enable terminal), and the output signal is dout [7…0].
2.2 Design of high-speed counter
高速计数器的设计是实现精确测量时间的核心。本设计中,为了获得精确的计数频率,采用了QuartusⅡ中內嵌的锁相环,外部的参考时钟由16MHz的晶振提供,锁相环所采用的倍频为6倍,这样就能获得稳定的96MHz的内部时钟。整体的原理图结构如图2所示。锁相环(PLL3)的频率输出作为计数器的计数时钟,计数器(cnter)由四个十进制计数器组成,内部设有FIFO,主要用于计数结果的读取,当wrreq(写允许)信号为高电平时,将计数结果写入FIFO,FIFO的时钟与计数器的时钟同步;当接收电路的信号经过光电耦合器到达rdreq(读允许)端时,该端电平变为高电平,同时wrreq为低电平,此时计数结束,同时将计数结果送到输出端,输出计数结果。
Figure 2 High-speed counter schematic diagram [page]
2.3 Calculation and compensation module
The calculation and compensation module is divided into two parts: calculation and compensation. Its function is to calculate the density of the liquid based on the counting result of the counter and the result of temperature correction by the compensation circuit. In this design, the distance between the transmitting and receiving probes is 2cm; the time for the sound wave to pass between the two probes can be obtained from the counting result of the counter (cntvalue), because the unit counting time is the reciprocal of the counting frequency, so:
(2-1)
The structure of the operator is shown in Figure 3. Inputs c1 and c2 are count values, and the results after the parallel multiplier operation are sent to the parallel divider; because the compression coefficient K is a constant, but the K of each liquid is different, the entire density meter needs to have the function of selecting the liquid. The sel module in the figure is the part that realizes this function. The input signal is used to select the liquid to be tested. The density meter in this design can measure 300 kinds of liquids, so the selection signal is a 9-bit coded binary number. The essence of the selection module is a memory that stores the compression coefficients of various liquids. The coefficient of the density of the liquid to be tested is found according to the selection signal, and the result is also sent to the divider.
Figure 3 Operation and compensation module structure
The TEM in the figure is the temperature compensation module. Temperature has a great influence on the speed of sound. In liquid, every 1°C change in temperature will cause a 2% change in the speed of sound. In the actual environment, the temperature generally changes by more than 40°C. The resulting change in the speed of sound of more than 8% may introduce an error of more than 8% to the actual measurement. When using ultrasonic sound velocity to measure liquid density, in order to improve accuracy, temperature compensation must be performed [2].
2.4 Control and operation circuit
The overall structure of the control and operation circuit is shown in Figure 4. Pulse is a square pulse generation module; count is a high-speed counter; operate is an operation and compensation module;
Figure 4 Control and operation overall structure diagram [page]
3. Conclusion
The experiment was conducted at room temperature (20°C) and pressure (1 standard atmosphere). The liquid to be tested was commonly used water, and its compression coefficient K=5×10-5/atmosphere. Through simulation (Figure 5), it can be obtained that the density of water is 1Kg/m3. This is the same as the actual result. Due to the large number of input signals, only some simulation signals are selected here. Through the analysis of the timing, it can be obtained that the overall delay of the entire circuit is 230ns, which shows that the system has a high response speed.
Figure 5 System simulation results
Previous article:Research and implementation of pseudo code capture based on FPGA sliding correlation method
Next article:Using CPLD to implement parallel communication between single chip microcomputer and ISA bus
Recommended ReadingLatest update time:2024-11-17 03:58
- Popular Resources
- Popular amplifiers
- Analysis and Implementation of MAC Protocol for Wireless Sensor Networks (by Yang Zhijun, Xie Xianjie, and Ding Hongwei)
- MATLAB and FPGA implementation of wireless communication
- Intelligent computing systems (Chen Yunji, Li Ling, Li Wei, Guo Qi, Du Zidong)
- Summary of non-synthesizable statements in FPGA
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- 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!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- 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
- Difference between TMS320x281x and TMS320x2833x/TMS320x2823x
- Gameboy that doesn't need to be charged
- [National Technology N32 Bluetooth chip development package] --N32WB03x series
- Watch the video to win a 50-yuan Jingdong card | Taixiang's actual test of Shui Ge's secrets, the fourth issue
- Analysis of millimeter wave terminal technology and test solutions
- Have you seen it? The heat sink symbol in the schematic diagram
- [Raspberry Pi Pico Review]——by fxyc87
- What issues regarding antenna isolation should we pay attention to?
- A Brief Analysis of UWB Ultra-Wideband Indoor Positioning Technology
- What is the special purpose of inductors wound with silk wire?