Gas leakage detection method and device based on Internet of Things intelligent gas meter

By using the gas leakage detection circuit of microcontroller and transistor in the IoT smart gas meter, the leakage status is determined based on the received level signal frequency and the energy supply is stopped. This solves the problem of excessive power consumption of the detection circuit and extends the battery life. Improved system reliability.

CN118823980APending Publication Date: 2024-10-22ZHEJIANG WEIXING INTELLIGENT METER STOCK
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410971257.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2024-10-22

AI Technical Summary

Technical Problem

In IoT smart gas meters, the additional power consumption of the gas leakage detection circuit is too high, resulting in shortened battery life, increased maintenance costs and reduced system reliability, posing safety risks.

Method used

A gas leakage detection circuit based on a single-chip microcomputer and a transistor is used to output a high-level signal and receive a level signal through the single-chip microcomputer, determine the leakage status based on the frequency of the received signal, and output a low-level signal to stop energy supply when a leak is detected. Reduce power consumption.

Benefits of technology

It effectively reduces the power consumption of the gas leakage detection circuit, extends the battery life of the gas meter, reduces maintenance costs, improves the reliability of the system, and reduces safety risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118823980A_ABST
    Figure CN118823980A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of gas detection, and discloses a gas leakage detection method and device based on an Internet of Things intelligent gas meter, and the method comprises the steps: outputting a high level signal through a first port of a single-chip microcomputer, and receiving the first level signal through a second port of the single-chip microcomputer; the single-chip microcomputer determines a receiving frequency according to the first level signal, and a second port of the single-chip microcomputer receives at least one second level signal according to the receiving frequency; and the single-chip microcomputer determines the leakage state of the gas according to all the second level signals, and when the gas is in the leakage state, the first port of the single-chip microcomputer outputs a low level signal. According to the gas leakage alarm detection circuit, the high-level signal is output through the first port of the single-chip microcomputer in the gas leakage alarm detection circuit so as to provide energy required by the circuit, whether gas leakage occurs or not is confirmed by detecting the level signal at the second port of the single-chip microcomputer, and then the low-level signal is output from the first port immediately when gas leakage is confirmed. Therefore, energy supply is stopped and extra power consumption is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of gas detection technology, and in particular to a gas leak detection method and device based on an Internet of Things smart gas meter. Background Art

[0002] During the use of IoT smart gas meters, gas leaks may occur due to reasons such as pipeline aging, substandard gas equipment, and irregular gas usage by users, which may endanger personal safety and property safety. Therefore, it is very necessary to monitor gas leaks accurately and in real time. When using IoT smart gas meters, a switch output type gas alarm is often used for detection. If there is a gas leak, the alarm will output a switch signal to the gas meter, and the gas meter will output the signal to the detection circuit through the interface. At this time, due to the transmission of the switch signal in the detection circuit, the detection circuit will generate some additional power consumption.

[0003] However, the existing solutions do not address the extra power consumption mentioned above, which results in excessive power consumption of the detection circuit. High power consumption will not only shorten the battery life of the gas meter connected to the detection circuit, requiring more frequent battery replacement or charging, thereby increasing maintenance costs and workload, but may also cause the gas leak detection system to fail at critical moments, reducing overall reliability and increasing safety risks. Therefore, how to reduce this extra power consumption is an urgent problem to be solved. Summary of the invention

[0004] In order to solve the above-mentioned problem of reducing the extra power consumption in the gas leak detection circuit, the embodiment of the present application provides a gas leak detection method and device based on an IoT smart gas meter, and its technical solution is as follows: In a first aspect, an embodiment of the present application provides a gas leak detection method based on an IoT smart gas meter, the method being applied to a gas leak alarm detection circuit, the circuit comprising a gas meter main control board, a transistor and a single-chip microcomputer, a first interface of the gas meter main control board being connected to the base of the transistor, a second interface of the gas meter main control board being connected to the collector of the transistor, a first port of the single-chip microcomputer being connected to the emitter of the transistor, and a second port of the single-chip microcomputer being connected to the collector of the transistor, the method comprising: The first port of the single-chip microcomputer outputs a high level signal, and the second port of the single-chip microcomputer receives a first level signal; The single chip microcomputer determines a receiving frequency according to the first level signal, and the second port of the single chip microcomputer receives at least one second level signal according to the receiving frequency; The single chip microcomputer determines the leakage state of the gas according to all the second level signals, and when the gas is in the leakage state, the first port of the single chip microcomputer outputs a low level signal.

[0005] In an optional solution of the first aspect, the single-chip microcomputer determines a receiving frequency according to the first level signal, and the second port of the single-chip microcomputer receives at least one second level signal according to the receiving frequency, including: When the single chip microcomputer recognizes that the first level signal is a low level signal, the preset first frequency is used as the receiving frequency; A second level signal is received by the second port of the single chip microcomputer according to the receiving frequency.

