CN111795727B - Method and circuit for indirectly measuring ultrasonic wave transmission time - Google Patents

Method and circuit for indirectly measuring ultrasonic wave transmission time Download PDF

Info

Publication number
CN111795727B
CN111795727B CN202010650060.3A CN202010650060A CN111795727B CN 111795727 B CN111795727 B CN 111795727B CN 202010650060 A CN202010650060 A CN 202010650060A CN 111795727 B CN111795727 B CN 111795727B
Authority
CN
China
Prior art keywords
unit
pulse width
time
circuit
reference signal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010650060.3A
Other languages
Chinese (zh)
Other versions
CN111795727A (en
Inventor
王安然
赵伟国
蒋延付
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Jiliang University
Original Assignee
China Jiliang University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Jiliang University filed Critical China Jiliang University
Priority to CN202010650060.3A priority Critical patent/CN111795727B/en
Publication of CN111795727A publication Critical patent/CN111795727A/en
Application granted granted Critical
Publication of CN111795727B publication Critical patent/CN111795727B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01FMEASURING VOLUME, VOLUME FLOW, MASS FLOW OR LIQUID LEVEL; METERING BY VOLUME
    • G01F1/00Measuring the volume flow or mass flow of fluid or fluent solid material wherein the fluid passes through a meter in a continuous flow
    • G01F1/66Measuring the volume flow or mass flow of fluid or fluent solid material wherein the fluid passes through a meter in a continuous flow by measuring frequency, phase shift or propagation time of electromagnetic or other waves, e.g. using ultrasonic flowmeters
    • G01F1/667Arrangements of transducers for ultrasonic flowmeters; Circuits for operating ultrasonic flowmeters

Landscapes

  • Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • Fluid Mechanics (AREA)
  • General Physics & Mathematics (AREA)
  • Measuring Volume Flow (AREA)

Abstract

The invention discloses a method and a circuit for indirectly measuring ultrasonic transmission time. The method for indirectly measuring the ultrasonic transmission time is based on the reference signal, converts the measurement of the forward and reverse relative to the non-whole-period flight time of the reference signal into the measurement of the pulse width, improves the precision of time measurement by adopting the measurement of a certain number of continuous pulse widths, designs a pulse width modulation and phase-shifting circuit for solving the influence of signal period deviation on the flight time measurement, and reduces the measurement error by the design of a correction circuit.

Description

Method and circuit for indirectly measuring ultrasonic wave transmission time
Technical Field
The invention belongs to the technical field of flow detection, and relates to a method and a circuit for indirectly measuring ultrasonic transmission time.
Background
Compared with other types of flowmeters, the ultrasonic flowmeter has the advantages of no movable parts inside the measuring part, no abrasion, high precision and repeatability, and bidirectional measurement. The time difference method is the most widely applied method in the current ultrasonic flowmeter, and the difference between the forward flight time and the backward flight time of the acoustic signal and the flow velocity are in a linear relation, so the measurement accuracy of the forward flight time and the backward flight time directly influences the measurement accuracy of the flowmeter.
In the traditional time difference measurement, the transmission time between an excitation signal of a transducer and an echo receiving signal is obtained through a time measurement chip, a threshold value method is usually adopted, and when the echo signal is greater than the threshold value, the echo arrival time is considered to be the moment. However, due to attenuation of sound waves in propagation in a medium and susceptibility to environmental changes, the stability of echo signals is poor, amplitude jitter and other problems occur, and particularly in the case of low signal-to-noise ratio, an erroneous echo threshold point is captured, pulse "false detection" is caused, erroneous measurement of propagation time is caused, and a large measurement deviation is caused.
Although the method such as the double threshold method, the echo modeling method, various digital signal processing algorithms and the like solves the problem of misjudgment of the arrival time of the echo to a certain extent, the method still has certain limitations. Moreover, the essence of the time difference method is to slightly differ two orders of magnitude relatively large, close-valued amounts of time, requiring a high measurement circuit.
Disclosure of Invention
The invention provides a method and a circuit for indirectly measuring ultrasonic transmission time aiming at the defects of the prior art, the method and the circuit adopt the principle of capacitance charge and discharge and a signal processing method, realize the measurement of indirect flight time by measuring the time of a non-whole period, avoid the requirement of a traditional time difference method for obtaining a circuit with a tiny time difference by subtracting two numerical values with relatively large orders of magnitude, and further improve the measurement precision. According to the method, time changes of forward flow and reverse flow relative to a reference signal caused by different flowing speeds of liquid media in a pipeline are converted into widths of pulse levels, and the pulse signals are passed through an integrating circuit to obtain stable voltage, so that analog-to-digital conversion is carried out to obtain time. Meanwhile, aiming at the measurement error of the flight time caused by the periodic movement of the signal in the measurement, a signal processing method combining modulation and phase shift is adopted to improve the accuracy and the reproducibility of flow measurement.
The specific method for indirectly measuring the ultrasonic transmission time comprises the following steps:
the single chip microcomputer synchronously generates excitation signals and reference signals, and a certain number of excitation signals passing through the frequency division unit are selected for sending into the ultrasonic transducer for each measurement so as to generate a certain number of continuous ultrasonic signals.
The ultrasonic transducer changes the sending and receiving states through the analog switch, and echo signals received by the ultrasonic transducer are processed to obtain square wave signals.
The time pulse width conversion unit is synchronously triggered by the square wave signal, and the first rising edge of the echo signal triggers the start reference signal so as to ensure time synchronization.
Meanwhile, the reference signal is preprocessed, the reference signal with the same frequency as the frequency-divided excitation signal is obtained through the frequency dividing circuit, the duty ratio of the high level is increased through the pulse width modulation circuit, the duty ratio can be increased from the original 50% to 90%, and the measurement range of forward and backward flow is enlarged; the relative position of the reference signal is moved through the phase-shifting circuit, so that the pulse width formed between the rising edge of the forward and reverse flow echo signals and the falling edge of the reference signal under the static condition is increased by 1/(2f) periods (wherein f is the frequency of the reference signal and the echo signal), thereby increasing the pulse width of small-flow measurement, improving the measurement accuracy, avoiding period deviation, ensuring the consistency of the number of the whole forward and reverse flows periods, solving the problem of inconsistent number of the whole periods, and being incapable of judging the conditions of reverse flow or overlarge flow.
And converting the offset time of the echo signal relative to the reference signal into a pulse width by a time pulse width conversion unit, and selecting the pulse width between the rising edge of the echo signal and the falling edge of the reference signal as the transmission time of the non-full-period ultrasonic wave.
The pulse width voltage conversion unit mainly selects a certain number of continuous wave pulse widths obtained by the time pulse width conversion unit for conversion, wherein the number of the continuous wave pulse widths is changed by the variable window time TyiThe control is carried out by controlling the temperature of the air conditioner,
Figure BDA0002574609530000021
Ty0the time from the ultrasonic characteristic point to a certain number of continuous wave pulse widths at a certain temperature T0 is represented, the sound velocity of the ultrasonic wave in the liquid has a certain relation with the liquid temperature ti, and can be represented by f' (ti), so the window time T is variableyiThe arrangement of the device can ensure that the head wave of the continuous wave pulse width is at the same position under the complex working condition, and further improves the measuring accuracy.
The constant current source is controlled by a certain quantity of continuous wave pulse width high and low levels to charge the capacitor, stable voltage obtained at two ends of the capacitor is input into the singlechip through the sampling and holding circuit, thereby realizing the conversion of pulse width and voltage, obtaining accurate non-whole period flight time, and calculating the difference between forward and reverse ultrasonic wave transmission time.
Further, the measurement system is self-calibrated by a known duty cycle pulse width before each voltage conversion to reduce errors.
Furthermore, the power supply control voltage stabilizing unit controls the power supply of the comparing unit and the sampling and holding unit, and the power supply is turned off in non-measurement time so as to reduce power consumption.
The circuit for indirectly measuring the ultrasonic wave transmission time comprises:
the ultrasonic transducer comprises an ultrasonic transducer A, an ultrasonic transducer B, a frequency division unit, an analog switch unit, a comparison unit, a preprocessing unit, a time pulse width conversion unit, a pulse width voltage conversion unit, a sampling holding unit, a power supply control voltage stabilization unit, a temperature detection unit and a single chip microcomputer unit.
The ultrasonic transducer A and the ultrasonic transducer B are arranged on the same side of the pipeline;
the input end of the energy converter A is connected with the source end A of the first channel circuit of the analog switch; the input end of the transducer B is connected with the source end B of the analog switch first channel circuit; the output end of the first channel of the analog switch is connected with the positive input end of the comparison unit; the enabling end of the first channel of the analog switch is connected with an I/O port of the singlechip.
The input end of the transducer A is connected with the source end A of the analog switch second channel circuit; the input end of the transducer B is connected with the source end B of the analog switch second channel circuit; the output end of the second channel of the analog switch is grounded; the enabling end of the second channel of the analog switch is connected with the I/O port of the singlechip.
The input end of the frequency division unit is connected with an I/O port of the singlechip; the output end of the frequency dividing unit is connected with the positive input end of the comparing unit; the negative input end of the comparison unit is connected with +1.5V voltage; the output end of the comparison unit is connected with the first comparison end of the time pulse width conversion unit; the output end of the comparison unit is connected with the time synchronization control end of the time pulse width conversion unit.
The input end of the preprocessing unit is connected with an I/O port of the singlechip; the output end of the preprocessing unit is connected with the second comparison end of the time pulse width conversion unit.
The input end of the pulse width voltage conversion unit is connected with the output end of the time pulse width conversion unit; the voltage discharge end of the pulse width voltage conversion unit is connected with an I/O port of the singlechip; the output end of the pulse width voltage conversion unit is connected with the input end of the sampling holding unit; the output end of the sampling and holding unit is connected with the I/O port of the singlechip.
The enabling end of the power supply control voltage-stabilizing unit is connected with an I/O port of the singlechip; the input end of the power supply control voltage stabilizing unit is connected with + 3V; the output end of the power supply control voltage stabilizing unit is respectively connected with the power supply ends of the comparison unit and the sampling and holding unit chip.
The input end of the temperature detection unit is connected with the temperature sensor and the reference resistor; the output end of the temperature detection unit is connected with the I/O port of the singlechip.
The analog switch unit model selection chip ADG 884; the frequency division unit model selection chip SN74LVC1G79 DBVR; the comparing unit type selection chip TLV 7021; the preprocessing unit type selection chip GN74D, TPS79630, SN74AHC1G14, SN74HC02DRG 4; the time pulse width conversion unit is selected to be GN 74D; the pulse width voltage conversion unit is in a selected type LM334 and a selected type TS5A3154 DCUR; the sample and hold unit is provided with a model selection chip OPA 2380; the power supply control voltage stabilizing unit model selection chip TPS 76930; the temperature detection unit is a model selection thermistor CMFB103F 3970; the single chip microcomputer unit model selection chip MSP430F 449.
The invention has the beneficial effects that: the measuring method designed by the invention can indirectly measure the transmission time of the ultrasonic wave relative to the reference signal, avoids misjudgment of the arrival time of the ultrasonic echo, converts the time offset of the ultrasonic echo relative to the reference signal into the measurement of the pulse width, outputs the voltage passing through the pulse width, and improves the measuring accuracy by measuring a certain number of pulse widths, wherein the voltage difference of forward and backward flow measurement is in direct proportion to the flow speed. The circuit designed by the invention preprocesses the reference signal, increases the duty ratio of high level thereof through the pulse width modulation circuit, can increase the duty ratio from the original 50% to 90%, and enlarges the measurement range of forward and reverse flow; the relative position of the reference signal is moved through the phase-shifting circuit, so that the pulse width formed between the rising edge of the forward and reverse flow echo signals and the falling edge of the reference signal under the static condition is increased by 1/(2f) periods (wherein f is the frequency of the reference signal and the echo signal), thereby increasing the pulse width of small-flow measurement, improving the measurement accuracy, avoiding period deviation, ensuring the consistency of the number of the whole forward and reverse flows periods, solving the problem that the number of the whole periods is inconsistent and being incapable of judging whether the reverse flow or the flow is overlarge. Before the pulse width voltage conversion circuit is used each time, the self-correction is carried out through the known pulse width, so that the interference caused by complex working conditions can be reduced. And some larger power consumption chips are turned off by controlling the voltage stabilizing chip through the power supply in non-measurement time, so that the power consumption of the circuit is reduced.
Drawings
FIG. 1 is a schematic view of an ultrasonic pipe model structure;
FIG. 2 is a schematic view of the measurement principle of an ultrasonic flow meter;
FIG. 3 is a schematic diagram of an indirect time measurement principle of an ultrasonic flow meter;
FIG. 4 is a schematic diagram of the time measurement principle before and after pulse width modulation of an ultrasonic flow meter;
FIG. 5 is a schematic diagram of the time measurement before and after phase shifting of an ultrasonic flow meter;
FIG. 6 is a block diagram of an ultrasonic flow meter system;
FIG. 7 is a time measurement system diagram of an ultrasonic flow meter;
FIG. 8 is a pre-processing unit circuit diagram;
FIG. 9 is a pulse width voltage conversion self-correction circuit diagram;
FIG. 10 is a schematic diagram of the results of an indirect time measurement circuit;
fig. 11 is a flow chart of an indirect time measurement method.
Detailed Description
The following further describes a method and a circuit for indirectly measuring the transmission time of ultrasonic waves according to the present invention with reference to the accompanying drawings.
Referring to fig. 1, the ultrasonic transducer A, B is installed on the same side of the pipeline, the transmission of echo signals is performed through the two reflection sheets, the sound path is effectively increased, and the measurement principle mainly adopts a time difference method for measurement. The traditional ultrasonic flowmeter works according to the principle that: c is the propagation speed of the ultrasonic wave in water, v is the average speed of water flow, and the effective sound path is L +2L1The downstream transmission time t of the ultrasonic wave in the fluiddownComprises the following steps:
Figure BDA0002574609530000051
countercurrent transmission time t of ultrasonic waves in fluidupComprises the following steps:
Figure BDA0002574609530000052
because v < < c, the forward and reverse flow transmission time difference delta t is:
Figure BDA0002574609530000053
referring to fig. 2, where T is a period of the ultrasonic signal; n is a radical ofd、NuRespectively representing the whole period values of signals in the forward flow process and the reverse flow process; delta taud、ΔτuRepresenting the non-whole cycle time, the transit time t of the ultrasonic wave during forward and backward flow propagationdown,tupAnd the time difference Δ t can be expressed as:
tdown=NdT+Δτd (4)
tup=NuT+Δτu (5)
Δt=tup-tdown (6)
generally, the time difference generated by forward and backward flow of the ultrasonic transducer in a fluid medium does not exceed a whole period, and N isdAnd NuIn case of equality,. DELTA.tauuAnd Δ τdThe difference of (a) is the forward and backward transmission time difference Δ t.
Referring to fig. 3, the principle of indirect time measurement of the ultrasonic flowmeter is shown. The key of the ultrasonic flowmeter is to measure the time difference between two rising edges of the forward and backward echo signals, namely the transmission time difference deltat. The invention provides an indirect measurement ultrasonic wave transmission time based on a reference signal, and the time difference is time difference delta t by measuring the leading and lagging time of the forward and reverse currents relative to the reference signal.
Referring to fig. 4, a schematic diagram of the time measurement principle before and after pulse width modulation of the ultrasonic flowmeter is shown. Referring to fig. 4(a), the reference signal is not processed, the rising edge of the forward and backward echo signals and the falling edge of the reference signal form a non-whole period time, and the reference signal does not work at low level, so that the comparison range is only 50%. Referring to fig. 4(b), the pulse width modulation circuit expands the duty ratio of the high level of the reference signal in one period, and expands the range of forward and backward flow measurement.
FIG. 5 is a schematic diagram of the time measurement before and after phase shifting of an ultrasonic flow meter. Typically, the transducer excitation frequency of an ultrasonic flow meter for water flow measurements is 1 MHz. Referring to fig. 5(a), the relative positions of the forward and backward flow echo signals are small, and when the flow rate is 0, the time of the echo signal and the reference signal is small, and when the flow rate is increased, the forward flow reception echo signal is advanced and the backward flow echo signal is delayed by Δ τ'dIs greater than delta tau'uAnd the time difference is delta t-delta tau'd-Δτ′uWhen the flow rate is increased to a certain value, the backward flow echo signal is compared with the next reference signal. Referring to fig. 5(b), the time difference at this time is Δ t ═ Δ τ'd-Δτ′u+ T, the forward and reverse flow do not coincide in time for the entire cycle, but in practice the flow meter will not be able to determine whether the time for the entire cycle does not coincide or the flow rate in reverse direction. To solve this problem, the relative position of the reference signal is shifted by the phase shift circuit, and in a static state, the pulse width formed between the rising edge of the forward/backward echo signal and the falling edge of the reference signal is increased by 1/(2f) cycles, and since the ultrasonic transducer is operated under excitation at a frequency of 1MHz, the forward echo is always fixed at a certain position with respect to the reference signal by the circuit, and Δ τ 'is set with reference to fig. 5 (c)'dIs always kept between 500-750ns to ensure that delta tau 'is ensured when the water flow flows in the forward direction'd>Δτ′uThat is, the time difference is Δ t ═ Δ τ'd-Δτ′uAnd is increased by Δ τ'd、Δτ′uThe basic value of the static condition is beneficial to improving the accuracy of small-flow measurement; when the flow rate increases, referring to fig. 5(d), the time difference is still Δ t ═ Δ τ'd-Δτ′u
Referring to fig. 6, an overall circuit block diagram of the method for indirectly measuring the ultrasonic transit time is shown in fig. 6. The whole circuit comprises a single chip circuit, a display circuit, a communication circuit, a power supply control circuit, a temperature detection circuit, a frequency division circuit, an analog switch circuit, a preprocessing circuit, a comparison circuit, a time pulse width conversion circuit, a pulse width voltage conversion circuit and a sampling holding circuit. Wherein the singlechip chip selects MSP430F449, and the singlechip is connected with the display circuit through an I/O port; the singlechip is connected with the communication circuit through an I/O port; the singlechip is connected with the input end of the power supply control circuit through an I/O port; the single chip microcomputer is connected with the output end of the temperature detection circuit through the I/O port; the temperature detection circuit is connected with the temperature sensor; the singlechip outputs an excitation signal and a reference signal through an I/O port; the excitation signal is connected with the input end of the frequency division circuit; the output end of the frequency dividing circuit is connected with the analog switch circuit; the analog switch is respectively connected with the ultrasonic transducer A and the ultrasonic transducer B; the analog switch is connected with the input end of the comparison circuit; the output end of the comparison circuit is connected with the input end of the time pulse width conversion circuit; the reference signal is connected with the input end of the preprocessing circuit; the output end of the preprocessing circuit is connected with the input end of the time pulse width conversion circuit; the output end of the time pulse width conversion circuit is connected with the input end of the pulse width voltage conversion circuit; the output end of the pulse width voltage conversion circuit is connected with the input end of the sampling hold circuit; the output end of the sampling hold circuit is connected with an I/O port of the singlechip; the output end of the power control circuit is connected with the power end of the comparison circuit; the output end of the power supply control circuit is connected with the power supply end of the sampling holding circuit.
Fig. 7 is a specific circuit example of the method for indirectly measuring the ultrasonic wave transmission time. In the figure, an analog switch selects an ADG884 chip, and the code number of the chip is U71; the frequency division circuit selects SN74LVC1G79DBVR chips, and the chip codes are U72-1 and U72-2 respectively; the comparator selects a TLV7021 chip with the code number of U73; the time pulse width conversion circuit selects a GN74D chip, and the code number of the chip is U74; the pulse width voltage conversion circuit selects LM334 and TS5A3154DCUR chips, and the chip codes are U75 and U76 respectively; the sample hold circuit selects an OPA2380 chip, and the code number of the chip is U77; the TPS76930 chip is selected by power supply control, and the code number of the chip is U78; the single chip microcomputer selects an MSP430F449 chip with the code number of U79.
One end of the transducer A is grounded, and the other end of the transducer A is respectively connected with the S1A end of the U71 first channel and the S2A end of the U71 second channel; one end of the transducer B is grounded, and the other end of the transducer B is respectively connected with the S1B end of the U71 first channel and the S2B end of the U71 second channel.
The end of a first channel D1 of the analog switch U71 is connected with the output end Q of the U72-2; the end of the U71 second channel D2 is grounded; the enable terminal IN1 of the U71 first channel is connected with the P1.3 terminal of U79; the enable terminal IN2 of the U71 second channel is connected to the P2.0 terminal of U79.
The input end CLK of the frequency dividing circuit U72-1 is connected with the P1.4 end of U79; d terminal of U72-1 and D terminal of U72-1
Figure BDA0002574609530000071
End connection; the output end Q of the U72-1 is connected with the input end CLK of the U72-2; d terminal of U72-2 and D terminal of U72-2
Figure BDA0002574609530000072
End connection; the output end Q of the U72-2 is respectively connected with the D1 end of the U71 and the plus input end "+" of the U73, and the circuit part consisting of the U72-1 and the U72-2 realizes the function of quarter frequency division.
The negative input end "-" of the comparator U73 is connected with + 1.5V; the positive input end "+" of U73 is respectively connected with the D1 end of the first channel of U71, the output end Q of U72-2, one end of a voltage-dividing resistor R1 and one end of a voltage-dividing resistor R2; a power supply terminal VCC of U73 is respectively connected with one end of a voltage-dividing resistor R2 and an output terminal Vout of U78; the output end OUT of the U73 is respectively connected with the input end CLK of a trigger U74 of the time pulse width conversion circuit and the input end of the preprocessing circuit.
The D end of a trigger U74 of the time pulse width conversion circuit is connected with a +3V power supply; reset terminal of U74
Figure BDA0002574609530000073
Is connected with the output end of the preprocessing circuit; the input end of the preprocessing circuit is connected with the P1.4 end of U79; set terminal of U74
Figure BDA0002574609530000074
Is connected with the P2.2 end of U79; the output Q of U74 is connected to the input IN of U76.
The input end V + of a constant current source chip U75 of the pulse width voltage conversion circuit is connected with a +3V power supply; the R end of U75 is connected with one end of a regulating resistor R3 and one end of a regulating resistor R4; the output end V-of the U75 is respectively connected with the other end of the adjusting resistor R4 and the positive end of the diode; negative terminal and regulation of diodeThe other end of the resistor R3 is connected; the output end Iout of the U75 is connected with the input end COM of the U76; enable terminal of U76
Figure BDA0002574609530000081
Is connected with the ground; the control end IN of the U76 is connected with the output end Q of the U74; the output terminal NO of U76 is connected to one end of the discharge resistor R5, one end of the charge capacitor C, and the positive input terminal "+" of the sample-and-hold chip U77, respectively.
The positive input end "+" of the sample-and-hold circuit chip U77 is respectively connected with one end of the charging capacitor C, one end of the discharging resistor R5 and the output end NO of the U76; the other end of the discharge resistor R5 is connected with the P1.6 end of the singlechip; the negative input end "-" of the U77 is connected with the output end VOUT of the U77; the output terminal VOUT of U77 is connected with the P6.3 terminal of U79.
The power supply input end IN of the power supply voltage stabilization control chip U78 is connected with a +3V power supply; the output end of U78 is respectively connected with the VCC end of U73 and the VCC end of U77; enable terminal of U78
Figure BDA0002574609530000082
Is connected with the P2.1 end of U79.
One specific circuit for the reference signal preprocessing is shown in fig. 8, and a chip model selection chip GN74D has chip codes of U81, U82-1, U82-2 and U83; a model selection chip TPS79630 with the chip code number U84; the model selection chip SN74AHC1G14, the chip code is U85; the model selection chip SN74HC02DRG4 has a chip code number U86. Reset terminal of U81
Figure BDA0002574609530000083
Is connected with the P2.4 end of the singlechip; d terminal and set terminal of U81
Figure BDA0002574609530000084
Is connected with a +3V power supply; the input terminal CLK of U81 is connected to the output terminal OUT of U73 shown in FIG. 7; an output end Q of the U81 and reset ends of the U82-1, the U82-2 and the U83
Figure BDA0002574609530000085
Connecting; the CLK at the input end of U82-1 is connected with the P1.4 end of the singlechip; d terminal of U82-1With U82-1
Figure BDA0002574609530000086
End connection; the output end Q of the U82-1 is connected with the input end CLK of the U82-2; d terminal of U82-2 and D terminal of U82-2
Figure BDA0002574609530000087
End connection; set ends of U82-1 and U82-2
Figure BDA0002574609530000088
Is connected with a +3V power supply; the output end Q of the U82-2 is connected with the input ends CLK and A of the U83 and U85; d terminal and set terminal of U83
Figure BDA0002574609530000089
Is connected with a +3V power supply; the output end Q of the U83 is connected with the enable end EN of the U84; the input end IN of the U84 is connected with a +3V power supply; the output end of the U84 is connected with a power supply end VCC of the U85; an output end Y of the U85 is connected with one end of a differential capacitor C1; the other end of the differential capacitor C1 is connected with one end of a differential resistor R1; one end of the differential resistor R1 is connected with the input end B of the U86; the other end of the differential resistor R1 is grounded; the input end A of the U86 is connected with the P2.3 end of the singlechip; the output terminal Y of U86 and the reset terminal of U74 in FIG. 7
Figure BDA00025746095300000810
And (4) connecting. In fig. 7, the output end OUT of U73 is the shaped ultrasonic echo signal, the P2.4 end of the single chip microcomputer is set to a high level before each measurement, and is set to a low level after the measurement is finished, so that during each measurement, the shaped downstream echo signal is processed by U81 and then controls to turn on the reset ends of U82-1, U82-2 and U83
Figure BDA00025746095300000811
By the property of the D flip-flop, the rising edge of the CLK terminal of U82-1 is always used as the mark for starting the reference signal preprocessing at the output terminal to realize the time synchronism of the received echo signal and the preprocessed reference signal, in this example, the CLK terminal of U82-1 inputs a 4MHz signal, so the time between the output reference signal and the downstream signal is 0-250ns, wherein U83, U84,The circuit part formed by U85 realizes the phase shift function of the reference signal, so that the current example downstream echo is relative to the reference signal delta tau'dAlways kept between 500 and 750 ns; a circuit part consisting of C1, R1 and U85 realizes the pulse width modulation function of the reference signal; the P2.3 end of the single chip determines the number n of output pulse widths through setting time. In order to solve the problem of cycle deviation in the measurement process, a preprocessing circuit of a reference signal is provided. The pulse width modulation and phase shift are carried out on the reference signal, the time measurement range is expanded, and the output pulse widths of the forward and reverse relative transmission time are in the same period.
Fig. 9 is a specific circuit example of the self-calibration circuit, which is described in connection with fig. 7, and self-calibrates the reference voltage by outputting a known pulse width through software. In FIG. 9, the control section type selection chip TS5A3154DCUR has a chip code number U91; the controllable constant current source model selection chip LM334 is U92; the chip selection is OPA2380, and the code number of the chip is U93. The input IN of U91 IN FIG. 9 is connected to the output Q of U74 IN FIG. 7; set terminal of U74 in FIG. 7
Figure BDA0002574609530000091
And the end P2.2 of the singlechip is connected, and the singlechip outputs a control signal to enable the end Q to output a fixed pulse width. IN fig. 9, the pulse width is connected to the input terminal IN of U91; constant current is output by a pulse high-level enabling current source U92 to charge a charging capacitor C, and a reference voltage is output by an output end VOUT of a sample-hold chip U93; data self-calibration is performed by comparing reference voltages prior to each test.
Fig. 10 is a schematic diagram of a final output result of indirectly measuring the transmission time of the ultrasonic wave, in which 10 continuous pulse signals are selected for measurement, the pulse charges a charging capacitor in a high level stage, and performs voltage holding in a low level stage, and the offset time of the echo signal relative to the reference signal is output in a stable voltage manner.
After the system is powered on, the single chip microcomputer automatically initializes each circuit unit, the single chip microcomputer simultaneously outputs 4MHz excitation signals and reference signals, and the excitation signals are continuously transmitted through the frequency division circuitA plurality of 1MHz pulse excitation signals reach the analog switch, meanwhile, the singlechip controls the pins P1.3 and P2.0 to enable the analog switch, S1A is selected to be conducted with D1, S1B is selected to be not conducted with D1, S2B is selected to be conducted with D2, S2A is selected to be not conducted with D2, at the moment, the transducer A is used as a transmitting end of an ultrasonic signal, and the transducer B is grounded; after the excitation signal is transmitted, selecting the conduction of S1B and D1, the non-conduction of S1A and D1, the conduction of S2A and D2 and the non-conduction of S2B and D2, wherein the transducer B is used as a receiving end of an ultrasonic signal, and the transducer A is grounded; as shown in fig. 1, transducer a is positioned at the upstream end and transducer B is positioned at the downstream end. The echo signal is shaped by the negative terminal of the comparator TLV7021 and input to the CLK terminal of the trigger GN74D, and is input to GN74D by the preprocessed reference signal
Figure BDA0002574609530000101
At the end, the Q end of GN74D outputs the offset time (pulse width) of n downstream echo signals relative to the reference signal, and inputs TS5a3154DCUR to control the on-off of the constant current source LM334, and charges the charging capacitor at the pulse high level stage to obtain a stable voltage, thereby obtaining the downstream relative transmission time.
Similarly, as long as the enable end of the analog switch is changed through the single chip microcomputer, the connection between S1B and D1 is selected, the connection between S1A and D1 is not selected, the connection between S2A and D2 is selected, the connection between S2B and D2 is not selected, at the moment, the transducer B is used as the transmitting end of the ultrasonic signal, and the transducer A is grounded; after the excitation signal is transmitted, the selection of S1A is conducted with D1, the selection of S1B is not conducted with D1, the selection of S2B is conducted with D2, and the selection of S2A is not conducted with D2, at this time, the transducer A is used as the receiving end of the ultrasonic signal, and the transducer B is grounded. Through subsequent circuit processing, the relative transmission time of the reverse flow is obtained, and finally, the time difference Δ t can be calculated, and fig. 11 is a specific flow chart of the indirect time measurement method.
The indirect transmission time measuring method is based on the circuit, measures the pulse width of n echo signals relative to the reference signal and converts the pulse width into the output of voltage, and carries out self-correction on the output voltage through the known pulse width, thereby improving the accuracy of time measurement. The measurement range is enlarged and the signal period deviation is avoided by a reference signal preprocessing circuit. The circuit design adopts a 3V battery for power supply, and through the design of software and hardware circuits, the power consumption of the whole measuring method and circuit is reduced, and the cost of the device is saved.

Claims (4)

1. The method for indirectly measuring the ultrasonic wave transmission time is characterized by comprising the following steps:
the singlechip synchronously generates an excitation signal and a reference signal, and the excitation signal of a certain number of pulse excitation signals passing through the frequency division unit is selected for each measurement and sent to the ultrasonic transducer so as to generate a certain number of continuous ultrasonic signals;
the ultrasonic transducer changes the sending and receiving states through the analog switch, and echo signals received by the ultrasonic transducer are processed to obtain square wave signals;
the time pulse width conversion unit is synchronously triggered by the square wave signal, and the first rising edge of the echo signal triggers the start reference signal to ensure time synchronization;
preprocessing a reference signal, obtaining the reference signal with the same frequency as the divided excitation signal through a frequency dividing circuit, increasing the duty ratio of high level through pulse width modulation, and moving the relative position of the reference signal through a phase shifting circuit to increase the pulse width between the rising edge of an echo signal and the falling edge of the reference signal by 1/(2f) cycles, wherein f is the frequency of the reference signal and the echo signal;
converting the offset time of the echo signal relative to the reference signal into a pulse width by a time pulse width conversion unit, and selecting the pulse width between the rising edge of the echo signal and the falling edge of the reference signal as the transmission time of the non-full-period ultrasonic wave;
the pulse width voltage conversion unit mainly selects a certain number of continuous wave pulse widths obtained by the time pulse width conversion unit for conversion, wherein the number of the continuous wave pulse widths is controlled by variable window time;
the constant current source is controlled by a certain quantity of continuous wave pulse width high and low levels to charge the capacitor, stable voltage obtained at two ends of the capacitor is input into the singlechip through the sampling and holding circuit, thereby realizing the conversion of pulse width and voltage, obtaining accurate non-whole period flight time, and calculating the difference between forward and reverse ultrasonic wave transmission time.
2. The method of indirectly measuring ultrasonic transit time of claim 1, wherein: the measurement system is self-calibrated by a known duty cycle pulse width before each voltage conversion to reduce errors.
3. The method of indirectly measuring ultrasonic transit time of claim 1, wherein: the power supply control voltage stabilizing unit controls the power supply of the comparing unit and the sampling and holding unit, and the power supply is turned off in non-measuring time so as to reduce power consumption.
4. A circuit for implementing the method of indirectly measuring ultrasonic transit time of claim 1, comprising:
the ultrasonic transducer comprises an ultrasonic transducer A, an ultrasonic transducer B, a frequency division unit, an analog switch unit, a comparison unit, a preprocessing unit, a time pulse width conversion unit, a pulse width voltage conversion unit, a sampling holding unit, a power supply control voltage stabilization unit, a temperature detection unit and a single chip microcomputer unit;
the ultrasonic transducer A and the ultrasonic transducer B are arranged on the same side of the pipeline;
the input end of the energy converter A is connected with the source end A of the first channel circuit of the analog switch; the input end of the transducer B is connected with the source end B of the analog switch first channel circuit; the output end of the first channel of the analog switch is connected with the positive input end of the comparison unit; the enabling end of the first channel of the analog switch is connected with an I/O port of the singlechip;
the input end of the transducer A is connected with the source end A of the analog switch second channel circuit; the input end of the transducer B is connected with the source end B of the analog switch second channel circuit; the output end of the second channel of the analog switch is grounded; the enabling end of the second channel of the analog switch is connected with an I/O port of the singlechip;
the input end of the frequency division unit is connected with an I/O port of the singlechip; the output end of the frequency dividing unit is connected with the positive input end of the comparing unit; the negative input end of the comparison unit is connected with +1.5V voltage; the output end of the comparison unit is connected with the first comparison end of the time pulse width conversion unit; the output end of the comparison unit is connected with the time synchronization control end of the time pulse width conversion unit;
the input end of the preprocessing unit is connected with an I/O port of the singlechip; the output end of the preprocessing unit is connected with the second comparison end of the time pulse width conversion unit;
the input end of the pulse width voltage conversion unit is connected with the output end of the time pulse width conversion unit; the voltage discharge end of the pulse width voltage conversion unit is connected with an I/O port of the singlechip; the output end of the pulse width voltage conversion unit is connected with the input end of the sampling holding unit; the output end of the sampling and holding unit is connected with an I/O port of the singlechip;
the enabling end of the power supply control voltage-stabilizing unit is connected with an I/O port of the singlechip; the input end of the power supply control voltage stabilizing unit is connected with + 3V; the output end of the power supply control voltage stabilizing unit is respectively connected with the power supply ends of the comparison unit and the sampling and holding unit chip;
the input end of the temperature detection unit is connected with the temperature sensor and the reference resistor; the output end of the temperature detection unit is connected with the I/O port of the singlechip.
CN202010650060.3A 2020-07-08 2020-07-08 Method and circuit for indirectly measuring ultrasonic wave transmission time Active CN111795727B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010650060.3A CN111795727B (en) 2020-07-08 2020-07-08 Method and circuit for indirectly measuring ultrasonic wave transmission time

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010650060.3A CN111795727B (en) 2020-07-08 2020-07-08 Method and circuit for indirectly measuring ultrasonic wave transmission time

Publications (2)

Publication Number Publication Date
CN111795727A CN111795727A (en) 2020-10-20
CN111795727B true CN111795727B (en) 2022-01-28

Family

ID=72810524

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010650060.3A Active CN111795727B (en) 2020-07-08 2020-07-08 Method and circuit for indirectly measuring ultrasonic wave transmission time

Country Status (1)

Country Link
CN (1) CN111795727B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113847129A (en) * 2021-10-12 2021-12-28 安徽江淮汽车集团股份有限公司 Vehicle-mounted urea solution index measuring system
CN115993158B (en) * 2023-02-24 2023-08-22 北京安超微电子有限公司 Head wave detection threshold setting method for ultrasonic flow metering device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1743142A1 (en) * 2004-05-07 2007-01-17 Endress+Hauser Flowtec AG Ultrasonic measuring apparatus for determining and/or monitoring the volume flow rate and/or mass flow rate of a medium
CN102200457A (en) * 2010-03-26 2011-09-28 河南新天科技股份有限公司 Ultrasonic flow detection circuit
CN104697593A (en) * 2015-03-24 2015-06-10 合肥工业大学 Ultrasonic gas flowmeter on basis of FPGA (field programmable gate array) and DSP (digital signal processor)
CN105628116A (en) * 2016-03-21 2016-06-01 杭州山科智能科技股份有限公司 Low-power consumption ultrasonic wave transmitting time measuring method and circuit
CN106768110A (en) * 2017-03-08 2017-05-31 中国计量大学 A kind of inexpensive ultrasonic transducer signal method for fast measuring and circuit
CN206431148U (en) * 2016-11-24 2017-08-22 深圳先进技术研究院 A kind of automatic analytical instrument and its liquid detection device and detecting liquid level circuit

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101334308B (en) * 2007-06-29 2013-03-27 通用电气公司 Artificial circuit for checking flow gauge

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1743142A1 (en) * 2004-05-07 2007-01-17 Endress+Hauser Flowtec AG Ultrasonic measuring apparatus for determining and/or monitoring the volume flow rate and/or mass flow rate of a medium
CN102200457A (en) * 2010-03-26 2011-09-28 河南新天科技股份有限公司 Ultrasonic flow detection circuit
CN104697593A (en) * 2015-03-24 2015-06-10 合肥工业大学 Ultrasonic gas flowmeter on basis of FPGA (field programmable gate array) and DSP (digital signal processor)
CN105628116A (en) * 2016-03-21 2016-06-01 杭州山科智能科技股份有限公司 Low-power consumption ultrasonic wave transmitting time measuring method and circuit
CN206431148U (en) * 2016-11-24 2017-08-22 深圳先进技术研究院 A kind of automatic analytical instrument and its liquid detection device and detecting liquid level circuit
CN106768110A (en) * 2017-03-08 2017-05-31 中国计量大学 A kind of inexpensive ultrasonic transducer signal method for fast measuring and circuit

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
气体超声流量计回波信号的自适应阈值法研究;章涛;《传感技术学报》;20181215;第1853-1857页 *

Also Published As

Publication number Publication date
CN111795727A (en) 2020-10-20

Similar Documents

Publication Publication Date Title
CN111795727B (en) Method and circuit for indirectly measuring ultrasonic wave transmission time
CN107290564B (en) Phase difference-based ultrasonic flow velocity measurement method
JP4788235B2 (en) Fluid flow measuring device
CN107727176B (en) Ultrasonic gas flowmeter and flow measurement method thereof
US10782169B2 (en) Ultrasonic flowmeter
EP0856145A1 (en) Digital speed determination in ultrasonic flow measurements
CN107860430B (en) Time difference measurement method of ultrasonic gas flowmeter based on time difference method
KR100440759B1 (en) Flow rate measuring device
US5777238A (en) Driver-receiver apparatus for use with ultrasonic flowmeters
JP2007187506A (en) Ultrasonic flowmeter
CN112304376A (en) Ultrasonic flowmeter flow measuring method based on data fusion
JP7111533B2 (en) Zero point detector
JP3350501B2 (en) Flow measurement device
JP2007051889A (en) Measuring device for fluid flow
JPH1151725A (en) Ultrasonic flowmeter
JP3651124B2 (en) Ultrasonic measuring device and flow measuring device including the same
CN109782024B (en) Ultrasonic gas meter metering error prevention method for judging wave number based on steady state parameters
CN111964738B (en) Dynamic threshold setting method based on ultrasonic echo signal similarity
US5327360A (en) Measuring relative deflection of interspaced toothed wheels on a less than once per revolution basis
JP5135806B2 (en) Fluid flow measuring device
EP1913342A1 (en) Low power ultrasonic flow measurement
CN111337092B (en) Method for selecting reference signal, calculating method and phase difference type ultrasonic flowmeter
CN212645798U (en) Flow parameter measuring device and ultrasonic flowmeter
JP5228462B2 (en) Fluid flow measuring device
JP5135807B2 (en) Fluid flow measuring device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant