Automatic triggering and self-calibrating ultrasonic rain measuring system

文档序号:704677 发布日期:2021-04-13 浏览:10次 中文

阅读说明:本技术 一种自动触发和自校准的超声测雨系统 (Automatic triggering and self-calibrating ultrasonic rain measuring system ) 是由 李松斌 袁名勇 刘鹏 林道友 于 2020-12-09 设计创作,主要内容包括:一种自动触发和自校准的超声测雨系统,该系统包括降雨监测模块、自校准及雨量测量模块、中央处理模块、水位监测模块和排水模块;其中,降雨监测模块,用于监测降雨并发送降雨信号;自校准及雨量测量模块,用于在中央控制模块的控制下,发射超声波信号并接收,得到校准飞行时间,用于在中央控制模块的控制下,向雨量桶内的积水面发射超声波信号并接收经积水面反射的测量回波信号,得到测量飞行时间;中央处理模块,用于接收降雨信号启动水位监测模块和自校准及雨量测量模块,用于计算得到降雨量数值并以固定格式输出;水位监测模块,用于对雨量桶内的水位监测并发送排水信号;排水模块,用于接收排水信号,打开排水阀门排空雨量桶内的积水。(An ultrasonic rain measuring system capable of automatic triggering and self-calibration comprises a rain monitoring module, a self-calibration and rainfall measurement module, a central processing module, a water level monitoring module and a drainage module; the rainfall monitoring module is used for monitoring rainfall and sending a rainfall signal; the self-calibration and rainfall measurement module is used for transmitting and receiving ultrasonic signals under the control of the central control module to obtain calibration flight time, and is used for transmitting ultrasonic signals to a ponding surface in the rainfall bucket and receiving measurement echo signals reflected by the ponding surface under the control of the central control module to obtain measurement flight time; the central processing module is used for receiving a rainfall signal, starting the water level monitoring module and the self-calibration and rainfall measurement module, and calculating to obtain a rainfall numerical value and outputting the rainfall numerical value in a fixed format; the water level monitoring module is used for monitoring the water level in the rainfall barrel and sending a drainage signal; and the drainage module is used for receiving the drainage signal and opening the drainage valve to drain the accumulated water in the rainfall barrel.)

1. An ultrasonic rain measuring system capable of automatic triggering and self-calibration is characterized by comprising a rainfall monitoring module, a self-calibration and rainfall measurement module, a central processing module, a water level monitoring module and a drainage module; wherein the content of the first and second substances,

the rainfall monitoring module is used for monitoring rainfall and sending a rainfall signal to the central processing module;

the self-calibration and rainfall measurement module is used for transmitting an ultrasonic signal and receiving a calibration echo signal to perform speed self-calibration under the control of the central control module, obtaining calibration flight time and sending the calibration flight time to the central processing module, and is used for transmitting the ultrasonic signal to a water accumulation surface in the rainfall bucket and receiving a measurement echo signal reflected by the water accumulation surface to perform rainfall measurement under the control of the central control module, obtaining measurement flight time and sending the measurement flight time to the central processing module;

the central processing module is used for receiving a rainfall signal, starting the water level monitoring module and the self-calibration and rainfall measurement module to work, receiving self-calibration flight time and measurement flight time, obtaining a rainfall numerical value through calculation and outputting the rainfall numerical value in a fixed format;

the water level monitoring module is used for monitoring the water level in the rainfall barrel and sending a drainage signal to the drainage module when the water level exceeds a preset water level height or the water level is kept unchanged for more than a preset time;

and the drainage module is used for receiving a drainage signal and opening a drainage valve to drain accumulated water in the rainfall barrel.

2. The ultrasonic rain measuring system of automatic triggering and self calibration of claim 1, wherein the rain monitoring module comprises a rain sensing sensor and a rain monitoring circuit; wherein the content of the first and second substances,

the rainwater sensing sensor is used for sending a sensing signal to the rainfall monitoring circuit when sensing rainwater;

and the rainfall monitoring circuit is used for sending rainfall signals to the central processing module according to the received sensing signals.

3. The ultrasonic rain measurement system of automatic triggering and self calibration according to claim 1, wherein the self calibration and rain measurement module comprises a time measurement unit, a channel selection unit, an automatic calibration unit and a rain measurement unit; wherein the content of the first and second substances,

the time measuring unit is used for generating a pulse signal with a specific frequency under the control of the central processing module and sending the pulse signal to the channel selection unit, and is used for calculating and obtaining the calibration flight time t according to the calibration echo signal0And sending to the central processing module, and calculating to obtain the measured flight time t according to the measured echo signal1And sending to a central processing module;

the channel selection unit is used for selecting the automatic calibration unit and the rainfall measurement unit to work alternately under the control of the central processing module, sending the received pulse signals to the automatic calibration unit and the rainfall measurement unit respectively, and receiving the calibration echo signals acquired by the automatic calibration unit and inputting the calibration echo signals into the time measurement unit; the rainfall measuring unit is also used for receiving a measuring echo signal collected by the rainfall measuring unit and inputting the measuring echo signal into the time measuring unit;