[0006] In another optional solution of the first aspect, the single chip microcomputer determines the receiving frequency according to the first level signal, and the second port of the single chip microcomputer receives at least one second level signal according to the receiving frequency, further comprising: When the single chip microcomputer recognizes that the first level signal is a high level signal, the preset second frequency is used as the receiving frequency; wherein the preset second frequency is greater than the preset first frequency; At least two second level signals are received by the second port of the single chip microcomputer according to the receiving frequency.

[0007] In another optional solution of the first aspect, the single chip microcomputer determines the leakage state of the gas according to all the second level signals, including: When the single-chip microcomputer identifies that there is at least one low-level signal and at least one high-level signal among all the second-level signals, the second port of the single-chip microcomputer receives at least two second-level signals according to a preset second frequency; When the single chip microcomputer recognizes that all the second level signals are low level signals, it is determined that the gas is in a non-leaking state; When the single chip microcomputer recognizes that all the second level signals are high level signals, it is determined that the gas is in a leaking state.

[0008] In another optional solution of the first aspect, after the first port of the single-chip microcomputer outputs the low level signal, the method further includes: Using the preset first frequency as the receiving frequency; The first port of the single-chip microcomputer outputs a high level signal, and the second port of the single-chip microcomputer receives a third level signal based on a preset waiting time and a receiving frequency; When the single chip microcomputer recognizes that the third level signal is a high level signal, the first port of the single chip microcomputer outputs a low level signal; When the single chip microcomputer recognizes that the third level signal is a low level signal, a high level signal is outputted from the first port of the single chip microcomputer, and the first level signal is received from the second port of the single chip microcomputer.

[0009] In yet another optional solution of the first aspect, the circuit further includes a pull-up resistor, a first current limiting resistor, and a second current limiting resistor, wherein: One end of the pull-up resistor is connected to the first port of the single-chip microcomputer and is connected to the emitter of the transistor; The other end of the pull-up resistor is connected to the base of the transistor and to one end of the first current limiting resistor; One end of the first current limiting resistor is also connected to the base of the transistor; The other end of the first current limiting resistor is connected to the first interface of the gas meter main control board; One end of the second current limiting resistor is connected to the second port of the single chip microcomputer and is also connected to the collector of the transistor; The other end of the second current limiting resistor is connected to the second interface of the gas meter main control board and is also connected to the ground terminal.

[0010] In yet another optional solution of the first aspect, the circuit further includes a first double germanium diode and a second double germanium diode, wherein: The anode of the first dual germanium diode is connected to the other end of the first current limiting resistor; The cathode of the first dual germanium diode is connected to the first interface of the main control board of the gas meter; The anode of the second dual-germanium diode is connected to the other end of the second current limiting resistor; The cathode of the second dual-germanium diode is connected to the second interface of the main control board of the gas meter and is also connected to the ground terminal.

[0011] In a second aspect, an embodiment of the present application provides a gas leak detection device based on an IoT smart gas meter, the device is applied to a gas leak alarm detection circuit, the circuit includes a gas meter main control board, a transistor and a single-chip microcomputer, a first interface of the gas meter main control board is connected to the base of the transistor, a second interface of the gas meter main control board is connected to the collector of the transistor, a first port of the single-chip microcomputer is connected to the emitter of the transistor, and a second port of the single-chip microcomputer is connected to the collector of the transistor, the device includes: A first processing module, configured to output a high level signal from a first port of the single chip microcomputer and receive a first level signal from a second port of the single chip microcomputer; A second processing module, configured to determine a receiving frequency according to the first level signal by the single chip microcomputer, and receive at least one second level signal according to the receiving frequency by a second port of the single chip microcomputer; The third processing module is used for determining the leakage state of the gas according to all the second level signals by the single chip microcomputer, and when the gas is in the leakage state, the first port of the single chip microcomputer outputs a low level signal.

[0012] In a third aspect, the embodiment of the present application further provides a gas leak detection device based on an IoT smart gas meter, including a processor and a memory; The processor is connected to the memory; A memory for storing executable program codes; The processor runs the program corresponding to the executable program code by reading the executable program code stored in the memory, so as to implement the gas leak detection method based on the Internet of Things smart gas meter provided by the first aspect of the embodiment of the present application or any implementation method of the first aspect.

[0013] In a fourth aspect, an embodiment of the present application provides a computer storage medium, which stores a computer program. The computer program includes program instructions. When the program instructions are executed by a processor, the gas leak detection method based on the Internet of Things smart gas meter provided by the first aspect of the embodiment of the present application or any implementation method of the first aspect can be implemented.

[0014] The beneficial effects brought by the technical solutions provided by some embodiments of this specification include at least: In the process of gas leak detection based on the Internet of Things smart gas meter, a high-level signal is output through the first port of the single-chip microcomputer in the gas leak alarm detection circuit to provide the energy required for the operation of the circuit, and the changes in the gas meter main control board caused by the gas leak are converted into changes in the level signal through the circuit, and then the transistor in the circuit transmits the change in the level signal to the second port of the single-chip microcomputer, so as to confirm whether a gas leak has occurred by detecting the level signal at the second port. At the same time, when the single-chip microcomputer confirms that a gas leak has occurred, a low-level signal is immediately output from the first port to stop power supply and reduce additional power consumption. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0016] Figure 1 An overall flow chart of a gas leak detection method based on an IoT smart gas meter provided in an embodiment of the present application; Figure 2 A schematic diagram of the structure of a gas leak alarm detection circuit based on an IoT smart gas meter provided in an embodiment of the present application; Figure 3 An overall flow chart of another gas leak detection method based on an IoT smart gas meter provided in an embodiment of the present application; Figure 4 A schematic diagram of the structure of a gas leak detection device based on an IoT smart gas meter provided in an embodiment of the present application; Figure 5A schematic structural diagram of another gas leak detection device based on an IoT smart gas meter provided in an embodiment of the present application. DETAILED DESCRIPTION

