Ultrasonic distance measuring device and ultrasonic distance measuring method
By using the power adjustment module and the power amplification module in the ultrasonic ranging device to automatically adjust the ultrasonic transmission power, the problem of high energy consumption caused by fixed transmission power is solved, the measurement accuracy and stability are improved, and the battery life is extended.
Patent Information
- Application Number
- CN202011357694.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-27
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2040-11-27
AI Technical Summary
Existing ultrasonic ranging devices emit ultrasonic waves with a fixed transmission power, which results in high energy consumption and cannot be widely used in various special environments.
An ultrasonic ranging device is designed, which uses a power adjustment module and a power amplification module to automatically adjust the ultrasonic transmission power by adjusting the power supply voltage to ensure that when no echo signal is received, the transmission power is increased until a signal is received.
It improves measurement accuracy and stability, reduces energy consumption, and significantly increases battery life especially when powered by battery, making it suitable for a variety of applications.
Smart Images

Figure CN112630781B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electronic technology, and in particular to an ultrasonic distance measuring device and an ultrasonic distance measuring method. Background Art
[0002] In people's lives or industries, there are devices that need to detect distances in various aspects, such as public transportation systems, detecting the safe distance between people and doors, working at construction sites, and position monitoring in some industrial sites. The distance measuring devices currently used are mainly optical and physical measurement devices, but these devices are often expensive and occupy a large area, so they cannot be widely used in a variety of special environments, such as car reversing, liquid level, well depth, pipeline length measurement, etc.
[0003] Because ultrasonic waves have strong directivity, slow energy consumption, and can propagate over long distances in media, they are often used to measure distances. For example, measuring instruments and level measuring instruments can all be measured using ultrasonic waves. Ultrasonic detection is often rapid, convenient, simple to calculate, and easy to achieve real-time control. Therefore, ultrasonic ranging has been widely used.
[0004] In the prior art, the ultrasonic distance measuring device transmits ultrasonic waves at a fixed transmission power, which results in high energy consumption. Summary of the invention
[0005] Based on this, it is necessary to provide an ultrasonic ranging device with controllable ultrasonic transmission power, which can automatically adjust the ultrasonic transmission power according to the measured distance and has low energy consumption, and also provide an ultrasonic ranging method to address the above problems.
[0006] A technical means adopted by the present invention is to provide an ultrasonic distance measuring device, the ultrasonic distance measuring device comprising:
[0007] A power regulation module, configured to receive a power control signal and obtain a power supply voltage after performing voltage conversion on a first power supply voltage according to the power control signal;
[0008] A power amplification module, connected to the power regulation module, for receiving the power supply voltage and the transmission drive signal, amplifying the transmission drive signal to obtain an amplified signal, and using the amplified signal and the power supply voltage to drive the ultrasonic transmitter to transmit an ultrasonic signal; wherein the power supply voltage is a second power supply voltage for driving the ultrasonic transmitter;
[0009] The ultrasonic transmitter is connected to the power amplifier module and is used to transmit the ultrasonic signal to the object to be tested;
[0010] An ultrasonic receiver, used to receive an echo signal formed by the object to be measured reflecting the ultrasonic signal, and convert the echo signal into a voltage signal corresponding to the echo signal;
[0011] A signal processing module, connected to the ultrasonic receiver, for amplifying, frequency selecting and shaping the voltage signal to obtain a distance detection signal; and
[0012] A control module, connected to the power regulation module, the power amplification module and the signal processing module, and configured to output the power control signal and the transmission drive signal, and receive the distance detection signal;
[0013] When the control module fails to receive the distance detection signal, the control module adjusts the power control signal to adjust the power supply voltage until the distance detection signal is received;
[0014] When receiving the distance detection signal, the control module decodes the distance detection signal to obtain a distance measurement result.
[0015] Another technical means adopted by the present invention is to provide an ultrasonic ranging method, which is applied to the ultrasonic ranging device described above, and the ultrasonic ranging method comprises:
[0016] The power regulation module receives the power control signal and obtains the power supply voltage after performing voltage conversion on the first power supply voltage according to the power control signal;
[0017] The power amplifier module receives the power supply voltage and the transmission drive signal, amplifies the transmission drive signal to obtain an amplified signal, and uses the amplified signal and the power supply voltage to drive the ultrasonic transmitter to transmit an ultrasonic signal; wherein the power supply voltage is a second power supply voltage for driving the ultrasonic transmitter;
[0018] The ultrasonic transmitter transmits the ultrasonic signal to the object to be measured;
[0019] The ultrasonic receiver receives an echo signal formed by the object to be measured reflecting the ultrasonic signal, and converts the echo signal into a voltage signal corresponding to the echo signal;
[0020] The signal processing module amplifies, frequency selects and shapes the voltage signal to obtain a distance detection signal;
[0021] When the control module fails to receive the distance detection signal, the control module adjusts the power control signal to adjust the power supply voltage until the distance detection signal is received;
[0022] When receiving the distance detection signal, the control module decodes the distance detection signal to obtain a distance measurement result.
[0023] Due to the adoption of the above technical scheme, the ultrasonic distance measuring device and method provided by the present invention include a power regulating module, a power amplifying module, an ultrasonic transmitter, an ultrasonic receiver, a signal processing module and a control module. The present invention increases the controllability of ultrasonic transmission power by adopting a power regulating module, and adjusts the ultrasonic transmission power by adjusting the magnitude of the power supply voltage used to drive the ultrasonic transmitter to transmit ultrasonic signals. In the case where no echo signal is received, the control module adjusts the power control signal to adjust the magnitude of the power supply voltage until the distance detection signal is received, that is, until the echo signal is received, thereby achieving the purpose of automatically adjusting the ultrasonic transmission power according to the measured distance. The ultrasonic distance measuring device provided by the present invention adjusts the ultrasonic transmission power by adaptively measuring the distance, thereby being able to obtain a more stable echo signal, thereby improving the measurement accuracy and stability. The adaptively measuring the distance to adjust the ultrasonic transmission power can also reduce energy consumption, especially in the application occasion where the ultrasonic distance measuring device is powered by a battery, which can significantly increase the battery life. The ultrasonic distance measuring device provided by the present invention can be widely used in life and industry. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0025] in:
[0026] Figure 1 FIG. 1 is a schematic diagram of the structure of an ultrasonic distance measuring device in an embodiment. Figure 1 ;
[0027] Figure 2 FIG. 1 is a schematic diagram of the structure of an ultrasonic distance measuring device in an embodiment. Figure 2 ;
[0028] Figure 3 FIG. 1 is a schematic diagram of the structure of an ultrasonic distance measuring device in an embodiment. Figure 3 ;
[0029] Figure 4 FIG. 1 is a schematic diagram of the structure of an ultrasonic distance measuring device in an embodiment. Figure 4 ;
[0030] Figure 5is a circuit schematic diagram of an ultrasonic transmitting part in an embodiment;
[0031] Figure 6 is a circuit schematic diagram of an ultrasonic receiving part in an embodiment;
[0032] Figure 7 The process of the ultrasonic ranging method in one embodiment is as follows Figure 1 ;
[0033] Figure 8 is a flow chart of step S7 in one embodiment;
[0034] Fig. 9 The process of the ultrasonic ranging method in one embodiment is as follows Figure 2 ;
[0035] Fig.10 The figure is a working principle diagram of ultrasonic transmission power regulation in one embodiment.
[0036] In the figure, 1, ultrasonic ranging device; 2, object to be measured; 11, power amplification module; 12, power regulation module; 13, signal processing module; 14, control module; 15, ultrasonic transmitter; 16, ultrasonic receiver; 17, temperature compensation module; 18, data display module; 111, amplifier circuit; 112, drive circuit; 121, switch circuit; 122 transformer circuit; 123, sampling circuit. DETAILED DESCRIPTION
[0037] In order to make the purpose of the invention, technical scheme and technical effects of the present invention clearer, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described in this specification are only for explaining the present invention, not for limiting the present invention. In the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other.
[0038] The terms "first", "second", etc. (if any) in the specification and claims and the above drawings are used to distinguish similar parts, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated herein.
[0039] The present invention provides an ultrasonic distance measuring device 1, such as Figure 1As shown, in one embodiment, the ultrasonic distance measuring device 1 may include a power regulating module 12, a power amplifying module 11, an ultrasonic transmitter 15, an ultrasonic receiver 16, a signal processing module 13 and a control module 14. The power regulating module 12 may be used to receive a power control signal, and obtain a power supply voltage after performing voltage conversion on a first power supply voltage according to the power control signal; that is, the first power supply voltage may be a power supply voltage that a power supply provides a working voltage to the ultrasonic distance measuring device 1. The power amplifier module 11 can be connected to the power regulation module 12, and is used to receive the power supply voltage and the transmission drive signal, and obtain an amplified signal after amplifying the transmission drive signal, and use the amplified signal and the power supply voltage to drive the ultrasonic transmitter 15 to transmit the ultrasonic signal; wherein the power supply voltage is a second power supply voltage for driving the ultrasonic transmitter 15; the ultrasonic transmitter 15 can be connected to the power amplifier module 11, and can be used to transmit the ultrasonic signal to the object to be measured 2; the ultrasonic receiver 16 can be used to receive an echo signal formed by the object to be measured 2 reflecting the ultrasonic signal, and convert the echo signal into a voltage signal corresponding to the echo signal; the ultrasonic transmitter 15 and the ultrasonic receiver 16 can be a single ultrasonic ranging device, or a two-in-one ultrasonic ranging device, which can be used to transmit ultrasonic waves, and can also be used to receive ultrasonic waves returned by the object to be measured 2, that is, used to receive echo signals at the same time. The signal processing module 13 can be connected to the ultrasonic receiver 16, and is used to amplify, frequency select and shape the voltage signal to obtain a distance detection signal; the control module 14 can be connected to the power adjustment module 12, the power amplification module 11 and the signal processing module 13, and is used to output the power control signal and the transmission drive signal, and receive the distance detection signal; when the control module 14 fails to receive the distance detection signal, it adjusts the power control signal to adjust the power supply voltage until the distance detection signal is received; when the control module 14 receives the distance detection signal, it decodes the distance detection signal to obtain a distance measurement result.
[0040] It should be noted that if Figure 5 and Figure 6As shown, the power supply can be a power interface connected to an external power supply device, or it can be an energy storage device, such as a rechargeable battery, or it can be a power module, a power chip, etc. The power supply has a positive output terminal VCC and a negative output terminal GND. The positive output terminal VCC and the negative output terminal GND output a power supply voltage that can provide a working voltage for the ultrasonic ranging device 1, such as 3.3V, 5V, 12V. Of course, the power supply voltage can also be other voltage values required for adaptation, wherein the negative output terminal GND refers to the power ground, which is used for grounding. The control module 14 can adopt a microprocessor U1, and the microprocessor U1 can be a single-chip microcomputer, DSP, FPGA, etc. Of course, the control module 14 can also adopt other control modules 14 with equivalent functions, and this application does not make special restrictions.
[0041] This embodiment increases the controllability of ultrasonic emission power by adopting a power adjustment module 12, and adjusts the ultrasonic emission power by adjusting the magnitude of the power supply voltage used to drive the ultrasonic transmitter 15 to emit ultrasonic signals. In the case where no echo signal is received, the control module 14 adjusts the power control signal to adjust the magnitude of the power supply voltage until the distance detection signal is received, that is, until the echo signal is received, thereby achieving the purpose of automatically adjusting the ultrasonic emission power according to the measured distance. The ultrasonic distance measuring device provided in this embodiment adjusts the ultrasonic emission power by adaptively measuring the distance, thereby being able to obtain a more stable echo signal, thereby improving the measurement accuracy and stability. The adaptively measuring distance to adjust the ultrasonic emission power can also reduce energy consumption, especially in the application scenario where the ultrasonic distance measuring device is battery-powered, which can significantly increase the battery life. The ultrasonic distance measuring device provided by the present invention can be widely used in life and industry.
[0042] In one embodiment, the control module 14 can also be used to perform quality assessment on the distance detection signal when the distance detection signal is received; wherein the quality assessment refers to comparing whether the number of times the ultrasonic signal emitted by the ultrasonic transmitter 15 is consistent with the number of times the echo signal received by the ultrasonic receiver 16; when the number of times the ultrasonic signal is inconsistent with the number of times the echo signal is inconsistent, the control module 14 adjusts the power control signal to adjust the power supply voltage until the number of times the ultrasonic signal is consistent with the number of times the echo signal is consistent; when the number of times the ultrasonic signal is consistent with the number of times the echo signal is consistent, the control module 14 performs decoding operation on the distance detection signal to obtain a distance measurement result.
[0043] The propagation speed of ultrasound is easily affected by temperature. The propagation speed of ultrasound at room temperature is about 340 meters per second, but when the temperature changes, the propagation speed of ultrasound will change. For example, when the temperature rises by 1°C, the propagation speed of ultrasound will increase by 0.6 meters per second. Therefore, when using ultrasound to measure distance, the effect of temperature on the propagation speed of ultrasound must be considered.
[0044] In order to improve the ultrasonic measurement accuracy, in one embodiment, Figure 2 As shown, the ultrasonic ranging device 1 may also include a temperature compensation module 17, which may be connected to the control module 14, and may be used to detect and sample the current ambient temperature and obtain a temperature sampling voltage to output to the control module 14, and the control module 14 may perform temperature compensation correction on the ranging result based on the temperature sampling voltage. Furthermore, the temperature compensation module 17 may use a thermistor to detect the ambient temperature. For example, a negative temperature coefficient thermistor may be used, and when the ambient temperature rises, the resistance of the negative temperature coefficient thermistor decreases.
[0045] For example, please refer to Figure 6 As shown, the temperature compensation module 17 may include a third resistor R1 and a first thermistor RT1, wherein the first end of the third resistor R1 is connected to the positive output terminal VCC, the second end of the third resistor R1 is connected to the first end of the first thermistor RT1 and is connected to the control module 14, and the second end of the first thermistor RT1 is connected to the negative output terminal GND. Furthermore, the first thermistor RT1 changes its own resistance value through the change of the ambient temperature to detect the ambient temperature, and then the temperature sampling voltage output to the control module 14 also changes. The control module 14 performs temperature compensation correction on the ranging result according to the temperature sampling voltage and the relationship between the ambient temperature and the ultrasonic propagation speed.
[0046] This embodiment uses only one resistor and one thermistor to complete the detection and sampling of the ambient temperature, and the circuit is simple and the cost is low.
[0047] In this embodiment, the temperature compensation module 17 is added to increase the function of ambient temperature detection and sampling. During each ultrasonic ranging, the current ambient temperature is measured and sampled by the thermistor, and a temperature sampling voltage is obtained and output to the control module 14. The control module 14 outputs the temperature sampling voltage according to the relationship between the ambient temperature and the ultrasonic propagation speed, as shown in formula (1):
[0048] V=331.4+0.61T (1)
[0049] In formula (1), V is the ultrasonic wave propagation velocity, and T is the Celsius temperature value.
[0050] The ranging result is subjected to relevant temperature compensation correction. Since temperature has a great influence on the ultrasonic wave propagation speed, if temperature compensation correction is not performed, the ultrasonic wave ranging error will be large. In this embodiment, the detection accuracy can be improved by adding a temperature compensation module 17.
[0051] In one embodiment, Figure 3 As shown, the signal processing module 13 may include a signal processing chip, which may be used to amplify, frequency select and shape the voltage signal to obtain a distance detection signal. Furthermore, the signal processing chip may also have functions such as gain control, filtering and detection.
[0052] For example, please refer to Figure 6 As shown, the signal processing module 13 may include a signal processing chip U3, a second capacitor C2 and a fifth resistor R5. The ultrasonic receiver 16 may be connected to the signal processing module 13 via an ultrasonic receiving interface RX1. Specifically, the first pin of the signal processing chip U3 is connected to the positive output terminal VCC, the second pin of the signal processing chip U3 is connected to the control module 14, the sixth pin of the signal processing chip U3 is connected to the ultrasonic receiving interface RX1, the third pin of the signal processing chip U3 is connected to the first end of the second capacitor C2, and the fifth pin of the signal processing chip U3 is connected to the first end of the fifth resistor R5; the second end of the second capacitor C2, the fourth pin of the signal processing chip U3 and the fifth resistor R5 are all connected to the negative output terminal GND. Among them, the signal processing chip U3 can adopt CXA20106, of course, the signal processing chip U3 can also adopt other models, which is not limited in this application.
[0053] This embodiment adopts a dedicated signal processing chip U3, which integrates functions such as signal amplification, frequency selection and shaping processing. Compared with the method of using discrete components or general amplifier chips and frequency selection circuits to perform signal processing in the prior art, it can simplify the circuit, reduce the circuit board area, reduce the requirements of the production process and the detection link, thereby reducing labor costs. The method of using discrete components or general amplifier chips and frequency selection circuits to perform signal processing in the prior art is easily interfered by external signals, resulting in unstable signals, low detection result accuracy, large errors, and low detection efficiency. This embodiment adopts a dedicated signal processing chip U3, which can improve the anti-interference ability of ultrasonic ranging and the stability of the signal, and the detection result is high in accuracy, small in error, and high in detection efficiency.
[0054] In one embodiment, Figure 4As shown, the power regulation module 12 may include a switch circuit 121 and a transformer circuit 122. The switch circuit 121 may be connected to the control module 14, and is used to receive the power control signal and adjust its own switch state according to the power control signal; the transformer circuit 122 may be connected to the switch circuit 121 and the power amplifier module 11, and is used to obtain the supply voltage after performing voltage conversion on the first power supply voltage based on the switch state. Furthermore, the power control signal may be a pulse signal.
[0055] For example, please refer to Figure 5 As shown, the supply voltage is VHB shown in the figure. The switch circuit 121 may include a fourth resistor R4 and a first transistor Q1. Specifically, a first end of the fourth resistor R4 is connected to the control module 14, a second end of the fourth resistor R4 is connected to the base of the first transistor Q1, a collector of the first transistor Q1 is connected to the transformer circuit 122, and an emitter of the first transistor Q1 is connected to the negative output terminal GND.
[0056] The switch circuit 121 in this embodiment can realize the switch function by using only one resistor and one transistor, and the circuit is simple and the cost is low. The switch circuit 121 receives the power control signal and controls the transistor to be turned on or off according to the changes in the frequency and pulse width of the power control signal. Furthermore, when the transistor is turned on, the switch circuit 121 is closed, and when the transistor is turned off, the switch circuit 121 is disconnected, so that the switch state of the switch circuit 121 is adjusted, the transformer circuit is controlled, and the purpose of adjusting the ultrasonic transmission power is achieved.
[0057] For example, please refer to Figure 5 As shown, the transformer circuit 122 may include a transformer T1, a second diode D2, a first diode D1 and a first capacitor C1. Specifically, the first end of the primary coil of the transformer T1 is connected to the anode of the second diode D2 and connected to the switch circuit 121. The second end of the primary coil of the transformer T1 is connected to the cathode of the second diode D2 and connected to the positive output terminal VCC. The third end of the secondary coil of the transformer T1 is connected to the anode of the first diode D1, the cathode of the first diode D1 is connected to the first end of the first capacitor C1, and connected to the amplification module. The fourth end of the secondary coil of the transformer T1 is connected to the second end of the first capacitor C1 and connected to the negative output terminal GND. Further, the collector of the first transistor Q1 is connected to the anode of the second diode D2.
[0058] The transformer circuit 122 in this embodiment can achieve voltage conversion by using only one transformer, two diodes and one capacitor, that is, the first power supply voltage is converted to obtain the supply voltage. The circuit is simple and the cost is low. The switching state of the switch circuit 121 is controlled based on the control module 14, and then the operation of the transformer circuit 122 is controlled to achieve voltage conversion. Furthermore, when the control module 14 controls the switch circuit 121 to be closed, the primary coil of the transformer stores energy, and when the control module 14 controls the switch circuit 121 to be disconnected, the energy stored in the primary coil of the transformer is transferred to the secondary coil, forming an energy conversion, that is, achieving a voltage conversion, and achieving simple and convenient control.
[0059] In one embodiment, Figure 4 As shown, the power regulation module 12 may further include a sampling circuit 123. The sampling circuit 123 may be connected to the transformer circuit 122 and the control module 14, and is used to sample the supply voltage and obtain a supply sampling voltage to output to the control module 14, and the control module 14 adjusts the power control signal based on the supply sampling voltage so that the supply voltage is within a set range.
[0060] For example, please refer to Figure 5 As shown, the sampling circuit 123 may include a first resistor R1 and a second resistor R2. Specifically, the first end of the first resistor R1 is connected to the transformer circuit 122, the second end of the first resistor R1 is connected to the first end of the second resistor R2 and connected to the control module 14, and the second end of the second resistor R2 is connected to the negative output terminal GND. Furthermore, the first end of the first resistor R1 is connected to the cathode of the first diode D1.
[0061] For details, please refer to Figure 5As shown, the working principle of the power regulation module 12 is as follows: the microprocessor U1 outputs a pulse signal of a set frequency through the control pin CLK, and the first transistor Q1 is controlled by the pulse signal to open and close periodically. During the opening period of the first transistor Q1, the current flows from the positive output terminal VCC through the second end of the primary coil of the transformer T1 through the internal coil, flows out from the first end of the primary coil, and then flows through the first transistor Q1 to the negative output terminal GND, during which the energy storage of the primary coil of the transformer T1 is completed. When the first transistor Q1 is closed, since the current cannot change suddenly, the current still flows in from the second end of the primary coil and flows out from the first end of the primary coil, but the loop flows back to the second end of the primary coil through the second diode D2. In this process, the energy stored in the transformer T1 coil is transferred to the secondary coil, forming an energy conversion. The voltage of the secondary coil of the transformer T1 is rectified by the first diode D1 to obtain the power supply voltage VHB, which is a DC voltage. At the same time, the first capacitor C1 is charged. The charging circuit is the third terminal of the secondary coil of the transformer T1, the power supply voltage VHB, to the first capacitor C1, and then through the fourth terminal of the secondary coil of the transformer T1, to complete a charging cycle. At the same time, after the power supply voltage VHB is divided by the first resistor R1 and the second resistor R2, the signal is sent to the signal pin VC of the microprocessor U1 to monitor the power supply voltage VHB in real time. The voltage of this power supply voltage VHB can be adjusted by the microprocessor U1 by adjusting the pulse width of the control pin CLK. When the voltage value of the power supply voltage VHB is higher than the set range, the microprocessor U1 reduces the pulse width of the control pin CLK. If the voltage value of the power supply voltage VHB is lower than the set range, the microprocessor U1 increases the pulse width of the control pin CLK, thereby stabilizing the voltage value of the power supply voltage VHB within the set range, thereby realizing the parameterization function.
[0062] In one embodiment, Figure 4 As shown, the power amplification module 11 may include an amplification circuit 111 and a drive circuit 112. The amplification circuit 111 may be connected to the control module 14, and is used to receive the transmission drive signal, and obtain an amplified signal after amplifying the transmission drive signal; the drive circuit 112 may be connected to the amplification circuit 111, the power adjustment module 12, and the ultrasonic transmitter 15, and is used to receive the power supply voltage, and use the amplified signal and the power supply voltage to drive the ultrasonic transmitter 15 to transmit an ultrasonic signal.
[0063] For example, please refer to Figure 5As shown, the amplifier circuit 111 may include an amplifier chip U2, and the drive circuit 112 may include a second transistor Q2, a third transistor Q3, a fourth transistor Q4 and a fifth transistor Q5, and the second transistor Q2, the third transistor Q3, the fourth transistor Q4 and the fifth transistor Q5 form a bridge drive circuit 112. The ultrasonic transmitter 15 can be connected to the drive circuit 112 through an ultrasonic transmission interface TX1. Specifically, the first pin of the amplifier chip U2 is connected to the positive output terminal VCC, the fourth pin of the amplifier chip U2 is connected to the negative output terminal GND, and the second pin and the third pin of the amplifier chip U2 are respectively connected to the control module 14 for receiving the transmission drive signal. The fifth pin, the sixth pin, the seventh pin and the eighth pin of the amplifier chip U2 are respectively connected to the base of the fourth transistor Q4, the base of the second transistor Q2, the base of the fifth transistor Q5 and the base of the third transistor Q3. The emitter of the fifth transistor Q5 and the emitter of the fourth transistor Q4 are both connected to the negative output terminal GND. The collector of the fifth transistor Q5 is connected to the collector of the third transistor Q3 and connected to the ultrasonic transmission interface TX1, and the collector of the second transistor Q2 is connected to the collector of the fourth transistor Q4 and connected to the ultrasonic transmission interface TX1. The emitter of the third transistor Q3 and the emitter of the second transistor Q2 are connected and connected to the transformer circuit 122. Further, the emitter of the third transistor Q3 and the emitter of the second transistor Q2 are both connected to the cathode of the first diode D1.
[0064] The amplifier circuit 111 in this embodiment can realize the amplification function only by using the amplifier chip U2. Compared with using discrete components such as transistors to realize the amplification function, it can simplify the circuit, reduce the circuit board area, reduce the production process requirements and detection links, and thus reduce labor costs.
[0065] The driving circuit 112 in this embodiment uses a bridge driving circuit composed of four transistors to drive the ultrasonic transmitter 15 to transmit ultrasonic waves, thereby improving the driving capability of the ultrasonic transmitter 15 .
[0066] Specifically, refer to Figure 5 and Figure 6As shown, the working principle of ultrasonic ranging is that when the detection starts, the voltage conversion function is first started, that is, the CLK pin of the microprocessor U1 outputs a signal of a certain frequency and pulse width to control the conversion of the transformer T1, so that the power supply voltage VHB output by the secondary coil of the transformer T1 after rectification is stabilized at a certain value. At this time, the CTL1 and CTL2 pins of the microprocessor U1 output signals with opposite level states, which are sent to the amplifier chip U2. After being processed and amplified by the amplifier chip U2, the bridge drive circuit 112 composed of transistors Q2, Q3, Q4 and Q5 is driven to drive the ultrasonic transmitter 15. The ultrasonic transmitter 15 realizes the conversion of electrical energy into mechanical energy. The signals of the CTL1 and CTL2 pins of the microprocessor U1 are cyclically switched according to the resonant frequency of the ultrasonic transmitter 15. The transmission power of the ultrasonic wave is adjusted and controlled by adjusting the power supply voltage of the bridge drive circuit 112, that is, the power supply voltage VHB. When the distance detection signal received by the microprocessor U1 is unstable, the signal frequency and width of the CLK of the microprocessor U1 are adjusted to increase the supply voltage VHB output by the rectifier output of the secondary coil of the transformer T1, thereby increasing the transmission power of the ultrasonic transmitter 15. When the distance detection signal received by the microprocessor U1 contains multiple signals with different widths, the signal frequency and width of the CLK of the microprocessor U1 are adjusted to reduce the supply voltage VHB output by the rectifier output of the secondary coil of the transformer T1, thereby reducing the transmission power of the ultrasonic transmitter 15, so as to reduce the instability of ultrasonic ranging caused by the entry of signals reflected by some interference objects due to the excessive strength of the transmitted ultrasonic signal.
[0067] For further information, please refer to Figure 5 and Fig.10As shown, the working principle of ultrasonic transmission power regulation is: before the ultrasonic ranging starts, the microprocessor U1 outputs a signal of a certain frequency and pulse width at the CLK pin, so that the power supply voltage VHB rectified and output by the secondary coil of the transformer T1 is stabilized at a default value, that is, the power supply voltage VHB is stabilized within a set range, and then the CTL1 and CTL2 pins of the microprocessor U1 output a signal of the resonant frequency of the ultrasonic transmitter 15, which is driven by the bridge drive circuit 112 composed of the amplifier chip U2 and transistors Q2, Q3, Q4, and Q5 to transmit ultrasonic signals.The ultrasonic distance measuring device 1 checks whether an echo signal is received, that is, the microprocessor U1 checks whether the INT pin has a distance detection signal. If there is no distance detection signal, that is, no echo signal is received, the microprocessor U1 increases the pulse width of the CLK pin and increases the power supply voltage VBH voltage to increase the ultrasonic transmission power. The microprocessor U1 checks again whether the INT pin has a distance detection signal. If there is no distance detection signal, the ultrasonic transmission power continues to be increased. If there is a distance detection signal, that is, an echo signal is received, the quality of the received echo signal is evaluated, that is, the microprocessor U1 evaluates the quality of the distance detection signal. If the echo signal If the ultrasonic signal is unstable and fluctuates greatly, for example, the echo signal is not within the specified range, that is, the distance detection signal is unstable and fluctuates greatly, then the ultrasonic transmission power will continue to be increased. If the echo signal is stable, for example, the echo signal is within the specified range, but the number of echo signals increases, that is, the distance detection signal is stable, but the number of distance detection signals increases, and some distance detection signals are unstable, then the ultrasonic transmission power will be reduced until the number of ultrasonic signals emitted by the ultrasonic transmitter 15 is consistent with the number of echo signals received by the ultrasonic receiver 16. When the ultrasonic transmission power is stable, the distance measurement will be formally started. Specifically, the power adjustment module 12 receives The power control signal is received, and the first power supply voltage VCC is converted into the power supply voltage VHB according to the power control signal; the power amplification module 11 receives the power supply voltage VHB and the transmission drive signal, and amplifies the transmission drive signal to obtain an amplified signal, and uses the amplified signal and the power supply voltage VHB to drive the ultrasonic transmitter 15 to transmit an ultrasonic signal; wherein the power supply voltage VHB is a second power supply voltage for driving the ultrasonic transmitter 15; the ultrasonic transmitter 15 transmits the ultrasonic signal to the object under test 2; the ultrasonic receiver 16 receives the ultrasonic signal from the object under test 2 reflects the ultrasonic signal to form an echo signal, and converts the echo signal into a voltage signal corresponding to the echo signal; the signal processing module 13 amplifies, selects the frequency and performs shaping processing on the voltage signal to obtain a distance detection signal; after the distance detection signal is decoded and calculated by the microprocessor U1 to obtain the ranging result, the temperature compensation module 17 detects and samples the current ambient temperature and obtains the temperature sampling voltage and outputs it to the microprocessor U1. The microprocessor U1 performs temperature compensation correction on the current ranging result based on the temperature sampling voltage and the relationship between the ultrasonic propagation speed and the ambient temperature, and outputs the detection distance.
[0068] In one embodiment, Figure 4 As shown, the ultrasonic distance measuring device may further include a data display module 18 for displaying measured data. Further, the data display module 18 may be connected to the control module 14 .
[0069] The present invention also provides an ultrasonic distance measurement method, such as Figure 7 As shown, in one embodiment, the ultrasonic distance measuring device 1 described in any of the above embodiments may include:
[0070] Step S1: The power regulation module receives a power control signal and performs voltage conversion on a first power supply voltage according to the power control signal to obtain a power supply voltage;
[0071] Step S2: the power amplification module receives the power supply voltage and the transmission drive signal, amplifies the transmission drive signal to obtain an amplified signal, and uses the amplified signal and the power supply voltage to drive the ultrasonic transmitter to transmit an ultrasonic signal; wherein the power supply voltage is a second power supply voltage for driving the ultrasonic transmitter;
[0072] Step S3: the ultrasonic transmitter transmits the ultrasonic signal to the object to be tested;
[0073] Step S4: the ultrasonic receiver receives an echo signal formed by the object to be measured reflecting the ultrasonic signal, and converts the echo signal into a voltage signal corresponding to the echo signal;
[0074] Step S5: the signal processing module amplifies, frequency selects and shapes the voltage signal to obtain a distance detection signal;
[0075] Step S6: When the control module fails to receive the distance detection signal, the control module adjusts the power control signal to adjust the power supply voltage until the distance detection signal is received; specifically, the power control signal may be a pulse signal, and the control module may control the power adjustment module by adjusting the pulse width of the power control signal to adjust the power supply voltage obtained after voltage conversion. Furthermore, when the control module fails to receive the distance detection signal, the control module may increase the pulse width of the power control signal to increase the power supply voltage, thereby increasing the ultrasonic transmission power, until the distance detection signal is received.
[0076] Step S7: upon receiving the distance detection signal, the control module decodes the distance detection signal to obtain a distance measurement result.
[0077] This embodiment adjusts the ultrasonic transmission power by adjusting the power supply voltage used to drive the ultrasonic transmitter to transmit the ultrasonic signal. When the echo signal is not received, the pulse width of the power control signal is adjusted to adjust the power supply voltage until the distance detection signal is received, that is, until the echo signal is received, so as to achieve the purpose of automatically adjusting the ultrasonic transmission power according to the measured distance. The ultrasonic transmission power is adjusted by adaptively measuring the distance to obtain a more stable echo signal, thereby improving the measurement accuracy and stability, and reducing energy consumption. In particular, in the application scenario where the ultrasonic distance measuring device is powered by a battery, the battery life can be significantly improved. The ultrasonic distance measuring method provided in this embodiment can be widely used in life and industry.
[0078] In one embodiment, Figure 8 As shown, before the control module decodes the distance detection signal to obtain the distance measurement result, it may also include:
[0079] Step S71: the control module performs a quality assessment on the distance detection signal; wherein the quality assessment refers to comparing whether the number of ultrasonic signals emitted by the ultrasonic transmitter and the number of echo signals received by the ultrasonic receiver are consistent;
[0080] Step S72: When the number of ultrasonic signals and the number of echo signals are inconsistent, the control module adjusts the power control signal to adjust the power supply voltage until the number of ultrasonic signals and the number of echo signals are consistent; specifically, when the number of ultrasonic signals is greater than the number of echo signals, the control module will reduce the pulse width of the power control signal to reduce the power supply voltage, thereby reducing the ultrasonic transmission power. When the number of ultrasonic signals is less than the number of echo signals, the control module will increase the pulse width of the power control signal to increase the power supply voltage, thereby increasing the ultrasonic transmission power.
[0081] Step S73: When the number of ultrasonic signals is consistent with the number of echo signals, the control module executes the step of decoding the distance detection signal to obtain a distance measurement result.
[0082] In one embodiment, Fig. 9 As shown, after the step of decoding the distance detection signal to obtain the distance measurement result, the following steps may also be included:
[0083] Step S8: The temperature compensation module detects and samples the current ambient temperature and obtains a temperature sampling voltage and outputs it to the control module;
[0084] Step S9: the control module performs temperature compensation correction on the distance measurement result based on the temperature sampling voltage to obtain the detection distance.
[0085] Specifically, each time ultrasonic ranging is performed, the current ambient temperature is measured and sampled by the temperature compensation module, and a temperature sampling voltage is obtained and output to the control module. The control module calculates the temperature sampling voltage and the relationship between the ambient temperature and the ultrasonic propagation speed, as shown in formula (1):
[0086] V=331.4+0.61T (1)
[0087] In formula (1), V is the ultrasonic wave propagation velocity, and T is the Celsius temperature value.
[0088] The ranging result is corrected by temperature compensation. Since the ultrasonic wave propagation speed is affected by the ambient temperature, if the temperature compensation is not performed, the ultrasonic wave ranging error will be large. In this embodiment, the detection accuracy can be improved by adding a temperature compensation module.
[0089] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0090] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. An ultrasonic distance measuring device, It is characterized in that The ultrasonic distance measuring device comprises: A power regulation module, configured to receive a power control signal and obtain a power supply voltage after performing voltage conversion on a first power supply voltage according to the power control signal; A power amplification module, connected to the power regulation module, for receiving the power supply voltage and the transmission drive signal, amplifying the transmission drive signal to obtain an amplified signal, and using the amplified signal and the power supply voltage to drive the ultrasonic transmitter to transmit an ultrasonic signal; wherein the power supply voltage is a second power supply voltage for driving the ultrasonic transmitter; The ultrasonic transmitter is connected to the power amplifier module and is used to transmit the ultrasonic signal to the object to be tested; An ultrasonic receiver, used to receive an echo signal formed by the object to be measured reflecting the ultrasonic signal, and convert the echo signal into a voltage signal corresponding to the echo signal; A signal processing module, connected to the ultrasonic receiver, for amplifying, frequency selecting and shaping the voltage signal to obtain a distance detection signal; and A control module, connected to the power regulation module, the power amplification module and the signal processing module, and configured to output the power control signal and the transmission drive signal, and receive the distance detection signal; When the control module fails to receive the distance detection signal, the control module adjusts the power control signal to adjust the power supply voltage until the distance detection signal is received; When the control module receives the distance detection signal, if the number of the ultrasonic signal and the number of the echo signal are inconsistent, the control module adjusts the power control signal to adjust the power supply voltage until the number of the ultrasonic signal and the number of the echo signal are consistent, and then decodes the distance detection signal to obtain a distance measurement result.
2. The ultrasonic distance measuring device according to claim 1, It is characterized in that The control module is also used to perform quality assessment on the distance detection signal when the distance detection signal is received; wherein the quality assessment refers to comparing whether the number of ultrasonic signals emitted by the ultrasonic transmitter is consistent with the number of echo signals received by the ultrasonic receiver.
3. The ultrasonic distance measuring device according to claim 1, It is characterized in that The distance measuring device also includes: The temperature compensation module is connected to the control module and is used to detect and sample the current ambient temperature and obtain a temperature sampling voltage to output to the control module. The control module performs temperature compensation correction on the distance measurement result based on the temperature sampling voltage.
4. The ultrasonic distance measuring device according to claim 1, It is characterized in that The signal processing module comprises: The signal processing chip is used to amplify, frequency select and shape the voltage signal to obtain a distance detection signal.
5. The ultrasonic distance measuring device according to claim 1, It is characterized in that The power regulation module comprises: a switch circuit, connected to the control module, configured to receive the power control signal and adjust its own switch state according to the power control signal; and A transformer circuit is connected to the switch circuit and the power amplifier module, and is used to obtain a supply voltage after performing voltage conversion on the first power supply voltage based on the switch state.
6. The ultrasonic distance measuring device according to claim 5, It is characterized in that The power regulation module also includes: A sampling circuit is connected to the transformer circuit and the control module, and is used to sample the power supply voltage and obtain a power supply sampling voltage to output to the control module. The control module adjusts the power control signal based on the power supply sampling voltage so that the power supply voltage is within a set range.
7. The ultrasonic ranging module according to claim 1, It is characterized in that The power amplification module comprises: an amplifying circuit, connected to the control module, configured to receive the transmitting driving signal and obtain an amplified signal after amplifying the transmitting driving signal; and The driving circuit is connected to the amplifying circuit, the power regulating module and the ultrasonic transmitter, and is used to receive the power supply voltage and use the amplified signal and the power supply voltage to drive the ultrasonic transmitter to transmit an ultrasonic signal.
8. An ultrasonic distance measurement method, It is characterized in that Applied to the ultrasonic ranging device according to any one of claims 1 to 7, the ultrasonic ranging method comprises: The power regulation module receives the power control signal and obtains the power supply voltage after performing voltage conversion on the first power supply voltage according to the power control signal; The power amplifier module receives the power supply voltage and the transmission drive signal, amplifies the transmission drive signal to obtain an amplified signal, and uses the amplified signal and the power supply voltage to drive the ultrasonic transmitter to transmit an ultrasonic signal; wherein the power supply voltage is a second power supply voltage for driving the ultrasonic transmitter; The ultrasonic transmitter transmits the ultrasonic signal to the object to be measured; The ultrasonic receiver receives an echo signal formed by the object to be measured reflecting the ultrasonic signal, and converts the echo signal into a voltage signal corresponding to the echo signal; The signal processing module amplifies, frequency selects and shapes the voltage signal to obtain a distance detection signal; When the control module fails to receive the distance detection signal, the control module adjusts the power control signal to adjust the power supply voltage until the distance detection signal is received; When receiving the distance detection signal, the control module decodes the distance detection signal to obtain a distance measurement result.
9. An ultrasonic distance measurement method according to claim 8, It is characterized in that Before the control module decodes the distance detection signal to obtain the distance measurement result, the control module also includes: The control module performs a quality assessment on the distance detection signal; wherein the quality assessment refers to comparing whether the number of times the ultrasonic signal emitted by the ultrasonic transmitter is consistent with the number of times the echo signal received by the ultrasonic receiver; In the case where the number of the ultrasonic signal and the number of the echo signal are inconsistent, the control module adjusts the power control signal to adjust the power supply voltage until the number of the ultrasonic signal and the number of the echo signal are consistent; In the case where the number of ultrasonic signals is consistent with the number of echo signals, the control module executes the step of decoding the distance detection signal to obtain a distance measurement result.
10. An ultrasonic distance measurement method according to claim 8, It is characterized in that After the step of decoding the distance detection signal to obtain the distance measurement result, the following step is further included: The temperature compensation module detects and samples the current ambient temperature and obtains the temperature sampling voltage and outputs it to the control module; The control module performs temperature compensation correction on the distance measurement result based on the temperature sampling voltage to obtain the detection distance.