the automatic calibration unit comprises a first self-calibration ultrasonic probe and a second self-calibration ultrasonic probe, the first self-calibration ultrasonic probe and the second self-calibration ultrasonic probe are arranged in a right-to-right mode, the distance is fixed, the frequency is the same, the first self-calibration ultrasonic probe is a transmitting probe and is used for transmitting an ultrasonic signal to the second self-calibration ultrasonic probe under the control of a pulse signal; the second self-calibration ultrasonic probe is a receiving probe and is used for receiving and obtaining a calibration echo signal;

the rainfall measurement unit comprises a first measurement ultrasonic probe and a second measurement ultrasonic probe, and the first measurement ultrasonic probe is a transmitting probe and is used for transmitting an ultrasonic signal to a water accumulation surface under the control of a pulse signal; the second self-calibration ultrasonic probe is a receiving probe and is used for receiving a measurement echo signal reflected by the water surface.

4. The auto-triggering and self-calibrating ultrasonic rain gauge system of claim 3, wherein the auto-calibration unit further comprises an impedance transformation driver circuit, a clipping circuit, and a signal processing circuit, wherein,

the impedance transformation driving circuit is used for receiving a pulse signal, amplifying and impedance matching the pulse signal and then sending the amplified and impedance matched pulse signal to the first self-calibration ultrasonic probe;

the amplitude limiting circuit is used for carrying out amplitude limitation on the calibration echo signal received by the second self-calibration ultrasonic probe and inputting the calibration echo signal into the signal processing circuit;

and the signal processing circuit is used for sequentially filtering and shaping the calibration echo signals with limited amplitude and sending the calibration echo signals to the channel selection unit.

5. The auto-triggering and self-calibrating ultrasonic rain gauge system of claim 3, wherein the rain measurement unit further comprises an impedance transformation driver circuit, a clipping circuit, and a signal processing circuit, wherein,

the impedance transformation driving circuit is used for receiving a pulse signal, amplifying and impedance matching the pulse signal and then sending the amplified and impedance matched pulse signal to the first self-calibration ultrasonic probe;

the amplitude limiting circuit is used for carrying out amplitude limitation on the measurement echo signal received by the second measurement ultrasonic probe and inputting the measurement echo signal into the signal processing circuit;

and the signal processing circuit is used for sequentially filtering and shaping the measurement echo signals with limited amplitude and sending the measurement echo signals to the channel selection unit.

6. The automatically triggered and self-calibrated ultrasonic rain gauge system according to claim 1, wherein said central processing module comprises: the system comprises a wake-up unit, a self-calibration and rainfall measurement control unit and a rainfall calculation unit; wherein the content of the first and second substances,

the wake-up unit is used for receiving a rainfall signal to start the water level monitoring module and the self-calibration and rainfall measurement module to work;

the self-calibration and rainfall measurement control unit is used for controlling the self-calibration and rainfall measurement module to respectively perform self-calibration and rainfall measurement;

and the rainfall calculation unit is used for receiving the self-calibration flight time and the measurement flight time, obtaining a rainfall numerical value through calculation and outputting the rainfall numerical value in a fixed format.

7. The ultrasonic rain measurement system with automatic triggering and self-calibration function according to claim 6, wherein the rainfall calculation unit is implemented by the following steps:

according to the distance h between the first self-calibration ultrasonic probe and the second self-calibration ultrasonic probe, the flight time t is calibrated0Calculating the corrected propagation velocity v of the ultrasonic signal under the current environment, wherein the unit is millimeter per microsecond:

v=h/t0

from measured time of flight t1And the unit is microsecond, and the distance D from the first measurement ultrasonic probe to the water accumulation surface is calculated as follows:

D=v×t1/2

the vertical distance H from the first measurement ultrasonic probe to the ponding surface is calculated by the following formula:

wherein d is the distance between the first measurement ultrasonic probe and the second measurement ultrasonic probe;

comparing the vertical distance H from the first measuring ultrasonic probe to the water surface at the present time with the vertical distance H1 from the first measuring ultrasonic probe to the water surface at the previous time,

if H > H1, the rainfall Δ H is:

ΔH=H-H1

if H is less than or equal to H1, the rainfall amount delta H is as follows:

ΔH=0

assigning the vertical distance H from the first measurement ultrasonic probe to the ponding surface at the current moment to H1;

and expanding the rainfall delta H by a fixed multiple to be an integer and outputting the integer.

8. The automatically triggered and self-calibrated ultrasonic rain gauge system according to claim 1, further comprising a power supply module for providing a direct current power supply for the system operation.

Technical Field

The invention relates to the technical field of hydrological and meteorological measurement, in particular to an automatic triggering and self-calibration ultrasonic rain measuring system.

Background

At present, the common rain gauges include a weighing type rain gauge, a siphon type rain gauge and a tipping bucket type rain gauge. Because the weighing type rain gauge and the siphon type rain gauge need manual measurement, the automation degree is low; the dump bucket of the dump bucket rain gauge has four capacities, 0.1mm, 0.2mm, 0.5mm, and 1mm, and the capacity of 0.1mm is the most used, but there is a defect, and although the accuracy of 0.1mm is relatively high, the error is large because the dump bucket is delayed and splashed after the rainfall becomes large. And it belongs to mechanical rotating structure, influences life, needs regular maintenance.