[0017] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0018] In the following introduction, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance. The following introduction provides multiple embodiments of the present application, and different embodiments can be replaced or combined, so the present application can also be considered to include all possible combinations of the same and / or different embodiments recorded. Therefore, if one embodiment includes features A, B, and C, and another embodiment includes features B and D, then the present application should also be considered to include embodiments containing one or more of all other possible combinations of A, B, C, and D, although the embodiment may not be clearly recorded in the following text.

[0019] The following description provides examples and does not limit the scope, applicability or examples set forth in the claims. Changes may be made to the functions and arrangements of the elements described without departing from the scope of the present application. Various processes or components may be appropriately omitted, substituted or added to each example. For example, the described method may be performed in an order different from the order described, and various steps may be added, omitted or combined. In addition, features described in some examples may be combined in other examples.

[0020] See also Figure 1 , Figure 1 An overall flow chart of a gas leak detection method based on an IoT smart gas meter provided in an embodiment of the present application is shown.

[0021] like Figure 1 As shown, the gas leak detection method based on the Internet of Things smart gas meter may at least include the following steps: Step 101: A first port of a single-chip microcomputer outputs a high-level signal, and a second port of the single-chip microcomputer receives a first-level signal.

[0022] In the embodiment of the present application, the executor of the gas leakage detection method based on the smart gas meter of the Internet of Things is a single-chip microcomputer, and the method is applied in a gas leakage alarm detection circuit, which includes a gas meter main control board, a transistor and a single-chip microcomputer, wherein the first interface of the gas meter main control board is connected to the base of the transistor, the second interface of the gas meter main control board is connected to the collector of the transistor, the first port of the single-chip microcomputer is connected to the emitter of the transistor, and the second port of the single-chip microcomputer is connected to the collector of the transistor. In the process of gas leakage detection based on the smart gas meter of the Internet of Things, a high-level signal is output through the first port of the single-chip microcomputer in the gas leakage alarm detection circuit to provide the energy required for the operation of the circuit, and the change of the gas meter main control board caused by the gas leakage is converted into a change of the level signal through the circuit, and then the change of the level signal is transmitted to the second port of the single-chip microcomputer by the transistor in the circuit, so as to confirm whether a gas leakage occurs by detecting the level signal at the second port. At the same time, when the single-chip microcomputer confirms that a gas leakage occurs, a low-level signal is immediately output from the first port to stop the energy supply and reduce the additional power consumption.

[0023] It can be understood that when a gas leak occurs, the first interface and the second interface of the gas meter main control board in the gas leak alarm detection circuit are in a closed state, that is, a short circuit is formed between the first interface and the second interface, allowing the current to pass through unimpeded. On the contrary, when no gas leak occurs, the first interface and the second interface of the gas meter main control board are in a normally open state, that is, a short circuit is formed between the first interface and the second interface, and the current cannot flow between the two. In addition, the transistor in the circuit is used to convert the state change of the first interface and the second interface of the gas meter main control board into a change of the level signal to output to the second port of the single-chip microcomputer. At the same time, the first port of the single-chip microcomputer is mainly used to power the circuit.

[0024] Specifically, in the process of gas leak detection based on the Internet of Things smart gas meter, the first port of the microcontroller in the gas leak alarm detection circuit can first output a high-level signal to provide the circuit with the energy required for operation, and then the second port of the microcontroller can receive the first level signal output when the circuit is operating.

[0025] Step 102: The single chip microcomputer determines a receiving frequency according to the first level signal, and the second port of the single chip microcomputer receives at least one second level signal according to the receiving frequency.

[0026] Specifically, after the second port of the single-chip microcomputer receives the first level signal, the single-chip microcomputer can determine the receiving frequency for receiving the second level signal according to the type of the received first level signal, and then the second port of the single-chip microcomputer can receive at least one second level signal according to the determined receiving frequency. Among them, the type of the first level signal can be but is not limited to high level signal and low level signal, and each first level signal has a unique corresponding pre-set receiving frequency. In addition, the number of second level signals received by the second port of the single-chip microcomputer will also vary depending on the receiving frequency. For example, when the receiving frequency is large (such as receiving once every 3 seconds), multiple second level signals can be received; when the receiving frequency is small (such as receiving once every 5 milliseconds), only one second level signal can be received.

