Ultrasonic distance measuring circuit and equipment thereof
By designing an ultrasonic ranging circuit integrating centralized control module, ultrasonic transmission module and echo processing module, and using programmable simulation units for signal processing, the problems of low measurement accuracy and poor anti-interference ability of traditional ultrasonic ranging circuits in complex environments are solved, and high precision and anti-interference ability are improved.
Patent Information
- Application Number
- CN202510105795.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-23
- Publication Date
- 2025-02-28
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional ultrasonic ranging circuits have low measurement accuracy and poor anti-interference ability in complex environments, which cannot meet the needs of application scenarios such as underwater fine three-dimensional sonar scanning and water-filled cave scanning.
An ultrasonic ranging circuit including a centralized control module, an ultrasonic transmission module and an echo processing module is designed, and signal processing is performed using a programmable analog unit, including filtering, gain adjustment, level conversion and time gain compensation, to improve the quality and response speed of the ultrasonic echo signal.
It realizes accurate control of ultrasonic signals, improves measurement accuracy and anti-interference ability, and meets the high-precision ranging requirements in complex environments.
Smart Images

Figure CN119535466A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of ultrasonic ranging technology, and in particular to an ultrasonic ranging circuit and device thereof. Background Art
[0002] With the development of electronic technology, the design of ultrasonic ranging circuits is becoming more and more miniaturized and intelligent, and can be integrated into various ultrasonic ranging devices, such as smartphones, drones, self-driving cars, etc. The measurement accuracy of traditional ultrasonic ranging circuits is usually affected by many factors. In complex environments (such as electromagnetic interference, other sound wave interference, etc.), ultrasonic signals may be interfered or attenuated, resulting in inaccurate ranging data, which cannot meet the needs of underwater fine three-dimensional sonar scanning and water-filled cave scanning. Traditional ultrasonic ranging circuits have problems such as inability to accurately control ultrasonic emission, slow response speed, low measurement accuracy and poor anti-interference ability. Summary of the invention
[0003] In view of this, the embodiments of the present application provide an ultrasonic ranging circuit and an ultrasonic ranging device, which can effectively control ultrasonic emission and improve response speed, measurement accuracy and anti-interference ability.
[0004] In a first aspect, an embodiment of the present application provides an ultrasonic ranging circuit, comprising: a centralized control module, an ultrasonic transmitting module and an echo processing module, wherein the echo processing module comprises a programmable analog unit, and the programmable analog unit comprises a filtering subunit, a signal amplifying subunit, a logarithmic amplifying subunit and a signal detecting subunit connected in sequence; The centralized control module is connected to the first end of the ultrasonic transmitting module and the echo processing module respectively, and the second end of the ultrasonic transmitting module is connected to the second end of the echo processing module; The centralized control module is used to output a control signal to control the working state of the ultrasonic transmitting module, so that the ultrasonic transmitting module transmits the ultrasonic signal required for ranging; The centralized control module is also used to control the working mode of the echo processing module, so that the echo processing module performs filtering processing, gain adjustment and level conversion processing on the received ultrasonic echo signal to obtain a processed ultrasonic echo signal; The programmable analog unit is used to adjust the attenuation of the ultrasonic echo signal during the propagation process, and output the ultrasonic echo signal after gain adjustment in the form of a differential signal; The centralized control module is also used to communicate with the programmable analog unit through a communication bus, and adjust the filtering parameters of the filtering subunit for filtering the ultrasonic echo signal according to the ultrasonic echo signal in the form of a single-channel signal; The centralized control module is further used to control the gain of the signal amplification subunit according to the selected time gain compensation mode to compensate for the signal attenuation of the ultrasonic echo signal; The logarithmic amplification subunit is used to perform logarithmic transformation on the compensated ultrasonic echo signal; The centralized control module is also used to set the detection parameters of the signal detection subunit, and to implement the peak detection of the ultrasonic echo signal after logarithmic transformation by the signal detection subunit through programming; The centralized control module is also used to receive the processed ultrasonic echo signal, perform signal conversion on the processed ultrasonic echo signal, and send the signal conversion result to the host computer.
[0005] In a first possible embodiment of the first aspect, the ultrasonic transmitting module includes a first filtering unit, a driving unit, a voltage conversion unit, and an ultrasonic sensing unit connected in sequence; The first filtering unit is used to filter the input control signal; The driving unit is used to drive the voltage conversion unit to perform voltage conversion according to the control signal after filtering, so as to provide a working voltage to the ultrasonic sensor unit, so that the ultrasonic sensor unit transmits the ultrasonic signal.
[0006] In a second possible embodiment of the first aspect, the echo processing module further includes a level conversion unit, a first end of the level conversion unit is connected to the programmable analog unit, and a second end of the level conversion unit is connected to the centralized control module; The level conversion unit is used to convert the ultrasonic echo signal in the form of a differential signal into a single-channel signal for output; The centralized control module is further used to collect the ultrasonic echo signal in the form of the single-channel signal, and perform signal conversion on the ultrasonic echo signal in the form of the single-channel signal according to a trigger level signal.
[0007] In a third possible embodiment of the first aspect, the echo processing module further includes a protection unit and a second filtering unit, a first end of the protection unit is connected to a receiving end of the ultrasonic echo signal, a second end of the protection unit is connected to a first end of the second filtering unit, and a second end of the second filtering unit is connected to the programmable analog unit; The protection unit is used to perform signal limiting and reverse protection on the receiving end of the ultrasonic echo signal, and the second filtering unit is used to perform high-pass filtering and low-pass filtering on the ultrasonic echo signal respectively.
[0008] In a fourth possible embodiment of the first aspect, the centralized control module includes a main control chip, a first function port, a second function port, and a third function port, the main control chip is connected to the first function port, the second function port, and the third function port, respectively, the first function port is used to connect the ultrasonic transmitting module, the second function port is used to connect the echo processing module, and the third function port is used to connect the host computer; The first functional port includes a control signal output port; The second functional port includes a parameter configuration port, a chip selection port, a reset port, a clock signal output port, a read / write control port, a signal acquisition port and a trigger level port; The third functional port includes a network port.
[0009] In a fifth possible embodiment of the first aspect, the first filtering unit includes a first RC filtering network, and the driving unit includes a microcontroller chip; The first end of the first RC filter network is connected to the centralized control module, the second end of the first RC filter network is connected to the first end of the microcontroller chip, and the second end of the microcontroller chip is connected to the voltage conversion unit.
[0010] In a sixth possible embodiment of the first aspect, the voltage conversion unit includes a first switch subunit and a transformer, and the ultrasonic sensing unit includes a second switch subunit and an ultrasonic sensor; The first end of the first switch subunit is connected to the driving unit, the second end of the first switch subunit is respectively connected to the input end and the tap end of the transformer, the output end of the transformer is connected to the first end of the second switch subunit, and the second end of the second switch subunit is connected to the ultrasonic sensor.
[0011] In a seventh possible embodiment of the first aspect, the protection unit includes a first bidirectional diode, a second bidirectional diode, a first inductor, a second inductor, and a first voltage-dividing resistor; The cathode of the first bidirectional diode is connected to the first receiving end of the ultrasonic echo signal, the anode of the first bidirectional diode is connected to the first end of the first inductor, the cathode of the first bidirectional diode is connected to the anode, and the second end of the first inductor is connected to the second filtering unit; A common terminal of the first bidirectional diode and the second bidirectional diode is grounded; The cathode of the second bidirectional diode is connected to the second receiving end of the ultrasonic echo signal, the anode of the second bidirectional diode is connected to the first end of the second inductor, the cathode of the second bidirectional diode is connected to the anode, and the second end of the second inductor is connected to the second filtering unit.
[0012] In an eighth possible embodiment of the first aspect, the second filtering unit includes a second RC filtering network; The first end of the second RC filter network is connected to the second end of the first inductor; the second end of the second RC filter network is connected to the second end of the second inductor, and the third end of the second RC filter network is connected to the programmable analog unit.
[0013] In a second aspect, an embodiment of the present application provides an ultrasonic ranging device, including the above-mentioned ultrasonic ranging circuit.
[0014] The embodiments of the present application have the following beneficial effects: An ultrasonic ranging circuit of the present embodiment includes: a centralized control module, an ultrasonic transmitting module and an echo processing module; the echo processing module includes a programmable analog unit, and the programmable analog unit includes a filtering subunit, a signal amplifying subunit, a logarithmic amplifying subunit and a signal detecting subunit connected in sequence; the centralized control module is used to output a control signal to control the working state of the ultrasonic transmitting module, so that the ultrasonic transmitting module transmits the ultrasonic signal required for ranging; the centralized control module is also used to control the working mode of the echo processing module, so that the echo processing module performs filtering processing, gain adjustment and level conversion processing on the received ultrasonic echo signal to obtain the processed ultrasonic echo signal; the centralized control module is also used to receive the processed ultrasonic echo signal, perform signal conversion on the processed ultrasonic echo signal, and send the signal conversion result to the host computer. The ultrasonic ranging circuit can accurately control the emission of ultrasonic signals, avoid the situation where piezoelectric ceramics repeatedly oscillate and emit ultrasonic signals, and can also process the received ultrasonic echo signals to improve the quality of ultrasonic signals and compensate for the attenuation of ultrasonic echo signals caused by the increase of detection depth, thereby improving the response speed of ultrasonic echo signals and the accuracy of ultrasonic ranging. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0016] Figure 1 A schematic diagram of the structure of an ultrasonic ranging circuit according to an embodiment of the present application is shown; Figure 2 A circuit diagram of an ultrasonic transmitting module according to an embodiment of the present application is shown; Figure 3 A circuit diagram of the protection unit and the second filtering unit in the embodiment of the present application is shown; Figure 4 A circuit diagram of a programmable analog unit according to an embodiment of the present application is shown; Figure 5 A circuit diagram of a level conversion unit according to an embodiment of the present application is shown; Figure 6 A circuit diagram of a centralized control module in an embodiment of the present application is shown.
[0017] Description of main component symbols: 100-ultrasonic ranging circuit; 110-centralized control module; 120-ultrasonic transmitting module; 121-first filtering unit; 122-driving unit; 123-voltage conversion unit; 124-ultrasonic sensing unit; 130-echo processing module; 131-protection unit; 132-second filtering unit; 133-programmable analog unit; 1331-filtering subunit; 1332-signal amplifying subunit; 1333-logarithmic amplifying subunit; 1334-signal detecting subunit; 134-level conversion unit. DETAILED DESCRIPTION
[0018] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.
[0019] The components of the embodiments of the present application generally described and shown in the drawings herein may be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0020] Hereinafter, the terms "including", "having" and their cognates that can be used in various embodiments of the present application are intended only to indicate specific features, numbers, steps, operations, elements, components or a combination of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components or a combination of the foregoing items or increasing the possibility of one or more features, numbers, steps, operations, elements, components or a combination of the foregoing items. In addition, the terms "first", "second", "third" and the like are only used to distinguish descriptions and cannot be understood as indicating or implying relative importance.
[0021] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meanings as those generally understood by those skilled in the art to which the various embodiments of the present application belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meanings as the contextual meanings in the relevant technical field and will not be interpreted as having idealized meanings or overly formal meanings unless clearly defined in the various embodiments of the present application.
[0022] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0023] The principle of ultrasonic ranging is mainly based on the propagation characteristics of sound waves in different media. Ultrasonic ranging equipment measures distance by emitting ultrasonic signals and receiving ultrasonic echo signals reflected back. The external media include air, liquid and solid. Specifically, sonar ranging includes the following steps: ultrasonic ranging equipment emits ultrasonic signals of a certain frequency; ultrasonic signals propagate in different media. When encountering obstacles, part of the ultrasonic signals will be reflected back; capture the reflected ultrasonic echo signals; by measuring the time difference between the emission of ultrasonic signals and the reception of ultrasonic echo signals, the round-trip time of ultrasonic signals in different media can be calculated; using the known values of the speed of sound in different media, combined with the round-trip time, the distance between the ultrasonic ranging equipment and the obstacle can be calculated. The calculation formula is usually: distance = speed of sound × round-trip time ÷ 2. The speed of sound is relatively constant in different media, but it will be affected by the temperature, salinity and pressure of the medium. Therefore, in practical applications, these environmental factors need to be calibrated to ensure the accuracy of the measurement. The present application provides an ultrasonic ranging circuit, which takes into account various factors such as the anti-interference ability of the ultrasonic ranging circuit, the accuracy of the signal processing method and the stability of the system, and can make innovations in ultrasonic emission, response speed, measurement accuracy and anti-interference ability.
[0024] Please refer to Figure 1 , is a structural diagram of an ultrasonic ranging circuit 100 provided in an embodiment of the present application. Exemplarily, the ultrasonic ranging circuit 100 includes: a centralized control module 110, an ultrasonic transmitting module 120 and an echo processing module 130. The centralized control module 110 is connected to the first ends of the ultrasonic transmitting module 120 and the echo processing module 130, respectively, so that the centralized control module 110 controls the working state and working mode of the ultrasonic transmitting module 120 and the echo processing module 130, the second end of the ultrasonic transmitting module 120 is connected to the second end of the echo processing module 130, and the ultrasonic echo signal receiving end of the echo processing module 130 is connected to the second end of the ultrasonic transmitting module 120, for receiving the ultrasonic echo signal returned by the ultrasonic transmitting module 120.
[0025] In this embodiment, the centralized control module 110 is used to output a control signal to control the start and stop working state of the ultrasonic transmitting module 120, so that the ultrasonic transmitting module 120 transmits the ultrasonic signal required for ranging. The echo processing module 130 is used to receive the ultrasonic echo signal. The centralized control module 110 is also used to control the working mode of the echo processing module 130, so that the echo processing module 130 performs filtering processing, gain adjustment and level conversion processing on the received ultrasonic echo signal to obtain the processed ultrasonic echo signal. The centralized control module 110 is also used to receive the processed ultrasonic echo signal, perform signal conversion on the processed ultrasonic echo signal, and send the signal conversion result to the host computer.
[0026] In one embodiment, the echo processing module 130 is used to process the received ultrasonic echo signal to obtain an ultrasonic echo signal in the form of a single-channel signal, and the centralized control module 110 is used to collect the ultrasonic echo signal in the form of a single-channel signal, and output a working mode command after calculation. The echo processing module 130 is also used to run the corresponding working mode according to the working mode command to realize adaptive filtering and time automatic gain control. Among them, the working mode includes an automatic gain adjustment working mode and an adaptive filtering working mode. For example, if the centralized control module 110 recognizes that the gain value in the detected ultrasonic echo signal in the form of a single-channel signal is not within the preset gain threshold range, the automatic gain adjustment working mode command is issued, and the echo processing module 130 runs to the automatic gain adjustment working mode according to the automatic gain adjustment working mode command issued by the centralized control module 110, and adjusts the gain value until the gain value in the echo processing module 130 is within the gain threshold range preset by the centralized control module 110. If the centralized control module 110 identifies that the filter value of the detected ultrasonic echo signal after filtering is not within the preset filter threshold range, it issues an adaptive filtering working mode command, and the echo processing module 130 operates in the adaptive filtering working mode according to the adaptive filtering working mode command issued by the centralized control module 110, and adjusts the filter value until the filter value in the echo processing module 130 is within the filter threshold range preset by the centralized control module 110. Similarly, the echo processing module 130 can also operate in the automatic signal conditioning mode, the automatic rectification working mode, and the automatic calculation working mode.
[0027] The structure and working process of each component in the ultrasonic ranging circuit 100 are described below.
[0028] In one embodiment, the ultrasonic transmitting module 120 includes a first filtering unit 121, a driving unit 122, a voltage conversion unit 123 and an ultrasonic sensor unit 124 connected in sequence; the first filtering unit 121 is used to filter the input control signal; the driving unit 122 is used to drive the voltage conversion unit 123 to perform voltage conversion according to the control signal after filtering, so as to provide a working voltage to the ultrasonic sensor unit 124, so that the ultrasonic sensor unit 124 transmits an ultrasonic signal. Exemplarily, as Figure 2 As shown, the first filtering unit 121 includes a first RC filtering network, the driving unit 122 includes a microcontroller chip U9, the voltage conversion unit 123 includes a first switch subunit and a transformer T2, and the ultrasonic sensing unit 124 includes a second switch subunit and an ultrasonic sensor; the first end of the first RC filtering network is connected to the control signal output port pwm_h / pwm_l of the centralized control module 110, the second end of the first RC filtering network is connected to the first end of the microcontroller chip U9, the second end of the microcontroller chip U9 is connected to the first end of the first switch subunit, the second end of the first switch subunit is respectively connected to the input end and the tap end of the transformer T2, the output end of the transformer T2 is connected to the first end of the second switch subunit, and the second end of the second switch subunit is connected to the pin terminal P3 of the ultrasonic sensor.
[0029] In one embodiment, if Figure 2 As shown, the first switch subunit includes two groups of MOS switch tubes, and the microcontroller chip U9 is used to drive the MOS switch tubes, thereby controlling the transformer T2 to generate the working voltage of the ultrasonic sensor for the ultrasonic sensor to transmit the ultrasonic signal. The second switch subunit includes two groups of switch diodes, which are used to control the ultrasonic sensor to transmit the ultrasonic signal after the transformer T2 generates the working voltage, and to suppress the piezoelectric ceramic from repeatedly oscillating and transmitting the ultrasonic signal. Specifically, the first end of each group of two switch diodes is connected to the pin terminal P3 of the ultrasonic sensor to respectively connect the positive and negative pins driven by the ultrasonic sensor, and the second end of each group of two switch diodes and multiple electronic components are connected to the positive and negative pins sensor_p / sensor_n for receiving the ultrasonic echo signal.
[0030] In one embodiment, the echo processing module 130 includes a protection unit 131 and a second filtering unit 132, wherein the first end of the protection unit 131 is connected to the receiving end of the ultrasonic echo signal, that is, connected to the positive and negative pins sensor_p / sensor_n for receiving the ultrasonic echo signal, the second end of the protection unit 131 is connected to the first end of the second filtering unit 132, and the second end of the second filtering unit 132 is connected to the programmable analog unit 133. The protection unit 131 is used to perform signal limiting and reverse protection on the receiving end of the ultrasonic echo signal to prevent the sensor_p / sensor_n input current or voltage from being too large and damaging the subsequent circuit, and the second filtering unit 132 is used to perform high-pass filtering and low-pass filtering on the ultrasonic echo signal respectively.
[0031] Exemplary, such as Figure 3 As shown, the protection unit 131 includes a first bidirectional diode U8, a second bidirectional diode U9, a first inductor L6, a second inductor L8 and a first voltage-dividing resistor R51, and the second filtering unit 132 includes a second RC filtering network, which includes a high-pass filtering network and a low-pass filtering network. The cathode of the first bidirectional diode U8 is connected to the first receiving end of the ultrasonic echo signal, the anode of the first bidirectional diode U8 is connected to the first end of the first inductor L6, the cathode of the first bidirectional diode U8 is connected to the anode, and the second end of the first inductor L6 is connected to the first end of the second RC filtering network; the common end of the first bidirectional diode U8 and the second bidirectional diode U9 is grounded; the cathode of the second bidirectional diode U9 is connected to the second receiving end of the ultrasonic echo signal, the anode of the second bidirectional diode U9 is connected to the first end of the second inductor L8, the cathode of the second bidirectional diode U9 is connected to the anode, the second end of the second inductor L8 is connected to the second end of the second RC filtering network, and the third end of the second RC filtering network is respectively connected to the corresponding pins of the programmable analog unit 133.
[0032] In one embodiment, the echo processing module 130 includes a programmable analog unit 133; the programmable analog unit 133 is used to adjust the attenuation of the ultrasonic echo signal during the propagation process, and output the gain-adjusted ultrasonic echo signal in the form of a differential signal. The programmable analog unit is also used to realize automatic gain adjustment and real-time adaptive filtering according to the control command sent by the centralized control module 110 through the communication bus.
[0033] Exemplarily, the programmable analog unit 133 includes a filtering subunit 1331, a signal amplifying subunit 1332, a logarithmic amplifying subunit 1333 and a signal detecting subunit 1334 connected in sequence; the centralized control module 110 is also used to communicate with the programmable analog unit 133 through a communication bus, and adjust the filtering parameters of the filtering subunit 1331 for filtering the ultrasonic echo signal according to the ultrasonic echo signal in the form of a single-channel signal; the centralized control module 110 is also used to control the gain of the signal amplifying subunit 1332 according to the selected time gain compensation mode to compensate for the signal attenuation of the ultrasonic echo signal; the logarithmic amplifying subunit 1333 is used to perform logarithmic transformation on the compensated ultrasonic echo signal; the centralized control module 110 is also used to set the detection parameters of the signal detecting subunit 1334, and realize the peak detection of the logarithmically transformed ultrasonic echo signal by the signal detecting subunit 1334 through programming.
[0034] In one embodiment, the filtering subunit 1331 includes a bandpass filter, whose filtering center frequency, gain and Q value can be set programmably. The signal amplification subunit 1332 is an amplifier, whose amplification factor can be programmable; the logarithmic amplification subunit 1333 includes a custom voltage converter, which is used to set as an adjustable logarithmic amplifier. The signal detection subunit 1334 includes a detector to detect the ultrasonic echo signal. First, the centralized control module 110 determines the adaptive adjustment of the filtering parameters of the bandpass filter according to the collected ultrasonic echo signal, and secondly, the centralized control module 110 controls the amplifier gain according to the time gain compensation mode selected by the user, wherein the time gain compensation mode includes a linear mode, an exponential mode and a custom mode. Then, the voltage converter is a programmable logarithmic amplification to further improve the quality of the signal. Finally, the detector performs programmable peak detection to output the ultrasonic echo signal finally processed by the programmable analog unit 133.
[0035] In one embodiment, if Figure 4As shown, the programmable analog unit 133 is a programmable analog circuit integrated device. The analog circuit programming design can use programming software to customize functions. It is suitable for signal conditioning, filtering, gain, rectification, addition, subtraction, multiplication, etc. It is also suitable for nonlinear functions such as sensor response linearization and arbitrary waveform synthesis. The programmable analog circuit integrated device is composed of a 2x2 matrix of fully configurable analog modules (cabs) and is surrounded by programmable interconnect resources and analog input and output units with active components. The programmable analog circuit integrated device includes an on-chip clock generator to control multiple non-overlapping clock domains from an external stable clock source. The programmable analog circuit integrated device also includes an internal bandgap reference generator to create a temperature compensated reference level, including a multi-bit lookup table, which can realize waveform synthesis and several nonlinear functions. The configuration data of the programmable analog circuit integrated device is stored in a static random access memory (SRAM), which provides an interface for a communication bus for simple serial loading of configuration data with the centralized control module 110, such as filtering parameters, time gain compensation mode, slope control of logarithmic amplification, etc. The programmable analog circuit integrated device has multiple configurable input and output structures, each of which can be used as an input or output, and also integrates a differential amplifier and a chopper-stabilized amplifier.
[0036] In one embodiment, since the programmable analog unit 133 outputs an ultrasonic echo signal in the form of a differential signal, it is necessary to perform signal conversion on the ultrasonic echo signal in the form of a differential signal. The echo processing module 130 also includes a level conversion unit 134, a first end of the level conversion unit 134 is connected to the programmable analog unit 133, a second end of the level conversion unit 134 is connected to the signal acquisition port sensor_ad of the centralized control module 110, the centralized control module 110 acquires the output signal of the level conversion unit 134, and the level conversion unit 134 is also connected to the trigger level port ADC (Digital-to-Analog Converter) of the centralized control module 110, and the centralized control module 110 provides a control trigger level signal. The level conversion unit 134 is used to convert the ultrasonic echo signal in the form of a differential signal into a single-channel signal for output; the centralized control module 110 is also used to acquire the ultrasonic echo signal in the form of a single-channel signal, and perform signal conversion on the ultrasonic echo signal in the form of a single-channel signal according to the trigger level signal.
[0037] In one embodiment, if Figure 5 As shown, the level conversion unit 134 uses two groups of operational amplifiers, which have the advantages of high bandwidth, high conversion rate, low power consumption and low broadband noise. One group of operational amplifiers provides a bias voltage, and the other group of operational amplifiers converts the ultrasonic echo signal in the form of a differential signal output by the programmable analog unit 133 into a single-channel signal output.
[0038] In one embodiment, if Figure 6 As shown, the centralized control module 110 includes a main control chip, a first function port, a second function port and a third function port, the main control chip is connected to the first function port, the second function port and the third function port respectively, the first function port is used to connect the ultrasonic transmitting module 120, the second function port is used to connect the echo processing module 130, and the third function port is used to connect the host computer; the first function port includes a control signal output port pwm_h / pwm_l, and the centralized control module 110 controls the ultrasonic sensor emission through the control signal output port pwm_h / pwm_l; the second function port includes a parameter configuration port fpaa_mosi, a chip select port fpaa_ , reset port fpaa_reset, clock signal output port, read / write control port fpaa_aclk, signal acquisition port sensor_ad and trigger level port dac, wherein the clock signal output port includes the main clock signal output port clk_fpga and the serial clock signal output port fpaa_sclk. The centralized control module 110 configures the parameters of each module of the programmable analog unit 133 through the parameter configuration port fpaa_mosi, including filtering parameters, amplification factors, detection parameters, etc.; the centralized control module 110 configures the parameters of each module of the programmable analog unit 133 through the chip select port fpaa_ Determine whether the programmable analog unit 133 is selected; the centralized control module 110 controls the reset of the programmable analog unit 133 through the reset port fpaa_reset; the centralized control module 110 provides the master clock signal inside the programmable analog unit 133 through the master clock signal output port clk_fpga, which is used to synchronize all timing logics. The centralized control module 110 can communicate with the programmable analog unit 133 through SPI (Serial Peripheral Interface) to control the working mode of the programmable analog unit 133. The centralized control module 110 provides a stable serial clock signal through the serial clock signal output port fpaa_sclk to ensure the synchronization of signal transmission; the centralized control module 110 performs clock control of chip reading and writing of the programmable analog unit 133 through the read-write control port fpaa_aclk; the centralized control module 110 collects ultrasonic echo signals in the form of differential signals through the signal acquisition port sensor_ad; the centralized control module 110 performs signal conversion on the ultrasonic echo signals through the trigger level port dac. The third functional port includes a network port, through which the centralized control module 110 transmits the converted ultrasonic echo signal to the host computer. The centralized control module 110 also includes a debugging port PA13 / PA14, which is connected to the P4 terminal, and the program of the centralized control module 110 can be debugged through the P4 terminal.
[0039] In one embodiment, the main control chip supports all single-precision data processing instructions and data types, and can implement a complete set of DSP (Digital Signal Processing) instructions and a memory protection unit (Micro Processor Unit, MPU) to enhance application security. The main control chip also includes high-speed embedded memory, and a large number of enhanced I / O (Input / Output) and peripheral devices connected to two APB buses (Advanced Peripheral Bus), two AHB buses (Advanced High-performance Bus) and a 32-bit multi-AHB bus matrix, providing three 12-bit ADCs (Analog-to-Digital Converters), two DACs (Digital-to-Analog Converters), a low-power RTC (Real-Time Clock), twelve general-purpose 16-bit timers, including two PWM (Pulse-Width Modulation) timers for motor control and two general-purpose 32-bit timers, and also has standard serial port communication and advanced network communication interfaces.
[0040] The present application also provides an ultrasonic ranging device. Exemplarily, the ultrasonic ranging device includes the ultrasonic ranging circuit 100 of the above embodiment. The ultrasonic ranging device can be a sonar device, an ultrasonic water depth detector, an ultrasonic ranging sensor, an underwater ranging sensor, and other ranging devices used in hydropower surveying.
[0041] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can also be implemented in other ways. The apparatus embodiments described above are merely schematic, for example, the flowcharts and structure diagrams in the accompanying drawings show the possible architecture, functions and operations of the apparatus, method and computer program product according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and a module, a program segment or a part of a code contains one or more executable instructions for implementing a specified logical function. It should also be noted that in an alternative implementation, the functions marked in the box can also occur in a different order from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the structure diagram and / or the flow diagram, and the combination of boxes in the structure diagram and / or the flow diagram, can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0042] In addition, the functional modules or units in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0043] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a smart phone, a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of each embodiment of the present application.
[0044] The above are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be covered by the protection scope of the present application.
Claims
1. An ultrasonic ranging circuit, characterized in that: include: A centralized control module, an ultrasonic transmitting module and an echo processing module, wherein the echo processing module includes a programmable analog unit, and the programmable analog unit includes a filtering subunit, a signal amplifying subunit, a logarithmic amplifying subunit and a signal detecting subunit connected in sequence; The centralized control module is connected to the first end of the ultrasonic transmitting module and the echo processing module respectively, and the second end of the ultrasonic transmitting module is connected to the second end of the echo processing module; The centralized control module is used to output a control signal to control the working state of the ultrasonic transmitting module, so that the ultrasonic transmitting module transmits the ultrasonic signal required for ranging; The centralized control module is also used to control the working mode of the echo processing module, so that the echo processing module performs filtering processing, gain adjustment and level conversion processing on the received ultrasonic echo signal to obtain a processed ultrasonic echo signal; The programmable analog unit is used to adjust the attenuation of the ultrasonic echo signal during the propagation process, and output the ultrasonic echo signal after gain adjustment in the form of a differential signal; The centralized control module is also used to communicate with the programmable analog unit through a communication bus, and adjust the filtering parameters of the filtering subunit for filtering the ultrasonic echo signal according to the ultrasonic echo signal in the form of a single-channel signal; The centralized control module is further used to control the gain of the signal amplification subunit according to the selected time gain compensation mode to compensate for the signal attenuation of the ultrasonic echo signal; The logarithmic amplification subunit is used to perform logarithmic transformation on the compensated ultrasonic echo signal; The centralized control module is also used to set the detection parameters of the signal detection subunit, and to implement the peak detection of the ultrasonic echo signal after logarithmic transformation by the signal detection subunit through programming; The centralized control module is also used to receive the processed ultrasonic echo signal, perform signal conversion on the processed ultrasonic echo signal, and send the signal conversion result to the host computer.
2. The ultrasonic ranging circuit according to claim 1, characterized in that: The ultrasonic transmitting module comprises a first filtering unit, a driving unit, a voltage conversion unit and an ultrasonic sensing unit connected in sequence; The first filtering unit is used to filter the input control signal; The driving unit is used to drive the voltage conversion unit to perform voltage conversion according to the control signal after filtering, so as to provide a working voltage to the ultrasonic sensor unit, so that the ultrasonic sensor unit transmits the ultrasonic signal.
3. The ultrasonic ranging circuit according to claim 1, characterized in that: The echo processing module further comprises a level conversion unit, a first end of the level conversion unit is connected to the programmable analog unit, and a second end of the level conversion unit is connected to the centralized control module; The level conversion unit is used to convert the ultrasonic echo signal in the form of a differential signal into a single-channel signal for output; The centralized control module is further used to collect the ultrasonic echo signal in the form of the single-channel signal, and perform signal conversion on the ultrasonic echo signal in the form of the single-channel signal according to a trigger level signal.
4. The ultrasonic ranging circuit according to claim 1, characterized in that: The echo processing module further includes a protection unit and a second filtering unit, wherein a first end of the protection unit is connected to a receiving end of the ultrasonic echo signal, a second end of the protection unit is connected to a first end of the second filtering unit, and a second end of the second filtering unit is connected to the programmable analog unit; The protection unit is used to perform signal limiting and reverse protection on the receiving end of the ultrasonic echo signal, and the second filtering unit is used to perform high-pass filtering and low-pass filtering on the ultrasonic echo signal respectively.
5. The ultrasonic ranging circuit according to claim 1, characterized in that: The centralized control module includes a main control chip, a first function port, a second function port and a third function port, the main control chip is connected to the first function port, the second function port and the third function port respectively, the first function port is used to connect to the ultrasonic transmitting module, the second function port is used to connect to the echo processing module, and the third function port is used to connect to the host computer; The first functional port includes a control signal output port; The second functional port includes a parameter configuration port, a chip selection port, a reset port, a clock signal output port, a read / write control port, a signal acquisition port and a trigger level port; The third functional port includes a network port.
6. The ultrasonic ranging circuit according to claim 2, characterized in that: The first filtering unit includes a first RC filtering network, and the driving unit includes a microcontroller chip; The first end of the first RC filter network is connected to the centralized control module, the second end of the first RC filter network is connected to the first end of the microcontroller chip, and the second end of the microcontroller chip is connected to the voltage conversion unit.
7. The ultrasonic ranging circuit according to claim 2, characterized in that: The voltage conversion unit includes a first switch subunit and a transformer, and the ultrasonic sensor unit includes a second switch subunit and an ultrasonic sensor; The first end of the first switch subunit is connected to the driving unit, the second end of the first switch subunit is respectively connected to the input end and the tap end of the transformer, the output end of the transformer is connected to the first end of the second switch subunit, and the second end of the second switch subunit is connected to the ultrasonic sensor.
8. The ultrasonic ranging circuit according to claim 4, characterized in that: The protection unit includes a first bidirectional diode, a second bidirectional diode, a first inductor, a second inductor and a first voltage-dividing resistor; The cathode of the first bidirectional diode is connected to the first receiving end of the ultrasonic echo signal, the anode of the first bidirectional diode is connected to the first end of the first inductor, the cathode of the first bidirectional diode is connected to the anode, and the second end of the first inductor is connected to the second filtering unit; A common terminal of the first bidirectional diode and the second bidirectional diode is grounded; The cathode of the second bidirectional diode is connected to the second receiving end of the ultrasonic echo signal, the anode of the second bidirectional diode is connected to the first end of the second inductor, the cathode of the second bidirectional diode is connected to the anode, and the second end of the second inductor is connected to the second filtering unit.
9. The ultrasonic ranging circuit according to claim 8, characterized in that: The second filtering unit includes a second RC filtering network; The first end of the second RC filter network is connected to the second end of the first inductor; the second end of the second RC filter network is connected to the second end of the second inductor, and the third end of the second RC filter network is connected to the programmable analog unit.
10. An ultrasonic distance measuring device, characterized in that: The ultrasonic ranging circuit comprises the ultrasonic ranging circuit as claimed in any one of claims 1 to 9.