A state detection device for a solenoid valve
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 苏州三思而行半导体技术有限公司
- Filing Date
- 2026-06-08
- Publication Date
- 2026-08-07
AI Technical Summary
为此,本申请的一个目的在于提供一种电磁阀的状态检测装置,以解决无法检测电磁阀阀芯真实机械开闭位置、以及检测成本高的问题
[0019] The solenoid valve status detection device provided in this embodiment outputs a detection pulse signal to the solenoid valve. Utilizing the significant difference in coil inductance between the open and closed states, it converts the actual mechanical position of the valve core into a difference in the duration of a high-level square wave electrical signal. The controller then acquires this high-level duration and compares it with a preset threshold range to accurately determine the open and closed states of the solenoid valve. This solution eliminates the need for additional mechanical position detection components such as valve position feedback sensors, Hall effect sensors, or reed switches, resulting in low hardware costs and suitability for mass production applications in household products.
Smart Images

Figure CN122525358A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of gas safety monitoring and solenoid valve control technology, and in particular to a solenoid valve status detection device. Background Technology
[0002] In the field of gas safety monitoring, household methane alarms are core devices for ensuring safe indoor gas use. Their core function is to activate a normally open, energized, closed solenoid valve installed on the gas pipeline upon detecting excessive methane concentration, cutting off the gas supply to prevent leaks. These solenoid valves typically use 12V to close. To ensure cost-effectiveness in residential settings, the solenoid valve itself generally does not have an additional valve position feedback interface. Therefore, detecting the status of the solenoid valve in the alarm presents a technical challenge.
[0003] Currently, the core technical requirements for the linkage control of household methane alarms and solenoid valves are accurate detection of the actual open / closed state of the solenoid valve core, identification of open-circuit and short-circuit faults in the solenoid valve, reliable valve closure after methane concentration exceeds the standard, and prevention of manual valve opening. However, existing technologies have significant shortcomings in this application scenario, making it difficult to balance detection reliability and product economy.
[0004] In related technologies, Solution 1 only controls the on / off state of the solenoid valve without any status detection. This solution is the mainstream low-cost solution for home alarms. The MCU only drives the solenoid valve to close by outputting a 12V voltage, without any feedback detection. This solution can only determine whether a drive voltage has been output to the solenoid valve, but cannot detect whether the solenoid valve core is actually engaged and closed. This poses safety hazards such as failure to engage when energized, mechanical jamming of the valve core, and manual opening of the solenoid valve. Furthermore, it cannot identify faults such as the solenoid valve being disconnected (open circuit) or the coil being short-circuited. The alarm cannot detect abnormal states of the solenoid valve, which can easily lead to valve closure failure in the event of a gas leak.
[0005] Option two involves using a valve position feedback line, Hall effect sensor, or reed switch to detect the solenoid valve's status. This is a common detection method for industrial-grade solenoid valves, detecting the mechanical position of the valve core by adding a mechanical feedback contact inside the solenoid valve or by installing a Hall effect sensor or reed switch externally. While this method can accurately detect the open / closed state of the solenoid valve, it requires additional feedback wiring, increasing the cost of sensor components. Furthermore, Hall effect sensors or reed switches have strict installation requirements, making them unsuitable for the miniaturized and cost-effective design needs of home alarm systems and difficult to mass-produce for home products.
[0006] Option 3 is a current-detection-based solenoid valve status determination scheme. This scheme detects the coil's operating current by connecting a sampling resistor in series in the solenoid valve's drive circuit to determine whether the solenoid valve is energized. This scheme can distinguish between the energized and de-energized states of the solenoid valve, but it cannot detect the actual mechanical position of the valve core. If the valve core is stuck, even if current flows through the coil, the valve core will not move, and the alarm will still mistakenly interpret it as the valve being closed.
[0007] Therefore, there is an urgent need for a solenoid valve condition detection solution that can balance detection reliability and product economy. Summary of the Invention
[0008] One objective of this application is to solve or at least alleviate some or all of the aforementioned problems. Therefore, one objective of this application is to provide a solenoid valve status detection device to solve the problems of being unable to detect the actual mechanical opening and closing position of the solenoid valve spool and high detection costs.
[0009] This invention provides a state detection device for a solenoid valve, comprising: A pulse drive module is electrically connected to the interface of the solenoid valve and is used to output a detection pulse signal to the solenoid valve so that the coil of the solenoid valve responds to the detection pulse signal to generate a feedback signal reflecting the inductance of the coil. A first detection module, electrically connected to the interface of the solenoid valve, is used to receive the feedback signal and convert the feedback signal into a square wave electrical signal. The high-level duration of the square wave electrical signal is related to the inductance of the coil. The controller, wherein the first receiving end of the controller is electrically connected to the first detection module; The controller is used to receive the square wave electrical signal, and when the high level duration of the square wave electrical signal is within a first preset threshold range, it determines that the solenoid valve is in an open state; when the high level duration of the square wave electrical signal is within a second preset threshold range, it determines that the solenoid valve is in a closed state. Wherein, the time value corresponding to the first preset threshold interval is greater than the time value corresponding to the second preset threshold interval.
[0010] Optionally, the first detection module includes a first isolation diode and an operational amplifier; The cathode of the first isolation diode is electrically connected to the interface of the solenoid valve, and the anode of the first isolation diode is electrically connected to the input terminal of the operational amplifier. The output terminal of the operational amplifier is electrically connected to the first receiving terminal of the controller.
[0011] Optionally, the pulse drive module includes a low-voltage pulse drive unit and a high-voltage pulse drive unit; The detection pulse signal includes a low-voltage detection pulse signal and a high-voltage detection pulse signal; The input terminal of the low-voltage pulse drive unit is electrically connected to the first control terminal of the controller, and the output terminal of the low-voltage pulse drive unit is electrically connected to the interface of the solenoid valve, for outputting the low-voltage detection pulse signal to the solenoid valve under the control of the first control terminal; The input terminal of the high-voltage pulse drive unit is electrically connected to the second control terminal of the controller, and the output terminal of the high-voltage pulse drive unit is electrically connected to the interface of the solenoid valve, for outputting the high-voltage detection pulse signal or the high-voltage drive pulse signal to the solenoid valve under the control of the second control terminal; The high-voltage drive pulse signal is used to drive the solenoid valve to the closed state. The pulse width of the high-voltage detection pulse signal is shorter than that of the high-voltage drive pulse signal, and the voltage of the low-voltage detection pulse signal is lower than that of the high-voltage detection pulse signal.
[0012] Optionally, the low-voltage pulse driving unit includes a first switching transistor and a second switching transistor; The control terminal of the first switch is electrically connected to the first control terminal of the controller, the first pole of the first switch is grounded, and the second pole of the first switch is electrically connected to the control terminal of the second switch. The first terminal of the second switching transistor is electrically connected to the low-voltage power supply, and the second terminal of the second switching transistor serves as the output terminal of the low-voltage pulse drive unit.
[0013] Optionally, the high-voltage pulse drive unit includes a third switch and a fourth switch; The control terminal of the third switch is electrically connected to the second control terminal of the controller, the first terminal of the third switch is grounded, and the second terminal of the third switch is electrically connected to the control terminal of the fourth switch. The first terminal of the fourth switching transistor is electrically connected to the high-voltage power supply, and the second terminal of the fourth switching transistor serves as the output terminal of the high-voltage pulse drive unit.
[0014] Optionally, the status detection device further includes a second isolation diode, the anode of which is electrically connected to the output terminal of the low-voltage pulse drive unit, and the cathode of which is electrically connected to the interface of the solenoid valve. And / or, The status detection device further includes a third isolation diode, the anode of which is electrically connected to the output terminal of the high-voltage pulse drive unit, and the cathode of which is electrically connected to the interface of the solenoid valve.
[0015] Optionally, a second detection module may also be included; The input terminal of the second detection module is electrically connected to the interface of the solenoid valve, and is used to collect the voltage at the interface of the solenoid valve and output the corresponding level signal; The second receiving end of the controller is electrically connected to the output end of the second detection module, and is used to receive the level signal, and when the square wave electrical signal is not received, to determine whether the solenoid valve is in an open circuit state or a short circuit state based on the level signal; Specifically, when the level signal is a high level signal, the solenoid valve is determined to be in an open circuit state; when the level signal is a low level signal, the solenoid valve is determined to be in a short circuit state.
[0016] Optionally, the second detection module includes a first voltage divider resistor and a second voltage divider resistor; The first end of the first voltage divider resistor serves as the input terminal of the second detection module; The second end of the first voltage divider resistor is electrically connected to the first end of the second voltage divider resistor, and serves as the output terminal of the second detection module; The second terminal of the second voltage divider resistor is grounded.
[0017] Optionally, the second detection module includes a first voltage divider resistor, a second voltage divider resistor, and a second diode; The first end of the first voltage divider resistor serves as the input terminal of the second detection module; The second end of the first voltage divider resistor is electrically connected to the first end of the second voltage divider resistor and the anode of the second diode, respectively; The second terminal of the second voltage divider resistor is grounded; The cathode of the second diode serves as the output terminal of the second detection module.
[0018] Optionally, the status detection device further includes a fourth isolation diode, the anode of which is electrically connected to the input terminal of the second detection module, and the cathode of which is electrically connected to the interface of the solenoid valve.
[0019] The solenoid valve status detection device provided in this embodiment outputs a detection pulse signal to the solenoid valve. Utilizing the significant difference in coil inductance between the open and closed states, it converts the actual mechanical position of the valve core into a difference in the duration of a high-level square wave electrical signal. The controller then acquires this high-level duration and compares it with a preset threshold range to accurately determine the open and closed states of the solenoid valve. This solution eliminates the need for additional mechanical position detection components such as valve position feedback sensors, Hall effect sensors, or reed switches, resulting in low hardware costs and suitability for mass production applications in household products.
[0020] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 This is a schematic diagram of the structure of a solenoid valve status detection device provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of another solenoid valve status detection device provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of another solenoid valve status detection device provided in an embodiment of the present invention. Detailed Implementation
[0023] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0024] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0025] Figure 1 This is a schematic diagram of the structure of a solenoid valve status detection device provided in an embodiment of the present invention, as shown below. Figure 1 As shown, the state detection device provided in this embodiment of the invention includes: The pulse drive module 11 is electrically connected to the interface 21 of the solenoid valve and is used to output a detection pulse signal to the solenoid valve so that the coil of the solenoid valve responds to the detection pulse signal to generate a feedback signal reflecting the coil inductance.
[0026] The first detection module 12 is electrically connected to the interface 21 of the solenoid valve. It is used to receive feedback signals and convert the feedback signals into square wave electrical signals. The high-level duration of the square wave electrical signals is related to the coil inductance.
[0027] The controller 13 has a first receiving terminal 131 that is electrically connected to the first detection module 12.
[0028] The controller 13 is used to receive square wave electrical signals, and when the high level duration of the square wave electrical signal is within a first preset threshold range, it determines that the solenoid valve is in the open state; when the high level duration of the square wave electrical signal is within a second preset threshold range, it determines that the solenoid valve is in the closed state.
[0029] The time value corresponding to the first preset threshold interval is greater than the time value corresponding to the second preset threshold interval.
[0030] Specifically, the status detection device provided in this embodiment is used to detect the status of the solenoid valve. The solenoid valve is an actuator that uses electromagnetic force to control the flow of fluid. It generates electromagnetic force by energizing a coil, which drives the internal valve core to move, thereby opening or closing the fluid passage.
[0031] In some embodiments, the solenoid valve is a normally open, energized-closed solenoid valve for household gas systems, which may have the following characteristics: Under normal conditions, the coil is not energized, the valve core is in the released position under the action of the spring, the solenoid valve is in the open state, the gas circuit is open, and gas is supplied normally.
[0032] When a sufficiently large driving current is applied to the coil for a sufficiently long time, the electromagnetic force drives the valve core to overcome the spring force and engage, thus closing the solenoid valve and cutting off the gas supply.
[0033] After the valve core is engaged, the internal mechanical locking mechanism locks the valve core in the closed position. The valve core remains closed after the coil is de-energized, and there is no need for continuous power supply. Therefore, only one drive pulse is needed to complete the valve closing action. After the solenoid valve is closed, the mechanical lock needs to be released by manually operating the external reset lever or knob. The valve core can then be reset and opened under the action of the spring.
[0034] In embodiments of the present invention, such as Figure 1As shown, the solenoid valve has an interface 21, which is a wiring port for the solenoid valve to be electrically connected to the outside, including a first terminal 211 and a second terminal 212. The coil of the solenoid valve is electrically connected to the state detection device of this embodiment through the first terminal 211; the second terminal 212 is grounded.
[0035] The pulse drive module 11 is electrically connected to the first terminal 211 and is used to output a detection pulse signal to the solenoid valve through the first terminal 211.
[0036] The detection pulse signal is a non-driving pulse, whose voltage and / or pulse width are configured to be used only to excite the coil of the solenoid valve to detect inductance characteristics, without driving the valve core to produce a pull-in or release action.
[0037] When a detection pulse signal is applied to the coil of the solenoid valve, current flows through the coil. Since the coil is an inductive load, the current cannot change abruptly. When the pulse voltage of the detection pulse signal is fixed, the rate of current rise is inversely proportional to the coil inductance.
[0038] The current change signal generated by the solenoid valve coil in response to the detection pulse signal is the feedback signal, which reflects the change characteristics of the coil inductance.
[0039] like Figure 1 As shown, the input terminal of the first detection module 12 is electrically connected to the first terminal 211 of the interface 21, and is used to receive the feedback signal and convert the received feedback signal into a square wave electrical signal. Since the feedback signal reflects the current change of the solenoid valve coil under the excitation of the detection pulse signal, its waveform characteristics are directly affected by the coil inductance. Therefore, the square wave electrical signal generated after processing the feedback signal by the internal circuitry of the first detection module 12 (such as a shaping amplification circuit composed of operational amplifiers) has a high-level duration that corresponds to the physical characteristics of the feedback signal, and is thus related to the coil inductance of the solenoid valve.
[0040] The output terminal of the first detection module 12 is electrically connected to the first receiving terminal 131 of the controller 13 to output the converted square wave electrical signal to the controller 13. The controller 13 can obtain the high-level duration of the square wave electrical signal through a timer and perform state determination.
[0041] It should be noted that, due to the different mechanical positions of the valve core in the open and closed states of the solenoid valve, the magnetic resistance of the internal magnetic circuit of the solenoid valve changes, resulting in a significant difference in the coil inductance. Therefore, under the excitation of the same detection pulse signal, the current change rate corresponding to the open and closed states is significantly different, and the difference in inductance will be transmitted through the feedback signal, which is ultimately reflected in the duration of the high level of the square wave electrical signal output by the first detection module 12.
[0042] Specifically, when the solenoid valve is in the closed state, the valve core is in the energized position. At this time, the corresponding coil inductance is small and the current rises rapidly. Under the excitation of the detection pulse signal, the current in the coil changes rapidly, and the high-level duration of the square wave electrical signal output after processing by the first detection module 12 is short.
[0043] When the solenoid valve is in the open state, the valve core is in the released position. At this time, the corresponding coil inductance is relatively large, for example, 2 to 5 times that of the closed state. The current rises slowly, and under the same detection pulse signal excitation, the time required for the current in the coil to change is longer. The high level duration of the square wave electrical signal converted by the first detection module 12 is also longer.
[0044] After multiple field tests, it was found that when the solenoid valve is in the open state, the high-level duration of the square wave electrical signal captured by the controller is about 200μs; when the solenoid valve is in the closed state, the high-level duration of the square wave electrical signal is about 90μs. The time difference between the two is more than 2 times, the detection characteristics are significantly different, and there is no overlapping interval, which can ensure the accuracy and reliability of the open and closed state determination.
[0045] After receiving the square wave electrical signal, the controller 13 can obtain the high-level duration of the square wave electrical signal through its internal timer.
[0046] The controller 13 has a first preset threshold range and a second preset threshold range. The first preset threshold range is used to determine that the solenoid valve is in the open state, and the second preset threshold range is used to determine that the solenoid valve is in the closed state. The time value corresponding to the first preset threshold range is greater than the time value corresponding to the second preset threshold range, which corresponds to the physical law that the high-level duration of the square wave signal is longer when the valve is open and shorter when the valve is closed.
[0047] During the detection process, the controller 13 compares the high-level duration of the square wave electrical signal acquired by the timer with the first preset threshold range and the second preset threshold range. If the high-level duration falls within the first preset threshold range, it is determined that the solenoid valve is currently in the open state; if the high-level duration falls within the second preset threshold range, it is determined that the solenoid valve is currently in the closed state.
[0048] Since there is a sufficient numerical difference between the first preset threshold interval and the second preset threshold interval, and there is no overlap between the two, the accuracy and reliability of the state determination can be guaranteed.
[0049] In summary, the state detection device provided in this embodiment of the invention outputs a detection pulse signal to the solenoid valve. Utilizing the significant difference in coil inductance between the open and closed states of the solenoid valve, it converts the actual mechanical position of the valve core into a difference in the duration of a high-level square wave electrical signal. The controller then acquires the high-level duration and compares it with a preset threshold range, achieving accurate determination of the open and closed states of the solenoid valve. This solution eliminates the need for additional mechanical position detection elements such as valve position feedback sensors, Hall effect sensors, or reed switches inside or outside the solenoid valve, resulting in low hardware costs and suitability for mass production applications in household products.
[0050] Figure 2 This is a schematic diagram of another solenoid valve status detection device provided in an embodiment of the present invention, as shown below. Figure 2 As shown, optionally, the first detection module 12 includes a first isolation diode D1 and an operational amplifier U1. The cathode of the first isolation diode D1 is electrically connected to the interface 21 of the solenoid valve, the anode of the first isolation diode D1 is electrically connected to the input terminal of the operational amplifier U1, and the output terminal of the operational amplifier U1 is electrically connected to the first receiving terminal 131 of the controller 13.
[0051] Specifically, such as Figure 2 As shown, the cathode of the first isolation diode D1 is electrically connected to the first terminal 211 of the interface 21, and the anode of the first isolation diode D1 is electrically connected to the inverting input terminal of the operational amplifier U1.
[0052] The output of operational amplifier U1 is electrically connected to the first receiver 131 of controller 13, which can be a general purpose input / output interface (GPIO). In one example, the first receiver 131 is configured as a timercapture pin to capture the high-level duration of the square wave electrical signal output by the first detection module 12, but it is not limited to this.
[0053] The first isolation diode D1 is used to achieve unidirectional signal transmission and electrical isolation. Utilizing its unidirectional conductivity, it allows only the feedback signal from the solenoid valve's interface 21 to enter the input terminal of the operational amplifier U1, while preventing the signal at the input terminal of the operational amplifier U1 from back-interfering to the solenoid valve's interface 21. For example, when the pulse drive module 11 outputs a signal (such as a detection pulse signal), the first isolation diode D1 is in a reverse cutoff state, protecting the subsequent operational amplifier U1 from the impact of the signal output by the pulse drive module 11.
[0054] Simultaneously, the first isolation diode D1 also utilizes its junction capacitance to couple the transient component in the feedback signal, transmitting a signal reflecting the characteristics of the coil inductance change to the operational amplifier U1. For example, when the detection pulse signal ends (falling edge appears), the solenoid valve coil generates a momentary reverse induced electromotive force (negative voltage pulse) due to its inductive characteristics. At this time, the first isolation diode D1 conducts, coupling this negative voltage feedback signal reflecting the coil characteristics to the operational amplifier U1.
[0055] Operational amplifier U1 is used to amplify and shape the received feedback signal, converting it into a square wave electrical signal. In some embodiments, operational amplifier U1 is configured as an inverting amplifier circuit or a comparator circuit. After receiving the negative voltage feedback signal from the first isolation diode D1, it flips and amplifies the signal, converting it into a positive square wave electrical signal with a clear pulse width and outputting it to controller 13. The high-level duration of this square wave electrical signal is positively correlated with the coil inductance of the solenoid valve.
[0056] When the solenoid valve is in the open state, the change in the internal magnetic circuit of the coil results in a larger inductance, and the feedback signal generated by the coil discharge lasts for a longer period of time. The high-level duration of the square wave electrical signal obtained after conversion is also correspondingly longer.
[0057] When the solenoid valve is in the closed state, the coil inductance is small, the feedback signal decays quickly, and the high level of the resulting square wave signal lasts for a short period of time.
[0058] Through the above circuit structure, the first detection module 12 converts the weak inductance fluctuations that are difficult to measure directly into the high-level duration (square wave width) of the square wave electrical signal that the controller 13 can accurately time, thereby realizing the detection of the mechanical opening and closing state of the solenoid valve.
[0059] In some embodiments, such as Figure 2 As shown, the first detection module 12 also includes a first resistor R1 and a first diode D01. The first resistor R1 is connected in series between the inverting input terminal of the operational amplifier U1 and the anode of the first isolation diode D1. The cathode of the first diode D01 is electrically connected to the inverting input terminal of the operational amplifier U1, and the anode of the first diode D01 is grounded.
[0060] Among them, the first resistor R1 is a current-limiting resistor, which is used to limit the current flowing into the input terminal of the operational amplifier U1 to prevent damage to the operational amplifier U1 due to overcurrent.
[0061] The first diode D01 is an overvoltage protection diode used to form a reverse connection to ground. Under normal operating conditions, the feedback signal voltage is lower than the breakdown voltage of the first diode D01, which is in a reverse cutoff state, exhibiting high impedance and not affecting the normal transmission of the feedback signal. When an overvoltage occurs at the input of operational amplifier U1 due to abnormal conditions (such as an unexpected intrusion of the drive pulse at solenoid valve interface 21 or other abnormal high-voltage interference), the input voltage exceeds the breakdown voltage of the first diode D01. The first diode D01 then reverse-breaks down and conducts, clamping the voltage at the input of operational amplifier U1 within a safe regulated range, thereby protecting the input of operational amplifier U1 from overvoltage damage.
[0062] In some embodiments, such as Figure 2 As shown, the non-inverting input of operational amplifier U1 is grounded to provide a reference zero potential.
[0063] In some embodiments, such as Figure 2 As shown, the first detection module 12 also includes a second resistor R2. The second resistor R2 is connected between the output terminal and the inverting input terminal of the operational amplifier U1. The second resistor R2 serves as a feedback resistor and is used to set the amplification factor of the operational amplifier U1.
[0064] Specifically, operational amplifier U1 operates in inverting amplification mode, and its amplification factor is determined by the ratio of the second resistor R2 to the first resistor R1 in the input circuit. By appropriately selecting the value of the second resistor R2, the feedback signal can be amplified to a level range suitable for sampling by the first receiving terminal 131 of controller 13, ensuring that the high-level duration of the square wave signal can be accurately captured by the timer of controller 13.
[0065] For example, the resistance value of the second resistor R2 is selected to be tens of times that of the first resistor R1, such as tens of kilohms to hundreds of kilohms, so that the operational amplifier U1 provides sufficient amplification gain to the feedback signal, converting the weak feedback signal into a square wave electrical signal with clear amplitude, while avoiding excessive amplification factor that would cause the output square wave electrical signal to saturate or become distorted.
[0066] In some embodiments, such as Figure 2 As shown, the first detection module 12 also includes a first capacitor C1. The first capacitor C1 is connected between the power supply pin of the operational amplifier U1 and ground. The first capacitor C1 serves as a bypass filter capacitor to filter out high-frequency noise in the power supply, ensuring the purity and stability of the output waveform of the operational amplifier U1 when the signal is flipped.
[0067] Specifically, when operational amplifier U1 processes, amplifies, and shapes the feedback signal, its internal circuitry rapidly flips in response to changes in the input signal. Transient current changes may introduce high-frequency noise through the power supply loop. The first capacitor C1 provides a low-impedance AC path at the power supply pin, bypassing high-frequency noise to ground. This stabilizes the supply voltage of operational amplifier U1, ensuring the integrity and consistency of the output square wave signal waveform. It also prevents measurement errors caused by the high-level duration of the square wave signal due to power supply noise interference, which could affect the accuracy of solenoid valve status determination.
[0068] In some embodiments, the operational amplifier U1 can be a general-purpose operational amplifier, such as any one of the single-channel or dual-channel operational amplifiers such as LM358, TL082, UA741, LM324; or a voltage comparator, such as any one of the voltage comparators such as LM339, LM393; as long as the selected operational amplifier or voltage comparator can convert the feedback signal generated by the coil of the solenoid valve in response to the detection pulse signal into a square wave electrical signal, and the high-level duration of the square wave electrical signal can reflect the change characteristics of the coil inductance (i.e., the difference in the rate of current change), it can be used as an equivalent alternative to the operational amplifier U1.
[0069] In some embodiments, the overvoltage protection circuit composed of the first resistor R1 and the first diode D01 can be replaced by other equivalent protection structures. For example, the first diode D01 can be replaced by a TVS transient suppression diode, which utilizes its fast response speed and strong surge absorption capability to achieve overvoltage clamping; a varistor can also be used to replace the first diode D01, utilizing its nonlinear volt-ampere characteristics to present low impedance for protection during overvoltage; an RC filter protection circuit can also be set at the input of the operational amplifier U1, using resistors to limit current and capacitors to absorb transient high-frequency energy to achieve overvoltage / overcurrent protection. As long as the selected protection structure can achieve the overvoltage protection and / or overcurrent protection functions at the input of the operational amplifier U1, and does not affect the normal conversion and transmission of the feedback signal to a square wave electrical signal during normal detection, it can be used as an equivalent replacement for the above-mentioned overvoltage protection circuit and falls within the protection scope of this application.
[0070] In some embodiments, the first isolation diode D1 is selected as 1N4007. 1N4007 is a general-purpose rectifier diode with low forward voltage drop and high reverse withstand voltage. It can effectively realize unidirectional signal transmission and electrical isolation, and is inexpensive and suitable for mass production applications of household methane alarms.
[0071] In some embodiments, the first isolation diode D1 can also be replaced by other equivalent rectifier diodes. For example, any one of the 1N4001 to 1N4009 series rectifier diodes, or any one of the 1N5401 to 1N5408 series rectifier diodes, can be selected. As long as the selected diode can couple the feedback signal from the solenoid valve interface 21 to the input terminal of the operational amplifier U1 and provide electrical isolation to prevent crosstalk of the signal output from the pulse drive module 11 to the input terminal of the operational amplifier U1, it can be used as an equivalent replacement for the first isolation diode D1 and fall within the protection scope of this application.
[0072] Optional, such as Figure 2 As shown, the pulse drive module 11 includes a low-voltage pulse drive unit 111 and a high-voltage pulse drive unit 112. The detected pulse signals include low-voltage detection pulse signals and high-voltage detection pulse signals.
[0073] The input terminal of the low-voltage pulse drive unit 111 is electrically connected to the first control terminal 132 of the controller 13, and the output terminal of the low-voltage pulse drive unit 111 is electrically connected to the interface 21 of the solenoid valve. The low-voltage pulse drive unit 111 is used to output a low-voltage detection pulse signal to the solenoid valve under the control of the first control terminal 132.
[0074] The input terminal of the high-voltage pulse drive unit 112 is electrically connected to the second control terminal 133 of the controller 13, and the output terminal of the high-voltage pulse drive unit 112 is electrically connected to the interface 21 of the solenoid valve. The high-voltage pulse drive unit 112 is used to output a high-voltage detection pulse signal or a high-voltage drive pulse signal to the solenoid valve under the control of the second control terminal 133.
[0075] Among them, the high-voltage drive pulse signal is used to drive the solenoid valve to the closed state, the pulse width of the high-voltage detection pulse signal is shorter than the pulse width of the high-voltage drive pulse signal, and the voltage of the low-voltage detection pulse signal is lower than the voltage of the high-voltage detection pulse signal.
[0076] The output terminals of both the low-voltage pulse drive unit 111 and the high-voltage pulse drive unit 112 are electrically connected to the first terminal 211 of the interface 21.
[0077] The low-pressure pulse drive unit 111 outputs a low-pressure detection pulse signal, which is used to detect the open / closed state of the solenoid valve under normal conditions. The voltage of the low-pressure detection pulse signal is lower than that of the high-pressure detection pulse signal, and it is configured to only excite the coil to detect inductive characteristics, without driving the valve spool to engage or disengage. In one example, the low-pressure detection pulse signal uses a 5V pulse. Since 5V is much lower than the rated drive voltage of the solenoid valve (e.g., 12V), even with a large pulse width, the electromagnetic force generated by the coil is insufficient to drive the valve spool, thus making it suitable for routine safety inspections under normal conditions.
[0078] The high-voltage pulse drive unit 112 outputs a high-voltage drive pulse signal, which drives the valve core of the solenoid valve to engage, switching the solenoid valve to the closed state. The high-voltage drive pulse signal has a high voltage and a wide pulse width, providing sufficient energy to the coil to generate the electromagnetic force required to drive the valve core. In one example, the high-voltage drive pulse signal uses a 12V pulse with a pulse width of 80ms, but it is not limited to this.
[0079] The high-voltage pulse drive unit 112 is also used to output a high-voltage detection pulse signal, which is used to detect whether the solenoid valve remains closed after it is in the closed state. The voltage of the high-voltage detection pulse signal is the same as or similar to that of the high-voltage drive pulse signal, but its pulse width is shorter than that of the high-voltage drive pulse signal. It is configured to only excite the coil to detect inductive characteristics and not drive the valve core to produce mechanical action. In one example, the high-voltage detection pulse signal uses a pulse with a voltage of 12V and a pulse width of 8μs. Since the 8μs pulse width is extremely short, the current in the coil does not have time to rise to a level sufficient to drive the valve core to move. Therefore, this pulse can only detect the position of the valve core and will not change the state of the valve core.
[0080] In this embodiment, by setting up a low-voltage pulse driving unit 111 and a high-voltage pulse driving unit 112, the detection function can be divided into different scenarios.
[0081] Specifically, under normal conditions where no abnormal alarm signal (such as a methane concentration exceeding the standard) is received, the controller 13 controls the low-pressure pulse drive unit 111 to output a low-pressure detection pulse signal at a first preset frequency (such as once every 10 seconds) through the first control terminal 132 to perform low-power safety inspection.
[0082] Upon receiving an abnormal alarm signal, the controller 13 first controls the high-voltage pulse drive unit 112 to output a high-voltage drive pulse signal to close the solenoid valve through the second control terminal 133. Then, it controls the high-voltage pulse drive unit 112 to output a high-voltage detection pulse signal for high-frequency detection at a second preset frequency (e.g., once every 100 milliseconds). If it detects that the solenoid valve has been manually opened or has unexpectedly rebounded and is in an open state, it outputs a high-voltage drive pulse signal again to close the solenoid valve, forming a closed-loop safety control.
[0083] The second preset frequency is higher than the first preset frequency to ensure real-time monitoring of the solenoid valve status under abnormal conditions.
[0084] In some embodiments, the first control terminal 132 can be a general purpose input / output interface (GPIO).
[0085] Optional, such as Figure 2As shown, the low-voltage pulse drive unit 111 includes a first switching transistor Q1 and a second switching transistor Q2. The control terminal of the first switching transistor Q1 is electrically connected to the first control terminal 132 of the controller 13. The first electrode of the first switching transistor Q1 is grounded, and the second electrode of the first switching transistor Q1 is electrically connected to the control terminal of the second switching transistor Q2. The first electrode of the second switching transistor Q2 is electrically connected to the low-voltage power supply VCC_L, and the second electrode of the second switching transistor Q2 serves as the output terminal of the low-voltage pulse drive unit 111, and is electrically connected to the first terminal 211 of the interface 21 of the solenoid valve.
[0086] The first switch Q1 and the second switch Q2 together constitute the two-stage switching drive structure of the low-voltage pulse drive unit 111.
[0087] The first switching transistor Q1 is an input stage switching transistor. Its function is to convert the control signal output by the controller 13 (e.g., 3.3V or 5V GPIO level) into a drive signal for the control terminal of the second switching transistor Q2. At the same time, it realizes the isolation between the controller 13 and the subsequent circuits, and protects the pins of the controller 13 from the impact of the high voltage or induced electromotive force at the back end.
[0088] The second switching transistor Q2 is the output stage switching transistor. Its function is to turn on or off under the drive of the first switching transistor Q1, thereby controlling whether the low-voltage power supply VCC_L outputs a low-voltage detection pulse signal to the solenoid valve.
[0089] In some embodiments, such as Figure 2 As shown, the first switching transistor Q1 is an NPN transistor, with its control terminal at the base, the first terminal at the emitter, and the second terminal at the collector. The second switching transistor Q2 is a PNP transistor, with its control terminal at the base, the first terminal at the emitter, and the second terminal at the collector.
[0090] In some embodiments, the first switching transistor Q1 can also be an N-channel MOSFET, and the second switching transistor Q2 can also be a P-channel MOSFET. The type of the switching transistor can be flexibly selected according to the actual driving requirements and cost requirements. As long as the controller 13 can control the on / off of the low-voltage detection pulse signal and the output low-voltage detection pulse signal is a non-driving stage pulse that does not drive the valve core, it is an equivalent substitution.
[0091] The operation of the low-voltage pulse drive unit 111 may include: When a low-voltage detection pulse signal is required, the controller 13 outputs an enable control signal (such as a high-level signal) to the control terminal of the first switch Q1 through the first control terminal 132. Upon receiving the enable control signal (such as a high-level signal), the first switch Q1 turns on, and its second terminal is pulled down to ground potential. Since the second terminal of the first switch Q1 is electrically connected to the control terminal of the second switch Q2, the control terminal of the second switch Q2 is also pulled down to ground potential, and the second switch Q2 turns on. After the second switch Q2 turns on, the low-voltage power supply VCC_L forms a path through the first and second terminals of the second switch Q2, outputting a low-voltage detection pulse signal to the first terminal 211.
[0092] When it is necessary to stop outputting the low-voltage detection pulse signal, the controller 13 outputs a non-enable control signal (such as a low-level signal) to the control terminal of the first switch Q1 through the first control terminal 132. The first switch Q1 is turned off, the control terminal of the second switch Q2 is pulled up to a high level, the second switch Q2 is turned off, and the output of the low-voltage detection pulse signal to the first terminal 211 is stopped.
[0093] Therefore, the controller 13 can control the conduction and cutoff of the first switch Q1 and the second switch Q2 by controlling the output control signal of the first control terminal 132, thereby obtaining the required low voltage detection pulse signal at the second electrode of the second switch Q2. The voltage of the low voltage detection pulse signal is equal to the voltage of the low voltage power supply VCC_L minus the conduction voltage drop of the second switch Q2.
[0094] In some embodiments, such as Figure 2 As shown, the low-voltage pulse drive unit 111 also includes a third resistor R3. The third resistor R3 is connected in series between the control terminal of the first switch Q1 and the first control terminal 132 of the controller 13 to limit the current flowing into the control terminal of the first switch Q1 and protect the control terminal of the first switch Q1 and the first control terminal 132 of the controller 13 from overcurrent damage.
[0095] In some embodiments, such as Figure 2 As shown, the low-voltage pulse drive unit 111 also includes a fourth resistor R4. One end of the fourth resistor R4 is electrically connected to the control terminal of the first switching transistor Q1, and the other end is grounded. The fourth resistor R4 acts as a pull-down resistor, used to reliably pull down the control terminal level of the first switching transistor Q1 to ground potential when the first control terminal 132 has no output signal or is in a high impedance state, preventing the first switching transistor Q1 from being mis-turned on due to electromagnetic interference or signal fluctuations, and playing a role in debouncing and stabilizing the circuit operation.
[0096] In some embodiments, such as Figure 2As shown, the low-voltage pulse drive unit 111 also includes a fifth resistor R5. One end of the fifth resistor R5 is electrically connected to the first terminal of the second switch Q2, and the other end is electrically connected to the control terminal of the second switch Q2. The fifth resistor R5 acts as a pull-up resistor, used to pull up the control terminal level of the second switch Q2 when the first switch Q1 is turned off, ensuring that the second switch Q2 remains off when there is no drive signal.
[0097] In some embodiments, such as Figure 2 As shown, the low-voltage pulse drive unit 111 also includes a sixth resistor R6. The sixth resistor R6 is connected in series between the second terminal of the first switch Q1 and the control terminal of the second switch Q2. The sixth resistor R6 acts as a current-limiting resistor. When the first switch Q1 is turned on, the sixth resistor R6 limits the current flowing from the control terminal of the second switch Q2 through the second terminal of the first switch Q1 to ground, thus protecting the control terminal of the second switch Q2 and the second terminal of the first switch Q1 from overcurrent damage.
[0098] In some embodiments, such as Figure 2 As shown, the low-voltage pulse drive unit 111 also includes a seventh resistor R7. The seventh resistor R7 is connected in series between the second terminal of the second switching transistor Q2 and the interface 21 of the solenoid valve, serving as an output current-limiting resistor. The seventh resistor R7 is used to limit the current magnitude of the low-voltage detection pulse signal, ensuring that the energy of the low-voltage detection pulse signal is small, so that even if the pulse width is large or the coil parameters of the solenoid valve are different, the valve core of the solenoid valve cannot be driven to produce an engaging or disengaging action.
[0099] In some embodiments, the low-voltage pulse drive unit 111 may use other equivalent switch drive structures to replace the two-stage switch drive circuit composed of the first switch transistor Q1 and the second switch transistor Q2.
[0100] For example, the low-voltage pulse drive unit 111 can be replaced with a common-emitter switch circuit using a single NPN transistor and a pull-up resistor. In this alternative, the base of the NPN transistor is electrically connected to the first control terminal 132 of the controller 13 via a current-limiting resistor, the emitter is grounded, and the collector is electrically connected to the low-voltage power supply VCC_L via a pull-up resistor, serving as the output terminal of the low-voltage pulse drive unit 111. When the controller 13 outputs an enable control signal (such as a high-level signal), the NPN transistor is turned on, and the output terminal of the low-voltage pulse drive unit 111 is pulled low to ground potential; when the controller 13 outputs a de-enable control signal (such as a low-level signal), the NPN transistor is turned off, and the output terminal of the low-voltage pulse drive unit 111 is pulled up to the level of the low-voltage power supply VCC_L by the pull-up resistor, outputting a low-voltage detection pulse signal. The control logic of this alternative is the opposite of the two-stage switch drive structure, but it can still output a low-voltage detection pulse signal under the control of the controller 13.
[0101] For example, the low-voltage pulse drive unit 111 can be replaced by a switching circuit consisting of a single PNP transistor and a pull-down resistor, a switching circuit consisting of a single N-channel MOSFET or a P-channel MOSFET, or an integrated micropower switch chip, etc. As long as the switching drive structure used can realize the on / off control of the low-voltage detection pulse signal by the controller 13, and the output low-voltage detection pulse signal is a non-driving pulse, that is, the voltage and / or pulse width of the pulse is configured not to drive the valve core of the solenoid valve to produce a closing or releasing action, it can be regarded as an equivalent alternative to the low-voltage pulse drive unit 111 and falls within the protection scope of this application.
[0102] Optional, such as Figure 2 As shown, the high-voltage pulse drive unit 112 includes a third switch Q3 and a fourth switch Q4. The control terminal of the third switch Q3 is electrically connected to the second control terminal 133 of the controller 13. The first terminal of the third switch Q3 is grounded, and the second terminal of the third switch Q3 is electrically connected to the control terminal of the fourth switch Q4. The first terminal of the fourth switch Q4 is electrically connected to the high-voltage power supply VCC_H, and the second terminal of the fourth switch Q4 serves as the output terminal of the high-voltage pulse drive unit 112, and is electrically connected to the first terminal 211 of the interface 21 of the solenoid valve 20.
[0103] Among them, the third switch Q3 and the fourth switch Q4 together constitute the two-stage switching drive structure of the high-voltage pulse drive unit 112.
[0104] In some embodiments, such as Figure 2 As shown, the third switch Q3 is an NPN transistor, with its control terminal being the base, the first terminal being the emitter, and the second terminal being the collector. The fourth switch Q4 is a P-channel MOSFET, with its control terminal being the gate, the first terminal being the source, and the second terminal being the drain.
[0105] In some embodiments, the third switch Q3 can also be an N-channel MOSFET, and the fourth switch Q4 can also be a PNP transistor. The types of the above-mentioned switches can be flexibly selected according to actual driving requirements and cost requirements. As long as the controller 13 can control the on / off state of the high-voltage drive pulse signal and the high-voltage detection pulse signal, they are all equivalent substitutes.
[0106] In some embodiments, the second control terminal 133 can be a general purpose input / output interface (GPIO).
[0107] The function of the third switch Q3 is to amplify the low-voltage control signal output from the second control terminal 133 of the controller 13, converting it into a control signal that can reliably drive the fourth switch Q4 to turn on and off. Since the fourth switch Q4 can be a high-power P-channel MOSFET, its gate parasitic capacitance is large, requiring a certain drive current to achieve rapid turn-on and turn-off. If directly driven by the second control terminal 133 of the controller 13 (such as GPIO), insufficient drive capability may lead to slow switching speed or unreliable turn-on. By setting the third switch Q3 (such as an NPN transistor) as a pre-switching switch, the controller 13 only needs to provide a small base current to control the turn-on and turn-off of the third switch Q3. Then, the collector of the third switch Q3 outputs a larger current to drive the control terminal of the fourth switch Q4, thereby achieving reliable control of the high-voltage power supply VCC_H. Simultaneously, the controller 13 is electrically isolated from the high-voltage power supply VCC_H, protecting the pins of the controller 13 from high-voltage damage.
[0108] The fourth switch Q4 is a power switch. Its function is to turn on or off under the drive of the third switch Q3, and to control whether the high voltage power supply VCC_H outputs a high voltage pulse signal (such as a high voltage drive pulse signal or a high voltage detection pulse signal) to the solenoid valve 20.
[0109] The operation of the high-voltage pulse drive unit 112 may include: When a high-voltage pulse signal (such as a high-voltage drive pulse signal or a high-voltage detection pulse signal) is required, the controller 13 outputs an enable control signal (such as a high-level signal) to the control terminal of the third switch Q3 through the second control terminal 133. Upon receiving the enable control signal (such as a high-level signal), the third switch Q3 turns on, and its second terminal is pulled down to ground potential. Since the second terminal of the third switch Q3 is electrically connected to the control terminal of the fourth switch Q4, the control terminal of the fourth switch Q4 is also pulled down to a low level. For P-channel MOSFETs or PNP transistors, conduction occurs when the control terminal is low; therefore, the fourth switch Q4 turns on. After the fourth switch Q4 turns on, the high-voltage power supply VCC_H forms a path through the first and second terminals of the fourth switch Q4, outputting a high-voltage pulse signal (such as a high-voltage drive pulse signal or a high-voltage detection pulse signal) to the first terminal 211.
[0110] When it is necessary to stop the output of the high-voltage pulse signal, the controller 13 outputs a non-enable control signal (such as a low-level signal) to the control terminal of the third switch Q3 through the second control terminal 133. The third switch Q3 is turned off, the control terminal of the fourth switch Q4 is pulled up to a high level, the fourth switch Q4 is turned off, and the output of the high-voltage pulse signal to the first terminal 211 is stopped.
[0111] Therefore, by controlling the output control signal of the second control terminal 133, the controller 13 can obtain the required high-voltage drive pulse signal (e.g., a 12V / 80ms pulse signal) or high-voltage detection pulse signal (e.g., a 12V / 8μs pulse signal) at the second terminal of the fourth switching transistor Q4. Specifically, when the solenoid valve needs to be closed, the controller 13 controls the second control terminal 133 to output an enable control signal for a relatively long time (e.g., 80ms), causing the high-voltage power supply VCC_H to output a high-voltage drive pulse signal to the coil of the solenoid valve 20, driving the valve core to close. When the closed state needs to be detected, the controller 13 controls the second control terminal 133 to output an enable control signal for a shorter time (e.g., 8μs), causing the high-voltage power supply VCC_H to output a high-voltage detection pulse signal to the coil of the solenoid valve 20. This signal has a short pulse width and is only used to excite the coil to detect inductance characteristics, without driving the valve core to produce mechanical action.
[0112] It should be noted that the output voltage of the high-voltage power supply VCC_H is higher than the output voltage of the low-voltage power supply VCC_L used by the low-voltage pulse drive unit 111.
[0113] In one example, the output voltage of the high-voltage power supply VCC_H is 12V, and the output voltage of the low-voltage power supply VCC_L is 5V, but it is not limited to this.
[0114] In this embodiment, through the two-stage switching drive structure composed of the third switch Q3 and the fourth switch Q4, the high-voltage pulse drive unit 112 can reliably output high-voltage drive pulse signals and high-voltage detection pulse signals under the control of the low-voltage control signal of the controller 13. By precisely controlling the duration of the enable control signal output by the controller 13, the dual functions of valve closing drive and status detection are realized on the same output terminal of the high-voltage pulse drive unit 112.
[0115] In some embodiments, such as Figure 2 As shown, the high-voltage pulse drive unit 112 also includes an eighth resistor R8. The eighth resistor R8 is connected in series between the control terminal of the third switch Q3 and the second control terminal 133 of the controller 13, and serves as a current-limiting resistor to limit the current flowing from the second control terminal 133 of the controller 13 into the control terminal of the third switch Q3, thereby protecting the control terminal of the third switch Q3 and the second control terminal 133 of the controller 13 from overcurrent damage.
[0116] In some embodiments, such as Figure 2As shown, the high-voltage pulse drive unit 112 also includes a ninth resistor R9. One end of the ninth resistor R9 is electrically connected to the control terminal of the third switch Q3, and the other end is grounded. The ninth resistor R9 acts as a pull-down resistor, used to reliably pull down the control terminal level of the third switch Q3 to ground potential when there is no output signal at the second control terminal 133 of the controller 13 or when it is in a high-impedance state. This prevents the third switch Q3 from being mis-turned due to electromagnetic interference, signal fluctuation, or uncertain pin levels during the power-on initialization of the controller 13, thus playing a role in debouncing and stabilizing the circuit's operating state.
[0117] In some embodiments, such as Figure 2 As shown, the high-voltage pulse drive unit 112 also includes a tenth resistor R10. One end of the tenth resistor R10 is electrically connected to the high-voltage power supply VCC_H, and the other end is electrically connected to the control terminal (such as the gate) of the fourth switch Q4. The tenth resistor R10 acts as a pull-up resistor, used to pull up the gate level of the fourth switch Q4 to the same high-voltage power supply VCC_H level as the source of the fourth switch Q4 when the third switch Q3 is turned off, so that the gate-source voltage difference of the fourth switch Q4 is zero, ensuring that the fourth switch Q4 is reliably turned off.
[0118] In some embodiments, such as Figure 2 As shown, the high-voltage pulse drive unit 112 also includes an eleventh resistor R11. The eleventh resistor R11 is connected in series between the second terminal (e.g., collector) of the third switch Q3 and the control terminal (e.g., gate) of the fourth switch Q4, serving as a gate discharge current-limiting resistor. When the third switch Q3 is turned on, the eleventh resistor R11 limits the instantaneous current when the gate parasitic capacitance of the fourth switch Q4 discharges through the third switch Q3, protecting the third switch Q3 from overcurrent damage.
[0119] In some embodiments, the high-voltage pulse drive unit 112 may use other equivalent drive structures to replace the two-stage switching drive circuit composed of the third switch Q3 (NPN transistor) and the fourth switch Q4 (P-channel MOS transistor).
[0120] For example, the high-voltage pulse drive unit 112 can be replaced with a dual transistor combination circuit, where both the third switch Q3 and the fourth switch Q4 are transistors, such as Q3 being an NPN transistor and Q4 being a PNP transistor. In this alternative, the P-channel MOSFET is replaced with a PNP transistor.
[0121] For example, the high-voltage pulse drive unit 112 can be replaced by a single high-power MOS transistor circuit. A high-power P-channel MOS transistor with a wide gate drive voltage range is used, and its conduction and cutoff are directly controlled by the second control terminal 133 of the controller 13 through the drive resistor, eliminating the need for a pre-drive transistor.
[0122] For example, the high-voltage pulse drive unit 112 can be replaced with an IGBT or an integrated drive chip circuit such as ULN2003 to realize the output of high-voltage pulse signals.
[0123] As long as the drive structure adopted can selectively output high-pressure drive pulse signals (used to drive the valve core of solenoid valve 20 to close the valve) and high-pressure detection pulse signals (used to detect the state of solenoid valve 20 without driving the valve core to produce mechanical action) at the output end of high-pressure pulse drive unit 112 according to the control of controller 13, it can be used as an equivalent alternative to high-pressure pulse drive unit 112.
[0124] It should be noted that the above-mentioned alternative solutions only involve replacing the model, package (plug-in or surface mount) or power rating of the internal driving device of the high-voltage pulse drive unit 112. They do not change the core function of the high-voltage pulse drive unit 112 in outputting high-voltage pulse signals to the solenoid valve 20, nor do they change the following core detection logic upon which this embodiment is based: under normal conditions, safety inspection is performed using low-pressure detection pulse signals; under abnormal conditions, the valve is forcibly closed using high-pressure drive pulse signals, and high-frequency closed-loop monitoring is performed using high-pressure detection pulse signals. Therefore, the above-mentioned alternative solutions all fall within the scope of protection of this application.
[0125] Optional, such as Figure 2 As shown, the status detection device also includes a second isolation diode D2. The anode of the second isolation diode D2 is electrically connected to the output terminal of the low-voltage pulse drive unit 111, and the cathode of the second isolation diode D2 is electrically connected to the first terminal 211 of the interface 21 of the solenoid valve 20.
[0126] The second isolation diode D2 is used to enable unidirectional conduction of the output signal of the low-voltage pulse drive unit 111, allowing only the low-voltage detection pulse signal to flow from the low-voltage pulse drive unit 111 to the solenoid valve 20, while preventing the signal at the interface 21 of the solenoid valve 20 from back-crossing to the output terminal of the low-voltage pulse drive unit 111, thus avoiding interference or damage to the low-voltage pulse drive unit 111 by the high-voltage pulse signal or feedback signal.
[0127] Optional, such as Figure 2As shown, the status detection device also includes a third isolation diode D3. The anode of the third isolation diode D3 is electrically connected to the output terminal of the high-voltage pulse drive unit 112, and the cathode of the third isolation diode D3 is electrically connected to the first terminal 211 of the interface 21 of the solenoid valve 20. The third isolation diode D3 is used to achieve unidirectional conduction of the output signal of the high-voltage pulse drive unit 112, allowing only the high-voltage drive pulse signal and the high-voltage detection pulse signal to flow from the high-voltage pulse drive unit 112 to the solenoid valve 20, while preventing the signal at the interface 21 of the solenoid valve 20 from back-crossing to the output terminal of the high-voltage pulse drive unit 112, thus avoiding interference or damage to the high-voltage pulse drive unit 112 by the low-voltage detection pulse signal or feedback signal.
[0128] In one example, both the second isolation diode D2 and the third isolation diode D3 are 1N4007 rectifier diodes. The 1N4007 has advantages such as low forward voltage drop, high reverse voltage withstand, and low cost, and can effectively realize unidirectional signal transmission and electrical isolation, making it suitable for mass production applications in household methane alarms.
[0129] In some embodiments, at least one of the first isolation diode D1, the second isolation diode D2, and the third isolation diode D3 may be replaced by other equivalent diodes to achieve electrical isolation and signal convergence of the three signals.
[0130] For example, at least one of the first isolation diode D1, the second isolation diode D2, and the third isolation diode D3 can be set as any one of the rectifier diodes in the 1N4001 to 1N4009 series. The forward current rating and reverse withstand voltage rating of this series of diodes are different, but they can all meet the functional requirements of unidirectional signal transmission and electrical isolation in this embodiment.
[0131] For example, the first isolation diode D1, the second isolation diode D2, and the third isolation diode D3 can be set as Schottky diodes. Schottky diodes have the characteristic of low forward voltage drop (typically 0.2V to 0.4V, much lower than the 0.7V of ordinary silicon rectifier diodes). Using Schottky diodes can reduce the voltage drop loss of the signal in the transmission path and improve the detection sensitivity.
[0132] For example, while maintaining the electrical isolation function, the cathode junction structure (where the cathodes are all connected to the first terminal 211) of the first isolation diode D1, the second isolation diode D2, and the third isolation diode D3 can be adjusted to an anode junction structure. This involves synchronously reversing the directions of the first isolation diode D1, the second isolation diode D2, and the third isolation diode D3, with the anodes all connected to the first terminal 211, and the cathodes connected to the corresponding drive module or detection module. It should be noted that this adjustment needs to be coordinated with the level polarity adjustment of other parts of the circuit, but it does not change the core principle of using unidirectional conductive elements to achieve electrical isolation and junction of multiple signals.
[0133] As long as the unidirectional conducting element used can achieve electrical isolation and signal convergence of the three signals—the low-voltage detection pulse signal output by the low-voltage pulse drive unit 111, the high-voltage drive pulse signal and the high-voltage detection pulse signal output by the high-voltage pulse drive unit 112, and the feedback signal received by the first detection module 12—and avoid crosstalk between the three signals, it can be used as an equivalent replacement for the isolation diode mentioned above.
[0134] It should be noted that changing only the diode's packaging form (such as replacing the through-hole package with a surface mount package) or specific model, without changing the core function of using the diode's unidirectional conduction characteristics to achieve electrical isolation and convergence of multiple signals, and without changing the core detection logic on which this embodiment is based, all fall within the protection scope of this application.
[0135] Optional, such as Figure 2 As shown, the status detection device also includes a second detection module 14. The input terminal of the second detection module 14 is electrically connected to the first terminal 211 of the interface 21 of the solenoid valve 20, and is used to collect the voltage at the first terminal 211 and generate a corresponding level signal based on the voltage. The output terminal of the second detection module 14 is electrically connected to the second receiving terminal 134 of the controller 13, and outputs the generated level signal to the controller 13.
[0136] The controller 13 receives the aforementioned level signal through the second receiving terminal 134. In some embodiments, the second control terminal 133 can be a general purpose input / output interface (GPIO).
[0137] During the detection process, when the controller 13 does not receive the square wave electrical signal output by the first detection module 12 through the first receiving terminal 131, the controller 13 determines whether the solenoid valve 20 is in an open circuit state or a short circuit state based on the high or low level signal received by the second receiving terminal 134.
[0138] The specific determination logic may include: when the level signal is a high level signal, it is determined that the solenoid valve 20 is in an open circuit state, that is, the solenoid valve 20 is not connected or the coil is disconnected; when the level signal is a low level signal, it is determined that the solenoid valve 20 is in a short circuit state, that is, the coil of the solenoid valve 20 is short-circuited.
[0139] When solenoid valve 20 is open-circuited (solenoid valve 20 is not connected to interface 21, or the coil of solenoid valve 20 is internally disconnected), the detection pulse signal output by pulse drive module 11 cannot form a complete current loop. At this time, no current flows through the coil of solenoid valve 20, and no feedback signal can be generated. Since the first detection module 12 (such as operational amplifier U1) cannot receive a valid feedback signal, its output cannot generate a valid square wave signal. Therefore, the first receiving terminal 131 of controller 13 cannot capture the square wave signal. In this case, the first terminal 211 is left floating or grounded through a high impedance. Under the action of the detection pulse signal, the voltage at the first terminal 211 is pulled high, and after processing by the second detection module 14, a high-level signal is output.
[0140] When a short circuit occurs in the coil of solenoid valve 20, the two ends of the coil are directly connected or connected through a very small impedance. At this time, the detection pulse signal output by pulse drive module 11 flows directly to ground through the short circuit path. Although current flows through the coil, the coil can no longer generate a normal inductance effect. Since the inductance is almost zero or extremely small after the coil is short-circuited, the signal acquired by the input terminal of the first detection module 12 is abnormally weak or has no effective inductance response characteristics, and cannot trigger the operational amplifier U1 to output a valid square wave signal. The first receiving terminal 131 of controller 13 also cannot capture a square wave signal. In this case, the voltage at the first terminal 211 is clamped to an extremely low level by the short circuit path or diode, and outputs a low-level signal after processing by the second detection module 14.
[0141] Therefore, by combining the two conditions of "whether a square wave electrical signal is received" and "the level of the signal", the controller 13 can uniquely distinguish the four states of the solenoid valve 20: when a square wave electrical signal is received and the duration of the high level falls within the first preset threshold range, it is determined to be in the open state; when a square wave electrical signal is received and the duration of the high level falls within the second preset threshold range, it is determined to be in the closed state; when no square wave electrical signal is received and the signal level is high, it is determined to be in the open circuit state; when no square wave electrical signal is received and the signal level is low, it is determined to be in the short circuit state.
[0142] In this embodiment, by setting a second detection module 14, this embodiment can further distinguish the fault type of the solenoid valve 20 when the first detection module 12 cannot detect a valid square wave electrical signal. This solves the technical problem that traditional detection schemes cannot distinguish between open circuit faults and short circuit faults, and realizes accurate detection of all states (open, closed, open circuit, short circuit) of the solenoid valve 20.
[0143] Optional, such as Figure 2 As shown, the second detection module 14 includes a first voltage divider resistor R12 and a second voltage divider resistor R13.
[0144] The first end of the first voltage divider resistor R12 serves as the input end of the second detection module 14 and is electrically connected to the first terminal 211 of the interface 21 of the solenoid valve 20 for collecting the voltage at the first terminal 211.
[0145] The second end of the first voltage divider resistor R12 is electrically connected to the first end of the second voltage divider resistor R13. This connection node serves as the output terminal of the second detection module 14 and is electrically connected to the second receiving terminal 134 of the controller 13. The second end of the second voltage divider resistor R13 is grounded.
[0146] The first voltage divider resistor R12 and the second voltage divider resistor R13 form a voltage divider network, which is used to divide the voltage at the first terminal 211 and output a level signal to the second receiving terminal 134 of the controller 13. The input voltage of the second receiving terminal 134 of the controller 13 is equal to the voltage at the first terminal 211 multiplied by the voltage division ratio R13 / (R12+R13).
[0147] By appropriately selecting the resistance values of the first voltage divider resistor R12 and the second voltage divider resistor R13, the voltage level signal output by the voltage divider network can be matched with the logic level requirements of the controller 13. Specifically, when the solenoid valve 20 is open, the voltage at the first terminal 211 is relatively high (e.g., close to the voltage of the low-voltage power supply VCC_L, 5V). After voltage division by the voltage divider network, the second receiving terminal 134 receives a high-level signal, the voltage value of which is higher than the high-level input threshold of the controller 13. When the solenoid valve 20 is normally connected or short-circuited, the voltage at the first terminal 211 is relatively low (pulled down by the DC resistance of the coil during normal connection, and clamped at approximately 0.7V or close to 0V during short circuit). After voltage division by the voltage divider network, the second receiving terminal 134 receives a low-level signal, the voltage value of which is lower than the low-level input threshold of the controller 13.
[0148] In one example, the first voltage divider resistor R12 has a resistance of 10kΩ, the second voltage divider resistor R13 has a resistance of 10kΩ, and the voltage division ratio is 0.5. When the solenoid valve 20 is open, the voltage at the first terminal 211 is approximately 5V, and after voltage division, a high-level signal of approximately 2.5V is output. When the solenoid valve 20 is short-circuited, the voltage at the first terminal 211 is approximately 0.7V or lower, and after voltage division, a low-level signal of approximately 0.35V or lower is output. The aforementioned high-level and low-level signals are respectively above the typical high-level input threshold (e.g., 2.0V) and below the low-level input threshold (e.g., 0.8V) of the controller 13, and can be reliably identified by the controller 13.
[0149] In this embodiment, by setting up a voltage divider network consisting of the first voltage divider resistor R12 and the second voltage divider resistor R13, the second detection module 14 can realize the acquisition and level conversion of the voltage at the first terminal 211 with a very simple hardware structure, providing a reliable level basis for the controller 13 to distinguish between open circuit faults and short circuit faults of the solenoid valve 20.
[0150] Figure 3 This is a schematic diagram of the structure of another solenoid valve status detection device provided in an embodiment of the present invention, as shown below. Figure 3 As shown, optionally, the second detection module 14 includes a first voltage divider resistor R12, a second voltage divider resistor R13, and a second diode D4.
[0151] The first end of the first voltage divider resistor R12 serves as the input terminal of the second detection module 14, and is electrically connected to the first terminal 211 of the interface 21 of the solenoid valve 20, for acquiring the voltage at the first terminal 211. The second end of the first voltage divider resistor R12 is electrically connected to the first end of the second voltage divider resistor R13 and the anode of the second diode D4. The second end of the second voltage divider resistor R13 is grounded. The cathode of the second diode D4 serves as the output terminal of the second detection module 14, and is electrically connected to the second receiving terminal 134 of the controller 13.
[0152] The first voltage divider resistor R12 and the second voltage divider resistor R13 form a voltage divider network to divide the voltage at the first terminal 211. The second diode D4 is connected in series between the output node of the voltage divider network and the second receiving terminal 134 of the controller 13 to clamp and isolate the output level under specific operating conditions.
[0153] Specifically, when the solenoid valve 20 is in an open-circuit state (not connected or the coil is disconnected), the first terminal 211 is left floating or grounded through a high impedance. During the output of the detection pulse signal by the pulse drive module 11, the voltage at the first terminal 211 is pulled up to a level close to the low-voltage power supply VCC_L (e.g., 5V). This voltage is divided by the first voltage divider resistor R12 and the second voltage divider resistor R13, resulting in a higher voltage at the second end of the first voltage divider resistor R12 (i.e., the voltage divider node). At this time, the second diode D4 is forward biased and conducts, and the high-level signal at the voltage divider node is transmitted to the second receiving terminal 134 of the controller 13 via the second diode D4. The second receiving terminal 134 of the controller 13 receives the high-level signal, and combined with the condition that the first receiving terminal 131 does not receive a square wave signal, determines that the solenoid valve 20 is in an open-circuit state.
[0154] When solenoid valve 20 is in a short-circuit state (coil short-circuited), the first terminal 211 is pulled to an extremely low level (e.g., approximately 0.7V or close to 0V) by the short-circuit path or clamping element. After voltage division by the first voltage divider resistor R12 and the second voltage divider resistor R13, the voltage at the voltage divider node is also extremely low. At this time, the anode voltage of the second diode D4 is extremely low, and the second receiving terminal 134 of the controller 13 is pulled low by the extremely low level of the cathode of the second diode D4. The second receiving terminal 134 of the controller 13 receives a low-level signal. Combined with the condition that the first receiving terminal 131 does not receive a square wave signal, it is determined that solenoid valve 20 is in a short-circuit state.
[0155] In addition, when the solenoid valve 20 is normally connected (open or closed), the first detection module 12 can receive the feedback signal and output a square wave signal. The controller 13 determines the open or closed state of the solenoid valve 20 based on the high-level duration of the square wave signal. At this time, the output signal of the second detection module 14 can be used as an auxiliary reference.
[0156] In this embodiment, the second diode D4 serves as both a unidirectional signal transmission and level clamping mechanism. This prevents reverse voltage leakage within the controller 13 from interfering with the detection node and also enables accurate level identification in conjunction with the controller 13. Specifically, the second diode D4 conducts forward when the voltage divider network outputs a high level, ensuring effective transmission of the high-level signal. Simultaneously, when the voltage divider network outputs an extremely low level, the second diode D4 reliably pulls down the second receiver 134 of the controller 13. Furthermore, the forward voltage drop of the second diode D4 provides a certain level offset, making the difference between high and low levels more distinct and further improving the reliability of distinguishing between open-circuit and short-circuit states.
[0157] Optional, such as Figure 2 and Figure 3As shown, the status detection device also includes a fourth isolation diode D5. The anode of the fourth isolation diode D5 is electrically connected to the input terminal of the second detection module 14, and the cathode of the fourth isolation diode D5 is electrically connected to the first terminal 211 of the interface 21 of the solenoid valve 20.
[0158] The fourth isolation diode D5 is used to enable unidirectional signal conduction between the second detection module 14 and the first terminal 211. It only allows the second detection module 14 to acquire voltage signals from the first terminal 211, while preventing drive pulse signals (such as low-voltage detection pulse signals, high-voltage drive pulse signals, or high-voltage detection pulse signals) at the first terminal 211 from affecting the internal circuitry of the second detection module 14 through its input terminal. Simultaneously, the fourth isolation diode D5 also prevents high-voltage signals (e.g., 12V) from directly entering the second detection module 14 when a high-voltage drive pulse signal (e.g., 12V) is output, thus avoiding overvoltage damage to the voltage divider resistors in the second detection module 14 and the second receiving terminal 134 of the controller 13.
[0159] Simultaneously, during routine fault detection (providing a non-drive-stage low-voltage detection pulse signal), when solenoid valve 20 is short-circuited, the potential of the first terminal 211 of interface 21 is forcibly pulled down to near 0V. At this time, the fourth isolation diode D5 is forward-biased, clamping the voltage on its anode side (i.e., the input terminal of the second detection module 14) near a lower diode forward voltage drop (approximately 0.7V). After processing by the voltage divider network, the low voltage ensures that the controller 13 reliably reads the logic low-level signal. When solenoid valve 20 is open-circuited, interface 21 loses its load pull-down path. The fourth isolation diode D5 is in a slightly on or off state due to the lack of a current loop, and its anode side remains at a high potential. This high potential, after processing by the voltage divider network, ensures that the controller reliably reads the logic high level.
[0160] In this embodiment, by introducing the fourth isolation diode D5, not only is the high-voltage crosstalk risk caused by the high-voltage drive and low-voltage detection sharing the same physical interface resolved, but its unidirectional clamping characteristic also further improves the anti-interference capability and level recognition accuracy of the second detection module 14 during fault diagnosis.
[0161] Optional, such as Figure 2 and Figure 3 As shown, the second isolation diode D2 and the fourth isolation diode D5 are the same diode, which reduces the number of components and further reduces hardware costs.
[0162] In some embodiments, the first voltage divider resistor R12 and the second voltage divider resistor R13 in the second detection module 14 can be replaced by other equivalent voltage divider components or resistance values. For example, the resistance values of the first voltage divider resistor R12 and the second voltage divider resistor R13 can be arbitrarily adjusted according to actual circuit requirements, such as replacing the original 10kΩ with 5kΩ, 100kΩ, or other suitable resistance values. By adjusting the resistance ratio of the first voltage divider resistor R12 and the second voltage divider resistor R13, the voltage division ratio of the voltage divider network can be changed, thereby adjusting the level amplitude of the output from the second detection module 14 to the second receiving terminal 134 of the controller 13 to adapt to the logic level requirements of different controllers 13.
[0163] For example, at least one of the first voltage divider resistor R12 and the second voltage divider resistor R13 can be replaced with a precision resistor to improve the stability and consistency of the voltage divider accuracy and reduce the detection error caused by individual resistor differences or temperature drift.
[0164] For example, the first voltage divider resistor R12 and / or the second voltage divider resistor R13 can be replaced with an adjustable potentiometer. By manually or automatically adjusting the resistance value of the potentiometer, the voltage division ratio can be flexibly calibrated on site to adapt to the parameter differences of different models of solenoid valves 20 or the changes in cable impedance under different installation environments.
[0165] As long as the voltage divider components or resistance configurations used can achieve the following core level differentiation effect: when the solenoid valve 20 is open, the output terminal of the second detection module 14 (i.e., the second receiving terminal 134 of the controller 13) is a high-level signal; when the solenoid valve 20 is short-circuited, the output terminal of the second detection module 14 is a low-level signal, both can be used as equivalent replacements for the first voltage divider resistor R12 and the second voltage divider resistor R13.
[0166] In some embodiments, the second diode D4 in the second detection module 14 can be replaced by other equivalent level adjustment devices, or the same level differentiation effect can be achieved by simplifying the circuit structure.
[0167] Optionally, the second diode D4 can be directly replaced with other types of diodes or level clamping devices. For example, the second diode D4 can be replaced with a 1N4148 or 1N4448 switching diode, both of which are general-purpose small-signal switching diodes with similar forward conduction characteristics and a forward voltage drop of approximately 0.7V, and can be used interchangeably. Alternatively, the second diode D4 can be replaced with a small 3.3V or 5V Zener diode.
[0168] As long as the alternative device can clamp or adjust the detection terminal level through its own forward voltage drop (such as the voltage drop of a silicon diode of about 0.7V, the voltage drop of a Schottky diode of about 0.2V to 0.4V, and the breakdown voltage of a Zener diode), and does not change the core level difference characteristic of "the second detection module 14 outputs a high level when the solenoid valve 20 is open and the second detection module 14 outputs a low level when the solenoid valve 20 is short-circuited", it can be used as an equivalent alternative to the second diode D4.
[0169] In some embodiments, even if the second diode D4 is removed, and only the voltage divider network consisting of the first voltage divider resistor R12 and the second voltage divider resistor R13 is retained, the same level differentiation effect can be achieved by adjusting the resistance ratio of the voltage divider resistors. Specifically, the resistance value of the second voltage divider resistor R13 (lower voltage divider resistor) can be increased, or the resistance value of the first voltage divider resistor R12 (upper voltage divider resistor) can be decreased, thereby increasing the voltage division ratio R13 / (R12+R13). When the solenoid valve 20 is short-circuited, the voltage at the first terminal 211 is clamped at an extremely low level (e.g., about 0.7V or close to 0V). Even without the clamping effect of the second diode D4, after voltage division by the adjusted voltage divider network, the second receiving terminal 134 can still acquire a sufficiently low low-level signal (below the low-level input threshold of the controller 13). When the solenoid valve 20 is open, the voltage at the first terminal 211 is close to the low-voltage power supply VCC_L level (e.g., 5V). After voltage division by the adjusted voltage divider network, the second receiving terminal 134 acquires a sufficiently high high-level signal (higher than the high-level input threshold of the controller 13). As long as the second diode D4 is removed, the core level difference characteristic of "the second detection module 14 outputting a high-level signal when the solenoid valve 20 is open and the second detection module 14 outputting a low-level signal when the solenoid valve 20 is short-circuited" can still be achieved by adjusting the resistance ratio of the voltage divider resistors. Moreover, the controller 13 still distinguishes between open-circuit faults and short-circuit faults based on the combined judgment logic of "when no square wave signal is received, combined with the high and low levels of the second receiving terminal 134". This simplified structure is still an equivalent alternative of the present invention.
[0170] It is understandable that whether a diode is set in the second detection module 14, what type of level clamping or isolation diode is set, or whether the same level detection effect is achieved by simply adjusting the resistance ratio of the voltage divider resistors, as long as the core level characteristic of "outputting a high level when the solenoid valve 20 is open and outputting a low level when the solenoid valve 20 is short-circuited" is not changed, and the controller 13 does not deviate from the core fault judgment logic of "combining judgments based on the high and low levels of the second receiving terminal 134 to distinguish between open-circuit faults and short-circuit faults when no valid square wave electrical signal is received", all fall within the protection scope of this application.
[0171] In some embodiments, the input connection location of the voltage divider network in the second detection module 14 can be replaced by other equivalent access methods.
[0172] In the original plan, such as Figure 3 As shown, the input terminal of the second detection module 14 is connected to the first terminal 211 through the anode of the second isolation diode D2. That is, the input terminal of the voltage divider network is actually connected to the anode of the second isolation diode D2. This connection position can indirectly collect the voltage signal at the first terminal 211 through the second isolation diode D2, and at the same time, electrical isolation is achieved by using the second isolation diode D2.
[0173] In the alternative, the input of the voltage divider network can be directly connected to the first terminal 211 (the interface signal terminal of the solenoid valve 20), meaning that the first end of the first voltage divider resistor R12 is directly electrically connected to the first terminal 211 without going through the second isolation diode D2. This alternative eliminates the isolation function of the second isolation diode D2 on the input path of the second detection module 14, but the voltage divider network can still directly acquire the voltage signal at the first terminal 211, acquiring a high level when the solenoid valve 20 is open and a low level when the solenoid valve 20 is short-circuited.
[0174] For example, the input terminal of the voltage divider network can be connected to the signal input terminal of the operational amplifier U1 in the first detection module 12, that is, the anode of the first isolation diode D1. Since this node can also reflect the connection status of the solenoid valve 20 (higher level when open, lower level when normally connected or short-circuited), it can also be used as a signal acquisition point for the voltage divider network.
[0175] For example, the input of the voltage divider network can be connected to the node between the output of the high-voltage pulse drive unit 112 and the anode of the third isolation diode D3, or to other signal nodes associated with the state of the solenoid valve 20. As long as the selected signal node can stably acquire the voltage signal reflecting the open-circuit or short-circuit state of the solenoid valve 20, and meets the core level characteristics of "acquiring a high level when the solenoid valve 20 is open and acquiring a low level when the solenoid valve 20 is short-circuited", it can be used as the equivalent access position of the input of the voltage divider network.
[0176] In some embodiments, the controller 13 can complete all driving, detection, and signal capture functions through four GPIO ports. For example, the first GPIO port (GPIO1) serves as the second control terminal 133, electrically connected to the input terminal of the high-voltage pulse drive unit 112, and is used to control the output of the high-voltage drive pulse signal and the high-voltage detection pulse signal. The second GPIO port (GPIO2) serves as the first control terminal 132, electrically connected to the input terminal of the low-voltage pulse drive unit 111, and is used to control the output of the low-voltage detection pulse signal. The third GPIO port (GPIO3) serves as the first receiver terminal 131, electrically connected to the output terminal of the first detection module 12, and is configured as a timer capture pin to capture the high-level duration of the square wave electrical signal. The fourth GPIO port (GPIO4) serves as the second receiver terminal 134, electrically connected to the output terminal of the second detection module 14, and is configured as a level detection pin to receive level signals to determine open-circuit faults or short-circuit faults.
[0177] Through the functional allocation of the above four GPIO ports, the controller 13 achieves dual-channel control (low-voltage pulse output control and high-voltage pulse output control) of the pulse drive module 11, square wave signal acquisition of the first detection module 12, and level signal acquisition of the second detection module 14 with minimal pin resources. It completes the drive control and full-state (open, closed, open circuit, short circuit) detection of the solenoid valve 20. It has low hardware resource consumption and is suitable for the mass production requirements of low-cost and small-size household methane alarms.
[0178] In some embodiments, the GPIO port function allocation of the controller 13 can be replaced by other equivalent configuration methods, and is not limited to the specific allocation methods of the four GPIO ports (GPIO1 to GPIO4) described in the above embodiments, which correspond to high voltage pulse control, low voltage pulse control, square wave signal capture and level signal detection respectively.
[0179] For example, in the above embodiments, GPIO1, GPIO2, GPIO3, and GPIO4 correspond to the second control terminal 133, the first control terminal 132, the first receiving terminal 131, and the second receiving terminal 134, respectively. In alternative embodiments, the correspondence between the above functions and control ports can be arbitrarily reassigned. For example, GPIO1 can be configured as the first control terminal 132 to control the low-voltage pulse drive unit 111, GPIO2 can be configured as the second control terminal 133 to control the high-voltage pulse drive unit 112, and the functions of GPIO3 and GPIO4 can be interchanged. As long as the four GPIO ports of the controller 13 can still respectively implement the four core functions of high-voltage pulse signal output control, low-voltage pulse signal output control, square wave high-level time capture, and fault level detection, the adjustment of the GPIO port number is only a change in pin allocation and does not constitute a circumvention of this application.
[0180] For example, in some alternative embodiments, the number of GPIO ports used can be reduced through software time-sharing multiplexing. For instance, the same GPIO port can be used as both an output control terminal and an input detection terminal at different time periods, with function multiplexing achieved by switching the GPIO port's operating mode in software. Alternatively, different peripheral modules within the controller 13 (such as a timer capture module and an ADC module) can be mapped to the same GPIO port, achieving multi-functional multiplexing by switching peripheral functions.
[0181] For example, in alternative embodiments, the number of GPIO ports used can be adjusted. For instance, the four core functions can be implemented across a larger number of GPIO ports, such as using 5 or 6 GPIO ports. The high-voltage drive pulse signal output and the high-voltage detection pulse signal output can be controlled separately by assigning different GPIO ports, or the square wave signal capture and level signal detection functions can be further separated. Alternatively, the number of GPIO ports can be increased by adding peripheral chips (such as GPIO expansion chips). Conversely, the number of GPIO ports used can be reduced, for example, by using the time-division multiplexing technique described above to integrate the four core functions into 3 or even fewer GPIO ports.
[0182] Even if the numbering, function allocation, or number of GPIO ports are adjusted as described above, as long as the controller 13 can still achieve the four core functions of low-voltage pulse signal output, high-voltage dual-function pulse signal (high-voltage drive pulse signal and high-voltage detection pulse signal) output, square wave high-level time capture, and fault level detection, and does not deviate from the two core detection logics of this invention, namely, determining the open / closed state based on the difference in square wave high-level time and distinguishing between open-circuit faults and short-circuit faults based on the combination of "no square wave signal + high / low level", they are all equivalent alternatives to the GPIO port function allocation and fall within the protection scope of this application.
[0183] In some embodiments, the cathodes of the first isolation diode D1, the second isolation diode D2, and the third isolation diode D3 are connected together to the first terminal 211 of the interface 21 of the solenoid valve 20. The anode of the first isolation diode D1 is electrically connected to the input terminal of the first detection module 12 (operational amplifier U1) to realize unidirectional transmission of the detection signal of the first detection module 12; the anode of the second isolation diode D2 is electrically connected to the output terminal of the low-voltage pulse drive unit 111 to realize unidirectional transmission of the low-voltage detection pulse signal; the anode of the third isolation diode D3 is electrically connected to the output terminal of the high-voltage pulse drive unit 112 to realize unidirectional transmission of the high-voltage drive pulse signal and the high-voltage detection pulse signal. The three isolation diodes achieve electrical isolation and signal convergence of the three signals at the same node (first terminal 211). When one signal is working, the other two signals are not affected by the signal due to the reverse cutoff effect of the corresponding isolation diodes, thereby avoiding crosstalk between the three signals and ensuring the reliability of the drive signal and the accuracy of the detection signal.
[0184] In some embodiments, the low-voltage detection pulse signal output by the low-voltage pulse driving unit 111 can be replaced by other equivalent low-voltage pulse excitation forms, and is not limited to the 5V DC low-voltage pulse described in the above embodiments.
[0185] For example, a 5V DC low-voltage pulse can be replaced with a 3.3V DC low-voltage pulse. 3.3V is a common supply voltage and GPIO output level for many microcontrollers. Using a 3.3V low-voltage pulse allows direct use of the GPIO output voltage of controller 13, eliminating the need for additional boost or buck circuits and simplifying power management circuit design. Simultaneously, the 3.3V voltage is far lower than the rated drive voltage of solenoid valve 20 (12V), and the resulting electromagnetic force is insufficient to overcome the spring force and static friction of the valve core, thus ensuring that the valve core will not be driven to engage or disengage.
[0186] For example, the 5V DC low-voltage pulse can be replaced with a 6V DC low-voltage pulse. Although the 6V voltage is slightly higher than 5V, it is still far lower than the rated drive voltage of 12V for the solenoid valve 20. The resulting electromagnetic force is still insufficient to drive the valve core, ensuring the safety of the detection process. Appropriately increasing the voltage amplitude of the low-voltage pulse can enhance the strength of the feedback signal and improve the signal-to-noise ratio of the first detection module 12, making it suitable for applications with long connecting cables or complex electromagnetic environments.
[0187] For example, the DC low-voltage pulse can be replaced with a low-frequency, small-amplitude AC low-voltage pulse. The AC pulse signal can also excite the coil of the solenoid valve 20 to generate a feedback signal reflecting changes in inductance. Because the average power of the AC signal is lower, its driving capability on the valve core is weaker at the same peak voltage, reducing the risk of the valve core actuating. Simultaneously, using AC excitation can, to some extent, suppress the impact of DC bias and low-frequency drift on detection accuracy.
[0188] As long as the low-voltage pulse signal used is a non-driving pulse, that is, the voltage amplitude, pulse width, waveform and other parameters of the pulse are configured not to drive the valve core of the solenoid valve 20 to produce a closing or releasing action, and the pulse is only used to excite the coil of the solenoid valve 20 to detect the inductance characteristics of the coil, it can be used as an equivalent alternative to the above-mentioned 5V DC low-voltage pulse.
[0189] In some embodiments, the parameters of the high-voltage drive pulse signal output by the high-voltage pulse drive unit 112 can be arbitrarily adjusted, and are not limited to the 12V / 80ms pulse described in the above embodiments.
[0190] Specifically, the voltage of the high-voltage drive pulse signal can be adjusted according to the rated drive voltage requirement of the solenoid valve 20. For example, for a solenoid valve with a rated drive voltage of 9V, the voltage of the high-voltage drive pulse signal can be adjusted to 9V; for a solenoid valve with a rated drive voltage of 24V, the voltage can be adjusted to 24V; for solenoid valves with other rated drive voltage specifications, the voltage can be adjusted accordingly to the matching value. The duration of the high-voltage drive pulse signal can also be adjusted according to actual drive requirements. For example, for solenoid valves with a fast valve core closing speed, the duration can be shortened to 60ms or less; for solenoid valves with a slow valve core closing speed or a large mechanical load, the duration can be extended to 100ms, 120ms or longer to ensure that the valve core has enough time to complete the mechanical closing action.
[0191] Regardless of how the voltage and duration of the high-pressure drive pulse signal are adjusted, as long as it can stably drive the valve core of the solenoid valve 20 to engage, causing the valve core to move from the release position to the engagement position and be locked by the mechanical locking mechanism, thereby achieving reliable closure of the gas circuit, it is an equivalent alternative to the high-pressure drive pulse signal and falls within the protection scope of this application.
[0192] In some embodiments, the parameters of the high-voltage detection pulse signal output by the high-voltage pulse drive unit 112 can be arbitrarily adjusted, and are not limited to the 12V / 8μs pulse described in the above embodiments.
[0193] Specifically, the pulse width of the high-voltage detection pulse signal can be adjusted within the microsecond range. For example, the pulse width can be adjusted to 5μs, 10μs, 15μs, 20μs, or other microsecond values. The upper limit of the pulse width is determined by the valve core actuation time of the solenoid valve 20. As long as the pulse width is short enough that the current in the coil does not rise to the valve core's actuation current level, the valve core will not be driven to produce mechanical action. The voltage of the high-voltage detection pulse signal can also be adjusted, for example, to 9V, 24V, or other values. It can be the same as or different from the voltage of the high-voltage drive pulse signal.
[0194] Regardless of how the voltage and pulse width of the high-voltage detection pulse signal are adjusted, as long as the output high-voltage pulse signal is a non-driving stage short pulse, that is, its pulse width is too short to drive the valve core of the solenoid valve 20 to produce a closing or releasing action, and the pulse is only used to detect the coil inductance characteristics of the solenoid valve 20, it is an equivalent alternative to the high-voltage detection pulse signal and falls within the protection scope of this application.
[0195] In some embodiments, the controller 13 may use other equivalent signal detection methods to detect the high-level duration of the square wave electrical signal output by the first detection module 12, rather than being limited to the method of capturing the high-level duration by a timer as described in the above embodiments.
[0196] For example, controller 13 can acquire the high-level voltage duration of a square wave electrical signal via an analog-to-digital converter (ADC). Specifically, the ADC pin of controller 13 continuously samples the square wave electrical signal output by the first detection module 12, determines the high or low state of the signal level through a software algorithm, counts the number of sampling cycles during which the high level lasts, and then calculates the actual duration of the high level by combining this with the ADC's sampling frequency. This method utilizes the built-in ADC module of controller 13 to replace the timer capture function, making it suitable for application scenarios where timer resources are scarce but ADC resources are idle.
[0197] For example, a comparator can be added between the output of the first detection module 12 and the controller 13. After the comparator shapes the square wave signal into a standard digital level signal, the internal counter of the controller 13 or an external counting circuit counts the number of clock cycles during which the high level lasts, thereby calculating the duration of the high level. This method improves the steepness of the signal edge and the anti-interference capability through the external comparator, making it suitable for applications with harsh electromagnetic environments.
[0198] For example, the controller 13 can accurately measure the duration of the high level of the square wave signal through input capture function, dedicated peripheral for pulse width measurement, or programmable logic device.
[0199] As long as the signal detection method used can accurately identify the difference in the high-level duration of the square wave electrical signal output by the first detection module 12 and correlate this difference with the change in the coil inductance of the solenoid valve 20, that is, determine whether the solenoid valve 20 is in the open or closed state based on the length of the high-level duration, it can be used as an equivalent alternative to the above-mentioned timer capture method.
[0200] In some embodiments, the controller 13 may use other equivalent combination judgment methods to determine the combination of open circuit fault and short circuit fault of solenoid valve 20, instead of being limited to the combination judgment method of "first receiving end 131 not receiving square wave electrical signal + second receiving end 134 level state" described in the above embodiments.
[0201] For example, the combined judgment method can be replaced with "first receiver 131 not receiving a square wave signal + operational amplifier U1 input level status". In this alternative, in addition to determining whether a square wave signal is received through the first receiver 131, the controller 13 also acquires the level status of the operational amplifier U1 input (i.e., the anode of the first isolation diode D1) through an additional level detection pin. When the solenoid valve 20 is open, the anode of the first isolation diode D1 is at a high level; when the solenoid valve 20 is short-circuited, it is at a low level. The controller 13 determines an open circuit fault based on "no square wave signal received + operational amplifier U1 input is high level" and a short circuit fault based on "no square wave signal received + operational amplifier U1 input is low level".
[0202] For example, the combined judgment method can be replaced with "the first receiving end 131 did not receive a square wave electrical signal + the voltage divider branch midpoint level state". In this alternative, the controller 13 collects the level state of the voltage divider node between the first voltage divider resistor R12 and the second voltage divider resistor R13. This voltage divider node can be located inside the second detection module 14 or it can be an independently set voltage divider network. The level of the voltage divider node can also reflect the connection state of the solenoid valve 20: high level when open circuit and low level when short circuit.
[0203] For example, the controller 13 can collect the level status of other signal nodes associated with the interface 21 of the solenoid valve 20, such as the level at the first terminal 211, the level at the anode of the second isolation diode D2, and the level at the anode of the third isolation diode D3. As long as the level of the signal node can reflect whether the solenoid valve 20 is in an open circuit or a short circuit state, it can be combined with the condition of "no square wave electrical signal received" for judgment.
[0204] As long as the combined judgment logic of "no valid detection signal as a premise and high / low level difference as the basis for differentiation" is retained, regardless of which specific node in the circuit the level signal is collected from, the unique distinction between open circuit faults and short circuit faults can be achieved. These are all equivalent alternatives to the core fault detection principle of this invention and fall within the protection scope of this application.
[0205] Based on the above hardware structure, this embodiment of the invention also provides a control method for a state detection device. By executing a software algorithm through the controller 13, four core functions can be achieved: self-learning calibration, normal state detection, out-of-range closed-loop control, and state reporting. The execution logic, judgment rules, and action instructions for each step are as follows. All steps can be completed using the four GPIO ports (GPIO1 to GPIO4) of the controller 13, without requiring additional hardware resources.
[0206] Specifically, in some embodiments, self-learning calibration may include: After the user completes the connection between the solenoid valve 20 and the alarm, by triggering the self-learning calibration process (e.g., pressing the self-test button on the alarm), the controller 13 automatically executes the following self-learning calibration steps to adapt to the differences in coil inductance parameters of different models and batches of solenoid valves 20, and eliminate the influence of individual component differences on detection accuracy.
[0207] First, when the solenoid valve 20 is in the open state, the controller 13 controls the low-voltage pulse drive unit 111 to output a low-voltage detection pulse signal (e.g., a 5V low-voltage detection pulse) via GPIO2 (first control terminal 132). The low-voltage detection pulse signal is applied to both ends of the coil of the solenoid valve 20, and the coil responds to the pulse signal to generate a feedback signal reflecting the coil inductance in the open state. The first detection module 12 receives the feedback signal and converts it into a square wave electrical signal. The controller 13 captures the high-level duration of the square wave electrical signal via GPIO3 (first receiver terminal 131, configured as a timer capture pin) and records the value of the high-level duration as the reference time T_open for the open state of the solenoid valve 20.
[0208] Then, the controller 13 controls the high-voltage pulse drive unit 112 to output a high-voltage drive pulse signal (e.g., a 12V / 80ms valve closing drive pulse) via GPIO1 (second control terminal 133), driving the valve core of the solenoid valve 20 to close, completing the valve closing action. After the valve closing action is completed, the solenoid valve 20 is in the closed state. The controller 13 again controls the low-voltage pulse drive unit 111 to output a low-voltage detection pulse signal via GPIO2. The coil responds to this pulse signal to generate a feedback signal reflecting the coil inductance in the closed state. The first detection module 12 receives this feedback signal and converts it into a square wave electrical signal. The controller 13 captures the high-level duration of this square wave electrical signal via GPIO3 and records the value of this high-level duration as the reference time T_close for the closed state of the solenoid valve 20.
[0209] Then, controller 13 automatically establishes an interval judgment threshold that includes a preset error range, using T_open and T_close as reference values. In one example, the preset error range is ±20%, so the open state threshold interval is from T_open×0.8 to T_open×1.2, and the closed state threshold interval is from T_close×0.8 to T_close×1.2. The above-mentioned open state threshold interval is the first preset threshold interval, and the closed state threshold interval is the second preset threshold interval.
[0210] Because the coil inductance of solenoid valve 20 is large when it is open, the current rise rate of the feedback signal is slow, and the high-level duration of the square wave signal after conversion by the first detection module 12 is relatively long; when it is closed, the coil inductance is small, the current rise rate of the feedback signal is fast, and the high-level duration of the square wave signal is relatively short. Therefore, the value of T_open is greater than the value of T_close, and the time value corresponding to the first preset threshold interval is greater than the time value corresponding to the second preset threshold interval.
[0211] The aforementioned threshold range will serve as the basis for determining the opening and closing status of solenoid valve 20 during subsequent routine testing. After completing self-learning calibration, controller 13 enters the routine testing phase. Through this self-learning calibration process, the status detection device of this embodiment can automatically adapt to individual differences in coil inductance of different models and batches of solenoid valves, as well as changes in inductance parameters caused by factors such as installation location and connection wire length. It eliminates the need to pre-store fixed threshold parameters at the factory, thus improving the versatility and adaptability of the device.
[0212] In some embodiments, routine detection may include: When the methane detection module detects that the methane concentration is within the standard range, the controller 13 maintains a normal detection mode and performs full-state detection of the solenoid valve 20 at a first preset cycle (e.g., once every 10 seconds). The detection results can be uploaded in real time, and fault conditions will trigger an immediate alarm. The specific execution process may include: First, the controller 13 controls the low-voltage pulse drive unit 111 to output a low-voltage detection pulse signal (e.g., a 5V low-voltage detection pulse) via GPIO2 (first control terminal 132). At the same time, the controller 13 determines whether a valid square wave electrical signal can be captured via GPIO3 (first receiver terminal 131, configured as a timer capture pin).
[0213] If GPIO3 captures a valid square wave electrical signal, the controller 13 extracts the high-level duration of the square wave electrical signal and compares it with the first preset threshold interval (open state threshold interval) and the second preset threshold interval (closed state threshold interval) established during the self-learning calibration phase to determine the open / closed state of the solenoid valve 20.
[0214] The specific determination rule is as follows: if the duration of the high level falls within the first preset threshold range (open state threshold range, for example, T_open×0.8 to T_open×1.2), then the solenoid valve 20 is determined to be in the open state; if the duration of the high level falls within the second preset threshold range (closed state threshold range, for example, T_close×0.8 to T_close×1.2), then the solenoid valve 20 is determined to be in the closed state.
[0215] If GPIO3 fails to capture a valid square wave signal, it indicates that the solenoid valve 20 may have an open circuit or short circuit fault. At this time, the controller 13 reads the level status of GPIO4 (second receiver 134, configured as a level detection pin) and, combined with the premise that no square wave signal is received, determines the fault type of the solenoid valve 20.
[0216] The specific judgment rule is as follows: if GPIO4 detects a high-level signal, the solenoid valve 20 is determined to be in an open circuit state (not connected or the coil is disconnected); if GPIO4 detects a low-level signal, the solenoid valve 20 is determined to be in a short circuit state (the coil is short-circuited).
[0217] After each testing process is completed, the controller 13 can upload the current status information (open, closed, open circuit, or short circuit) of the solenoid valve 20 to the server via a 4G wireless communication module (or other wireless communication modules such as WiFi, NB-IoT, etc.) to achieve remote monitoring. If a short circuit fault is detected in the solenoid valve 20, the controller 13 can immediately trigger the buzzer and alarm light of the alarm device to issue an audible and visual alarm signal, reminding the user to repair the solenoid valve 20 in a timely manner.
[0218] In normal detection mode, controller 13 executes the above detection process at a first preset frequency (e.g., once every 10 seconds, corresponding to a first preset period of 10 seconds). This detection frequency is low, which can effectively reduce the standby power consumption of the device, while meeting the periodic monitoring requirements of the solenoid valve 20 status and adapting to the low power consumption operation requirements of household methane alarms.
[0219] In some embodiments, over-limit closed-loop control may include: When the methane detection module detects that the methane concentration reaches or exceeds the preset threshold, the controller 13 immediately exits the normal detection mode and enters the over-limit closed-loop control mode. This achieves closed-loop safety control of forced valve closure, high-frequency detection, and repeated valve closure, preventing the risk of continued gas leakage due to manual opening of the solenoid valve 20 or accidental valve core rebound. The specific execution process may include: First, controller 13 immediately triggers the audible and visual alarm module (including a buzzer and alarm light), issuing an audible and visual alarm signal indicating that the methane concentration has exceeded the standard, alerting the user to the risk of gas leakage. This audible and visual alarm signal will continue to be issued until the methane concentration drops below the safe threshold.
[0220] Simultaneously, the controller 13 controls the high-pressure pulse drive unit 112 to output a high-pressure drive pulse signal (e.g., a 12V / 80ms valve-closing drive pulse) via GPIO1 (second control terminal 133), driving the valve core of the solenoid valve 20 to engage, forcibly cutting off the gas path, and switching the solenoid valve 20 to the closed state. The voltage and pulse width of this high-pressure drive pulse signal are sufficient to enable the valve core to complete the mechanical engagement action.
[0221] After the valve closing action is completed, the controller 13 shortens the detection period of the solenoid valve 20 state from the first preset period (e.g., 10 seconds) in the normal detection mode to the second preset period (e.g., 100 milliseconds), entering the high-frequency detection mode. In the high-frequency detection mode, the controller 13 controls the high-voltage pulse drive unit 112 to output a high-voltage detection pulse signal (e.g., a short detection pulse of 12V / 8μs) every second preset period (100 milliseconds) via GPIO1. The voltage of this high-voltage detection pulse signal is the same as that of the high-voltage drive pulse signal (both are 12V), but its pulse width (8μs) is much shorter than that of the high-voltage drive pulse signal (80ms). Therefore, this pulse is only used to excite the coil of the solenoid valve 20 to detect the inductance characteristics, and its energy is insufficient to drive the valve core to produce mechanical action. The controller 13 captures the high-level duration of the response square wave electrical signal through the operational amplifier U1 and GPIO3 (first receiver 131) of the first detection module 12 to realize high-frequency detection of the closed state of the solenoid valve 20.
[0222] During high-frequency detection, if the controller 13 determines that the solenoid valve 20 is not in the closed state based on the high-level duration of the captured square wave electrical signal (i.e., the high-level duration falls within the first preset threshold range, indicating that the valve core has been released, and the solenoid valve 20 is either manually opened or in the open state due to accidental rebound), the controller 13 immediately controls the high-voltage pulse drive unit 112 to output a high-voltage drive pulse signal (12V / 80ms) again via GPIO1, forcibly driving the valve core of the solenoid valve 20 to re-close. This repeated valve-closing action continues to be executed, and the controller 13 continuously performs high-frequency detection at a second preset period (100 milliseconds). Once it detects that the solenoid valve 20 is not in the closed state, it immediately outputs a high-voltage drive pulse signal again until it detects that the solenoid valve 20 is in the closed state.
[0223] During periods when methane concentration exceeds the standard, controller 13 can continuously upload the methane exceeding the standard signal, the real-time status (open or closed) of solenoid valve 20, and the signal of each valve closing action to the server via the 4G wireless communication module, so as to realize remote real-time monitoring and facilitate relevant personnel to grasp the on-site situation in a timely manner and take corresponding measures.
[0224] Through the above-mentioned closed-loop control for exceeding the standard, this embodiment can forcibly close the valve when the methane concentration exceeds the standard, and continuously monitor the status of the solenoid valve 20 through high-frequency detection. Once it is found that the solenoid valve 20 is opened unexpectedly (whether by manual operation or accidental rebound caused by mechanical failure), the valve is immediately closed again, forming a closed-loop safety control of "detection, valve closure, re-detection, and re-closure", which fundamentally eliminates the safety hazard of the valve being accidentally opened when gas leaks.
[0225] In some embodiments, status reporting may include: The controller 13 collects four status information of the solenoid valve 20 in real time (open state, closed state, open circuit state, short circuit state), as well as the concentration data of the methane detection module, the alarm status of the audible and visual alarm module, and the valve closing action signal of the high-pressure pulse drive unit 112. The controller then uploads the above information to the server through the 4G wireless communication module (or other wireless communication modules, such as WiFi, NB-IoT, LoRa, etc.) according to the preset communication protocol to achieve remote real-time monitoring.
[0226] The frequency of status reporting is dynamically adjusted according to different operating modes. In normal detection mode, controller 13 uploads the status information of solenoid valve 20 and methane concentration data to the server at a first reporting frequency (e.g., once every 10 seconds, synchronized with the detection cycle of normal detection). When the methane concentration exceeds the limit, controller 13 increases the reporting frequency to a second reporting frequency (e.g., once every 100 milliseconds, synchronized with the high-frequency detection cycle in the over-limit closed-loop control mode), continuously uploading the methane over-limit signal, the real-time status of solenoid valve 20, and the valve closing action signal at a high frequency, ensuring that the remote monitoring terminal can grasp the on-site safety status in real time. When solenoid valve 20 malfunctions (open circuit or short circuit), controller 13 also uploads the fault information to the server at a frequency higher than the first reporting frequency (e.g., once every 100 milliseconds or immediately upon detecting a change in fault status), and simultaneously triggers a local audible and visual alarm.
[0227] Through the aforementioned status reporting mechanism, this embodiment can synchronize the full status information of the solenoid valve 20, methane concentration data, and alarm information to a remote server in real time, based on local detection and alarm. This allows users, property managers, or gas companies to understand the on-site situation in a timely manner through a remote platform, achieving dual safety protection of local alerts and remote monitoring.
[0228] In some embodiments, the time values of the detection cycle in the normal detection mode and the high-frequency detection cycle in the over-limit closed-loop control mode can be arbitrarily adjusted, and are not limited to the 10 seconds and 100 milliseconds described in the above embodiments.
[0229] Specifically, the routine detection cycle can be flexibly adjusted according to the low-power design requirements of the home methane alarm and the real-time monitoring needs of the solenoid valve status. For example, for battery-powered alarms with extremely strict power consumption requirements, the routine detection cycle can be extended to 15 seconds, 20 seconds, 30 seconds or longer to further reduce average power consumption and extend battery life; for scenarios that require more frequent monitoring of the solenoid valve status, the routine detection cycle can be shortened to 5 seconds, 3 seconds or less to improve the response speed to status changes.
[0230] The high-frequency detection cycle in the over-limit closed-loop control mode can also be adjusted according to safety level requirements and system response speed requirements. For example, for scenarios with extremely high safety requirements, the high-frequency detection cycle can be shortened to 50 milliseconds or less to monitor whether the solenoid valve remains closed in near real-time; for scenarios with relatively relaxed response speed requirements, the high-frequency detection cycle can be extended to 200 milliseconds, 500 milliseconds or longer to reduce the processing load and power consumption of the controller 13.
[0231] Regardless of how the period values for normal and high-frequency detection are adjusted, as long as the dual-cycle detection logic of "low-power inspection with a longer cycle under normal conditions and high-frequency detection with a shorter cycle after methane concentration exceeds the standard" is retained, that is, the normal detection cycle is longer than the high-frequency detection cycle, and the two form different detection frequency levels, they are both equivalent alternatives to the detection cycle and fall within the scope of protection of this application.
[0232] In some embodiments, the preset error range used to establish the first preset threshold interval and the second preset threshold interval in the self-learning calibration process can be arbitrarily adjusted, and is not limited to ±20% as described in the above embodiments.
[0233] Specifically, for applications where coil inductance is relatively consistent and parameter differences between solenoid valves in the same batch are small, the preset error range can be appropriately reduced. For example, the error range can be reduced to ±10% or ±15%. Reducing the error range makes the threshold interval more compact, improving the accuracy and sensitivity of state determination and reducing potential state misjudgments caused by an excessively wide threshold interval.
[0234] For applications where there are significant differences in coil inductance or where the operating environment temperature varies widely, leading to substantial inductance parameter drift, the preset error range can be appropriately expanded. For example, the error range can be increased to ±25% or ±30%. Expanding the error range provides greater tolerance, adapting to parameter fluctuations caused by individual differences in solenoid valves and environmental changes, ensuring the robustness and reliability of state determination, and preventing normal state fluctuations from being misjudged as faults or state changes due to an excessively narrow threshold range.
[0235] Regardless of how the preset error range is adjusted, as long as it can effectively eliminate the individual differences in coil inductance of different models and batches of solenoid valves 20, as well as the impact of changes in inductance parameters caused by factors such as installation position, connection wire length, and ambient temperature on detection accuracy, and ensure the accuracy and reliability of determining the open and closed states of solenoid valves 20, it is an equivalent alternative to the self-learning calibration error threshold and falls within the protection scope of this application.
[0236] In some embodiments, the self-learning calibration process can be initiated by other equivalent triggering methods, and is not limited to the button-activated method of pressing the self-test button as described in the above embodiments.
[0237] For example, the self-learning calibration process can be automatically initiated upon power-up of the alarm. When the alarm is powered on for the first time or each time it is powered on, the controller 13 automatically detects whether the solenoid valve 20 is connected. If the solenoid valve 20 is detected as connected, the self-learning calibration process is automatically executed, recording the square wave high-level reference time corresponding to the open and closed states of the solenoid valve 20, and establishing corresponding threshold judgment intervals. This method eliminates the need for manual operation by the user, simplifying the user process and enhancing the product's intelligence.
[0238] For example, the self-learning calibration process can be initiated by a remote command. Users send calibration commands to the alarm via a mobile app, cloud management platform, or other remote control terminal. After receiving the remote command via a 4G wireless communication module or other wireless communication module, the alarm controller 13 triggers the self-learning calibration process. This method is suitable for scenarios such as property management and centralized maintenance by gas companies, facilitating remote management and batch operations.
[0239] For example, the self-learning calibration process can be initiated when the alarm is first connected to the network. After the alarm is first connected to the wireless network (such as 4G, WiFi, NB-IoT, etc.) and the network configuration is completed, the controller 13 automatically triggers the self-learning calibration process to ensure that the solenoid valve parameters are calibrated before the alarm is officially put into use.
[0240] For example, the self-learning calibration process can be initiated by timed automatic calibration. The controller 13 is internally set with a timer that automatically triggers the self-learning calibration process at preset time intervals (e.g., every 24 hours, every week, or every month) to periodically update the threshold judgment range and eliminate the impact of inductance parameter drift caused by factors such as solenoid valve aging and changes in ambient temperature on detection accuracy.
[0241] Regardless of the startup method used in the self-learning calibration process, as long as the square wave high-level reference time (i.e., T_open and T_close) corresponding to the open and closed states of the solenoid valve 20 can be automatically recorded, and the corresponding first preset threshold interval and second preset threshold interval can be established based on the above reference time for the determination of the open and closed states of the solenoid valve 20 in subsequent normal testing, it is an equivalent alternative to the self-learning calibration startup method and falls within the protection scope of this application.
[0242] In some embodiments, high-frequency detection can be initiated after a delay of any duration following the valve closing pulse. In this alternative process, the controller 13 first outputs a high-voltage drive pulse signal via GPIO1 to force the valve to close, and then waits for a preset delay time (e.g., 50 milliseconds, 200 milliseconds, or 500 milliseconds) until the mechanical movement of the solenoid valve 20's spool is completely stable and the current in the coil has completely decayed before initiating high-frequency detection. This delayed initiation method can avoid the impact of electromagnetic interference and mechanical vibration generated during valve closing on the accuracy of state detection, improving the accuracy of the initial state detection. The timing of high-frequency detection initiation can be adaptively adjusted according to the specifications of the solenoid valve 20. For solenoid valves with a fast spool closing speed, high-frequency detection can be initiated immediately after the valve closing pulse; for solenoid valves with a slow spool closing speed, a longer delay can be set before initiating high-frequency detection.
[0243] Regardless of how the specific timing is adjusted in the over-limit closed-loop control process, as long as the closed-loop control logic of "forced valve closure (outputting a high-pressure drive pulse signal to switch the solenoid valve to the closed state), high-frequency detection (continuously detecting whether the solenoid valve remains closed with a short cycle), and re-transmitting the valve closure pulse if not closed (outputting a high-pressure drive pulse signal again to force valve closure when the solenoid valve is detected to be not closed)" is retained, it is an equivalent alternative to the over-limit closed-loop control process and falls within the protection scope of this application.
[0244] In some embodiments, the fault judgment execution process in normal detection and over-limit closed-loop control can be replaced by other equivalent processes, and is not limited to the instant judgment method described in the above embodiments, which is "reading the level status and determining the fault type immediately when no square wave signal is received".
[0245] For example, a debouncing confirmation mechanism can be introduced into the fault diagnosis process. In this alternative process, when the controller 13 detects for the first time that no square wave signal is received, it does not immediately read the level status and determine the fault type, but instead executes a repeated detection process. The controller 13 outputs detection pulse signals (low-voltage detection pulse signals or high-voltage detection pulse signals) multiple times (e.g., 3 times, 5 times or more) and determines whether no square wave signal is received each time. Only when no square wave signal is received after multiple consecutive detections does the controller 13 read the level status of the second receiver 134 and determine whether the solenoid valve 20 is in an open-circuit or short-circuit state based on the level.
[0246] If a valid square wave signal is captured during a repetitive detection process, it indicates that the previous "no square wave signal" was caused by transient interference, poor contact, or signal fluctuations, and was not a true fault condition. Controller 13 then cancels the fault determination process and continues to execute the normal open / close state determination. This repetitive detection anti-jitter logic effectively filters out false judgments caused by transient factors such as electromagnetic interference and connector micro-movements, improving the accuracy and reliability of fault determination.
[0247] For example, a fault determination delay step can be added to the fault determination process. In this alternative process, when the controller 13 first detects that no square wave signal is received, it starts a fault confirmation timer and sets a preset confirmation time window (e.g., 50 milliseconds, 100 milliseconds, or 500 milliseconds). Within this confirmation time window, the controller 13 continuously or repeatedly checks whether a square wave signal can be received. If no square wave signal is received within the entire confirmation time window, a fault confirmation is made, and the controller 13 then reads the level state of the second receiver 134 to distinguish between open-circuit faults and short-circuit faults. If a valid square wave signal is captured at any time within the confirmation time window, the fault determination process is canceled.
[0248] For example, when the controller 13 first detects that no square wave signal has been received, it can first read and temporarily store the level state of the second receiver 134, but does not immediately determine the fault. Instead, it first performs a repeated detection or delayed confirmation process. After confirming the fault, it then distinguishes the fault type based on the temporarily stored level state or the reread level state. The timing of reading the level state can be flexibly adjusted; it can be done before, after, or during fault confirmation.
[0249] Regardless of how the specific timing, number of detections, and delay parameters in the fault diagnosis execution process are adjusted, as long as the core logic of "taking the absence of a valid square wave signal as a prerequisite and the difference between high and low levels as the distinguishing criterion" is retained, that is, the determination of open circuit faults and short circuit faults is based on the combination of the two conditions of "no square wave signal" and "high and low level", it is an equivalent alternative to the fault diagnosis execution process and falls within the protection scope of this application.
[0250] In some embodiments, the status reporting and alarm process can be replaced by other equivalent methods, and is not limited to the specific implementation of "local audible and visual alarm and status upload via 4G wireless communication module" described in the above embodiments.
[0251] For example, in the above embodiment, the local audible and visual alarm is triggered when a short-circuit fault is detected in the solenoid valve 20. In alternative embodiments, the alarm triggering conditions and alarm methods can be arbitrarily adjusted. For example, the alarm triggering conditions can be extended to trigger an alarm for both open-circuit and short-circuit faults, meaning that as long as the solenoid valve 20 is detected to be in any fault state, the controller 13 will trigger the buzzer and alarm light of the alarm device to emit audible and visual alarm signals. Alternatively, a tiered alarm strategy can be adopted: when an open-circuit fault is detected in the solenoid valve 20, a first-level alarm is triggered (e.g., the alarm light flashes and the buzzer sounds intermittently); when a short-circuit fault is detected in the solenoid valve 20, a second-level alarm is triggered (e.g., the alarm light stays on and the buzzer sounds continuously). Different alarm modes distinguish different fault types, making it easier for users to quickly identify the cause of the fault. Furthermore, the alarm form can include audible alarms, visual alarms, vibration alarms, text display alarms, or any combination thereof, as long as it effectively alerts the user to the solenoid valve fault.
[0252] For example, in the above embodiment, the example of uploading status information to the server via a 4G wireless communication module was used. In alternative embodiments, the wireless communication module can employ other types of communication technologies. For instance, a WiFi module can be used to upload status information to the server via a home wireless network; a LoRa module can be used to upload status information to a gateway or base station via a low-power wide-area network; an NB-IoT module can be used to upload status information to a cloud platform via cellular IoT; or a Bluetooth module can be used to transmit status information to the user's smartphone or other Bluetooth terminals via Bluetooth connection. Furthermore, wired transmission methods can also be used, such as uploading status information to a host computer or monitoring center via wired communication interfaces like RS-485 bus, CAN bus, or Ethernet.
[0253] For example, in the above embodiment, the reporting frequency was described as once every 10 seconds under normal conditions, and once every 100 milliseconds under methane exceeding the limit and fault conditions. In alternative embodiments, the reporting frequency can be adjusted arbitrarily according to actual needs. For example, the normal reporting frequency can be adjusted to once every 30 seconds, once every minute, or once every 5 minutes to reduce the power consumption and data traffic consumption of the communication module; the fault reporting frequency can be adjusted to once every 200 milliseconds, once every 500 milliseconds, or once every second; an event-triggered reporting method can also be adopted, that is, a report is only triggered when the state of solenoid valve 20 changes or a fault is detected, and no report is made under normal conditions.
[0254] Regardless of how the alarm form, reporting method, and reporting frequency are adjusted, as long as the core detection logic of this invention is not changed, namely, determining the opening and closing status of the solenoid valve based on the time difference of the square wave high level, and distinguishing between open circuit faults and short circuit faults based on the combination of "no square wave signal + high and low level", they are all equivalent alternatives to the status reporting and alarm process and fall within the protection scope of this application.
[0255] In some embodiments, a single valve-closing pulse can be adjusted to multiple consecutive valve-closing pulses. In this alternative, when the methane concentration reaches an excessive threshold, the controller 13 controls the high-voltage pulse drive unit 112 to continuously output multiple high-voltage drive pulse signals via GPIO1, for example, continuously outputting two, three, or more 12V / 80ms valve-closing drive pulses, with an appropriate interval between adjacent pulses. By performing multiple consecutive valve closures, the reliability of the valve-closing action can be improved, avoiding valve-closing failures caused by insufficient single-pulse drive energy, obstructed valve core movement, or incomplete engagement of the mechanical locking mechanism.
[0256] In some embodiments, a tiered output of valve-closing pulses of varying durations can be employed. In this alternative, when the controller 13 first detects that the solenoid valve 20 is not closed and needs to be closed again, the output high-pressure drive pulse signal has a first duration (e.g., 80ms). If the solenoid valve 20 is again detected not to be closed, subsequent output high-pressure drive pulse signals have a second duration (e.g., 120ms) longer than the first duration. If the valve still fails to close successfully, the pulse duration can be further increased to a third duration (e.g., 160ms or 200ms). This tiered, incremental valve-closing pulse duration strategy can gradually enhance the electromagnetic driving force and improve the success rate of forced valve closure in the face of challenging scenarios such as continuous manual pulling of the reset lever or valve core jamming. Simultaneously, a preset maximum pulse duration (e.g., 200ms) is provided to prevent the coil from overheating and being damaged due to prolonged energization.
[0257] In some embodiments, the two methods described above can be combined, that is, after exceeding the limit, multiple valve-closing pulses are output continuously. If the solenoid valve 20 is subsequently detected not to remain closed, valve-closing pulses with progressively increasing durations are used to repeatedly close the valve.
[0258] Regardless of how the number of pulse outputs, pulse duration, and grading strategy in the valve closing action execution logic are adjusted, as long as the core safety logic of "forced valve closing when methane concentration exceeds the standard (outputting a high-pressure drive pulse signal to switch the solenoid valve to the closed state) and repeated valve closing when the solenoid valve is detected to be abnormally open (outputting a high-pressure drive pulse signal again)" is retained, it is an equivalent alternative to the valve closing action execution logic and falls within the protection scope of this application.
[0259] It is understood that the scope of patent protection for this invention is not limited to the specific hardware structure, parameter values, component models, or the number and allocation of GPIO ports described in the above embodiments, but rather uses the two core detection principles as the core protection boundary. This invention protects the technical solution for solenoid valve status detection, rather than limiting the specific hardware implementation.
[0260] Any technical solution that simultaneously meets the following two core conditions falls within the protection scope of this invention, regardless of its hardware form, parameter configuration, process details, pin usage, etc.: The first core condition (opening / closing state detection logic): adopts the opening / closing detection logic of "non-drive stage pulse excitation of solenoid valve coil, conversion of coil inductance difference into square wave high level duration difference through operational amplifier, and determination of the actual mechanical opening / closing state of solenoid valve based on square wave high level duration difference".
[0261] The second core condition (fault determination logic): adopts the fault determination logic of "taking the failure to receive a valid square wave detection signal as a premise, combining judgments based on the difference in the level of the detection terminal, and accurately distinguishing between open circuit faults (not connected or coil disconnected) and coil short circuit faults of solenoid valves".
[0262] In short, as long as the opening and closing status of the solenoid valve is accurately detected by detecting the high level time of the square wave after the non-driving stage pulse excitation, and the solenoid valve open circuit fault and short circuit fault are distinguished by the combination of "no square wave signal + high and low level of the detection terminal", no matter what fine-tuning or local modification is made to the selection of peripheral components, parameter value settings, control process details, hardware configuration scheme, etc., it all falls within the protection scope of this invention.
[0263] Regarding the two core detection principles of this invention, the following minor adjustments that do not alter the core detection logic are considered minor modifications that circumvent the protection scope of this invention and are still subject to this patent: The only changes are to the model, package, power rating, or material of the components, without altering the core hardware structure, signal transmission path, or the two core detection logics. For example, replacing the 1N4007 rectifier diode with a 1N4004 or Schottky diode, replacing the through-hole package with a surface-mount package, and replacing the transistor in the low-voltage pulse drive unit 111 with a transistor of the same type but a different model.
[0264] Only the pulse parameters, detection period, or error threshold are fine-tuned without altering the functional attributes of each parameter. For example, the voltage of the low-pressure detection pulse signal can be adjusted from 5V to 3.3V or 6V, the normal detection period from 10 seconds to 15 seconds or 30 seconds, and the preset error range of the self-learning calibration from ±20% to ±15% or ±25%. As long as the low-pressure detection pulse signal remains a non-driving pulse, the normal detection period remains longer than the excessively high-frequency detection period, and the error threshold can effectively eliminate individual differences in the solenoid valves, this is acceptable.
[0265] The core detection logic and implementation of the core functions of the present invention are not changed, only the GPIO port numbers and function assignments of the controller 13 are adjusted, or the number of GPIO ports used is increased or decreased. For example, the functions of GPIO1 and GPIO2 are interchanged, the four core functions are integrated into three GPIO ports through time-division multiplexing, or the functions are split into five GPIO ports for separate control.
[0266] Only the position of the local hardware structure was adjusted, without changing the core detection signal acquisition, conversion, and judgment logic. For example, the input terminal of the voltage divider network in the second detection module 14 was moved from the anode of the second isolation diode D2 to the first terminal 211; the Zener diode in the input protection circuit of the operational amplifier U1 was replaced with a TVS transient suppression diode and its layout on the circuit board was adjusted; and the cathode junction of the three isolation diodes D1, D2, and D3 was moved from the first terminal 211 to other equivalent junction nodes.
[0267] Only auxiliary circuits such as filtering, anti-static, lightning protection, and anti-interference are added, without any changes to the core detection and control logic of the present invention. For example, an anti-static diode is added to ground at the first terminal 211, a filter capacitor or ferrite bead is added to the power supply circuit, and a lightning protection device is added to the communication interface.
[0268] The changes only adjusted the start-up method, alarm format, data reporting method, or reporting frequency of the control flow, without altering the on / off judgment logic of "low-voltage pulse excitation + operational amplifier detection of high-level time" or the fault judgment logic of "no square wave signal + high / low level combination." For example, the start-up method for self-learning calibration was changed from button start to automatic start upon power-on; the alarm format was expanded from short-circuit fault alarm only to alarm for both open-circuit and short-circuit faults; and the wireless communication method was replaced from 4G to WiFi or NB-IoT, etc.
[0269] Only peripheral functional components such as wireless communication modules, audible and visual alarm devices, and power supply modules were replaced, without affecting the core circuitry and logic of the solenoid valve status detection. For example, the 4G communication module was replaced with a WiFi module, the buzzer was replaced with a voice broadcast module, and the linear regulated power supply was replaced with a switching regulated power supply.
[0270] It should be noted that the core components selected above (including transistors, MOSFETs, general-purpose diodes such as 1N4007 / 1N4148, general-purpose operational amplifiers such as LM358, and resistors and capacitors) are all common mass-produced components in the electronics field. There are no dedicated or customized components, resulting in low procurement costs, stable supply, and full compatibility with the mass production requirements of home methane alarms. The hardware circuit layout is compact and can be directly integrated into the main control board of the home alarm without increasing the hardware size.
[0271] The aforementioned hardware circuits have been successfully soldered and debugged, and the software algorithm has been programmed and run on the controller, undergoing multiple full-function tests. Test results show that this technology can reliably and accurately detect the four states of the solenoid valve: open, closed, open circuit, and short circuit. When methane concentration exceeds the standard, it can reliably complete closed-loop control of forced valve closure, high-frequency detection, and repeated valve closure. All functions meet design requirements, and there are no issues such as detection failure or untimely valve closure. The technical solution demonstrates completeness, feasibility, and mass production feasibility.
[0272] In summary, the present invention provides the following technical solutions: Based on the physical characteristics of a solenoid valve, the coil inductance is small when the valve core is engaged and large when it is released. By combining a non-drive stage detection pulse with an operational amplifier, the change in coil inductance is converted into the difference in the duration of the high level of a square wave electrical signal. This enables non-contact and accurate detection of the actual mechanical opening and closing state of the solenoid valve without the need for additional valve position feedback sensors, Hall sensors, reed switches, and feedback wiring.
[0273] The design incorporates a high-voltage pulse drive unit composed of switching transistors (such as a combination of MOSFETs and transistors), which can switch between outputting a high-voltage drive pulse signal (used to drive the valve core to close the valve) and a high-voltage detection pulse signal (used to detect inductance characteristics without driving the valve core). This achieves dual functions of valve closing drive and high-frequency status detection on the same control port.
[0274] Multiple isolation diodes (D1, D2, D3) are used to achieve electrical isolation and convergence of multiple signals, including the low-voltage detection pulse signal path, the high-voltage drive / detection pulse signal path, and the operational amplifier detection signal path, to avoid crosstalk between signals and ensure the reliability of the drive signal and the accuracy of the detection signal.
[0275] The design incorporates a voltage divider fault detection branch (second detection module), which combines the judgment logic of "no square wave electrical signal received + high or low level signal" to accurately distinguish between solenoid valve open circuit faults (not connected or coil disconnected) and coil short circuit faults. This solves the technical problem that traditional detection schemes cannot distinguish between similar no-signal faults.
[0276] All driving, detection, and signal capture functions are completed through only four GPIO ports of the controller, which are used for high voltage pulse output control, low voltage pulse output control, square wave high level time capture, and fault level detection, respectively, which greatly reduces the controller pin resource occupation and is compatible with low-cost hardware solutions.
[0277] The design incorporates a self-learning calibration process that automatically records the square wave high-level reference time for different models and batches of solenoid valves in both open and closed states. Based on this reference time and a preset error range, a corresponding threshold judgment interval is established to eliminate the impact of individual component differences on detection accuracy and improve the versatility and adaptability of the solution.
[0278] When methane concentration exceeds the standard, a closed-loop control logic is constructed: first, a high-pressure drive pulse signal is output to force the valve to close; then, the detection cycle is shortened from the normal second-level cycle to the hundred-millisecond-level cycle; high-frequency detection is performed through the high-pressure detection pulse signal; if the solenoid valve is not kept closed, the high-pressure drive pulse signal is immediately output again to force the valve to close, and high-frequency detection continues until the solenoid valve is kept closed, thus realizing closed-loop safety control of forced valve closure and continuous monitoring.
[0279] An overvoltage protection circuit consisting of a series current-limiting resistor (first resistor R1) and a reverse Zener diode to ground (first diode D01) is set in the operational amplifier detection branch (first detection module) to prevent excessively high input signals from damaging the operational amplifier and to improve the stability and durability of the hardware circuit.
[0280] The design employs a dual-cycle control method for normal operation and out-of-range detection: under normal conditions, low-power inspection is performed using a low-pressure detection pulse signal with a longer cycle (e.g., 10 seconds); when the methane concentration exceeds the limit, it immediately switches to a higher-frequency detection with a shorter cycle (e.g., 100 milliseconds), balancing low-power operation of the equipment with high-reliability monitoring in out-of-range scenarios.
[0281] Achieve linkage between local alarm and remote reporting of fault status: When a solenoid valve fault (such as a short circuit fault) is detected, a local audible and visual alarm is immediately triggered. At the same time, all solenoid valve status information (open, closed, open circuit, short circuit) and methane concentration data and alarm information are uploaded to the server through the wireless communication module, achieving dual protection of local reminders and remote monitoring.
[0282] Compared with related technologies, the technical solution provided by the embodiments of the present invention has the following beneficial effects: Lower hardware costs and no reliance on dedicated chips: No need for industrial-grade inductor detection chips or complex AC excitation circuits. The core components are only general-purpose resistors, capacitors, diodes, operational amplifiers, and conventional transistors and MOSFETs. These are all mass-produced components commonly used in the home electronics field, resulting in low procurement costs and making it a perfect fit for the economical product positioning of home methane alarms.
[0283] The circuit structure is extremely simple and the controller consumes few resources: the isolation and aggregation of multiple signals are achieved through isolation diodes, without the need for additional feedback wiring and expansion interfaces; all driving, detection and signal acquisition functions are completed using only the controller's four GPIO ports, without occupying additional resources such as ADC and DAC, which is suitable for the low-cost and small-size hardware design requirements of home alarms.
[0284] Accurate detection and differentiation of similar faults: Based on the detection method that converts inductance difference into square wave high-level time difference, it can accurately identify the actual mechanical opening and closing position of the solenoid valve, avoiding the misjudgment of "energized but not engaged" by traditional current detection schemes; at the same time, through the combination judgment of "no square wave signal + high and low level", it can accurately distinguish between two types of no-signal faults that traditional schemes cannot identify, namely open circuit faults and short circuit faults, resulting in more accurate detection results and no missed detections.
[0285] A single port enables dual functions, resulting in a more efficient design: The high-voltage pulse drive unit can switch between outputting high-voltage drive pulse signals and high-voltage detection pulse signals on the same control port, achieving dual functions of valve closing drive and high-frequency status detection. The detection pulse is only used to detect inductance characteristics and does not drive the valve core to move, avoiding interference from the detection signal with the normal state of the solenoid valve. The hardware design is more compact and the functionality is more reusable.
[0286] Self-learning calibration has strong adaptability and no batch limitations: Through the self-learning calibration process, it can automatically record the opening and closing reference parameters of different models and batches of solenoid valves and establish error threshold ranges, eliminating the influence of individual differences in solenoid valve coil inductance on detection accuracy. There is no need to adjust hardware or software parameters for different solenoid valves. It is compatible with mainstream household gas normally open and electrically closed solenoid valves on the market, and has strong versatility.
[0287] Closed-loop control for exceeding safety limits: When methane concentration exceeds the limit, a closed-loop control logic of "forced valve closure + high-frequency detection + repeated valve closure" is constructed. First, a drive pulse is output to force the valve to close. Then, high-frequency detection is performed at a cycle of hundreds of milliseconds. If the solenoid valve is not closed, the valve closure pulse is immediately resent until the valve remains closed. This completely avoids the risk of gas leakage caused by manual valve opening, valve core rebound, etc. Compared with the traditional "single valve closure without monitoring" solution, the safety protection is more in line with the core needs of home scenarios.
[0288] The dual detection cycle design balances power consumption and reliability: Under normal conditions, low-power inspection is performed using low-voltage detection pulses at a second-level cycle to reduce standby power consumption; if methane exceeds the standard, it immediately switches to high-frequency detection at a hundred-millisecond cycle to ensure rapid identification and timely handling of fault conditions, achieving a balance between low power consumption and high reliability.
[0289] With robust hardware protection, the system operates more stably: an overvoltage protection circuit is installed in the operational amplifier detection branch to prevent damage to core components from excessively high input signals; multiple signals are electrically isolated through isolation diodes to eliminate signal crosstalk, improve the stability and durability of the hardware circuit during long-term use, and adapt to the complex electrical environment of a household.
[0290] The linkage between fault alarms and remote monitoring enhances practicality: when a solenoid valve malfunction is detected, a local audible and visual alarm is immediately triggered to promptly remind the user to perform maintenance; at the same time, all solenoid valve status, methane concentration, and alarm information are uploaded to the server via a wireless module, achieving dual protection of local alerts and remote monitoring, which better meets the actual monitoring needs of household gas safety.
[0291] No additional installation or debugging required, making operation more convenient: The overall solution is an integrated design, and the solenoid valve can be used simply by plugging it in. Users only need to trigger the self-learning calibration (such as by pressing the self-test button). There is no need to install additional sensors or debug wiring. The operation threshold is low, which is suitable for the convenient use needs of home products.
[0292] Compared with other existing technologies (such as power-on / off schemes without detection, Hall / reed switch detection schemes, and simple current detection schemes), this invention has the core advantages of accurate detection, low cost, simple structure, and safe closed loop. It completely solves the safety hazards and usage limitations caused by the single-function design of traditional schemes. It is a household methane alarm solenoid valve status detection and control scheme that takes into account practicality, economy and safety.
[0293] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0294] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A state detection device for a solenoid valve, characterized in that, include: A pulse drive module is electrically connected to the interface of the solenoid valve and is used to output a detection pulse signal to the solenoid valve so that the coil of the solenoid valve responds to the detection pulse signal to generate a feedback signal reflecting the inductance of the coil. A first detection module, electrically connected to the interface of the solenoid valve, is used to receive the feedback signal and convert the feedback signal into a square wave electrical signal. The high-level duration of the square wave electrical signal is related to the inductance of the coil. The controller, wherein the first receiving end of the controller is electrically connected to the first detection module; The controller is used to receive the square wave electrical signal, and when the high level duration of the square wave electrical signal is within a first preset threshold range, it determines that the solenoid valve is in an open state; when the high level duration of the square wave electrical signal is within a second preset threshold range, it determines that the solenoid valve is in a closed state. Wherein, the time value corresponding to the first preset threshold interval is greater than the time value corresponding to the second preset threshold interval.
2. The state detection device according to claim 1, characterized in that, The first detection module includes a first isolation diode and an operational amplifier; The cathode of the first isolation diode is electrically connected to the interface of the solenoid valve, and the anode of the first isolation diode is electrically connected to the input terminal of the operational amplifier. The output terminal of the operational amplifier is electrically connected to the first receiving terminal of the controller.
3. The state detection device according to claim 1, characterized in that, The pulse drive module includes a low-voltage pulse drive unit and a high-voltage pulse drive unit; The detection pulse signal includes a low-voltage detection pulse signal and a high-voltage detection pulse signal; The input terminal of the low-voltage pulse drive unit is electrically connected to the first control terminal of the controller, and the output terminal of the low-voltage pulse drive unit is electrically connected to the interface of the solenoid valve, for outputting the low-voltage detection pulse signal to the solenoid valve under the control of the first control terminal; The input terminal of the high-voltage pulse drive unit is electrically connected to the second control terminal of the controller, and the output terminal of the high-voltage pulse drive unit is electrically connected to the interface of the solenoid valve, for outputting the high-voltage detection pulse signal or the high-voltage drive pulse signal to the solenoid valve under the control of the second control terminal; The high-voltage drive pulse signal is used to drive the solenoid valve to the closed state. The pulse width of the high-voltage detection pulse signal is shorter than that of the high-voltage drive pulse signal, and the voltage of the low-voltage detection pulse signal is lower than that of the high-voltage detection pulse signal.
4. The state detection device according to claim 3, characterized in that, The low-voltage pulse driving unit includes a first switching transistor and a second switching transistor; The control terminal of the first switch is electrically connected to the first control terminal of the controller, the first pole of the first switch is grounded, and the second pole of the first switch is electrically connected to the control terminal of the second switch. The first terminal of the second switching transistor is electrically connected to the low-voltage power supply, and the second terminal of the second switching transistor serves as the output terminal of the low-voltage pulse drive unit.
5. The state detection device according to claim 3, characterized in that, The high-voltage pulse drive unit includes a third switching transistor and a fourth switching transistor; The control terminal of the third switch is electrically connected to the second control terminal of the controller, the first terminal of the third switch is grounded, and the second terminal of the third switch is electrically connected to the control terminal of the fourth switch. The first terminal of the fourth switching transistor is electrically connected to the high-voltage power supply, and the second terminal of the fourth switching transistor serves as the output terminal of the high-voltage pulse drive unit.
6. The state detection device according to claim 3, characterized in that, The status detection device further includes a second isolation diode, the anode of which is electrically connected to the output terminal of the low-voltage pulse drive unit, and the cathode of which is electrically connected to the interface of the solenoid valve. And / or, The status detection device further includes a third isolation diode, the anode of which is electrically connected to the output terminal of the high-voltage pulse drive unit, and the cathode of which is electrically connected to the interface of the solenoid valve.
7. The state detection device according to claim 1, characterized in that, It also includes a second detection module; The input terminal of the second detection module is electrically connected to the interface of the solenoid valve, and is used to collect the voltage at the interface of the solenoid valve and output the corresponding level signal; The second receiving end of the controller is electrically connected to the output end of the second detection module, and is used to receive the level signal, and when the square wave electrical signal is not received, to determine whether the solenoid valve is in an open circuit state or a short circuit state based on the level signal. Specifically, when the level signal is a high level signal, the solenoid valve is determined to be in an open circuit state; when the level signal is a low level signal, the solenoid valve is determined to be in a short circuit state.
8. The state detection device according to claim 7, characterized in that, The second detection module includes a first voltage divider resistor and a second voltage divider resistor; The first end of the first voltage divider resistor serves as the input terminal of the second detection module; The second end of the first voltage divider resistor is electrically connected to the first end of the second voltage divider resistor, and serves as the output terminal of the second detection module; The second terminal of the second voltage divider resistor is grounded.
9. The state detection device according to claim 7, characterized in that, The second detection module includes a first voltage divider resistor, a second voltage divider resistor, and a second diode; The first end of the first voltage divider resistor serves as the input terminal of the second detection module; The second end of the first voltage divider resistor is electrically connected to the first end of the second voltage divider resistor and the anode of the second diode, respectively; The second terminal of the second voltage divider resistor is grounded; The cathode of the second diode serves as the output terminal of the second detection module.
10. The state detection device according to claim 8, characterized in that, The status detection device further includes a fourth isolation diode, the anode of which is electrically connected to the input terminal of the second detection module, and the cathode of which is electrically connected to the interface of the solenoid valve.