[0027] As an option of the embodiment of the present application, the single chip microcomputer determines the receiving frequency according to the first level signal, and the second port of the single chip microcomputer receives at least one second level signal according to the receiving frequency, including: When the single chip microcomputer recognizes that the first level signal is a low level signal, the preset first frequency is used as the receiving frequency; A second level signal is received by the second port of the single chip microcomputer according to the receiving frequency.

[0028] Specifically, after the second port of the microcontroller receives the first level signal, the first level signal can be identified first, and when the first level signal is identified as a low level signal, the preset first frequency is used as the receiving frequency, and then the second port of the microcontroller can receive a second level signal according to the receiving frequency.

[0029] It can be understood that the first level signal is a low level signal, which means that the transistor is in the cut-off state. At this time, the first interface and the second interface of the gas meter main control board are in the normally open state, which also means that there is no gas leakage. Therefore, a smaller frequency (i.e., the preset first frequency) can be used as the receiving frequency, and since the gas meter is in a normal working state at this time, it only needs to receive a second level signal according to the receiving frequency.

[0030] As another option of the embodiment of the present application, the single chip microcomputer determines the receiving frequency according to the first level signal, and the second port of the single chip microcomputer receives at least one second level signal according to the receiving frequency, further comprising: When the single chip microcomputer recognizes that the first level signal is a high level signal, the preset second frequency is used as the receiving frequency; wherein the preset second frequency is greater than the preset first frequency; At least two second level signals are received by the second port of the single chip microcomputer according to the receiving frequency.

[0031] Specifically, after the second port of the single-chip microcomputer receives the first level signal, the first level signal can be identified first, and when the first level signal is identified as a high level signal, the preset second frequency is used as the receiving frequency, and then the second port of the single-chip microcomputer can receive at least two second level signals according to the receiving frequency. The preset second frequency is greater than the preset first frequency.

[0032] It can be understood that the first level signal is a high level signal, which means that the triode is in the on state. At this time, the first interface and the second interface of the gas meter main control board are in the closed state, which also means that a gas leak may occur. Therefore, a larger frequency (i.e., the preset second frequency) can be used as the receiving frequency, and multiple second level signals are received according to the receiving frequency to confirm whether the high level signal is a false alarm. Among them, the cause of the false alarm can be but is not limited to electromagnetic interference generated by other electrical equipment, noise on the signal line, poor connection, such as loose joints, corrosion or physical damage, etc.

[0033] Step 103: The single chip microcomputer determines the leakage state of the gas according to all the second level signals, and when the gas is in the leakage state, the first port of the single chip microcomputer outputs a low level signal.

[0034] Specifically, after the second port of the single-chip microcomputer receives at least one second level signal, it can be determined whether the gas is leaking according to the types of all the second level signals, and then when it is confirmed that the gas is in a leaking state, the first port of the single-chip microcomputer can be changed from outputting a high level signal to outputting a low level signal to stop supplying power to the detection circuit, thereby reducing the additional power consumption. Among them, the types of the second level signal can be but are not limited to high level signals and low level signals, and the way to confirm that the gas is in a leaking state can be but is not limited to: when the number of second level signals of the type of high level signals is greater than or equal to a preset threshold, it is confirmed that the gas is in a leaking state. For example, if the preset threshold is 5, when 5 second level signals of the type of high level signals are received, it can be considered that the gas is in a leaking state at this time.

[0035] As another option of the embodiment of the present application, the single chip microcomputer determines the gas leakage state according to all the second level signals, including: When the single-chip microcomputer identifies that there is at least one low-level signal and at least one high-level signal among all the second-level signals, the second port of the single-chip microcomputer receives at least two second-level signals according to a preset second frequency; When the single chip microcomputer recognizes that all the second level signals are low level signals, it is determined that the gas is in a non-leaking state; When the single chip microcomputer recognizes that all the second level signals are high level signals, it is determined that the gas is in a leaking state.

[0036] Specifically, in the process of the single-chip microcomputer determining the leakage status of the gas based on at least one second level signal received, all the second level signals can be identified first, and when it is identified that there are both low level signals and high level signals in all the second level signals, it is considered that the identification result may have errors due to environmental influences, and it is necessary to receive the second level signal again and identify it again. Therefore, the second port of the single-chip microcomputer can receive at least two second level signals according to the preset second frequency.

[0037] At the same time, when the single-chip microcomputer recognizes that all second-level signals are low-level signals, it means that the main control board of the gas meter has not changed (that is, the first interface and the second interface are in the normally open state), and the gas meter is in normal working condition. The first-level signal is a high-level signal, which may be caused by a false alarm. It can be determined that the gas is in a non-leaking state.

[0038] In addition, when the single-chip microcomputer recognizes that all second-level signals are high-level signals, it means that the main control board of the gas meter has changed (that is, the first interface and the second interface are in a closed state), the gas meter is in an abnormal working state, and the first-level signal is a high-level signal due to gas leakage, then it can be determined that the gas is in a leakage state.