At present, because the ultrasonic transducer has high penetrability, obvious reflection can be generated when the ultrasonic transducer touches an interface to form a reflection echo, and the ultrasonic transducer has the advantages of high frequency, short wavelength, good directivity and the like, and can realize accurate measurement when being applied to rainfall detection at present. At present, a plurality of rain gauges made by using an ultrasonic technology exist, the transmission of ultrasonic waves in the air is influenced by temperature and atmospheric pressure, the ultrasonic rain gauges at the present stage are only limited to temperature and air pressure for compensating the ultrasonic speed, but sensors for measuring the air pressure and the temperature have errors, uncertainty exists in measuring precision, excessive measuring equipment is adopted in the system, potential hazards exist in stability, in addition, the current rain measuring system basically belongs to continuous work or is triggered by adopting a tipping bucket, the tipping bucket belongs to a mechanical rotation mode, frequent maintenance is needed, the intelligence is insufficient, the service life of an ultrasonic probe is influenced by the continuous work of the system, and meanwhile, the power consumption of the system is also increased. A liquid medium type probe or a single probe mode is adopted in a part of ultrasonic rain gauges, and the mode has the defect of large measuring blind area.

Disclosure of Invention

The invention aims to overcome the defects of the prior art and provides an automatic triggering and self-calibration ultrasonic rain measuring system.

In order to achieve the aim, the invention provides an automatic triggering and self-calibration ultrasonic rain measuring system which is characterized by comprising a rain monitoring module, a self-calibration and rainfall measurement module, a central processing module, a water level monitoring module and a drainage module; wherein the content of the first and second substances,

the rainfall monitoring module is used for monitoring rainfall and sending a rainfall signal to the central processing module;

the self-calibration and rainfall measurement module is used for transmitting an ultrasonic signal and receiving a calibration echo signal to perform speed self-calibration under the control of the central control module, obtaining calibration flight time and sending the calibration flight time to the central processing module, and is used for transmitting the ultrasonic signal to a water accumulation surface in the rainfall bucket and receiving a measurement echo signal reflected by the water accumulation surface to perform rainfall measurement under the control of the central control module, obtaining measurement flight time and sending the measurement flight time to the central processing module;

the central processing module is used for receiving a rainfall signal, starting the water level monitoring module and the self-calibration and rainfall measurement module to work, receiving self-calibration flight time and measurement flight time, obtaining a rainfall numerical value through calculation and outputting the rainfall numerical value in a fixed format;

the water level monitoring module is used for monitoring the water level in the rainfall barrel and sending a drainage signal to the drainage module when the water level exceeds a preset water level height or the water level is kept unchanged for more than a preset time;

and the drainage module is used for receiving a drainage signal and opening a drainage valve to drain accumulated water in the rainfall barrel.

As an improvement of the above invention, the rainfall monitoring module comprises a rain sensing sensor and a rainfall monitoring circuit; wherein the content of the first and second substances,

the rainwater sensing sensor is used for sending a sensing signal to the rainfall monitoring circuit when sensing rainwater;

and the rainfall monitoring circuit is used for sending rainfall signals to the central processing module according to the received sensing signals.

As an improvement of the above invention, the self-calibration and rainfall measurement module comprises a time measurement unit, a channel selection unit, an automatic calibration unit and a rainfall measurement unit; wherein the content of the first and second substances,

the time measuring unit is used for generating a pulse signal with a specific frequency under the control of the central processing module and sending the pulse signal to the channel selection unit, and is used for calculating and obtaining the calibration flight time t according to the calibration echo signal0And sending to the central processing module, and calculating to obtain the measured flight time t according to the measured echo signal1And sending to a central processing module;

the channel selection unit is used for selecting the automatic calibration unit and the rainfall measurement unit to work alternately under the control of the central processing module, sending the received pulse signals to the automatic calibration unit and the rainfall measurement unit respectively, and receiving the calibration echo signals acquired by the automatic calibration unit and inputting the calibration echo signals into the time measurement unit; the rainfall measuring unit is also used for receiving a measuring echo signal collected by the rainfall measuring unit and inputting the measuring echo signal into the time measuring unit;

the automatic calibration unit comprises a first self-calibration ultrasonic probe and a second self-calibration ultrasonic probe, the first self-calibration ultrasonic probe and the second self-calibration ultrasonic probe are arranged in a right-to-right mode, the distance is fixed, the frequency is the same, the first self-calibration ultrasonic probe is a transmitting probe and is used for transmitting an ultrasonic signal to the second self-calibration ultrasonic probe under the control of a pulse signal; the second self-calibration ultrasonic probe is a receiving probe and is used for receiving and obtaining a calibration echo signal;

the rainfall measurement unit comprises a first measurement ultrasonic probe and a second measurement ultrasonic probe, and the first measurement ultrasonic probe is a transmitting probe and is used for transmitting an ultrasonic signal to a water accumulation surface under the control of a pulse signal; the second self-calibration ultrasonic probe is a receiving probe and is used for receiving a measurement echo signal reflected by the water surface.

As an improvement of the above invention, the automatic calibration unit further comprises an impedance transformation driving circuit, a clipping circuit, and a signal processing circuit, wherein,

