Water meter valve control device, method, electronic device and storage medium
Through a simplified valve in-place detection circuit, combined with current changes and mechanical contact detection, the reliability problem of water meter valve in-place detection is solved, and simple and reliable valve control is achieved.
Patent Information
- Application Number
- CN202310145329.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-31
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2043-01-31
AI Technical Summary
In the prior art, the water meter valve in-place detection circuit has a complex structure, poor reliability, easy to operate erroneously, and current change detection is easily disturbed and leads to misjudgment.
The simplified valve in-place detection circuit is adopted, and the valve chip unit and sampling circuit are used to detect the valve in-place through current changes, and the dual detection is carried out in combination with mechanical contacts, simplifying the circuit structure and improving reliability.
The circuit connection of valve in-place detection is simple, the detection is sensitive and reliable, and the errors are reduced, and the reliability and accuracy of valve control is improved.
Smart Images

Figure CN116068919B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of water meter control technology, and in particular to a water meter valve control device, method, electronic device and storage medium. Background Art
[0002] Related technologies often use mechanical contacts to detect when a water meter valve is in position after opening and closing. When the valve is fully opened or closed, it hits the mechanical contacts, causing the valve to shut down. However, this approach is complex, unreliable, and prone to malfunction during switching and rust prevention. Consequently, valve position control circuits have emerged that use current changes as a basis for valve position detection. However, in actual applications, these circuits are complex to connect, require numerous circuit components, and are easily susceptible to interference, leading to abnormal current changes and, consequently, false detection of valve position. Summary of the Invention
[0003] The present application aims to solve at least one of the technical problems existing in the prior art. To this end, the present application provides a water meter valve control device, method, electronic device and storage medium, which simplifies the valve position detection circuit and uses a simple structure to detect and control the valve position.
[0004] A water meter valve control device according to an embodiment of the first aspect of the present application includes:
[0005] valve;
[0006] An in-position detection circuit, the in-position detection circuit comprising a valve chip unit and a sampling circuit;
[0007] The valve chip unit includes: a control input pin, a control output pin, a power pin and a ground pin;
[0008] The power pin is connected to a power source to receive a power signal, the ground pin is connected to the sampling circuit, and the control output pin is connected to the valve;
[0009] Main controller, including sampling pins and valve control pins;
[0010] The sampling pin is connected to the sampling circuit and is used to receive a sampling signal from the sampling circuit;
[0011] The valve control pin is connected to the control input pin of the valve chip unit;
[0012] The main controller is used to generate a first valve in place signal according to the sampling signal;
[0013] The main controller is further configured to generate a first valve control signal to the valve control pin according to the first valve in position signal;
[0014] The valve chip unit is used to output a valve opening and closing signal to the valve according to the first valve control signal and the power supply signal, so as to control the opening and closing of the valve.
[0015] According to some embodiments of the present application, the sampling circuit includes: a first resistor, a second resistor and a first capacitor;
[0016] One end of the first resistor is connected to the sampling pin of the main controller, and the other end of the first resistor is connected to the ground pin of the valve chip unit;
[0017] One end of the first capacitor is connected to the sampling pin of the main controller, and the other end of the first capacitor is grounded;
[0018] One end of the second resistor is grounded; the other end of the second resistor is connected to the ground pin of the valve chip unit;
[0019] The sampling pin is used to collect the voltage of the second resistor as a sampling signal.
[0020] According to some embodiments of the present application, including:
[0021] The valve control pins of the main controller include: a valve opening control pin and a valve closing control pin;
[0022] The control input pins of the valve chip unit include: a first control input pin and a second control input pin;
[0023] The control output pins of the valve chip unit include: a first control output pin and a second control output pin;
[0024] When the value of the sampling signal of the sampling circuit increases from a small value to a preset value, the first valve in position signal is generated;
[0025] The first valve position signal includes: a first valve open position signal and a first valve closed position signal;
[0026] The first valve control signal includes: a first valve closing control signal generated according to the first valve opening position signal and a first valve opening control signal generated according to the first valve closing position signal;
[0027] The valve opening and closing signal includes: a valve opening signal and a valve closing signal;
[0028] The first control input pin is connected to the valve opening control pin, and is used to receive the first valve opening control signal, and output the valve opening signal to the valve according to the first valve opening control signal, so as to control the opening of the valve;
[0029] The second control input pin is connected to the valve closing control pin, and is configured to receive the first valve closing control signal and output the valve closing signal to the valve according to the first valve closing control signal to control the closing of the valve.
[0030] According to some embodiments of the present application, the valve chip unit further includes: a first diode and a second diode;
[0031] The anode of the first diode is connected to the valve opening control pin of the main controller, and the cathode of the first diode is connected to the first control input pin of the valve chip unit;
[0032] The anode of the second diode is connected to the valve closing control pin of the main controller, and the cathode of the second diode is connected to the second control input pin of the valve chip unit.
[0033] According to some embodiments of the present application, the valve is a five-wire valve, including: a valve opening signal pin, a valve closing signal pin, a valve opening limit signal pin, a valve closing limit signal pin, and a valve grounding pin;
[0034] The main controller further includes a first in-position signal pin and a second in-position signal pin;
[0035] The valve opening signal pin is connected to the first control output pin of the valve chip unit;
[0036] The valve closing signal pin is connected to the second control output pin of the valve chip unit;
[0037] The valve opening position signal pin is connected to the first position signal pin of the main controller;
[0038] The valve closing position signal pin is connected to the second position signal pin of the main controller;
[0039] The valve opening signal pin receives the valve opening signal to control the opening of the valve, and the valve fully opened signal pin outputs a second valve fully opened signal, and generates a valve fully opened signal according to the first valve fully opened signal and the second valve fully opened signal;
[0040] The valve closing signal pin receives the valve closing signal to control the closing of the valve, and the valve closing position signal pin outputs a second valve closing position signal, and generates a valve closing position signal according to the first valve closing position signal and the second valve closing position signal.
[0041] According to some embodiments of the present application, the further comprising:
[0042] NB-IoT module;
[0043] The NB-IoT module is connected to the main controller and is used to receive a remote control signal to the main controller, so that the main controller generates a first valve control signal according to the first valve in place signal based on the remote control signal.
[0044] According to the second aspect of the present application, a water meter valve control method includes:
[0045] receiving a sampling signal from a sampling circuit, and generating a first valve in position signal according to the sampling signal;
[0046] Generate a first valve control signal to the valve control pin according to the first valve in position signal;
[0047] The first valve control signal is output to control the valve chip unit to output a valve opening and closing signal to the valve to control the opening and closing of the valve.
[0048] According to some embodiments of the present application, including:
[0049] When the value of the sampling signal of the sampling circuit increases from a small value to a preset value, the first valve in position signal is generated;
[0050] The first valve position signal includes: a first valve open position signal and a first valve closed position signal;
[0051] The first valve control signal includes: a first valve closing control signal generated according to the first valve opening position signal and a first valve opening control signal generated according to the first valve closing position signal;
[0052] The valve opening and closing signal includes: a valve opening signal and a valve closing signal;
[0053] Outputting the first valve opening control signal to the valve chip unit to control outputting the valve opening signal to the valve, so as to control the opening of the valve;
[0054] The first valve closing control signal is output to the valve chip unit to control output of the valve closing signal to the valve to control the closing of the valve.
[0055] According to some embodiments of the present application, including:
[0056] receiving a second valve fully opened signal output by the valve, and generating valve fully opened information according to a valve fully opened signal generated from the first valve fully opened signal and the second valve fully opened signal;
[0057] A second valve fully closed signal output by a valve is received, and valve fully closed information is generated according to a valve fully closed signal generated based on the first valve fully closed signal and the second valve fully closed signal.
[0058] According to the electronic device of the embodiment of the third aspect of the present application, it includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, it implements the water meter valve control method as described in the embodiment of the second aspect of the present application.
[0059] According to the computer-readable storage medium of the fourth embodiment of the present application, computer-executable instructions are stored, and the computer-executable instructions are used to execute the water meter valve control method described in the second embodiment.
[0060] The water meter valve control device, method, electronic device, and storage medium provided by the embodiments of the present application have at least the following beneficial effects: a main controller transmits an electrical signal for opening or closing the valve via a valve control pin and outputs it to a control input pin of a valve chip unit. The valve chip unit processes the received valve opening and closing signal by combining it with a power signal from a power pin and outputs it to the valve via a control output pin, thereby controlling the opening or closing of the valve. Since the operation of the valve opening or closing causes the current in the circuit to increase from a small value, the voltage sampled by the sampling circuit on the resistor also increases from a small value. When the valve is in the fully opened or closed position, the valve is locked, causing the current in the circuit to surge to a maximum value, thereby also reaching a maximum voltage sampled by the sampling circuit on the resistor. By setting the maximum voltage value to a preset value, it is possible to determine whether the valve is fully opened or closed based on the change in the sampled value. When the valve is fully opened or closed, the corresponding in-position signal pin in the valve is connected to the power supply to output a valve in-position signal. The main controller outputs information related to the valve in-position based on the sampled value and the valve in-position signal, thereby achieving a simple circuit connection relationship for valve in-position detection and sensitive and reliable detection.
[0061] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become obvious from the description below, or will be learned through practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0063] Figure 1 This is a valve position detection circuit diagram provided by one embodiment of the present application;
[0064] Figure 2 This is a schematic diagram of a five-wire valve provided by an embodiment of the present application;
[0065] Figure 3 This is a schematic diagram of a water meter valve control device module provided by an embodiment of the present application;
[0066] Figure 4This is a flow chart of a water meter valve control method provided by an embodiment of the present application;
[0067] Figure 5 It is a structural diagram of an electronic device provided by an embodiment of the present application.
[0068] Figure 1: Valve chip unit 100, first control input pin 110, second control input pin 120, first control output pin 130, second control output pin 140, power pin 150, ground pin 160, first diode 170, second diode 180, main controller 200, valve opening control pin 210, valve closing control pin 220, sampling pin 230, sampling circuit 300, first resistor 310, second resistor 320, first capacitor 330, power module 400, power supply 410, second capacitor 420, third capacitor 430, power ground 500, valve 600, valve opening signal pin 610, valve closing signal pin 620, valve ground pin 630, valve opening position signal pin 640, valve closing position signal pin 650, NB-IoT module 700, electronic device 1000, processor 1001, memory 1002. DETAILED DESCRIPTION
[0069] The following describes in detail embodiments of the present application. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application and are not to be construed as limiting the present application.
[0070] In the description of this application, it should be understood that descriptions involving orientations, such as up, down, front, back, left, right, etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings. They are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, they cannot be understood as limitations on this application.
[0071] In the description of this application, "several" means one or more, "many" means more than two, "greater than," "less than," and "exceed" are understood to exclude the number itself, while "above," "below," and "within" are understood to include the number itself. The terms "first" and "second" are used solely to distinguish technical features and are not to be construed as indicating or implying relative importance, or as implicitly specifying the number or order of the technical features indicated.
[0072] In the description of this application, unless otherwise clearly defined, terms such as setting, installing, and connecting should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in this application based on the specific content of the technical solution.
[0073] Related technologies often use mechanical contacts to detect when a water meter valve is in position. When the valve is fully opened or closed, it hits a mechanical contact, shutting down the valve. However, this approach is complex and mechanically complex, leading to a high failure rate. Furthermore, moisture easily enters when the valve is opened or closed, causing the switch contacts to rust or oxidize, making detection of valve position unreliable and prone to malfunction. Therefore, existing technologies have adopted the method of monitoring the increase and decrease of current as the basis for valve position detection. However, in actual applications, the circuit is complex, has many components, and is easily interfered with, resulting in abnormal increases in current, which can lead to incorrect judgments of valve position.
[0074] Based on this, the embodiments of the present application provide a water meter valve control device, method, electronic device and storage medium, which can simply and reliably detect the opening and closing of the control valve. In addition to effectively solving the above problems, it can also determine the cause of the valve circuit failure.
[0075] Reference Figure 1 and Figure 2 As shown in the valve position detection circuit diagram and valve schematic diagram, the water meter valve control device of this embodiment includes a valve chip unit 100, a main controller 200, a sampling circuit 300 and a valve 600. Figure 1The valve position detection circuit shown includes a valve chip unit 100 and a sampling circuit 300. In this embodiment, the valve chip unit 100 is provided with two control input pins, namely a first control input pin 110 and a second control input pin 120; two control output pins, namely a first control output pin 130 and a second control output pin 140; a power pin 150; and a ground pin 160. The power pin 150 is connected to the power supply 410 to receive a power signal, while the ground pin 160 is connected to the sampling circuit 300. The two control input pins are correspondingly connected to the two valve control pins of the main controller 200, while the two control output pins are connected to the valve 600. The main controller 200 also includes a sampling pin 230, which is connected to the sampling circuit 300. The main controller 200 receives a sampling signal from the sampling circuit 300 via the sampling pin 230 and then generates a first valve position signal based on the sampling signal. The next time valve 600 needs to be operated, a first valve control signal is generated based on the first valve in-position signal. This signal is output via one of the valve control pins of the main controller 200 to a corresponding control input pin of the valve chip unit 100. Upon receiving the first valve control signal, the valve chip unit 100 processes the first valve control signal with the power signal to generate a valve opening / closing signal. Finally, the valve opening / closing signal is output via a corresponding control output pin of the valve chip unit 100 to control the valve 600 to open or close. The in-position detection circuit of this water meter valve control device is simple, making it easier for personnel to inspect and maintain the circuit.
[0076] Reference Figure 1 As shown, in some embodiments of the present application, the ground pin 160 of the valve chip unit 100 is connected to the sampling circuit 300. Specifically, the ground pin 160 is connected to one end of the first resistor 310 in the sampling circuit 300, and the other end of the first resistor 310 is connected to the sampling pin 230 of the main controller 200. The ground pin 160 is also connected to one end of the second resistor 320 in the sampling circuit 300, and the other end of the second resistor 320 is connected to the power ground 500. The sampling circuit 300 also includes a first capacitor 330, one end of the first capacitor is connected to the sampling pin of the main controller 200, and the other end is connected to the power ground 500.
[0077] As will be appreciated, the valve chip unit 100 is connected to the power supply 410 and receives a power signal via the power pin 150, increasing the current to drive the valve. To protect the main controller 200 from receiving excessive current, the sampling circuit 300 includes a first resistor 310 for voltage division and current limiting. Therefore, the resistance of the first resistor 310 is relatively high. In one embodiment, the resistance of the first resistor 310 can be 1 kΩ. The sampling circuit 300 samples the second resistor 320, which is a precision sampling resistor with a relatively low resistance. In one embodiment, the resistance of the second resistor 320 is 1 Ω. The first capacitor 330 in the sampling circuit 300 is used for filtering, ensuring that the sampled signal at the sampling pin 230 is a stable DC voltage, facilitating detection. As will be appreciated, in one embodiment, the resistance of the first resistor 310 can also be 2 kΩ, and the resistance of the second resistor 320 can also be 0.5 Ω. The resistance values of the first resistor 310 and the second resistor 320 can be set according to actual needs, and the present embodiment is merely illustrative and not limiting.
[0078] Reference Figure 1 and Figure 2 As shown, in some embodiments of the present application, the valve chip unit 600 is provided with six pins, namely two control input pins, two control output pins, a power pin, and a ground pin. The valve control pins of the main controller 200 correspond to the control input pins of the valve chip unit 600, which are also provided with two, namely, the valve opening control pin 210 and the valve closing control pin 220. Specifically, the first control input pin 110 is connected to the valve opening control pin 210 of the main controller 200, and the second control input pin 120 is connected to the valve closing control pin 220 of the main controller 200. When the valve 600 is closed, the next operation of the main controller 200 on the valve 600 is to open it. At this time, the main controller 200 sends an electrical signal to control the valve to open, i.e., a first valve opening control signal, which is output to the first control input pin 110 of the valve chip unit 100 via the valve opening control pin 210. Correspondingly, when the valve 600 is open, the next operation of the main controller 200 on the valve 600 is to close it. At this time, the main controller 200 sends an electrical signal to control the valve to close, i.e., a first valve closing control signal, which is output to the second control input pin 120 of the valve chip unit 100 via the valve closing control pin 220. Both the first valve opening control signal and the first valve closing control signal are first valve control signals.
[0079] The first control output pin 130 of the valve chip unit 100 is connected to the valve-open signal pin 610 of the valve 600, and the second control output pin 140 is connected to the valve-close signal pin 620 of the valve 600. After receiving the electrical signal from the main controller 200 for controlling the opening and closing of the valve 600, namely the first valve control signal, the valve chip unit 100 amplifies and processes the first valve control signal through the power signal received by the power pin 150 to generate a valve opening and closing signal. The valve opening and closing signal is then output to the valve 600 to drive the valve operation. Specifically, the first control input pin 110 of the valve chip unit 100 receives the first valve opening control signal of the main controller 200, amplifies the valve opening signal with the power signal of the power supply 410, and forms a valve opening signal, and outputs the valve opening signal to the valve opening signal pin 610 of the valve 600 through the first control output pin 130, thereby driving the valve to operate and thus open the valve; correspondingly, the second control input pin 120 of the valve chip unit 100 receives the first valve closing control signal of the main controller 200, amplifies the valve closing signal with the power signal of the power supply 410, and forms a valve closing signal, and outputs the valve closing signal to the valve closing signal pin 620 of the valve 600 through the second control output pin 140, thereby driving the valve to operate and thus close the valve.
[0080] Specifically, when the valve 600 is operating during its opening or closing, the current in the entire circuit loop changes accordingly. The voltage across the second resistor 320 is filtered by the first resistor 310 and the first capacitor 330 and then sampled by the sampling pin 230 of the main controller 200. Based on the sampled voltage value, the main controller 200 can determine the magnitude of the voltage flowing through the second resistor 320, thereby determining whether the operating state of the valve 600 is in the correct position. It is understood that during the operation of the valve 600, the loop current increases from a low value. When the valve 600 is fully opened or fully closed, the valve stalls, causing the current to surge, thereby causing the voltage value of the second resistor 320 to also increase from a low value to a maximum value. Therefore, the sampling signal at the sampling pin 230 changes accordingly. At this time, the main controller 200 generates a first valve position signal based on the sampling signal, i.e., a first valve open position signal or a first valve closed position signal.
[0081] Furthermore, the generation of the first valve-open position signal indicates that the valve 600 is now in an open and fully-opened state. When the main controller 200 controls the valve 600 next time, it will generate a first valve-closing control signal based on the first valve-open position signal, thereby outputting a valve-closing signal through the valve-closing control pin 220 to close the valve; correspondingly, the generation of the first valve-closed position signal indicates that the valve 600 is now in a closed state. When the main controller 200 controls the valve 600 next time, it will generate a first valve-opening control signal based on the first valve-closed position signal, thereby outputting a valve-opening signal through the valve-opening control pin 210 to open the valve again.
[0082] Reference Figure 1 As shown, in some embodiments of the present application, the valve chip unit 100 further includes a first diode 170 and a second diode 180. The anode of the first diode 170 is connected to the valve opening control pin 210 of the main controller 200, and the cathode of the first diode 170 is connected to the first control input pin 110 of the valve chip unit 100; the anode of the second diode 180 is connected to the valve closing control pin 220 of the main controller 200, and the cathode of the second diode 180 is connected to the second control input pin 120 of the valve chip unit 100. The first diode 170 and the second diode 180 are provided to isolate the main controller 200 from the valve chip unit 100, protect the main controller 200 from receiving excessive current, and protect the main controller 200 and related pins.
[0083] It is understandable that, referring to Figure 1 As shown, in some embodiments of the present application, the relevant circuit of the valve chip unit 100 connected to the power supply 410 through the power pin 150 can also be provided with a second capacitor 420 and a third capacitor 430 for filtering the power supply 410 and providing a stable power supply voltage for the valve chip unit 100.
[0084] Reference Figure 2 The five-wire valve schematic diagram shown in FIG. In some embodiments of the present application, the valve 600 is a five-wire valve, correspondingly provided with five pins, including two valve signal pins, two in-position signal pins, and one ground pin. The valve open signal pin 610 is connected to the first control output pin 130 of the valve chip unit 100, the valve close signal pin 620 is connected to the second control output pin 140 of the valve chip unit 100, the valve open in-position signal pin 640 is connected to the first in-position signal pin of the main controller 200, the valve close in-position signal pin 650 is connected to the second in-position signal pin of the main controller 200, and the valve ground pin 630 is connected to the power ground 500.
[0085] Specifically, the valve 600 receives a valve opening signal through the valve opening signal pin 610 to control the valve 600 to open. When the valve 600 rotates to open, it will collide with the mechanical contact, and the corresponding valve opening signal pin 640 is short-circuited with the valve ground pin 630, so that the main controller 200 detects the level of the valve opening signal pin 640 to determine whether the valve is fully opened, that is, generates a second valve opening signal; the valve 600 receives a valve closing signal through the valve closing signal pin 620 to control the valve 600 to close. When the valve 600 rotates to close, it will collide with the mechanical contact, and the corresponding valve closing signal pin 650 is short-circuited with the valve ground pin 630, so that the main controller 200 detects the level of the valve closing signal pin 650 to determine whether the valve is fully closed, that is, generates a second valve closing signal.
[0086] Furthermore, the main controller 200 generates a valve open position signal by combining the first valve open position signal and the second valve open position signal, or generates a valve closed position signal by combining the first valve closed position signal and the second valve closed position signal, thereby performing double detection and judgment on the open and closed position status of the valve 600, thereby improving the reliability of the valve position detection.
[0087] It is understandable that the present application does not limit the valve 600 to a five-wire valve. It only needs to meet the conditions of having a valve open position signal pin 640 and a valve close position signal pin 650.
[0088] Reference Figure 3 The schematic diagram of the water meter valve control device module is shown, in which the power module 400 provides power to the device. In some embodiments of the present application, the power source is a battery; the valve 600 is used to control the opening and closing of the valve and send the second valve in place information to the main controller 200; the valve chip unit 100 is used to receive and process the signal from the main controller 200, and then output the control valve 600 opening and closing, while sampling the second resistor 320 to detect the valve 600 in place state; the NB-IoT module 700 is used to receive the remote control signal to the main controller 200, so that the main controller 200 generates the first valve control signal based on the remote control signal and the first valve in place signal. The main controller 200 is the control core of the entire meter, connecting and interacting with each module to coordinate the normal operation of the entire device.
[0089] Specifically, the NB-IoT module 700 provides communication functions for the device. For example, when a user's water bill is not paid on time and the water meter needs to be shut down, the water authority system communicates with the user's water meter through the NB-IoT module 700, sends a remote control signal to the main controller 200, triggering the main controller 200 to output a first valve closing control signal. At this time, the valve is in the fully open state. The first valve closing signal controls the closure of valve 600 to cut off the user's water supply. After the user pays the water bill, the water authority system continues to communicate with the user's water meter through the NB-IoT module 700, sends a remote control signal to the main controller 200, triggering the main controller 200 to output a first valve opening control signal. At this time, the valve is in the fully closed state. The first valve opening signal controls the opening of valve 600 to supply water to the user.
[0090] It is understandable that the water meter valve control device module can also be designed with other modules to connect to the main controller 200 according to actual needs. In one embodiment, the other module can be a Bluetooth module to provide the device with Bluetooth broadcast connection and near-end communication functions. Specifically, the frequency of Bluetooth broadcast can be adjusted by setting parameters to achieve low-power connection. When the device needs maintenance or software iteration, communication with the device can be carried out without manual triggering, which is conducive to communicating with the device in complex environments without the need to use buttons or Hall effects to wake up. In one embodiment, the other module can be a trigger module, which is used by equipment maintenance personnel or testers to perform equipment function tests in the later stage. It is a manual trigger reporting module. In one embodiment, the other module can be a pulse sampling module. For example, when the water meter device is using water, the meter pointer will output a pulse signal every time it rotates one circle. The pulse signal is collected through the pulse input line and accumulated to calculate the water consumption of the meter. It is understandable that the other module can be one or more of the above-mentioned Bluetooth module, trigger module or pulse sampling module.
[0091] In an embodiment of the present application, the in-position detection circuit of the water meter valve control device is simple with few components. The main controller outputs a first valve control signal to the valve chip unit through the valve control pin. The valve chip unit combines the power supply signal to amplify the first valve control signal and other processing to form a valve opening and closing signal, which is output to the valve, thereby controlling the opening or closing of the valve. In this process, a capacitor is set in the sampling circuit for filtering, and a resistor is set for sampling its voltage. The valve opening and closing position can be detected based on the change of the sampling signal from a small increase to a preset value. The mechanical contact scheme is then combined to perform double detection of the valve in-position, which not only improves the reliability of the detection, but also effectively prevents false operation.
[0092] based on Figure 1 The water meter valve control device circuit diagram shown in Figure 4 As shown, an embodiment of the present application provides a water meter valve control method, which is applied to a water meter valve control device. The water meter valve control method includes but is not limited to the following steps S100 to S400.
[0093] Step S100: generating a first valve position signal according to the sampling signal.
[0094] In some embodiments of the present application, step S100 specifically includes:
[0095] When valve 600 is opened or closed, the current in the circuit changes, which in turn causes the voltage across second resistor 320 in sampling circuit 300 to change. Sampling circuit 300 collects the voltage across second resistor 320 as a sampling signal, and based on the changes in the sampling signal, determines whether the valve is fully opened or closed. During this process, the circuit current increases from a low value to a high value. Therefore, when the sampling signal increases from a low value to a preset value, valve 600 is determined to be fully opened or closed. If valve 600 is fully open, a first valve-open signal is generated; if valve 600 is fully closed, a corresponding first valve-closed signal is generated.
[0096] Step S200: generating a first valve control signal.
[0097] In some embodiments of the present application, step S200 specifically includes:
[0098] The first valve control signal generated according to the first valve open position signal in step S100 is a first valve closing control signal. It can be understood that after the valve 600 is fully opened, the next operation of the main controller 200 on the valve 600 is to close it; correspondingly, after the valve 600 is fully closed, the next operation of the main controller 200 on the valve 600 is to open it. Therefore, the first valve control signal generated according to the first valve closed position signal in step S100 is a first valve opening control signal.
[0099] Step S300: output a first valve control signal.
[0100] It is understood that in some embodiments of the present application, the valve 600 remains open for a period of time after fully opening. Therefore, the generated first valve closing control signal is not output immediately, but requires corresponding triggering conditions. For example, when a user fails to pay fees on time or a related pipe is damaged and the valve needs to be closed to avoid further losses, the main controller 200 is triggered to output the first valve closing control signal. Similarly, the valve 600 remains closed for a period of time after fully closing, rather than immediately outputting the first valve opening control signal. Instead, the signal is triggered by receiving a corresponding remote control signal to trigger the main controller 200 to output the signal.
[0101] Step S400: Control the output valve opening and closing signal to control the valve opening and closing.
[0102] In some embodiments of the present application, step S400 specifically includes:
[0103] The main controller 200 outputs a first valve control signal to the valve chip unit 100. The valve chip unit 100, combined with the power signal, amplifies and processes the first valve control signal to generate a valve opening / closing signal, thereby controlling the opening and closing of the valve. Specifically, the first valve opening control signal output by the main controller 200 controls the valve chip unit 100 to generate a valve opening signal, which is output to the valve 600 to drive the valve to open. Conversely, the first valve closing control signal output by the main controller 200 controls the valve chip unit 100 to generate a valve closing signal, which is output to the valve 600 to drive the valve to close.
[0104] It can be understood that, in the process of valve 600 being opened or closed, the circuit current changes from small to large, causing the sampling signal in the sampling circuit to change from small to large. When the valve 600 is opened or closed, the valve 600 stall current surges to a maximum value, causing the sampling value of the sampling circuit to be the largest, reaching the preset value, thereby detecting and generating the corresponding first valve in-position signal.
[0105] Specifically, the sampling pin 230 may be an AD sampling pin. In some embodiments, the current or voltage of the second resistor 320 may be sampled as a sampling signal to determine whether the valve 600 is fully opened or closed.
[0106] In some embodiments of the present application, valve 600 is a five-wire valve, equipped with a valve opening signal pin 610 and a valve closing signal pin 620, as well as corresponding valve opening position signal pins 640 and 650, and a valve grounding pin 630. When valve 600 reaches its full position, it touches a mechanical contact. At this time, the corresponding position signal pin is short-circuited with the valve grounding pin 630, causing a voltage change, thereby determining whether the valve is fully opened or closed. Specifically, when valve 600 reaches its full position, the valve opening position signal pin 640 and the valve grounding pin 630 are short-circuited, thereby determining that valve 600 is fully opened and outputting a second valve opening position signal. Correspondingly, when valve 600 reaches its full position, the valve closing position signal pin 650 and the valve grounding pin 630 are short-circuited, thereby determining that valve 600 is fully closed and outputting a second valve closing position signal.
[0107] Furthermore, the main controller 200 combines the first valve open position signal and the second valve open position signal to generate a valve open position signal, and converts the valve open position signal into valve open position information that can be used to prompt the user that the valve 600 is in an open state at this time; correspondingly, the main controller 200 combines the first valve closed position signal and the second valve closed position signal to generate a valve closed position signal, and converts the valve closed position signal into valve closed position information that can be used to prompt the user that the valve 600 is in a closed state at this time.
[0108] In some embodiments of the present application, the water meter valve control method combines different in-place detection conditions to not only reliably determine the valve's in-place status, but also to determine the approximate cause of any valve circuit problems. For example, when the main controller 200 fails to detect the second valve in-place signal, but the sampling signal voltage of the sampling circuit remains at 0, it can be determined that there is an abnormality in the wiring of the valve chip unit 100. This is because when the valve 600 is actuated, the circuit inevitably generates a change in current, and the sampling value of the second resistor 320 in the sampling circuit 300 corresponds to a non-zero value. Since the sampling value is 0, it is determined that there is a problem with the wiring of the valve chip unit 100. Alternatively, when the main controller 200 fails to detect the second valve in-place signal, but the sampling signal of the sampling circuit 300 increases frequently, it can be determined that there is abnormal external interference with the device.
[0109] The water meter valve control method provided in the embodiment of the present application controls the opening and closing of the valve through a main controller. During the valve opening and closing process, the changes in the circuit current are collected by a sampling circuit to detect whether the valve is fully opened and closed. Combined with the double detection of the mechanical contact solution, the reliability of the valve full-close detection is improved. The correspondingly generated valve full-close prompt information facilitates the user to obtain the status of the valve and predict the exact time of valve execution so as to shut down the power supply in time after the opening and closing action is completed to reduce energy consumption and improve efficiency.
[0110] The present application also provides an electronic device 1000, referring to Figure 5 As shown, the electronic device 1000 includes: a processor 1001, a memory 1002, and a computer program stored in the memory 1002 and executable on the processor 1001. When the computer program is executed, it is used to execute the above-mentioned network upgrade method.
[0111] The processor 1001 and the memory 1002 may be connected via a bus or other means.
[0112] Memory 1002, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer executable programs, such as the network upgrade method described in the embodiments of this application. Processor 1001 implements the aforementioned network upgrade method by executing the non-transitory software programs and instructions stored in memory 1002.
[0113] The memory 1002 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and applications required for at least one function; the data storage area may store and execute the above-mentioned network upgrade method. In addition, the memory 1002 may include a high-speed random access memory 1002, and may also include a non-volatile memory 1002, such as at least one storage device memory device, a flash memory device or other non-volatile solid-state memory device. In some embodiments, the memory 1002 may optionally include a memory 1002 remotely arranged relative to the processor 1001, and these remote memories 1002 may be connected to the electronic device 1000 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.
[0114] The non-transient software program and instructions required to implement the above-mentioned water meter valve control method are stored in the memory 1002 , and when executed by one or more processors 1001 , the above-mentioned water meter valve control method is executed.
[0115] The embodiment of the present application also provides a storage medium, which is a computer-readable storage medium, and the storage medium stores a computer program, which implements the above-mentioned water meter valve control method when the computer program is executed by the processor. The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0116] The water meter valve control device, method, electronic device, and storage medium provided by the embodiments of the present application are characterized by a main controller outputting a first valve control signal to a valve chip unit via a valve control pin. The valve chip unit, in combination with a power supply signal, amplifies the first valve control signal and processes the signal to form a valve opening and closing signal, which is then output to the valve, thereby controlling the opening or closing of the valve. During the valve opening and closing process, the changes in the circuit current are collected by a sampling circuit to detect whether the valve is fully opened or closed. The circuit is simple and has few components, making it easy for staff to maintain. The dual detection combined with the mechanical contact solution improves the reliability and sensitivity of valve full-close detection, effectively preventing false operations. The correspondingly generated valve full-close prompt information facilitates the user to obtain the valve status, predict the exact time of valve execution, and promptly shut down the power supply after the opening and closing action is completed to reduce energy consumption and improve efficiency. It can also determine the approximate cause of circuit abnormalities.
[0117] The device embodiments described above are merely exemplary. The units described as separate components may or may not be physically separate, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.
[0118] Those skilled in the art will appreciate that all or some of the steps and systems in the method disclosed above can be implemented as software, firmware, hardware, and appropriate combinations thereof. Some physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, and the computer-readable medium can include computer storage media (or non-transitory media) and communication media (or temporary media). As known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory, or other memory technology, CD-ROM, digital versatile disks (DVD), or other optical disk storage, magnetic cassettes, magnetic tapes, storage device storage, or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, as is well known to those skilled in the art, communication media typically includes computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0119] It should also be understood that the various implementations provided in the embodiments of this application can be arbitrarily combined to achieve different technical effects. The above is a specific description of the preferred implementation of this application, but this application is not limited to the above implementation. Those skilled in the art can also make various equivalent modifications or substitutions under the conditions that do not violate the spirit of this application.
Claims
1. A water meter valve control device, characterized in that: include: valve; An in-position detection circuit, the in-position detection circuit comprising a valve chip unit and a sampling circuit; The valve chip unit includes: a control input pin, a control output pin, a power pin and a ground pin; The power pin is connected to a power source to receive a power signal, the ground pin is connected to the sampling circuit, and the control output pin is connected to the valve; Main controller, including sampling pins and valve control pins; The sampling pin is connected to the sampling circuit and is used to receive a sampling signal from the sampling circuit; The valve control pin is connected to the control input pin of the valve chip unit; The main controller is used to generate a first valve in place signal according to the sampling signal; The main controller is further configured to generate a first valve control signal to the valve control pin according to the first valve in position signal; The valve chip unit is used to output a valve opening and closing signal to the valve according to the first valve control signal and the power supply signal, so as to control the opening and closing of the valve; The valve control pins of the main controller include: a valve opening control pin and a valve closing control pin; The control input pins of the valve chip unit include: a first control input pin and a second control input pin; The control output pins of the valve chip unit include: a first control output pin and a second control output pin; When the value of the sampling signal of the sampling circuit increases from a small value to a preset value, the first valve in position signal is generated; The first valve position signal includes: a first valve open position signal and a first valve closed position signal; The first valve control signal includes: a first valve closing control signal generated according to the first valve opening position signal and a first valve opening control signal generated according to the first valve closing position signal; The valve opening and closing signal includes: a valve opening signal and a valve closing signal; The first control input pin is connected to the valve opening control pin, and is used to receive the first valve opening control signal, and output the valve opening signal to the valve according to the first valve opening control signal, so as to control the opening of the valve; The second control input pin is connected to the valve closing control pin, and is configured to receive the first valve closing control signal and output the valve closing signal to the valve according to the first valve closing control signal to control the closing of the valve.
2. The water meter valve control device according to claim 1, characterized in that: The sampling circuit includes: a first resistor, a second resistor and a first capacitor; One end of the first resistor is connected to the sampling pin of the main controller, and the other end of the first resistor is connected to the ground pin of the valve chip unit; One end of the first capacitor is connected to the sampling pin of the main controller, and the other end of the first capacitor is grounded; One end of the second resistor is grounded; the other end of the second resistor is connected to the ground pin of the valve chip unit; The sampling pin is used to collect the voltage of the second resistor as a sampling signal.
3. The water meter valve control device according to claim 1, characterized in that: The valve chip unit further includes: a first diode and a second diode; The anode of the first diode is connected to the valve opening control pin of the main controller, and the cathode of the first diode is connected to the first control input pin of the valve chip unit; The anode of the second diode is connected to the valve closing control pin of the main controller, and the cathode of the second diode is connected to the second control input pin of the valve chip unit.
4. The water meter valve control device according to claim 1, characterized in that: The valve is a five-wire valve, including: a valve opening signal pin, a valve closing signal pin, a valve opening position signal pin, a valve closing position signal pin and a valve grounding pin; The main controller further includes a first in-position signal pin and a second in-position signal pin; The valve opening signal pin is connected to the first control output pin of the valve chip unit; The valve closing signal pin is connected to the second control output pin of the valve chip unit; The valve opening position signal pin is connected to the first position signal pin of the main controller; The valve closing position signal pin is connected to the second position signal pin of the main controller; The valve opening signal pin receives the valve opening signal to control the opening of the valve, and the valve fully opened signal pin outputs a second valve fully opened signal, and generates a valve fully opened signal according to the first valve fully opened signal and the second valve fully opened signal; The valve closing signal pin receives the valve closing signal to control the closing of the valve, and the valve closing position signal pin outputs a second valve closing position signal, and generates a valve closing position signal according to the first valve closing position signal and the second valve closing position signal.
5. The water meter valve control device according to claim 1, characterized in that: Also includes: NB-IoT module; The NB-IoT module is connected to the main controller and is used to receive a remote control signal to the main controller, so that the main controller generates a first valve control signal according to the first valve in place signal based on the remote control signal.
6. A water meter valve control method, characterized in that: Applied to the water meter valve control device according to claim 1, the method comprises: receiving a sampling signal from a sampling circuit, and generating a first valve in position signal according to the sampling signal; Generate a first valve control signal to the valve control pin according to the first valve in position signal; The first valve control signal is output to control the valve chip unit to output a valve opening and closing signal to the valve to control the opening and closing of the valve.
7. The water meter valve control method according to claim 6, characterized in that: include: When the value of the sampling signal of the sampling circuit increases from a small value to a preset value, the first valve in position signal is generated; The first valve position signal includes: a first valve open position signal and a first valve closed position signal; The first valve control signal includes: a first valve closing control signal generated according to the first valve opening position signal and a first valve opening control signal generated according to the first valve closing position signal; The valve opening and closing signal includes: a valve opening signal and a valve closing signal; Outputting the first valve opening control signal to the valve chip unit to control outputting the valve opening signal to the valve, so as to control the opening of the valve; The first valve closing control signal is output to the valve chip unit to control output of the valve closing signal to the valve to control the closing of the valve.
8. The water meter valve control method according to claim 7, characterized in that: include: receiving a second valve fully opened signal output by the valve, and generating valve fully opened information according to a valve fully opened signal generated from the first valve fully opened signal and the second valve fully opened signal; A second valve fully closed signal output by a valve is received, and valve fully closed information is generated according to a valve fully closed signal generated based on the first valve fully closed signal and the second valve fully closed signal.
9. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the water meter valve control method according to any one of claims 6 to 8 is implemented.
10. A computer-readable storage medium, characterized in that The storage medium stores a program, and the program is executed by a processor to implement the water meter valve control method according to any one of claims 6 to 8.
Citation Information
Patent Citations
Valve control system of valve control water meter
CN218037755U