[0039] As another option of the embodiment of the present application, after the first port of the single-chip microcomputer outputs a low level signal, the method further includes: Using the preset first frequency as the receiving frequency; The first port of the single-chip microcomputer outputs a high level signal, and the second port of the single-chip microcomputer receives a third level signal based on a preset waiting time and a receiving frequency; When the single chip microcomputer recognizes that the third level signal is a high level signal, the first port of the single chip microcomputer outputs a low level signal; When the single chip microcomputer recognizes that the third level signal is a low level signal, a high level signal is outputted from the first port of the single chip microcomputer, and the first level signal is received from the second port of the single chip microcomputer.

[0040] Specifically, after the first port of the single-chip microcomputer outputs a low-level signal, the preset first frequency can be used as the receiving frequency, and then the second port can receive the third-level signal according to the receiving frequency after the level signal at the second port is in a stable state according to the preset waiting time. It is worth noting that in order to receive the third-level signal, before the second port receives it, the first port needs to output a high-level signal to power the detection circuit.

[0041] Next, the received third level signal can be identified, and when the third level signal is identified as a high level signal, it indicates that the gas leakage state has not been resolved at this time, and then the first port of the single-chip microcomputer can output a low level signal to stop power supply and reduce power consumption. At the same time, when the third level signal is identified as a low level signal, it indicates that the gas leakage state has been resolved at this time, and then the first port of the single-chip microcomputer can output a high level signal, and the second port of the single-chip microcomputer receives the first level signal to perform the next round of gas leakage detection.

[0042] As another option of the embodiment of the present application, the circuit further includes a pull-up resistor, a first current limiting resistor and a second current limiting resistor, wherein: One end of the pull-up resistor is connected to the first port of the single-chip microcomputer and is connected to the emitter of the transistor; The other end of the pull-up resistor is connected to the base of the transistor and to one end of the first current limiting resistor; One end of the first current limiting resistor is also connected to the base of the transistor; The other end of the first current limiting resistor is connected to the first interface of the gas meter main control board; One end of the second current limiting resistor is connected to the second port of the single chip microcomputer and is also connected to the collector of the transistor; The other end of the second current limiting resistor is connected to the second interface of the gas meter main control board and is also connected to the ground terminal.

[0043] Specifically, during the gas leak detection process of the IoT-based smart gas meter, the current can first pass through the first port of the microcontroller, then flow through the pull-up resistor and the transistor, and then flow to the first current limiting resistor through the pull-up resistor, and flow to the second current limiting resistor through the transistor. Among them, the current flowing to the first current limiting resistor will continue to flow to the first interface of the gas meter main control board, and the current flowing to the second current limiting resistor will flow to the ground terminal.

[0044] It can be understood that the pull-up resistor is mainly used in the collector open or drain open output circuit to provide a necessary current source so that the output can be pulled up to a logic high level; the first current limiting resistor and the second current limiting resistor are mainly used to prevent sensitive components in the circuit (such as semiconductor devices, sensors, etc.) from being damaged due to current overload.

[0045] As another option of the embodiment of the present application, the circuit further includes a first double germanium diode and a second double germanium diode, wherein: The anode of the first dual germanium diode is connected to the other end of the first current limiting resistor; The cathode of the first dual germanium diode is connected to the first interface of the main control board of the gas meter; The anode of the second dual-germanium diode is connected to the other end of the second current limiting resistor; The cathode of the second dual-germanium diode is connected to the second interface of the main control board of the gas meter and is also connected to the ground terminal.

[0046] Specifically, in the gas leak detection process based on the Internet of Things smart gas meter, the current flowing through the first current limiting resistor can flow to the first interface of the gas meter main control board through the first dual germanium diode, and the current flowing through the second current limiting resistor can flow to the ground terminal through the second dual germanium diode.

[0047] It is understandable that the first dual germanium diode and the second dual germanium diode are mainly used to prevent circuit damage that may be caused by reverse current flow, such as preventing the voltage direction at the interface of the gas meter main control board from being reversed, thereby damaging the detection circuit.

[0048] See also Figure 2 , Figure 2 A structural schematic diagram of a gas leak alarm detection circuit based on an IoT smart gas meter provided in an embodiment of the present application is shown.

[0049] like Figure 2 As shown, the detection circuit may at least include a gas meter main control board P1, a single-chip microcomputer U1 (i.e., MCU), a PNP-type transistor Q1, a pull-up resistor R1, a first current limiting resistor R2, a second current limiting resistor R3, a first dual-germanium diode D1, a second dual-germanium diode D2, and a ground terminal GND, wherein the gas meter main control board P1 includes a first interface 1 and a second interface 2, the single-chip microcomputer U1 includes a first port 1 and a second port 2, 119_PWR represents a level signal output by the first port 1 of the single-chip microcomputer U1, and 119 represents a level signal received by the second port of the single-chip microcomputer U1.

[0050] It should be noted that the connection method of each component can be found in Figure 2 As well as the description of the connection relationship mentioned above, the role of each component in the circuit can be found in the relevant content mentioned above, and no further details will be given here.