the impedance transformation driving circuit is used for receiving a pulse signal, amplifying and impedance matching the pulse signal and then sending the amplified and impedance matched pulse signal to the first self-calibration ultrasonic probe;

the amplitude limiting circuit is used for carrying out amplitude limitation on the calibration echo signal received by the second self-calibration ultrasonic probe and inputting the calibration echo signal into the signal processing circuit;

and the signal processing circuit is used for sequentially filtering and shaping the calibration echo signals with limited amplitude and sending the calibration echo signals to the channel selection unit.

As an improvement of the above invention, the rainfall measurement unit further comprises an impedance transformation driving circuit, a clipping circuit, and a signal processing circuit, wherein,

the impedance transformation driving circuit is used for receiving a pulse signal, amplifying and impedance matching the pulse signal and then sending the amplified and impedance matched pulse signal to the first self-calibration ultrasonic probe;

the amplitude limiting circuit is used for carrying out amplitude limitation on the measurement echo signal received by the second measurement ultrasonic probe and inputting the measurement echo signal into the signal processing circuit;

and the signal processing circuit is used for sequentially filtering and shaping the measurement echo signals with limited amplitude and sending the measurement echo signals to the channel selection unit.

As an improvement of the above invention, the central processing module includes: the system comprises a wake-up unit, a self-calibration and rainfall measurement control unit and a rainfall calculation unit; wherein the content of the first and second substances,

the wake-up unit is used for receiving a rainfall signal to start the water level monitoring module and the self-calibration and rainfall measurement module to work;

the self-calibration and rainfall measurement control unit is used for controlling the self-calibration and rainfall measurement module to respectively perform self-calibration and rainfall measurement;

and the rainfall calculation unit is used for receiving the self-calibration flight time and the measurement flight time, obtaining a rainfall numerical value through calculation and outputting the rainfall numerical value in a fixed format.

As an improvement of the above invention, the specific implementation process of the rainfall calculation unit is as follows:

according to the distance h between the first self-calibration ultrasonic probe and the second self-calibration ultrasonic probe, the flight time t is calibrated0Calculating the corrected propagation velocity v of the ultrasonic signal under the current environment, wherein the unit is millimeter per microsecond:

v=h/t0

from measured time of flight t1And the unit is microsecond, and the distance D from the first measurement ultrasonic probe to the water accumulation surface is calculated as follows:

D=v×t1/2

the vertical distance H from the first measurement ultrasonic probe to the ponding surface is calculated by the following formula:

wherein d is the distance between the first measurement ultrasonic probe and the second measurement ultrasonic probe;

comparing the vertical distance H from the first measuring ultrasonic probe to the water surface at the present time with the vertical distance H1 from the first measuring ultrasonic probe to the water surface at the previous time,

if H > H1, the rainfall Δ H is:

ΔH=H-H1

if H is less than or equal to H1, the rainfall amount delta H is as follows:

ΔH=0

assigning the vertical distance H from the first measurement ultrasonic probe to the ponding surface at the current moment to H1;

and expanding the rainfall delta H by a fixed multiple to be an integer and outputting the integer.

As an improvement of the above invention, the ultrasonic rain measuring system further comprises a power supply module for providing a direct current power supply for the system operation.

Compared with the prior art, the invention has the advantages that:

1. the invention integrates the functions of automatic triggering, automatic calibration, automatic drainage and the like, and can adapt to the use in various field environments;

2. the invention has long service life and low maintenance cost, wherein the automatic triggering function is realized by adopting an integrated circuit and a rainfall sensing technology, thereby avoiding the problem of easy abrasion caused by mechanical triggering, and effectively reducing the maintenance times and the maintenance cost; meanwhile, the service life of the system can be effectively prolonged due to the automatic triggering function, and the problems of continuous work, quick aging and short service life of the ultrasonic probe are avoided;

3. the automatic calibration function provided by the invention adopts double ultrasonic probes, performs acoustic self-calibration in a probe correlation mode, is different from the method for compensating by temperature and air pressure measurement in the prior art, adopts common-frequency ultrasonic calibration, and can effectively avoid the influence of accumulated errors of a compensation method with multiple measurement units on the measurement precision;

4. the invention has high measurement precision, adopts a high-precision time-to-digital converter, has the flight time resolution of 22ps, can effectively improve the measurement precision of the ultrasonic rain measurement system, and simultaneously combines a self-calibration function to ensure that the measurement precision of the system is less than 0.1 mm;

5. the power consumption is low, the power consumption of the system in a dormant state is less than 20mA and the power consumption of the system in an operating state is not more than 100mA due to the adoption of an automatic trigger function, and the system can supply power for a long time through a lithium battery and solar energy in a field environment without commercial power due to low power consumption;

6. the invention has small measuring blind area, adopts a double-probe measuring mode, can effectively reduce the ultrasonic measuring blind area, has the measuring blind area not more than 30mm and is different from the 100mm measuring blind area of a transmitting-receiving system of a single probe;

7. the invention can accurately measure the rainfall by accurately measuring the height of the surface of the rainwater in the rainfall barrel.

Drawings

