CN-122017815-A - Ultrasonic echo distinguishing electronic device and method
Abstract
The invention discloses an ultrasonic echo judging electronic device and method, wherein the judging electronic device comprises a zero-crossing comparator, a first threshold comparator, a second threshold comparator and a third threshold comparator, wherein the input ends of the zero-crossing comparator, the first threshold comparator, the second threshold comparator and the third threshold comparator are all connected to an echo signal input end and used for receiving echo signals, the output ends of the zero-crossing comparator, the first threshold comparator and a time window control unit are connected to a first part of a logic gate unit, the first part of the logic gate unit outputs a first zero-crossing trigger signal, the output end of the second threshold comparator is connected to a second part of the logic gate unit through a trigger unit, the second part of the logic gate unit outputs a second zero-crossing trigger signal, the output end of the third threshold comparator outputs a pulse count value to a micro control unit through a counter, and the micro control unit receives the first zero-crossing trigger signal and the second zero-crossing trigger signal and the pulse count value and comprehensively calculates flight time and judges an echo state.
Inventors
- YAO YI
- CHEN XIAOBO
- XIE XIAO
- Lv Zhangmin
Assignees
- 浙江威星智能仪表股份有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260319
Claims (10)
- 1. An ultrasonic echo judging electronic device is characterized by comprising a zero-crossing comparator, a first threshold comparator, a second threshold comparator, a third threshold comparator, a time window control unit, a trigger unit, a logic gate unit and a counter; The input end of the zero-crossing comparator, the input end of the first threshold comparator, the input end of the second threshold comparator and the input end of the third threshold comparator are all connected to the echo signal input end and are used for receiving echo signals; The output end of the zero-crossing comparator, the output end of the first threshold comparator and the output end of the time window control unit are connected to a first part of the logic gate unit, and the first part of the logic gate unit outputs a first zero-crossing trigger signal; the output end of the second threshold comparator is connected to a second part of the logic gate unit through a trigger unit, and the second part of the logic gate unit outputs a second zero crossing trigger signal; the output end of the third threshold comparator outputs a pulse count value to the micro control unit through the counter; The micro control unit receives the first zero crossing trigger signal, the second zero crossing trigger signal and the pulse count value, comprehensively calculates the flight time and judges the echo state.
- 2. The ultrasonic echo discrimination electronic device of claim 1, wherein the first portion of the logic gate unit includes a first and a second and gate, the time window control unit includes a programmable time mask window unit and a fixed time window trigger; the output end of the first threshold comparator and the output end of the programmable time shielding window unit are connected to the input end of the first AND gate; The output end of the first AND gate is connected to the input end of the fixed time window trigger, and the output end of the fixed time window trigger is connected to the first input end of the second AND gate; the output end of the zero-crossing comparator is connected to the second input end of the second AND gate; The output end of the second AND gate outputs a first zero crossing trigger signal.
- 3. The electronic device for discriminating ultrasonic echo according to claim 2 wherein said programmable time mask window unit is controlled by a micro control unit to be turned on and off for masking interference for a predetermined time after ultrasonic wave transmission, and said fixed time window trigger is for generating a fixed time window.
- 4. An ultrasound echo discriminating electronic device according to claim 1 wherein the flip-flop cell comprises a flip-flop having an input connected to the output of the second threshold comparator and an output connected to the second portion of the logic gate cell.
- 5. The ultrasonic echo discrimination electronic device of claim 4, wherein the second portion of the logic gate unit includes a third and gate; the output end of the trigger is connected to the first input end of the third AND gate; The output end of the zero-crossing comparator is connected to the second input end of the third AND gate; And the output end of the third AND gate outputs a second zero crossing trigger signal.
- 6. The ultrasonic echo discriminating electronic device of claim 1, wherein the logic gate unit further comprises a fourth and gate, an input of the fourth and gate is connected to an output of the third threshold comparator, and an output of the fourth and gate is connected to a clock input of the counter.
- 7. The ultrasonic echo discrimination electronic device according to claim 1, wherein the reference voltage of the first threshold comparator is set to a first low threshold for detecting a start edge of an echo signal, and the reference voltage of the second threshold comparator is set to a second high threshold, which is greater than the first low threshold.
- 8. The ultrasonic echo discrimination electronic device according to claim 1, wherein the reference voltage of the third threshold comparator is set to 2.5V.
- 9. The ultrasonic echo discriminating electronic apparatus according to claim 1 further comprising a time-to-digital converter, an input of the time-to-digital converter being connected to an output of the logic gate unit, the output of the time-to-digital converter being connected to the micro control unit for converting the first zero crossing trigger signal and the second zero crossing trigger signal output from the logic gate unit into time-of-flight data and outputting the time-of-flight data to the micro control unit.
- 10. A discrimination method based on the ultrasonic echo discrimination electronic device according to any one of claims 1 to 9, characterized by comprising: Acquiring an echo signal; generating a zero-crossing square wave signal of the echo signal through a zero-crossing comparator; generating, by a first threshold comparator, a first enable signal when the echo signal exceeds a first low threshold; In a fixed time window, performing logic AND operation on the first enabling signal and the zero-crossing square wave signal to generate a first zero-crossing trigger signal; Triggering latching when the echo signal exceeds a second high threshold value through a second threshold value comparator, and performing logic AND operation on the latching signal and the zero-crossing square wave signal to generate a second zero-crossing trigger signal; Generating pulses when the echo signals exceed a preset threshold value through a third threshold value comparator, and counting the pulses to obtain pulse count values; and comprehensively calculating the flight time and judging the echo state based on the first zero crossing trigger signal, the second zero crossing trigger signal and the pulse count value.
Description
Ultrasonic echo distinguishing electronic device and method Technical Field The present invention relates to the field of electronic measurement technologies, and in particular, to an electronic device and method for determining an ultrasonic echo. Background The ultrasonic detection technology is widely applied to the fields of industrial ranging, liquid level measurement, material flaw detection, medical imaging and the like due to the advantages of non-contact, high precision, moderate cost and the like. The basic principle is to transmit ultrasonic pulses to the medium to be measured and to receive echo signals reflected from the target, and to calculate the distance or analyze the characteristics of the medium by measuring the Time difference (i.e. Time of Flight, toF) between transmission and reception. In practical applications, accurately detecting the arrival time of an echo signal is a key to realizing high-precision measurement. Conventional ultrasonic echo detection methods generally employ a fixed threshold comparison method, i.e., when the voltage amplitude of the echo signal exceeds a preset fixed threshold, it is determined that the echo arrives, and the timing is triggered to stop. The adoption of a single threshold comparison is extremely easy to be interfered by environmental noise, circuit noise or emission residual vibration, and false triggering is generated, so that the measurement result is unreliable. Especially, under the conditions of weak echo signals and low signal-to-noise ratio, the detection success rate of the traditional method is drastically reduced. To overcome the above problems, some improvements have emerged in the prior art, such as the use of dynamic thresholds, digital Signal Processing (DSP) algorithms to analyze the waveform envelope, and the like. Although the dynamic threshold method can adapt to signal amplitude change to a certain extent, the algorithm is complex, the real-time performance is poor, and the method is still sensitive to rapidly-changing noise. The DSP algorithm needs a high-performance processor and an analog-to-digital converter, has high cost and large power consumption, and is not suitable for an embedded system with low cost and low power consumption. Accordingly, the present invention provides an electronic device and a method for determining an ultrasonic echo. Disclosure of Invention The invention aims at overcoming the defects of the prior art and provides an ultrasonic echo judging electronic device and method. In order to achieve the above purpose, the present invention adopts the following technical scheme: an ultrasonic echo judging electronic device comprises a zero-crossing comparator, a first threshold comparator, a second threshold comparator, a third threshold comparator, a time window control unit, a trigger unit, a logic gate unit and a counter; The input end of the zero-crossing comparator, the input end of the first threshold comparator, the input end of the second threshold comparator and the input end of the third threshold comparator are all connected to the echo signal input end and are used for receiving echo signals; The output end of the zero-crossing comparator, the output end of the first threshold comparator and the output end of the time window control unit are connected to a first part of the logic gate unit, and the first part of the logic gate unit outputs a first zero-crossing trigger signal; the output end of the second threshold comparator is connected to a second part of the logic gate unit through a trigger unit, and the second part of the logic gate unit outputs a second zero crossing trigger signal; the output end of the third threshold comparator outputs a pulse count value to the micro control unit through the counter; The micro control unit receives the first zero crossing trigger signal, the second zero crossing trigger signal and the pulse count value, comprehensively calculates the flight time and judges the echo state. Further, the first part of the logic gate unit comprises a first AND gate and a second AND gate, and the time window control unit comprises a programmable time shielding window unit and a fixed time window trigger; the output end of the first threshold comparator and the output end of the programmable time shielding window unit are connected to the input end of the first AND gate; The output end of the first AND gate is connected to the input end of the fixed time window trigger, and the output end of the fixed time window trigger is connected to the first input end of the second AND gate; the output end of the zero-crossing comparator is connected to the second input end of the second AND gate; The output end of the second AND gate outputs a first zero crossing trigger signal. Furthermore, the programmable time shielding window unit is controlled to be opened and closed by the micro control unit and is used for shielding the interference of preset time after the ultrasonic wave is