[0051] The working principle of the circuit is as follows: when there is no gas leakage, the first interface 1 and the second interface 2 in the gas meter main control board P1 are in a normally open state, and no current can pass between the two. At this time, the transistor Q1 is in a cut-off state, and almost no current is allowed to pass through, so that the 119 signal received by the second port 2 of the single-chip microcomputer U1 is pulled down to a low-level signal by the ground terminal GND; when a gas leak occurs, the first interface 1 and the second interface 2 in the gas meter main control board P1 are in a closed state, and current can pass between the two. At this time, the transistor Q1 is in a conducting state, allowing current to pass through, so that the 119 signal received by the second port 2 of the single-chip microcomputer U1 is pulled up to a high-level signal by the conducting transistor Q1. Therefore, the occurrence of gas leakage can be detected by detecting the level of the 119 signal.

[0052] See also Figure 3 , Figure 3 An overall flow chart of another gas leak detection method based on an IoT smart gas meter provided in an embodiment of the present application is shown.

[0053] like Figure 3 As shown, the gas leak detection method based on the Internet of Things smart gas meter includes at least the following steps: (1) The first port of the single-chip microcomputer outputs a high-level signal to power the detection circuit, and the single-chip microcomputer detects the level signal received by the second port every 2 seconds; (2) When the single-chip microcomputer detects that the level signal is a high-level signal, the level signal received by the second port is adjusted to be detected once every 10 milliseconds, and the number of times the high-level signal is detected is recorded. Conversely, when the single-chip microcomputer detects that the level signal is a low-level signal, step (1) is executed. (3) Then, when the number of times the recorded high-level signal is detected reaches 5 times or more, it can be confirmed that a gas leak has occurred. Otherwise, when the number of times does not reach 5 times or more, step (2) is executed; (4) After confirming that a gas leak has occurred, the first port of the single-chip microcomputer can output a low-level signal to stop supplying power to the detection circuit, thereby reducing additional power consumption; (5) Thereafter, a delay of 10 milliseconds may be made until the level signal at the second port of the single-chip microcomputer is in a stable state, and the level signal received by the second port may be detected once every 2 seconds. Before each detection, the output signal at the first port of the single-chip microcomputer may be changed to a high level signal to power the detection circuit so that the second port of the single-chip microcomputer can receive the level signal. (6) When it is detected that the level signal received in step (5) is a high level signal, the signal output at the first port of the single-chip microcomputer can be changed to a low level signal to stop supplying power to the detection circuit, thereby reducing additional power consumption. Conversely, when it is detected that the level signal received in step (5) is a low level signal, it is deemed that the gas leakage has been eliminated.

[0054] See also Figure 4 , Figure 4 A schematic structural diagram of a gas leak detection device based on an IoT smart gas meter provided in an embodiment of the present application is shown.

[0055] like Figure 4 As shown, the gas leakage detection device based on the IoT smart gas meter may include at least a first processing module 401, a second processing module 402 and a third processing module 403, wherein: The first processing module 401 is used to output a high level signal from a first port of the single chip microcomputer and receive a first level signal from a second port of the single chip microcomputer; The second processing module 402 is used for determining a receiving frequency according to the first level signal by the single chip microcomputer, and receiving at least one second level signal according to the receiving frequency by the second port of the single chip microcomputer; The third processing module 403 is used for determining the leakage state of the gas according to all the second level signals by the single chip microcomputer, and when the gas is in the leakage state, the first port of the single chip microcomputer outputs a low level signal.

[0056] In some possible embodiments, the single chip microcomputer determines a receiving frequency according to the first level signal, and the second port of the single chip microcomputer receives at least one second level signal according to the receiving frequency, including: The second processing module 402 is specifically used for: When the single chip microcomputer recognizes that the first level signal is a low level signal, the preset first frequency is used as the receiving frequency; A second level signal is received by the second port of the single chip microcomputer according to the receiving frequency.

[0057] In some possible embodiments, the single chip microcomputer determines the receiving frequency according to the first level signal, and the second port of the single chip microcomputer receives at least one second level signal according to the receiving frequency, further comprising: The second processing module 402 is specifically used for: When the single chip microcomputer recognizes that the first level signal is a high level signal, the preset second frequency is used as the receiving frequency; wherein the preset second frequency is greater than the preset first frequency; At least two second level signals are received by the second port of the single chip microcomputer according to the receiving frequency.

[0058] In some possible embodiments, the single chip microcomputer determines the gas leakage state according to all the second level signals, including: The third processing module 403 is specifically used for: When the single-chip microcomputer identifies that there is at least one low-level signal and at least one high-level signal among all the second-level signals, the second port of the single-chip microcomputer receives at least two second-level signals according to a preset second frequency; When the single chip microcomputer recognizes that all the second level signals are low level signals, it is determined that the gas is in a non-leaking state; When the single chip microcomputer recognizes that all the second level signals are high level signals, it is determined that the gas is in a leaking state.

[0059] In some possible embodiments, after the first port of the single chip microcomputer outputs a low level signal, the method further includes: The third processing module 403 is specifically used for: Using the preset first frequency as the receiving frequency; The first port of the single-chip microcomputer outputs a high level signal, and the second port of the single-chip microcomputer receives a third level signal based on a preset waiting time and a receiving frequency; When the single chip microcomputer recognizes that the third level signal is a high level signal, the first port of the single chip microcomputer outputs a low level signal; When the single chip microcomputer recognizes that the third level signal is a low level signal, a high level signal is outputted from the first port of the single chip microcomputer, and the first level signal is received from the second port of the single chip microcomputer.