FIG. 1 is a schematic block diagram of the components of the automatic triggering and self-calibrating ultrasonic rain measurement system of the present invention;

FIG. 2 is a schematic diagram of the DC12V-DC5V power supply circuit of the self-triggering and self-calibrating ultrasonic rain measurement system of the present invention;

FIG. 3 is a schematic diagram of the DC5V-3.3V power supply circuit of the auto-triggering and self-calibrating ultrasonic rain measurement system of the present invention;

FIG. 4 is a schematic diagram of the 12V voltage controlled switching circuit of the auto-triggering and self-calibrating ultrasonic rain measurement system of the present invention;

FIG. 5 is a schematic diagram of an ultrasonic driven impedance transformation circuit of the auto-triggering and self-calibrating ultrasonic rain measurement system of the present invention;

FIG. 6 is a schematic diagram of a 200KHz second order active band pass filter circuit of the automatic triggering and self-calibrating ultrasonic rain measurement system of the present invention;

FIG. 7 is a schematic diagram of a shaping circuit of the signal processing circuit of the automatic triggering and self-calibrating ultrasonic rain measurement system of the present invention;

FIG. 8 is a rain monitoring module workflow diagram of the auto-triggering and self-calibrating ultrasonic rain measurement system of the present invention;

FIG. 9 is a schematic diagram of an automatic calibration unit of the automatic triggering and self-calibrating ultrasonic rain measurement system of the present invention;

FIG. 10 is a schematic view of a rain measurement unit of the auto-triggering and self-calibrating ultrasonic rain measurement system of the present invention;

FIG. 11 is a flow chart of a time measuring unit of the automatic triggering and self-calibrating ultrasonic rain measurement system of the present invention;

FIG. 12 is a flow chart of the automatically triggered and self-calibrated ultrasonic rain measurement system of the present invention.

Detailed Description

The technical solution of the present invention will be described in detail below with reference to the accompanying drawings and examples.

As shown in fig. 1, the ultrasonic rain measurement system with automatic triggering and self-calibration of the present invention includes a power supply module, a rainfall monitoring module, a self-calibration and rainfall measurement module, a central processing module, a water level monitoring module, and a drainage module.

The power supply module is used for supplying power to the whole system;

the rainfall monitoring module is used for monitoring rainfall and sending a rainfall signal to the central processing module;

the rainfall measuring device comprises a self-calibration and rainfall measuring module, a central processing module and a control module, wherein the self-calibration and rainfall measuring module is used for transmitting an ultrasonic signal and receiving a calibration echo signal to perform speed self-calibration under the control of the central control module, obtaining calibration flight time and sending the calibration flight time to the central processing module, and is used for transmitting the ultrasonic signal to a water accumulation surface in a rainfall bucket and receiving a measurement echo signal reflected by the water accumulation surface to perform rainfall measurement under the control of the central control module, obtaining measurement flight time and sending the measurement flight time to the central processing module;

the central processing module is used for receiving a rainfall signal to start the water level monitoring module and the self-calibration and rainfall measurement module to work; the rainfall amount value is obtained through calculation and is output in a fixed format;

the water level monitoring module is used for monitoring the water level in the rainfall barrel and sending a drainage signal to the drainage module when the water level exceeds a preset water level height or the water level is kept unchanged for more than a preset time;

and the drainage module is used for receiving the drainage signal and opening the drainage valve to drain the accumulated water in the rainfall barrel.

Each module is described in detail below.

The power supply module is used for converting a DC12V direct-current power supply input by a system into DC5V through DC-DC conversion, converting DC12V into DC5V through a power chip MP2359 chip, wherein a circuit schematic diagram of the power chip MP2359 chip is shown in figure 2, the output current of the power chip MP2359 chip can reach 1.2A, and the resistance value of the feedback resistor is calculated according to the output voltage value according to the following formula. Through calculation, 5V voltage is output, and the resistance R2 is 9.53K Ω, and the resistance R4 is 49.9K Ω. The L1 selects 4.7uH power inductance, which is beneficial to improving the loading capacity.

R2=R4/{(VOUT/0.81)-1}

L=VOUT×(VIN-VOUT)/VIN×ΔIL×fsw

Wherein R4 and R2 are feedback resistors, VOUTIs output voltage, L is output power inductance, VinFor input voltage,. DELTA.ILIs a ripple current, fswIs the switching frequency;

DC5V is converted into DC3.3V, the system adopts an XC6206P332MR chip which is a low-noise low-dropout LDO (low dropout regulator), the output current of the chip is 200mA, a circuit schematic diagram of a central processing module is mainly provided for working, and a circuit schematic diagram is shown in figure 3, wherein C8, C49 and C50 are input and output filter capacitors of a power supply.

The 12V power supply is also provided for the ultrasonic drive circuit and the automatic drainage unit, a 12V voltage control switch circuit is shown in fig. 4, an optocoupler TL621 is used for isolation and an NPN triode are combined, the switch driving capability is increased, and the on and off of the 12V power supply can be effectively switched on and switched off. When PB12-1 is high level, the optical coupler is turned on, 12V voltage enables the triode Q2 to be turned on through R38, and finally the circuit outputs 12V voltage, otherwise, the circuit is turned off.

