Gas detection device and gas detection method
The fuel gas detection system addresses high costs and inaccuracies in TDC chip-based detectors by using a control unit, ultrasonic units, and charge time measurement to calculate flow speed, reducing component costs and improving accuracy.
Patent Information
- Application Number
- CN202110004190.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-04
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2041-01-04
AI Technical Summary
In the prior art, the TDC chip is costly and the device stability of the ultrasonic gas meter does not affect the accuracy of gas detection.
The gas detection device consisting of a control unit, a measuring unit, a first ultrasonic unit, a second ultrasonic unit, a signal processing unit, a calculation unit and a switching unit are used to control the transmission and reception of ultrasonic waves through the switching unit, and combine the charging time measurement unit and the internal constant current source to avoid measurement errors caused by inconsistencies in the device and reduce the impact of environmental interference.
It saves gas detection costs, improves detection accuracy and safety, reduces measurement errors caused by device inconsistency, and enhances the accuracy of gas flow rate calculation.
Smart Images

Figure CN114720720B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of gas equipment, and particularly relates to a gas detection device and a gas detection method. Background Art
[0002] In recent years, with the increase in population and the development of the economy, people's demand for energy has gradually increased, and the energy supply is facing huge pressure. In this context, the production and lifestyle with coal as the main energy structure can no longer meet the current energy demand, environmental protection requirements, and sustainable development requirements. In this case, natural gas, as a clean energy source, has received key attention. In order to standardize the use standards of natural gas, make efficient use of and monitor natural gas, it is necessary to detect natural gas.
[0003] In related technologies, usually an ultrasonic gas meter based on a Time to Digital Convert (TDC) chip is used for gas detection. Its principle is that the microcontroller unit (MCU) in the ultrasonic gas meter controls the ultrasonic sensors in the TDC chip to emit acoustic signals from the transmitting end to the receiving end in the downstream direction and the upstream direction respectively. After passing through their respective circuits for operations such as filtering and amplification, they are sent into the TDC chip and the MCU is notified to obtain the time difference of the ultrasonic wave passing through the downstream direction and the upstream direction, and the gas flow rate is calculated based on the time difference.
[0004] However, in the prior art, due to the influence of the device stability in the ultrasonic gas meter, the accuracy of gas detection is not high. Summary of the Invention
[0005] This application provides a gas detection device and a gas detection method to solve the technical problems in the prior art that the cost of the TDC chip is too high, resulting in a high cost of gas detection, and due to the influence of the device stability in the ultrasonic gas meter, the accuracy of gas detection is not high.
[0006] In a first aspect, the present application provides a gas detection device, which includes a control unit, a measurement unit, a first ultrasonic unit, a second ultrasonic unit, a signal processing unit, a calculation unit, and a switching unit. The control unit is respectively connected to the measurement unit, the first ultrasonic unit, the second ultrasonic unit, the signal processing unit, and the calculation unit. The first ultrasonic unit and the second ultrasonic unit are respectively arranged upstream and downstream of the gas pipeline. The switching unit is used to enable the first ultrasonic unit to transmit ultrasonic waves and the second ultrasonic unit to receive ultrasonic waves, or enable the second ultrasonic unit to transmit ultrasonic waves and the first ultrasonic unit to receive ultrasonic waves. The control unit controls the first ultrasonic unit and the second ultrasonic unit to transmit and receive ultrasonic signals, sends the received ultrasonic signals to the signal processing unit, and sends the processed signals to the control unit. The control unit sends the processed signals to the measurement unit and the calculation unit, so that the measurement unit and the calculation unit calculate the gas flow rate.
[0007] Here, the gas detection device of the embodiment of the present application is composed of a control unit, a measurement unit, a first ultrasonic unit, a second ultrasonic unit, a signal processing unit, a calculation unit, and a switching unit. The gas detection device further includes a switching unit. One end of the switching unit is connected to the signal processing unit, and the other end is respectively connected to the first ultrasonic unit and the second ultrasonic unit. The switching unit can connect the signal processing unit to the first ultrasonic unit, or connect the signal processing unit to the second ultrasonic unit, so as to control whether the first ultrasonic unit and the second signal ultrasonic unit emit or receive ultrasonic waves. There is no need to set up a separate signal processing unit for the ultrasonic signals of the two branches. On the one hand, it saves the cost of redundant components. On the other hand, it avoids the measurement error caused by device inconsistency, and further improves the accuracy of gas detection.
[0008] Optionally, the measurement unit is a charge time measurement unit.
[0009] Here, the charge time measurement unit is used in the embodiment of the present application to measure the charge, so as to obtain the time difference of ultrasonic wave transmission in the gas pipeline. There is no need to use an expensive TDC chip for measurement and calculation, which saves the cost of gas detection. In addition, since there is a constant current source inside the charge time measurement unit, the internal constant current source is used to charge the capacitor, and the flow rate of ultrasonic waves in the pipeline medium is calculated, which reduces the influence of environmental interference on the charge time measurement, improves the accuracy of time measurement, and improves the accuracy of gas detection.
[0010] Optionally, the calculation unit includes a timing unit and a comparison unit; the timing unit is connected to the comparison unit, and the timing unit and the comparison unit are respectively connected to the control unit;
[0011] The timing unit is configured to provide a clock signal for the control unit;
[0012] The comparison unit is configured to provide valid calculation data for the control unit.
[0013] Here, the calculation unit in the embodiment of the present application may include a timing unit and a comparison unit. The timing unit can provide the clock signal required for measurement and calculation according to the control of the control unit, and can also trigger the first ultrasonic unit and the second ultrasonic unit to emit ultrasonic waves according to the clock signal. The timing unit can also be used to accurately obtain the time of transmitting and receiving signals. The comparison unit can make a validity judgment based on the acquired signal data, so as to obtain valid and accurate calculation data. According to the limited and accurate calculation data, the accurate gas flow rate can be obtained, further improving the accuracy of gas detection.
[0014] Optionally, it further includes an ultrasonic trigger unit;
[0015] One end of the ultrasonic trigger unit is connected to the control unit, and the other end is respectively connected to the first ultrasonic unit and the second ultrasonic unit, and is configured to send a trigger signal to the first ultrasonic unit and the second ultrasonic unit according to an instruction of the control unit.
[0016] Here, the embodiment of the present application further includes an ultrasonic trigger unit. The ultrasonic trigger unit can send a trigger signal to the first ultrasonic unit and the second ultrasonic unit according to the control signal of the control unit, so as to emit ultrasonic waves to the first ultrasonic unit and the second ultrasonic unit for gas detection.
[0017] Optionally, it further includes a calibration unit;
[0018] The calibration unit is connected to the charging time measurement unit and is configured to calibrate the charging time measurement unit.
[0019] Here, the embodiment of the present application further includes a calibration unit. The calibration unit is connected to the charging time measurement unit and can calibrate the charging time measurement unit to reduce the error of the charging time measurement unit itself, further improving the accuracy of gas detection.
[0020] Optionally, the signal processing unit is an amplifier circuit;
[0021] One end of the amplifier circuit is respectively connected to the first ultrasonic unit and the second ultrasonic unit, and the other end of the amplifier circuit is connected to the control unit;
[0022] The amplifier circuit is configured to perform signal amplification processing on the received ultrasonic signal.
[0023] Optionally, the signal processing unit is a filter circuit;
[0024] One end of the filter circuit is respectively connected to the first ultrasonic unit and the second ultrasonic unit, and the other end of the filter circuit is connected to the control unit;
[0025] The filter circuit is used to filter out interference signals in the ultrasonic signal.
[0026] Optionally, the signal processing unit is a zero-crossing detection circuit;
[0027] One end of the zero-crossing detection circuit is respectively connected to the first ultrasonic unit and the second ultrasonic unit, and the other end of the zero-crossing detection circuit is connected to the control unit;
[0028] The zero-crossing detection circuit is used to control the magnitude of the output power of the processed signal.
[0029] Here, the signal processing unit provided in the embodiment of the present application may include an amplification circuit, a filter circuit and a zero-crossing detection circuit, which can amplify, filter and control the power of the ultrasonic signal sent by the receiving end. The signal after the above processing filters out invalid and redundant signals and amplifies the signal, which is convenient for the charging time measurement unit to perform sampling tests through the processed ultrasonic signal and calculate the accurate ultrasonic transmission time difference, further improving the accuracy of gas detection.
[0030] Optionally, it further includes an alarm unit, and the alarm unit is connected to the control unit.
[0031] Here, the alarm unit provided in the embodiment of the present application can alarm for the gas flow rate. If the gas flow rate is outside the normal range, an alarm is given to prevent economic losses and potential safety hazards caused by abnormal gas flow rate, improving the safety of gas use.
[0032] Optionally, the calculation unit and the measurement unit are arranged inside the control unit.
[0033] Here, in the embodiment of the present application, the calculation unit and the measurement unit are arranged inside the control unit, and the internal constant current source of the control unit can be used to charge the internal capacitor, which is used to reduce the radio frequency interference, external noise and other interferences of the calculation unit and the measurement unit and other devices in the gas detection device, further improving the accuracy of gas detection.
[0034] In a second aspect, the embodiment of the present application provides a gas detection method, including:
[0035] Determine the charging current value and the charging capacitance value;
[0036] Control the first ultrasonic unit to emit an ultrasonic signal, detect the voltage value of the internal capacitor, and charge the internal capacitor;
[0037] After the second ultrasonic unit receives the ultrasonic signal, control to stop charging the internal capacitor, and obtain the first voltage value after charging the internal capacitor;
[0038] Send the first voltage value to the calculation unit so that the calculation unit calculates the first time according to the first voltage value;
[0039] Through the switching unit, control the second ultrasonic unit to emit an ultrasonic signal, detect the voltage value of the internal capacitor, and charge the internal capacitor;
[0040] After the first ultrasonic unit receives the ultrasonic signal, control to stop charging the internal capacitor, and obtain the second voltage value after charging the internal capacitor;
[0041] Send the second voltage value to the calculation unit so that the calculation unit calculates the second time according to the second voltage value;
[0042] Determine the gas flow rate according to the first time and the second time.
[0043] Optionally,
[0044] Before controlling the first ultrasonic unit to emit an ultrasonic signal, detect the voltage value of the internal capacitor, and charge the internal capacitor, it further includes:
[0045] Send a calibration signal to the calibration unit so that the calibration unit charges the internal capacitor to obtain a calibration value.
[0046] The gas detection device and the gas pipeline provided by the embodiments of the present application. The gas detection device is composed of a control unit, a measurement unit, a first ultrasonic unit, a second ultrasonic unit, a signal processing unit, a calculation unit, and a switching unit. One end of the switching unit in the embodiments of the present application is connected to the signal processing unit, and the other end is respectively connected to the first ultrasonic unit and the second ultrasonic unit. The switching unit can connect the signal processing unit to the first ultrasonic unit, or connect the signal processing unit to the second ultrasonic unit to control whether the first ultrasonic unit and the second signal ultrasonic unit emit or receive ultrasonic waves, without separately setting a separate signal processing unit for the ultrasonic signals of the two branches. On the one hand, it saves the cost of redundant components. On the other hand, it avoids the measurement error caused by device inconsistency and further improves the accuracy of gas detection. Description of the Drawings
[0047] The accompanying drawings herein are incorporated into and constitute a part of this specification, showing embodiments consistent with the present disclosure and, together with the specification, are used to explain the principles of the present disclosure.
[0048] Figure 1 A schematic structural diagram of a gas detection device provided for an embodiment of the present application;
[0049] Figure 2 A schematic structural diagram of another gas detection device provided for an embodiment of the present application;
[0050] Figure 3 A schematic structural diagram of yet another gas detection device provided for an embodiment of the present application;
[0051] Figure 4 A schematic structural diagram of still another gas detection device provided for an embodiment of the present application;
[0052] Figure 5 A schematic flowchart of a gas detection method provided for an embodiment of the present application.
[0053] Through the above accompanying drawings, specific embodiments of the present disclosure have been shown, and there will be more detailed descriptions hereinafter. These drawings and textual descriptions are not intended to limit the scope of the concept of the present disclosure in any way, but rather to illustrate the concept of the present disclosure to those skilled in the art by reference to specific embodiments. Detailed Embodiments
[0054] To make the objectives, technical solutions, and advantages of the present application clearer, the technical solutions in the embodiments of the present application will be described in more detail below with reference to the accompanying drawings in the preferred embodiments of the present application. In the drawings, the same or similar reference numerals denote the same or similar components or components with the same or similar functions throughout. The described embodiments are some, but not all, of the embodiments of the present application. The embodiments described below with reference to the drawings are exemplary and are intended to explain the present application and should not be construed as limiting the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts fall within the scope of protection of the present application. The embodiments of the present application will be described in detail below with reference to the drawings.
[0055] In the description of the present application, it should be noted that, unless otherwise clearly specified and limited, the terms "mounted", "connected", and "coupled" should be construed broadly. For example, it may be a fixed connection, may be indirectly connected through an intermediate medium, or may be the internal communication of two components or the interaction relationship between two components. For those of ordinary skill in the art, the specific meanings of the above terms in the present application may be understood according to specific circumstances.
[0056] In recent years, with the increase in population and the development of the economy, people's demand for energy has gradually increased, and the energy supply is facing huge pressure. In this situation, the production and living mode with coal as the main energy structure can no longer meet the current energy demand, environmental protection requirements, and sustainable development requirements. In this context, natural gas, as a clean energy source, has received key attention. In order to standardize the natural gas usage standards, efficiently utilize and monitor natural gas, it is necessary to detect natural gas.
[0057] In related technologies, usually an ultrasonic gas meter based on a Time to Digital Convert (TDC) chip is used for gas detection. Its principle is that the microcontroller unit (MCU) in the ultrasonic gas meter controls the ultrasonic sensors in the TDC chip to emit acoustic signals from the transmitting end to the receiving end in the downstream direction and the upstream direction respectively. After passing through their respective circuits for operations such as filtering and amplification, they are sent into the TDC chip and the MCU is notified to obtain the time difference of the ultrasonic wave passing through the downstream direction and the upstream direction. The gas flow rate is calculated based on the time difference. The specific implementation method is as follows: Using a pair of ultrasonic sensors installed with the pipeline inclined, in the downstream direction, the TDC chip is controlled to make the ultrasonic sensor's transmitting end emit an acoustic signal to the receiving end. After the receiving end receives the acoustic signal, it is sent into the TDC time measurement chip after operations such as filtering and amplification, and the MCU is notified to obtain the time T1; in the upstream direction, the MCU controls the ultrasonic sensor's transmitting end of the TDC chip to emit an acoustic signal to the receiving end. After the receiving end receives the acoustic signal, it is sent into the TDC time measurement chip after operations such as filtering and amplification, and the MCU is notified to obtain the time T2; the flow rate is calculated based on the time difference between T1 and T2.
[0058] However, in the existing technology, the cost of the TDC chip is too high, which greatly increases the cost of the product, resulting in high gas detection costs. Moreover, since the circuit loops in the downstream and upstream directions are different circuits, although the device models are the same, the device consistency between the downstream and upstream directions cannot be guaranteed due to individual differences in electronic components such as operational amplifiers and resistors. The stability of the components will also be affected by the environment, thereby increasing the time measurement errors in the downstream and upstream directions, and the accuracy of gas detection is not high.
[0059] To solve the above technical problems, an embodiment of the present application provides a gas detection device and a gas pipeline. The gas detection device of the embodiment of the present application is composed of a control unit, a measurement unit, a first ultrasonic unit, a second ultrasonic unit, a signal processing unit, a calculation unit, and a switching unit. One end of the switching unit of the embodiment of the present application is connected to the signal processing unit, and the other end is respectively connected to the first ultrasonic unit and the second ultrasonic unit. The switching unit can connect the signal processing unit to the first ultrasonic unit or connect the signal processing unit to the second ultrasonic unit, without separately setting a signal processing unit for the ultrasonic signals of the two branches. On the one hand, it saves the cost of redundant components. On the other hand, it avoids the measurement error caused by device inconsistency, and further improves the accuracy of gas detection.
[0060] The following specifically describes the gas detection device provided by the embodiment of the present application in conjunction with specific embodiments.
[0061] Figure 1 It is a schematic structural diagram of a gas detection device provided by an embodiment of the present application, as Figure 1 shown. The gas detection device includes: a control unit 101, a charging time measurement unit 102, a first ultrasonic unit 103, a second ultrasonic unit 104, a signal processing unit 105, a calculation unit 106, and a switching unit 108.
[0062] The control unit 101 is respectively connected to the charging time measurement unit 102, the first ultrasonic unit 103, the second ultrasonic unit 104, the signal processing unit 105, and the calculation unit 106.
[0063] The first ultrasonic unit 103 and the second ultrasonic unit 104 are respectively arranged upstream and downstream of the gas pipeline 107. One end of the switching unit 108 is connected to the signal processing unit 105, and the other end is respectively connected to the first ultrasonic unit 103 and the second ultrasonic unit 104. The switching unit 108 is used to realize transmitting ultrasonic waves through the first ultrasonic unit 103 and receiving ultrasonic waves through the second ultrasonic unit 104, or realizing transmitting ultrasonic waves through the second ultrasonic unit 104 and receiving ultrasonic waves through the first ultrasonic unit 103. The control unit 104 controls the first ultrasonic unit 103 and the second ultrasonic unit 104 to transmit and receive ultrasonic signals, sends the received ultrasonic signals to the signal processing unit 105, and sends the processed signals to the control unit 101; the control unit 101 sends the processed signals to the charging time measurement unit 102 and the calculation unit 106, and calculates the gas flow rate according to the time information sent by the charging time measurement unit 102 and the calculation unit 106.
[0064] Optionally, the switching unit here can be a single-pole double-throw switch, or a switching circuit that can achieve automatic switching between two circuits, or a device such as a relay. The embodiments of the present application do not make specific limitations on this, as long as the function of the switching unit can be achieved.
[0065] Optionally, the first ultrasonic unit and the second ultrasonic unit can be an integrated ultrasonic sensor that can emit and receive ultrasonic waves, or an ultrasonic unit that includes an independent ultrasonic transmitter and an ultrasonic receiver.
[0066] Optionally, the control unit is an MCU or a Programmable Logic Controller (PLC).
[0067] Optionally, the measurement unit here is a charging time measurement unit CTMU.
[0068] Here, the embodiments of the present application use a charging time measurement unit to perform charging measurement, so as to obtain the time difference of ultrasonic wave transmission in the gas pipeline. There is no need to use an expensive TDC chip for measurement and calculation, which saves the cost of gas detection. In addition, since there is a constant current source inside the charging time measurement unit, the internal constant current source is used to charge the capacitor, and the flow velocity of the ultrasonic wave in the pipeline medium is calculated, which reduces the influence of environmental interference on the charging time measurement, improves the accuracy of time measurement, and improves the accuracy of gas detection.
[0069] Optionally, it further includes a calibration unit;
[0070] The calibration unit is connected to the charging time measurement unit and is used to calibrate the charging time measurement unit.
[0071] Specifically, before starting metering or before starting to control the first ultrasonic unit to emit a signal, the calibration unit charges the capacitor twice, and then the calibration value K can be calculated and K is assigned to the calculated time.
[0072] Here, the embodiments of the present application further include a calibration unit. The calibration unit is connected to the charging time measurement unit and can calibrate the charging time measurement unit to reduce the error of the charging time measurement unit itself, and further improve the accuracy of gas detection.
[0073] Specifically, the calibration unit is mainly used to calibrate the charging time measurement unit. By using the constant current source to charge the capacitor twice, the deviation is calculated, and the deviation is used for calibration.
[0074] Optionally, it further includes an alarm unit, and the alarm unit is connected to the control unit.
[0075] Optionally, the alarm unit can be a sound alarm unit or an indicator light alarm unit.
[0076] Here, the alarm unit provided in the embodiment of the present application can alarm for the gas flow rate. If the gas flow rate is outside the normal range, an alarm is given to prevent economic losses and safety hazards caused by abnormal gas flow rate, thereby improving the safety of gas use.
[0077] It can be understood that the normal range here can be determined according to the actual situation, and the present application does not make specific limitations thereto.
[0078] Optionally, it further includes a display unit, and the display unit is connected to the control unit.
[0079] Here, the display unit provided in the embodiment of the present application can display the detected gas flow rate and display the gas flow rate in real time, which is convenient for users to understand the gas condition, improves the user experience of gas detection, and also allows users to adjust the gas according to the real-time data, further improving the safety of gas use.
[0080] Optionally, it further includes an ultrasonic trigger unit;
[0081] One end of the ultrasonic trigger unit is connected to the control unit, and the other end is respectively connected to the first ultrasonic unit and the second ultrasonic unit, and is used to send trigger signals to the first ultrasonic unit and the second ultrasonic unit according to the instructions of the control unit.
[0082] Here, the embodiment of the present application further includes an ultrasonic trigger unit, and the ultrasonic trigger unit can send trigger signals to the first ultrasonic unit and the second ultrasonic unit according to the control signal of the control unit, so as to emit ultrasonic waves to the first ultrasonic unit and the second ultrasonic unit for gas detection.
[0083] The gas detection device of the embodiment of the present application is composed of a control unit, a measurement unit, a first ultrasonic unit, a second ultrasonic unit, a signal processing unit, a calculation unit and a switching unit. Among them, the gas detection device of the embodiment of the present application further includes a switching unit on the basis of the existing gas unit. One end of the switching unit is connected to the signal processing unit, and the other end is respectively connected to the first ultrasonic unit and the second ultrasonic unit. The switching unit can connect the signal processing unit to the first ultrasonic unit or connect the signal processing unit to the second ultrasonic unit, without separately setting a separate signal processing unit for the ultrasonic signals of the two branches. On the one hand, it saves the cost of redundant components, and on the other hand, it avoids the influence of measurement errors caused by device inconsistency, and further improves the accuracy of gas detection.
[0084] In a possible implementation manner, the calculation unit and the measurement unit are arranged inside the control unit. Correspondingly, Figure 2 It is a schematic structural diagram of another gas detection device provided by the embodiment of the present application, asFigure 2 As shown in the figure, the gas detection device includes: a control unit 101, a measurement unit 102, a first ultrasonic unit 103, a second ultrasonic unit 104, a signal processing unit 105, a calculation unit 106, and a switching unit 108. The calculation unit 106 and the measurement unit 102 are arranged inside the control unit.
[0085] Here, in the embodiments of the present application, by arranging the calculation unit and the measurement unit inside the control unit, a constant current source inside the control unit can be used to charge the internal capacitor, which is used to reduce radio frequency interference, external noise and other interferences from the external environment to devices such as the calculation unit and the measurement unit in the gas detection device, and further improves the accuracy of gas detection.
[0086] In a possible implementation manner, in the gas detection device provided by the embodiments of the present application, the signal processing unit includes an amplification circuit, a filtering circuit, and a zero-crossing detection circuit. Correspondingly, Figure 3 is a schematic structural diagram of another gas detection device provided by the embodiments of the present application. As Figure 3 shown in the figure, the gas detection device includes: a control unit 101, a measurement unit 102, a first ultrasonic unit 103, a second ultrasonic unit 104, a signal processing unit 105, a calculation unit 106, and a switching unit 108. The signal processing unit 105 specifically includes an amplification circuit 1051, a filtering circuit 1052, and a zero-crossing detection circuit 1053.
[0087] The amplification circuit 1051 is connected to the filtering circuit 1052, and the filtering circuit 1052 is connected to the zero-crossing detection circuit 1053. It can be understood that the connection sequence of the amplification circuit, the filtering circuit, and the zero-crossing detection circuit can be determined according to the actual situation, and the types of the amplification circuit, the filtering circuit, and the zero-crossing detection circuit are not specifically limited in the present application.
[0088] The amplification circuit is used to perform signal amplification processing on the received ultrasonic signal.
[0089] The filtering circuit is used to filter out interference signals in the ultrasonic signal.
[0090] The zero-crossing detection circuit is used to control the output power of the processed signal, and can also be used to detect the cycle time length of the ultrasonic signal to achieve the calibration synchronization function.
[0091] Here, the signal processing unit provided by the embodiments of the present application may include an amplification circuit, a filtering circuit, and a zero-crossing detection circuit, which can amplify, filter, and control the power of the ultrasonic signal sent by the receiving end. After the above processing, the signal filters out invalid and redundant signals, and amplifies the signal, which is convenient for the measurement unit to perform sampling tests through the processed ultrasonic signal and calculate the accurate ultrasonic transmission time difference, further improving the accuracy of gas detection.
[0092] Figure 4 Schematic diagram of another gas detection device provided by an embodiment of the present application. As Figure 4 shown, the gas detection device includes:
[0093] A control unit 101, a charging time measurement unit 1020, a first ultrasonic unit 103, a second ultrasonic unit 104, a signal processing unit 105, a calculation unit 106, a switching unit 107, and an ultrasonic trigger unit 401. The signal processing unit 105 specifically includes an amplifier circuit 1051, a filter circuit 1052, and a zero-crossing detection circuit 1053.
[0094] The control unit 101 is respectively connected to the charging time measurement unit 1020, the first ultrasonic unit 103, the second ultrasonic unit 104, the signal processing unit 105, and the calculation unit 106.
[0095] The first ultrasonic unit 103 and the second ultrasonic unit 104 are respectively arranged upstream and downstream of the gas pipeline 107. The first ultrasonic unit 103 and the second ultrasonic unit 104 are also connected to the signal processing unit 105. One end of the switching unit 201 is connected to the signal processing unit 105, and the other end is respectively connected to the first ultrasonic unit 103 and the second ultrasonic unit 104. One end of the ultrasonic trigger unit 401 is connected to the control unit 101, and the other end is respectively connected to the first ultrasonic unit 103 and the second ultrasonic unit 104.
[0096] Optionally, Figure 5 Schematic diagram of a gas detection method provided by an embodiment of the present application. Figure 5 The gas detection method in Figure 5 can be applied to the control unit of the above gas detection device. As
[0097] S501: Determine the charging current value and the charging capacitance value.
[0098] Among them, the charging current value and the charging capacitance value can be determined according to the historical charging current value and the historical charging capacitance value, or can be determined according to the current circuit current value and the charging capacitance value. The present application does not make specific limitations on this.
[0099] Among them, the switching branch is determined according to the upstream and downstream of the detected gas pipeline.
[0100] S502: Control the first ultrasonic unit to emit an ultrasonic signal, detect the voltage value of the internal capacitor, and charge the internal capacitor.
[0101] S503: After the second ultrasonic unit receives the ultrasonic signal, control the charging of the internal capacitor to stop, and obtain the first voltage value after the internal capacitor is charged.
[0102] Optionally, the voltage value after charging can be sampled by the test unit or the internal A / D module of the control unit.
[0103] S504: Send the first voltage value to the calculation unit so that the calculation unit calculates the first time according to the first voltage value.
[0104] S505: Through the switching unit, control the second ultrasonic unit to emit an ultrasonic signal, detect the voltage value of the internal capacitor, and charge the internal capacitor.
[0105] S506: After the first ultrasonic unit receives the ultrasonic signal, control the charging of the internal capacitor to stop, and obtain the second voltage value after the internal capacitor is charged.
[0106] S507: Send the second voltage value to the calculation unit so that the calculation unit calculates the second time according to the second voltage value.
[0107] Here, through the switching unit, the signal processing unit is connected to the first ultrasonic unit or the signal processing unit is connected to the second ultrasonic unit, so as to control whether the first ultrasonic unit and the second signal ultrasonic unit emit or receive ultrasonic waves. There is no need to set up a separate signal processing unit for the ultrasonic signals of the two branches. On the one hand, the cost of redundant components is saved. On the other hand, the measurement error caused by device inconsistency is avoided, and further, the accuracy of gas detection is improved.
[0108] Optionally, the test unit is a CTMU.
[0109] The working mode of CTMU is to use a fixed current source to charge the circuit. The type of the circuit depends on the type of measurement to be performed. In the case of time measurement, both the current and the capacitance of the circuit are predetermined and fixed. In this case, the voltage read after charging can represent the time elapsed from the start of charging the circuit by the current source to the stop of charging.
[0110] Optionally, before step S502, it further includes: sending a calibration signal to the calibration unit so that the calibration unit charges the internal capacitor to obtain a calibration value.
[0111] Here, the embodiment of the present application can calibrate the test unit. Optionally, the current source of the test unit can be adjusted by placing a high-precision resistor on the unused analog channel. Specifically, the calibration value K is obtained by charging the high-precision resistor one or more times.
[0112] Optionally, a complete switch of the measurement unit completes the charging process of the capacitor. After the charging process ends, it triggers the start of internal A / D sampling.
[0113] Optionally, the sampling process is as follows:
[0114] The control unit enables the system clock timer, sets the timer period to interrupt the control unit once every T milliseconds, and the reload register value is LOAD; after the control unit wakes up, it records the timer count value S0 at the wake-up moment, first raises the forward and reverse flow control pin (raises for forward flow, lowers for reverse flow), then raises the ultrasonic output control pin (raises for forward flow, lowers for reverse flow), and the ultrasonic trigger circuit works; after the ultrasonic signal passes through the amplification, filtering, and zero-crossing detection circuits, it is sent to the signal input edge trigger pin of the control unit. After the first pulse generates an input capture interrupt, it records the timer count value S1, and rewrites the reload register to (LOAD + N), where N is the number of timer clock cycles, and waits for the timer to generate an interrupt for a timing interrupt; when the timer interrupt occurs, it records the timer count value S2. At this time, it turns on the internal CTMU constant current source of the control unit to charge the internal capacitor, and waits for the second input capture interrupt signal of the signal input edge trigger pin; after the second input capture interrupt signal is generated, it records the timer count value S3, and turns off the internal CTMU constant current source of the control unit to charge the internal capacitor; it makes a validity judgment on the data based on the recorded S0, S1, S2, and S3. After the data judgment is correct, it enters the calculation of t1 (the length of one pulse period) according to the calculation formula; repeats the above steps N times to obtain the average value T1; calculates T2 according to the above method.
[0115] Optionally, the formula for calculating T1 is as follows:
[0116] T = C / I * V + K
[0117] T1 = t1 + (S2 - S0)
[0118] Where, T1 and T2 are the transmission times of ultrasonic waves in the gas pipeline for forward and reverse flows respectively, C is the charging capacitor value, I is the charging current value, V is the sampled voltage value, K is the correction value, t1 is the length of one pulse period, and S0 and S2 are the timer count values respectively.
[0119] S508: Determine the gas flow rate according to the first time and the second time.
[0120] In the embodiment of the present application, the downstream direction control unit controls the output pin to enable the transmitting end of the ultrasonic sensor to transmit a sound wave signal to the receiving end. After the receiving end receives the sound wave signal, it is connected to the internal charging time measurement unit of the single-chip microcomputer after operations such as amplification and filtering. The MCU starts the charging time measurement unit, the internal timer, and the input comparator to obtain the returned ultrasonic signal for software recognition and calculates the time T1. Similarly, the time T2 is obtained in the upstream direction. The flow rate is calculated based on the time difference between T1 and T2. Time measurement may result in an increase in measurement error in the upstream and downstream measurement times due to device consistency differences. Therefore, when performing upstream direction time measurement, a switch is used to switch the amplification circuit and the filtering circuit to the upstream path to solve the problem of large time measurement error caused by device consistency issues. A constant current source is used to charge the capacitor, and the ultrasonic transmission time can be determined through the voltage value after charging to calculate the flow rate of the ultrasonic wave in the pipeline medium, improving the accuracy of time measurement, reducing the product cost at the same time. Using an internal constant current source to charge the internal capacitor reduces the influence of environmental interference on the charging time measurement, reduces the cost, and improves the accuracy.
[0121] The embodiment of the present application also provides a gas system, including a gas pipeline and the gas detection device as described in the above embodiment.
[0122] In several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces, indirect couplings or communication connections of devices or units, which can be electrical, mechanical, or other forms.
[0123] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place, or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0124] In addition, each functional unit in various embodiments of the present application can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.
[0125] Other embodiments of the present disclosure will be readily apparent to those skilled in the art upon consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include known common general knowledge or conventional technical means in the technical field not disclosed in the present disclosure. The specification and examples are only to be considered as exemplary, and the true scope and spirit of the present disclosure are pointed out by the following claims.
[0126] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only limited by the appended claims.
Claims
1. A gas detection device, characterized in that, It includes a control unit, a measurement unit, a first ultrasonic unit, a second ultrasonic unit, a signal processing unit, a calculation unit and a switching unit. The control unit is respectively connected to the measurement unit, the first ultrasonic unit, the second ultrasonic unit, the signal processing unit and the calculation unit; One end of the switching unit is connected to the signal processing unit, and the other end is respectively connected to the first ultrasonic unit and the second ultrasonic unit; The first ultrasonic unit and the second ultrasonic unit are respectively arranged upstream and downstream of the gas pipeline. The switching unit is used to realize transmitting ultrasonic waves through the first ultrasonic unit and receiving ultrasonic waves through the second ultrasonic unit, or transmitting ultrasonic waves through the second ultrasonic unit and receiving ultrasonic waves through the first ultrasonic unit. The control unit determines the charging current value and the charging capacitance value, controls the first ultrasonic unit to transmit ultrasonic signals, and detects the voltage value of the internal capacitance and charges the internal capacitance; After the second ultrasonic unit receives the ultrasonic signal, it controls to stop charging the internal capacitance and obtains the first voltage value after the internal capacitance is charged; The first voltage value is sent to the calculation unit so that the calculation unit calculates the first time according to the first voltage value; Through the switching unit, it controls the second ultrasonic unit to transmit ultrasonic signals, and detects the voltage value of the internal capacitance and charges the internal capacitance; After the first ultrasonic unit receives the ultrasonic signal, it controls to stop charging the internal capacitance and obtains the second voltage value after the internal capacitance is charged. The second voltage value is sent to the calculation unit so that the calculation unit calculates the second time according to the second voltage value. The gas flow rate is determined according to the first time and the second time.
2. The gas detection device according to claim 1, wherein The measurement unit is a charging time measurement unit.
3. The gas detection device according to claim 1, characterized in that, The calculation unit includes a timing unit and a comparison unit. The timing unit is connected to the comparison unit, and the timing unit and the comparison unit are respectively connected to the control unit. The timing unit is used to provide a clock signal for the control unit. The comparison unit is used to provide effective calculation data for the control unit.
4. The gas detection device according to claim 2, characterized in that, It also includes a calibration unit. The calibration unit is connected to the charging time measurement unit and is used to calibrate the charging time measurement unit.
5. The gas detection device according to any one of claims 1 to 4, characterized in that, The signal processing unit is an amplifier circuit. One end of the amplifier circuit is respectively connected to the first ultrasonic unit and the second ultrasonic unit, and the other end of the amplifier circuit is connected to the control unit. The amplifier circuit is used to perform signal amplification processing on the received ultrasonic signals.
6. The gas detection device according to any one of claims 1 to 4, characterized in that The signal processing unit is a filter circuit. One end of the filter circuit is respectively connected to the first ultrasonic unit and the second ultrasonic unit, and the other end of the filter circuit is connected to the control unit. The filter circuit is used to filter out interference signals in the ultrasonic signals.
7. The gas detection device according to any one of claims 1 to 4, characterized in that, The signal processing unit is a zero-crossing detection circuit. One end of the zero-crossing detection circuit is respectively connected to the first ultrasonic unit and the second ultrasonic unit, and the other end of the zero-crossing detection circuit is connected to the control unit; The zero-crossing detection circuit is used to control the magnitude of the output power of the processed signal.
8. The gas detection device according to any one of claims 1 to 4, characterized in that, It further includes an alarm unit, and the alarm unit is connected to the control unit.
9. The gas detection device according to any one of claims 1 to 4, characterized in that, The calculation unit and the measurement unit are arranged inside the control unit.
10. The gas detection device according to claim 1, characterized in that, It further includes an ultrasonic trigger unit; One end of the ultrasonic trigger unit is connected to the control unit, and the other end is respectively connected to the first ultrasonic unit and the second ultrasonic unit, and is used to send trigger signals to the first ultrasonic unit and the second ultrasonic unit according to the instructions of the control unit.
11. A gas detection method, characterized in that, Using the gas detection device according to any one of claims 1 to 9, applied to the control unit, includes: Determine the charging current value and the charging capacitance value; Control the first ultrasonic unit to emit ultrasonic signals, detect the voltage value of the internal capacitor, and charge the internal capacitor; After the second ultrasonic unit receives the ultrasonic signal, control to stop charging the internal capacitor, and obtain the first voltage value after the internal capacitor is charged; Send the first voltage value to the calculation unit, so that the calculation unit calculates the first time according to the first voltage value; Through the switching unit, control the second ultrasonic unit to emit ultrasonic signals, detect the voltage value of the internal capacitor, and charge the internal capacitor; After the first ultrasonic unit receives the ultrasonic signal, control to stop charging the internal capacitor, and obtain the second voltage value after the internal capacitor is charged; Send the second voltage value to the calculation unit, so that the calculation unit calculates the second time according to the second voltage value; Determine the gas flow rate according to the first time and the second time.
12. The method according to claim 11, characterized in that, Before controlling the first ultrasonic unit to emit ultrasonic signals, detect the voltage value of the internal capacitor, and charge the internal capacitor, it further includes: Send a calibration signal to the calibration unit, so that the calibration unit charges the internal capacitor to obtain a calibration value.
Citation Information
Patent Citations
Fuel gas detection equipment and fuel gas system
CN214473455U