[0060] In some possible embodiments, the circuit further includes a pull-up resistor, a first current limiting resistor, and a second current limiting resistor, wherein: One end of the pull-up resistor is connected to the first port of the single-chip microcomputer and is connected to the emitter of the transistor; The other end of the pull-up resistor is connected to the base of the transistor and to one end of the first current limiting resistor; One end of the first current limiting resistor is also connected to the base of the transistor; The other end of the first current limiting resistor is connected to the first interface of the gas meter main control board; One end of the second current limiting resistor is connected to the second port of the single chip microcomputer and is also connected to the collector of the transistor; The other end of the second current limiting resistor is connected to the second interface of the gas meter main control board and is also connected to the ground terminal.

[0061] In some possible embodiments, the circuit further includes a first double germanium diode and a second double germanium diode, wherein: The anode of the first dual germanium diode is connected to the other end of the first current limiting resistor; The cathode of the first dual germanium diode is connected to the first interface of the main control board of the gas meter; The anode of the second dual-germanium diode is connected to the other end of the second current limiting resistor; The cathode of the second dual-germanium diode is connected to the second interface of the main control board of the gas meter and is also connected to the ground terminal.

[0062] See also Figure 5 , Figure 5 A structural schematic diagram of another gas leak detection device based on an IoT smart gas meter provided in an embodiment of the present application is shown.

[0063] like Figure 5 As shown, the gas leakage detection device 500 based on the IoT smart gas meter may include at least one processor 501 , at least one network interface 504 , a user interface 503 , a memory 505 and at least one communication bus 502 .

[0064] The communication bus 502 may be used to realize the connection and communication among the above-mentioned components.

[0065] The user interface 503 may include buttons, and the optional user interface may also include a standard wired interface or a wireless interface.

[0066] The network interface 504 may include, but is not limited to, a Bluetooth module, an NFC module, a Wi-Fi module, etc.

[0067] Among them, the processor 501 may include one or more processing cores. The processor 501 uses various interfaces and lines to connect the various parts of the entire gas leak detection device 500 based on the Internet of Things smart gas meter, and executes various functions and processes data of the gas leak detection device 500 based on the Internet of Things smart gas meter by running or executing instructions, programs, code sets or instruction sets stored in the memory 505, and calling data stored in the memory 505. Optionally, the processor 501 can be implemented in at least one hardware form of DSP, FPGA, and PLA. The processor 501 can integrate one or a combination of CPU, GPU, modem, etc. Among them, the CPU mainly processes the operating system, user interface, and application program; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 501, and it can be implemented by a single chip.

[0068] The memory 505 may include a RAM or a ROM. Optionally, the memory 505 includes a non-transitory computer-readable medium. The memory 505 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 505 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 505 may optionally be at least one storage device located away from the aforementioned processor 501. As Figure 5 As shown, the memory 505 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a gas leak detection application based on an IoT smart gas meter.

[0069] Specifically, the processor 501 may be used to call the gas leak detection application based on the IoT smart gas meter stored in the memory 505, and specifically perform the following operations: The first port of the single-chip microcomputer outputs a high level signal, and the second port of the single-chip microcomputer receives a first level signal; The single chip microcomputer determines a receiving frequency according to the first level signal, and the second port of the single chip microcomputer receives at least one second level signal according to the receiving frequency; The single chip microcomputer determines the leakage state of the gas according to all the second level signals, and when the gas is in the leakage state, the first port of the single chip microcomputer outputs a low level signal.

[0070] The present application also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the above method are implemented. The computer-readable storage medium may include, but is not limited to, any type of disk, including a floppy disk, an optical disk, a DVD, a CD-ROM, a micro drive, and a magneto-optical disk, a ROM, a RAM, an EPROM, an EEPROM, a DRAM, a VRAM, a flash memory device, a magnetic card or an optical card, a nanosystem (including a molecular memory IC), or any type of medium or device suitable for storing instructions and / or data.

[0071] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0072] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0073] In the several embodiments provided in the present application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of units, which is only a logical function division. There may be other division methods in actual implementation, such as 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 mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0074] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0075] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0076] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: U disk, read-only memory (ROM), random access memory (RAM), mobile hard disk, disk or optical disk and other media that can store program codes.

[0077] A person skilled in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by entering a program to instruct related hardware. The program may be stored in a computer-readable memory, and the memory may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0078] The above are only exemplary embodiments of the present disclosure and cannot be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the specification and practicing the disclosure here, those skilled in the art will easily think of the implementation scheme of the present disclosure. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the technical field that are not recorded in the present disclosure. The description and examples are only regarded as exemplary, and the scope and spirit of the present disclosure are defined by the claims.

Claims