The central processing module includes: the system comprises a wake-up unit, a self-calibration and rainfall measurement control unit and a rainfall calculation unit; wherein the content of the first and second substances,

the wake-up unit is used for receiving a rainfall signal to start the water level monitoring module and the self-calibration and rainfall measurement module to work;

the self-calibration and rainfall measurement control unit is used for controlling the self-calibration and rainfall measurement module to respectively perform self-calibration and rainfall measurement;

and the rainfall calculation unit is used for receiving the self-calibration flight time and the measurement flight time, obtaining a rainfall numerical value through calculation and outputting the rainfall numerical value in a fixed format.

The central processing module adopts an SMT32F407 chip, the STM32F407 controls the working logic of the whole system and performs calculation processing on the measured data, the central processing module has more advanced kernels, more resource sets, stronger peripheral functions and higher performance, the highest operating frequency can reach 168Mhz, the execution rate of a control algorithm is greatly improved, and the power consumption is only 238 uA/MHz.

The self-calibration and rainfall measurement module comprises a time measurement unit, a channel selection unit, an automatic calibration unit and a rainfall measurement unit; wherein the content of the first and second substances,

a time measuring unit for generating pulse signals with specific frequency under the control of the central processing module and sending the pulse signals to the channel selection unit for calculating and obtaining the calibration flight time t according to the calibration echo signals0And sending to the central processing module, and calculating to obtain the measured flight time t according to the measured echo signal1And sending to a central processing module;

the invention adopts the high-precision TDC-GP22 time-to-digital conversion chip to measure the flight time, thereby improving the measurement precision. The TDC-GP22 was used to measure range 2 with a time measurement resolution of up to 22 ps. The STM32F407 communicates with it via the SPI interface, and by configuring the registers of TDC-GP22, a pulse train can be generated to drive the transducer, while internally generating a start signal that propagates along a propagation chain formed by logic gates with fixed propagation times. The received echo signal is amplified, filtered and shaped, and then a stop signal is generated by triggering a threshold value. The one-way propagation time can be obtained according to the number of logic gates of the start signal when the stop signal arrives. Many interference signals are generated, interference can be effectively filtered based on the first detection function of the TDC-GP22, and the first wave detection function can effectively avoid the occurrence of a wrong zero point detection phenomenon, so that the precision of the flight time can be improved.

If the measurement distance is 140mm and the sound velocity is 340m/s, the ultrasonic transmission distance is 0.4117647058823529ms under ideal conditions, the time is measured by a high-precision time-to-digital conversion method, the time measurement precision can reach picosecond level, the measurement precision is greatly improved, and the measurement precision of the system can be smaller than 0.1 mm.

The TDC-GP22 first wave detection function flow includes:

1) the stop mask window of parameter DELVAL1 in register 3 is used to suppress noise in the time period before the time of flight stop arrives at the channel by the pulse generator setting the comparator offset value;

2) TDC-GP22 measures the time width after the rising and falling edges of the first wave, and will automatically set the offset value to 0 mV;

3) setting a mask window of the parameter DELREL1 time measurement in the register 3 respectively;

4) measuring and recording the first wave width and the half-wave period of the first real time as the basis for measuring the signal intensity;

5) the TDC-GP22 chip automatically records the stop pulse measured in the parameter DELREL1, calculates the average value and can read the average value in the register 4;

6) if not currently measured, no stop signal is generated. The Offset value is always maintained at the amplitude value set for detecting the first wave.

The automatic calibration unit comprises a first self-calibration ultrasonic probe (probe 1 in figure 1), a second self-calibration ultrasonic probe (probe 2 in figure 1), an impedance transformation driving circuit, a limiting circuit and a signal processing circuit. Wherein the content of the first and second substances,

the first self-calibration ultrasonic probe and the second self-calibration ultrasonic probe are arranged oppositely, the distance is fixed, the frequency is the same, the first self-calibration ultrasonic probe is a transmitting probe and is used for transmitting an ultrasonic signal to the second self-calibration ultrasonic probe under the control of a pulse signal; the second self-calibration ultrasonic probe is a receiving probe and is used for receiving and obtaining a calibration echo signal.

The impedance conversion driving circuit is used for receiving the pulse signal, amplifying and impedance matching the pulse signal and then sending the amplified and impedance matched pulse signal to the first self-calibration ultrasonic probe;

the amplitude limiting circuit is used for carrying out amplitude limitation on the calibration echo signal received by the second self-calibration ultrasonic probe and inputting the calibration echo signal into the signal processing circuit;

and the signal processing circuit is used for sequentially filtering and shaping the calibration echo signals with limited amplitude and sending the calibration echo signals to the channel selection unit.

The rainfall measurement unit comprises a first measurement ultrasonic probe (a probe 3 in figure 1), a second measurement ultrasonic probe (a probe 4 in figure 1), an impedance transformation driving circuit, an amplitude limiting circuit and a signal processing circuit, wherein the first measurement ultrasonic probe is a transmitting probe and is used for transmitting an ultrasonic signal to a water accumulation surface under the control of a pulse signal; the second self-calibration ultrasonic probe is a receiving probe and is used for receiving a measurement echo signal reflected by the water surface.

The impedance conversion driving circuit is used for receiving the pulse signal, amplifying and impedance matching the pulse signal and then sending the amplified and impedance matched pulse signal to the first self-calibration ultrasonic probe; in the impedance transformation driving circuit, as shown in fig. 5, after a pulse signal passes through R57, R58 plays a role in limiting current, R54 is a current-limiting resistor, a cement resistor with a power of 5W or more must be used, after passing through a darlington tube TIP122, the signal is amplified, and then passes through a high-frequency transformer, wherein the turn ratio of the transformer is: 16:270. R55 plays the effect of transducer matching, and 4 IN4148 diodes can rectify, and after transformer amplification, the driving voltage can reach more than 110V, and through high-voltage driving, the transducer transmits ultrasonic.

The amplitude limiting circuit is used for carrying out amplitude limitation on the measurement echo signal received by the second measurement ultrasonic probe and inputting the measurement echo signal into the signal processing circuit;

the channel selection unit is used for selecting the automatic calibration unit and the rainfall measurement unit to work alternately under the control of the central processing module, sending the received pulse signals to the automatic calibration unit and the rainfall measurement unit respectively, and receiving the calibration echo signals acquired by the automatic calibration unit and inputting the calibration echo signals into the time measurement unit; and the time measuring unit is also used for receiving the measuring echo signal collected by the rainfall measuring unit and inputting the measuring echo signal into the time measuring unit. The channel is selected by selecting a CD4052B chip to switch channels, so that only one pair of probes is in a working state at any time, one probe is in a transmitting state, and the other probe is in a connecting state, namely the calibration unit and the measurement unit respectively work alternately.

And the signal processing circuit is used for sequentially filtering and shaping the measurement echo signals with limited amplitude and sending the measurement echo signals to the channel selection unit.

The receiving filter circuit of the signal processing circuit is designed by a second-order band-pass filter circuit and a high-precision operational amplifier TL082, wherein the center frequency is 200KHz, the bandwidth is 10KHz, the positive and negative voltage power supply design is adopted, 4 pins are connected with-5V, 8 pins are connected with +5V, a received signal is subjected to primary negative feedback amplification through R12, then is subjected to DC blocking through C11 and finally passes through a second-order filter circuit, as shown in FIG. 6.

The shaping circuit of the signal processing circuit, as shown in fig. 7, shapes the received signal, and is designed by using an LM293 comparator, when the input voltage is greater than the set voltage 100mV, a 5V high level is output, and when the input voltage is less than 100mV, a 0V low level is output, wherein ZD1 plays a role of voltage stabilization protection, and R17 pull-up plays a role of increasing the output voltage. The power supply is +5V power supply.

The specific work flow of the system comprises the following steps:

step 1) the power supply system starts to supply power, after the system is initialized, the central processing module enters a dormant state, the rainwater monitoring unit enters a working state, and other units enter a dormant state.

Step 2) automatic triggering, wherein a working flow chart is shown in fig. 8, after the system is powered on, the system starts to immediately monitor whether the rainfall is present, when the rainfall is monitored, the rainfall monitoring module outputs a low level, after the system identifies a rainfall signal, the system can be started to enter a working state, otherwise, the system belongs to a dormant power-saving state.

And 3) when the rainfall reaches a set value, the measuring system enters a normal working state of automatic calibration and automatic measurement, the rainfall is measured after the automatic calibration is finished, and the measuring result is packaged into a fixed format and is output through a serial port.

The specific method comprises the following steps:

the automatic calibration is non-linear because the speed of ultrasound propagating in the air is not constant and changes along with the change of parameters such as ambient temperature, atmospheric pressure and the like, and therefore, the sound velocity correction is needed to accurately measure the rainfall water level.

The invention adopts a double-probe acoustic correlation correction method, namely, ultrasonic waves are transmitted and received at a fixed distance, and as the ultrasonic wave propagation speeds with the same frequency are the same in the air, the accuracy of rainfall measurement can be ensured as long as the correction ultrasonic probe frequency is the same as the rainfall measurement probe frequency. The installation mode of the correction probe is as shown in fig. 9, the correction probe is vertically installed in an opposite mode in the air, the first self-calibration ultrasonic probe transmits ultrasonic waves, the second self-calibration ultrasonic probe receives the ultrasonic waves, and the vertical distance is 100 mm. The ultrasonic propagation correction velocity v is represented by the formula:

h=v×t0

obtaining:

v=h/t0

v is the propagation velocity in the air after the ultrasonic wave correction under the current environment, t0And h is the vertical distance between the first self-calibration ultrasonic probe and the second self-calibration ultrasonic probe.

The rainfall measurement, as shown in fig. 10, adopts 2 ultrasonic probes, one for transmitting and one for receiving signal reflection, and adopts two probes to reduce the blind area of ultrasonic detection, and the detection blind area of the invention is less than 50 mm. The ultrasonic wave is transmitted by the first measurement ultrasonic probe, the ultrasonic wave is transmitted in the air medium and reflected when encountering the water surface, the second measurement ultrasonic probe of the ultrasonic wave receives the reflected signal, and the flight time of the ultrasonic wave in the air medium is t1