1. A gas leak detection method based on an Internet of Things smart gas meter, characterized in that: The method is applied to a gas leak alarm detection circuit, the circuit comprising a gas meter main control board, a triode and a single-chip microcomputer, the first interface of the gas meter main control board is connected to the base of the triode, the second interface of the gas meter main control board is connected to the collector of the triode, the first port of the single-chip microcomputer is connected to the emitter of the triode, and the second port of the single-chip microcomputer is connected to the collector of the triode; the method comprises: The first port of the single chip microcomputer outputs a high level signal, and the second port of the single chip microcomputer receives a first level signal; The single chip microcomputer determines a receiving frequency according to the first level signal, and the second port of the single chip microcomputer receives at least one second level signal according to the receiving frequency; The single chip microcomputer determines the leakage state of the gas according to all the second level signals, and when the gas is in the leakage state, the first port of the single chip microcomputer outputs a low level signal.

2. The method according to claim 1, characterized in that The single-chip microcomputer determines a receiving frequency according to the first level signal, and the second port of the single-chip microcomputer receives at least one second level signal according to the receiving frequency, including: When the single chip microcomputer recognizes that the first level signal is the low level signal, the preset first frequency is used as the receiving frequency; A second level signal is received by the second port of the single chip microcomputer according to the receiving frequency.

3. The method according to claim 2, characterized in that The single chip microcomputer determines the receiving frequency according to the first level signal, and the second port of the single chip microcomputer receives at least one second level signal according to the receiving frequency, further comprising: When the single chip microcomputer recognizes that the first level signal is the high level signal, a preset second frequency is used as a receiving frequency; wherein the preset second frequency is greater than the preset first frequency; At least two second level signals are received by the second port of the single chip microcomputer according to the receiving frequency.

4. The method according to claim 3, characterized in that The single chip microcomputer determines the gas leakage state according to all the second level signals, including: When the single-chip microcomputer recognizes that there is at least one of the low-level signals and at least one of the high-level signals among all the second-level signals, the second port of the single-chip microcomputer receives at least two of the second-level signals according to the preset second frequency; When the single chip microcomputer recognizes that all the second level signals are the low level signals, it is determined that the gas is in a non-leaking state; When the single chip microcomputer recognizes that all the second level signals are the high level signals, it is determined that the gas is in a leakage state.

5. The method according to claim 2, characterized in that: After the first port of the single chip microcomputer outputs a low level signal, the method further comprises: Using the preset first frequency as the receiving frequency; The high level signal is outputted by the first port of the single chip microcomputer, and the third level signal is received by the second port of the single chip microcomputer based on a preset waiting time and the receiving frequency; When the single chip microcomputer recognizes that the third level signal is the high level signal, the first port of the single chip microcomputer outputs the low level signal; When the single chip microcomputer recognizes that the third level signal is the low level signal, the high level signal is outputted by the first port of the single chip microcomputer, and the first level signal is received by the second port of the single chip microcomputer.

6. The method according to claim 1, characterized in that The circuit further includes a pull-up resistor, a first current limiting resistor and a second current limiting resistor, wherein: One end of the pull-up resistor is connected to the first port of the single-chip microcomputer and to the emitter of the transistor; The other end of the pull-up resistor is connected to the base of the transistor and to one end of the first current limiting resistor; One end of the first current limiting resistor is also connected to the base of the transistor; The other end of the first current limiting resistor is connected to the first interface of the gas meter main control board; One end of the second current limiting resistor is connected to the second port of the single chip microcomputer and is connected to the collector of the transistor; The other end of the second current limiting resistor is connected to the second interface of the gas meter main control board and is also connected to the ground terminal.

7. The method according to claim 6, characterized in that The circuit also includes a first double germanium diode and a second double germanium diode, wherein: The anode of the first dual germanium diode is connected to the other end of the first current limiting resistor; The cathode of the first dual germanium diode is connected to the first interface of the main control board of the gas meter; The anode of the second dual germanium diode is connected to the other end of the second current limiting resistor; The cathode of the second dual-germanium diode is connected to the second interface of the gas meter main control board and is also connected to the ground terminal.

8. A gas leak detection device based on an IoT smart gas meter, characterized in that: The device is applied to a gas leak alarm detection circuit, the circuit comprising a gas meter main control board, a transistor and a single-chip microcomputer, the first interface of the gas meter main control board is connected to the base of the transistor, the second interface of the gas meter main control board is connected to the collector of the transistor, the first port of the single-chip microcomputer is connected to the emitter of the transistor, and the second port of the single-chip microcomputer is connected to the collector of the transistor; the device comprises: A first processing module, configured to output a high level signal from a first port of the single chip microcomputer and receive a first level signal from a second port of the single chip microcomputer; A second processing module, configured to determine a receiving frequency according to the first level signal by the single chip microcomputer, and receive at least one second level signal according to the receiving frequency by a second port of the single chip microcomputer; The third processing module is used for determining the leakage state of the gas according to all the second level signals by the single chip microcomputer, and when the gas is in the leakage state, the first port of the single chip microcomputer outputs a low level signal.

9. A gas leak detection device based on an IoT smart gas meter, characterized in that: including a processor and a memory; The processor is connected to the memory; The memory is used to store executable program code; The processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a computer or a processor, the computer or the processor executes the steps of the method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Gas leakage alarm linkage monitoring method and system for gas meter

    CN120526543B