The distance D from the ultrasonic probe to the surface of the ponding water can be calculated by the following formula according to the propagation speed and the flight time.

D=v×t1/2

Wherein v is the propagation velocity after system correction, and the unit is millimeter per microsecond; t is t1The unit is microsecond of the flight time of the ultrasonic waves in the gas medium;

the installation distance between the first measuring ultrasonic probe and the second measuring ultrasonic probe is d millimeters, the installation distance d of the system is 20mm, and then the vertical distance H from the surface of the first measuring ultrasonic probe to the ponding surface of the ultrasonic wave can be obtained according to the following formula.

Comparing the vertical distance H from the current first measurement ultrasonic probe to the surface to the water surface with the vertical distance H1 from the last first measurement ultrasonic probe to the surface to the water surface,

if the current H is greater than H1, the rainfall is:

ΔH=H-H1

if the current H is less than or equal to H1, the rainfall is as follows:

ΔH=0

assigning the vertical distance H from the first measurement ultrasonic probe to the ponding surface at the current moment to H1;

and after the measurement result delta H is enlarged by a fixed multiple to be an integer, the measurement result delta H is output through a serial port, and the transmission baud rate of the serial port is set to be 115200.

In the rainfall measurement process, high-precision time measurement and Kalman filtering are needed, and the working mode is as follows:

the invention relates to high-precision time measurement, in an ultrasonic rain measurement system designed based on a time difference method, the measurement of the ultrasonic flight time is the most important work in the whole system, the measurement precision of the ultrasonic flight time directly determines the precision of the whole measurement system, and the TDC-GP22 is adopted for high-precision time measurement. The workflow diagram is shown in fig. 11. The STM32F407 communicates with the TDC-GP22 via SPI communication and performs configuration operations on its associated registers. And sending an operation command 'h 50', and performing power-on reset on the TDC-GP 22. And then configuring a TDC-GP22 register, setting triggering modes of a start signal and a stop signal, the number of transmitted pulses, frequency, a measurement mode, a propagation time calculation mode and the like. By configuring TDC-GP22, a 200KHz pulse signal is emitted. The Start _ Cal _ TDC command is sent for correction alone, or the command "h 03" can be sent, TDC-GP22 for clock calibration. Sending a command 'h 70', initializing TDC-GP22, reading a state register, sending 'h 01' to trigger one time of time measurement, emitting 18 pulses, triggering a stop signal after passing through a driving circuit, and calculating the flight time of the signal by TDC-GP 22. When the measurement is finished, an interrupt is generated, the system enters an interrupt function to read a time measurement result on a register, and the flight time of the signal is packed and stored in the STM32F 407.

And filtering the measurement raw data. The method comprises the following steps that ultrasonic waves are transmitted in the air, measured time data are influenced by electromagnetic interference of a system and the like, and time original data fluctuate, so that the measured original data need to be processed by a filtering algorithm, besides hardware filtering, a Kalman filtering algorithm is adopted for noise reduction processing on software, and a Kalman filtering state equation is described as follows:

x(k)=A·x(k-1)+B·μ(k)+w(k)z(k)=H·x(k)+y(k)

in the formula: x (k) is the state of the system at time k; μ (k) is a control quantity; w (k) is process noise conforming to a Gaussian distribution; z (k) is the observed value of the system at time k; y (k) is measurement noise conforming to a Gaussian distribution;

k represents time; x represents a system state; p represents the error covariance.

x(k|k-1)=A·P(k-1|k-1)·AT+Q

The covariance between two random variables X, Y whose expectation values are E [ X ], E [ Y ], respectively, is defined as:

Cov=E[XY]-E[X]E[Y]

the overall error of the two variables is measured.

And step 4) an automatic drainage unit, wherein when two conditions occur, a drainage valve needs to be opened for drainage.

When the water level in the rainfall barrel is higher than 140mm, the system automatically opens the drainage valve to completely discharge accumulated water in the barrel, and then the rainfall is measured continuously. The system is designed to discharge the accumulated water within 30 s.

When the accumulated water in the rainfall barrel does not reach 140mm, but the depth of the measured accumulated water is continuously unchanged for 5 minutes, the system automatically opens the drainage valve to drain water.

And 5) when the rainfall does not increase within the continuous specified time of the system and the detection and drainage are finished, the system enters the dormant working state again.

As shown in fig. 12, which is a flow chart of a system program, after the system is powered on, the system first performs initialization processing, then enters a sleep state, when rainfall is monitored, the STM32F4 chip wakes up from the sleep state, the system is started, when the rainfall level reaches a predetermined value, the system starts to configure a time measurement chip, configures the number of transmission pulses and the transmission frequency, then the system starts self-calibration and measurement work, judges whether drainage processing is needed according to data, and outputs the data according to a fixed format, if no rainfall exists, the system continues to sleep, and after the measurement is completed, the system returns to the sleep state.

Finally, it should be noted that the above embodiments are only used for illustrating the technical solutions of the present invention and are not limited. Although the present invention has been described in detail with reference to the embodiments, it will be understood by those skilled in the art that various changes may be made and equivalents may be substituted without departing from the spirit and scope of the invention as defined in the appended claims.

19页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:用于在空腔内存储波信号的装置和方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!