Valve detection device and operating method thereof

A valve operating method for a sprinkler system with a plurality of electrical valves is disclosed. The method includes the following steps: receiving a user generated query signal; generating a first set of the control signals to a driving circuit of the plurality of electrical valves of the sprinkler system in response to the query signal; generating a detection signal successive to the first set of the control signals; orderly sending the detection signal to the plurality of solenoid valves; and sensing a voltage level of a sensing terminal of the driving circuit, and obtaining a sensing result accordingly. A first sub-circuit of the driving circuit is disabled in response to the first set of the control signals. The valve control device include electronic parts to implement the above-mentioned steps is also disclosed.

BACKGROUND

Technical Field

This invention relates to a valve detection and driving method and valve control device, more particularly to a method and device for detecting the existence of a solenoid valve and driving the solenoid valve accordingly.

Related Art

Permanently installed watering systems typically include a number of lawn sprinklers, with several water conduits feeding water to one or more sprinklers in the zones. The conduits generally are installed underground, and feed the sprinklers in different zones. Each sprinkler connects to one of the conduits via a valve. When the valve is open, water from the conduits is feed to the corresponding sprinkler. A traditional sprinkler control system supplies electrical power to a solenoid valve of the corresponding sprinkler in order to open/close the solenoid valve, and thus provides/suspends water to the sprinklers.

In order for the sprinkler system to control each solenoid valve, it first need to learn which sprinklers are in connection with the solenoid valves and which ones are not. However, if there is a change, e.g. installation/uninstallation, of a new solenoid valve, the sprinkler system will need to update its knowledge about it in order to modify its control to the corresponding solenoid valve accordingly.

There is therefore a need to provide a method and device for valve detection of a sprinkler system.

SUMMARY

In one aspect of the present invention, embodiments are provided that an operating method of a valve control device. The valve control device has a driving circuit and the driving circuit comprises a plurality of solenoid valve terminals and a sensing terminal. The operating method includes the following steps: sending a first set of the control signals to the driving circuit; sending a detection signal; sensing a voltage level at the sensing terminal when the detection signal is sent to one of the solenoid valve terminals and obtaining a sensing result accordingly; and repeating the step of sensing the voltage level until all the sensing results of the corresponding solenoid valve terminals are obtained. A first sub-circuit of the driving circuit is disabled in response to the first set of the control signals.

In one embodiment, the operating method further includes a step of: sending a second set of the control signals to the driving circuit. A second sub-circuit of the driving circuit is disabled in response to the second set of the control signals.

In one embodiment, the operating method further includes steps of: selectively sending a driving signal to one of the plurality of solenoid valve terminals according to the corresponding sensing result; and repeating the step of sending the driving signal until all the sensing results are processed.

In one embodiment, the first sub-circuit of the driving circuit and the second sub-circuit of the driving circuit are mutually exclusive.

In one embodiment, the first sub-circuit of the driving circuit and the second sub-circuit of the driving circuit are circuitry-wise identical.

In one embodiment, the first sub-circuit of the driving circuit and the second sub-circuit of the driving circuit are two H-bridge circuits.

In another aspect of the present invention, embodiments are provided that a valve control device for a sprinkler system with a plurality of solenoid valves includes a microprocessor, a driving circuit, and a microcontroller unit. The driving circuit includes a plurality of solenoid valve terminals, a sensing terminal, a switch, a first sub-circuit, and a second sub-circuit. The solenoid valve terminals are configured to connect with the solenoid valves. The switch has at least one input terminal and a plurality of output terminals which are electronically coupled to the plurality of solenoid valve terminals, respectively. The first sub-circuit is electronically coupled to the at least one input terminal of the switch. The second sub-circuit is electronically coupled to the at least one input terminal of the switch. The switch connects one of the at least one input terminal with one of the plurality of output terminals according to a switch signal. The microcontroller unit is electronically coupled to the driving circuit, sends a first set of the control signals to the driving circuit and sends a detection signal. The microprocessor is electronically coupled to the driving circuit and the microcontroller unit, and repeatedly senses a voltage level at the sensing terminal when the detection signal is sent to one of the solenoid valve terminal and obtains a sensing result accordingly until all the sensing results of the corresponding solenoid valve terminals are obtained. The microprocessor also sends the switch signal to the switch. The first sub-circuit of the driving circuit is disabled in response to the first set of the control signals.

In one embodiment, the microcontroller unit sends a second set of the control signals to the driving circuit, and the second sub-circuit of the driving circuit is disabled in response to the second set of the control signals.

In one embodiment, the microcontroller unit sends a driving signal to the driving circuit, the microprocessor sends the switch signal to the switch according to the sensing results, and the driving circuit selectively relays the driving signal to one of the plurality of solenoid valve terminals according to the switch signal.

In one embodiment, the first sub-circuit of the driving circuit and the second sub-circuit of the driving circuit are mutually exclusive.

In one embodiment, the first sub-circuit of the driving circuit and the second sub-circuit of the driving circuit are circuitry-wise identical.

In one embodiment, the first sub-circuit of the driving circuit and the second sub-circuit of the driving circuit are two H-bridge circuits.

In yet another aspect of the present invention, embodiments are provided that a non-transitory computer-readable storage medium storing a program causing a valve control device to perform an operation for a valve control process. The valve control device comprises a driving circuit and the driving circuit comprises a plurality of solenoid valve terminals and a sensing terminal. The valve control process includes the following steps of: sending a first set of the control signals to the driving circuit; sending a detection signal; sensing a voltage level at the sensing terminal when the detection signal is sent to one of the solenoid valve terminals and obtaining a sensing result accordingly; and repeating the step of sensing the voltage level until all the sensing results of the corresponding solenoid valve terminals are obtained. A first sub-circuit of the driving circuit is disabled in response to the first set of the control signals.

In one embodiment, the valve control process further includes a step of: sending a second set of the control signals to the driving circuit. A second sub-circuit of the driving circuit is disabled in response to the second set of the control signals.

In one embodiment, the valve control process further includes steps: selectively sending a driving signal to one of the plurality of solenoid valve terminals according to the corresponding sensing result; and repeating the step of sending the driving signal until all the sensing results are processed.

In one embodiment, the first sub-circuit of the driving circuit and the second sub-circuit of the driving circuit are mutually exclusive.

In one embodiment, the first sub-circuit of the driving circuit and the second sub-circuit of the driving circuit are circuitry-wise identical.

In one embodiment, the first sub-circuit of the driving circuit and the second sub-circuit of the driving circuit are two H-bridge circuits.

DETAILED DESCRIPTION OF THE INVENTION

The embodiments of the invention will be apparent from the following detailed description, which proceeds with reference to the accompanying drawings, wherein the same references relate to the same elements.

One embodiment of the invention is implemented as a valve control device10, which is used with a sprinkler system1. In the embodiment, the sprinkler system1has a plurality of solenoid valves V1˜Vn, a plurality of water outlets O1˜On and at least one conduit C. The solenoid valves V1˜Vn are connected to the water outlets O1˜On, respectively. The solenoid valves V1˜Vn also connected to the conduit C such that the water inflow of each of the water outlets O1˜On from the conduit C can be controlled by the solenoid valves V1˜Vn, respectively. Please note that, the sprinkler system1described herein is for illustrative purpose only and not meant to be a limitation of the present invention.

Please refer toFIG. 1, which is a functional block diagram of the valve control device10according to an embodiment of the present invention. The valve control device10includes a microprocessor11, a driving circuit12, a microcontroller unit13, a user interface14. The driving circuit12has a first sub-circuit121, a second sub-circuit122, a sensing terminal SEN, an enable terminal EN_A, an enable terminal EN_B, a switch123, and a plurality of solenoid valve terminals D1˜Dn. The switch123has two input terminals and a plurality of output terminals which are electronically coupled to the plurality of solenoid valve terminals, respectively. The switch123connects one of the input terminals with one of the output terminals according to a switch signal S_SW issued by the microprocessor11. The first sub-circuit121and the second sub-circuit122are electronically coupled to each one of the input terminals of the switch123, respectively. In the embodiment, the first sub-circuit121and the second sub-circuit122are two identical H-bridge circuits, which function mutually exclusively. The driving circuit12is electronically coupled to the microprocessor11. The microcontroller unit13is electronically coupled to the microprocessor11and the driving circuit12. The solenoid valve terminals D1˜Dn are arranged for connecting to the solenoid valves V1˜Vn, respectively. The valve control device10is arranged to operate in two different modes, a driving mode and a detection mode.

When the valve control device10operates in the detection mode, the microprocessor11is arranged for receiving a query signal S_Q from the user interface14, or from a sever which the microprocessor11is in communications with. The word “server” is used herein to mean “a computer that runs a program which provides services to other computer programs.” Any implementation described herein as “server” is not necessarily to be construed as preferred or advantageous over other implementations. In response to the query signal S_Q, the microprocessor11triggers the microcontroller unit13to generate a first set of the control signals S_C1and then send the first set of the control signals S_C1to the driving circuit12. The driving circuit12receives the first set of the control signals S_C1via the enable terminals EN_A and EN_B. In the embodiment, the first set of the control signals S_C1includes an enable signal and a disable signal. When the driving circuit12receives an enable signal via enable terminal EN_A, the first sub-circuit121is enabled, and vice versa. When the driving circuit12receives an enable signal via enable terminal EN_B, the second sub-circuit122is enabled, and vice versa. The enable signal of the first set of the control signals S_C1is sent to the driving circuit12via the enable terminal EN_B, and the disable signal of the first set of the control signals S_C1is sent to the driving circuit12via the enable terminal EN_A. In this way, when received, the first sub-circuit121is disabled, and the second sub-circuit122is enabled. The microcontroller unit13is also triggered to generate a detection signal S_DE successive to the first set of the control signals S_C1and then sends the detection signal S_DE to the driving circuit12. The driving circuit12receives the detection signal S_DE and one-by-one relays the detection signal S_DE to each of the solenoid valve terminals D1˜Dn according to the switch signal S_SW. In a preferable embodiment, the detection signal S_DE is a continuous direct current (DC) signal with amplitude rages from 5V˜15V.

For each solenoid valve terminals that connects to a solenoid valve, it creates a closed loop for the driving circuit12. Therefore, when a solenoid valve terminal receives the detection signal S_DE, a current can flow back to the second sub-circuit122and thus cause the voltage level at the sensing terminal SEN to rise. In this way, by sensing the voltage level at the sensing terminal SEN when the solenoid valve terminal receives the detection signal S_DE, the microprocessor11can tell which solenoid valve terminal is connected to a solenoid valve and which is not. After the microprocessor11records a sensing result for the corresponding solenoid valve terminal (i.e., the solenoid valve terminal that currently electronically coupled to the driving circuit12through the switch123), the microprocessor11issues a new switch signal to the switch123such that the next solenoid valve terminal receives the detection signal S_DE. The microprocessor11repeats this process until all the sensing results of the solenoid valve terminals D1˜Dn are obtained.

When the valve control device10operates in the driving mode, the microcontroller unit13generates a second set of the control signals S_C2to the driving circuit12. In the embodiment, the second set of the control signals S_C2also includes an enable signal and a disable signal. The enable signal of the second set of the control signals S_C2is sent to the driving circuit12via the enable terminal EN_A, and the disable signal of the second set of the control signals S_C2is sent to the driving circuit12via the enable terminal EN_B. When the driving circuit12receives the second set of the control signals S_C2, the first sub-circuit121of the driving circuit12is enabled, and the second sub-circuit122of the driving circuit12is disabled. The microcontroller unit13also generates a driving signal S_DR successive to the second set of the control signals S_C2and sends the driving signal S_DR to the driving circuit12. In a preferable embodiment, the driving signal S_DR is a continuous alternative current (AC) signal with amplitude rages from 20V˜25V. The driving circuit12selectively relays the driving signal S_DR to the solenoid valve terminals D1˜Dn according to the switch signal S_SW issued by the microprocessor11. When the valve control device10operates in the driving mode, the microprocessor11issues the switch signal S_SW according to the sensing results previously obtained in the detection mode. In other words, only the solenoid valve terminals which are detected to be connected with a solenoid valve will receive the driving signal S_DR. In the preferable embodiment, since the driving signal S_DR is an AC signal, the solenoid valves V1˜Vn will open and then close, repeatedly. This will cause the water outlets O1˜On to sprinkle intermittently.

In detail, please refer toFIG. 2, which illustrates a circuit diagram of the first sub-circuit121and the second sub-circuit122in conjunction with other functional blocks according to the embodiment of the present invention. As can be seen fromFIG. 2, the first sub-circuit121is substantially an H-bridge circuit that comprises 4 transistors M1˜M4, 4 AND gates A1˜A4, 2 NOT gates N1and N2, 2 input terminals IN1and IN2, 2 output terminals OUT1and OUT2, and an enable terminal EN_A. The second sub-circuit122is also substantially an H-bridge circuit that comprises 4 transistors M5˜M8, 2 input terminals IN3and IN4, 2 output terminals OUT3and OUT4, the sensing terminal SEN, and an enable terminal EN_B.

The emitter of the transistor M1is connected to the collector of the transistor M2and the output terminal OUT1, and the emitter of transistor M3is connected to the collector of the transistor M4and the output terminal OUT2. The base of the transistor M1is connected to the output of the AND gate A1, the base of the transistor M2is connected to the output of the AND gate A2, the base of the transistor M3is connected to the output of the AND gate A3, and the base of the transistor M4is connected to the output of the AND gate A4. One input of the AND gate A1is connected to the input terminal IN1, and the other input of the AND gate A1is connected to the enable terminal EN_A. One input of the AND gate A2is connected to the input terminal IN1via the NOT gate N1, and the input output of the AND gate A2is connected to the enable terminal EN_A. One input of the AND gate A3is connected to the input terminal IN2, and the other input of the AND gate A3is connected to the enable terminal EN_A. One input of the AND gate A4is connected to the input terminal IN2via the NOT gate N2, and the other input of the AND gate A4is connected to the enable terminal EN_A.

The emitter of the transistor M5is connected to the collector of the transistor M6and the output terminal OUT3, and the emitter of transistor M7is connected to the collector of the transistor M8and the output terminal OUT4. The base of the transistor M5is connected to the output of the AND gate A5, the base of the transistor M6is connected to the output of the AND gate A6, the base of the transistor M7is connected to the output of the AND gate A7, and the base of the transistor M8is connected to the output of the AND gate A8. One input of the AND gate A5is connected to the input terminal IN3, and the other input of the AND gate A5is connected to the enable terminal EN_B. One input of the AND gate A6is connected to the input terminal IN3via the NOT gate N3, and the other input of the AND gate A6is connected to the enable terminal EN_B. One input of the AND gate A7is connected to the input terminal IN4, and the other input of the AND gate A7is connected to the enable terminal EN_B. One input of the AND gate A8is connected to the input terminal IN4via the NOT gate N4, and the other input of the AND gate A8is connected to the enable terminal EN_B.

The first set of the control signals S_C1is sent to the driving circuit12via the enable terminal EN_A and the enable terminal EN_B. When the valve control device10operates in the detection mode, the microcontroller unit13generates the first set of the control signals S_C1such that the enable terminal EN_A receives the disable signal while the enable terminal EN_B receives the enable signal. The disable signal received by the enable terminal EN_A will be inputs of the AND gates A1˜A4, which yields the low voltage outputs of all 4 AND gates A1˜A4, and thereby switching off the transistors M1˜M4. The first sub-circuit121is therefore disabled. On the other hand, the enable signal received by the enable terminal EN_B will be inputs of the AND gates A5˜A8, in addition to the detection signal S_DE received by the driving circuit12via input terminals IN3˜IN4as the inputs of the AND gates A5˜A8, the AND gates A5˜A8yields the high voltage outputs of AND gates A5and A7, and low voltage outputs of AND gates A6and A8. The transistors M5and M7is thereby switched on, and the second sub-circuit122is enabled.

The second set of the control signals S_C2is also sent to the driving circuit12via the enable terminal EN_A and the enable terminal EN_B. When the valve control device10operates in the driving mode, the microcontroller unit13generates the second set of the control signals S_C2such that the enable terminal EN_A receives the enable signal while the enable terminal EN_B receives the disable signal. The disable signal received by the enable terminal EN_B will be inputs of the AND gates A5˜A8, which yields the low voltage outputs of all 4 AND gates A5˜A8, and thereby switching off the transistors M5˜M8. The second sub-circuit122is therefore disabled. On the other hand, the enable signal received by the enable terminal EN_A will be inputs of the AND gates A1˜A4, in addition to the driving signal S_DR received by the driving circuit12via input terminals IN1˜IN2as the inputs of the AND gates A1˜A4, the AND gates A1˜A4yields the high voltage outputs of AND gates A1and A3, and low voltage outputs of AND gates A2and A4. The transistors M1and M3is thereby switched on, and the first sub-circuit121is enabled.

The switch123is controlled by the switch signal S_SW issued by the microprocessor11such that the detection signal S_DE is orderly sent to the solenoid valve terminals D1˜Dn one by one. In addition, the switch123is also controlled by the microprocessor11to ensure the driving signal S_DR is sent to the active solenoid valves according to the detection result.

In the embodiment, the driving circuit12may further include an LC filter (not shown) coupled between the output terminals OUT1and OUT2such that the driving signal S_DR, namely the AC current signal, will be converted into a sinusoid wave prior to being feed into the solenoid valves V1˜Vn. The converted sinusoid-wave will yield smoother control of the solenoid valves V1˜Vn. However, it is for illustrative purpose only and not meant to be a limitation of the present invention.

Please refer toFIGS. 3A and 3B, which are flowcharts illustrating steps of an operating method of the valve control device10for the sprinkler system1according to an embodiment of the present invention. Provided that the result is substantially the same, the steps are not required to be executed in the exact order shown inFIGS. 3A and 3B. The exemplary valve operating method may be briefly summarized by following steps.Step300: Send a first set of the control signals to the driving circuit.Step302: Send a detection signal.Step304: Sense a voltage level at the sensing terminal when the detection signal is sent to the current solenoid valve terminal and obtain a sensing result accordingly.Step306: Are all the sensing results of the solenoid valve terminals obtained? If “No”, go to Step307, otherwise go to Step308.Step307: Issue a switch signal to the switch such that the next solenoid valve terminal receives the detection signal. Then, go to Step304.Step308: End of detection.Step400: Send a second set of the control signals to the driving circuit.Step402: Selectively send a driving signal to one of the plurality (or, to the solenoid valve terminal that currently electronically coupled to the driving circuit12through the switch123) of solenoid valve terminals according to the sensing results.Step406: Are all the solenoid valve terminals which are detected to be connected with a solenoid valve driven? If “No”, go to Step407, otherwise go to Step408.Step407: Issue a switch signal to the switch such that the next solenoid valve terminal that is detected to be connected with a solenoid valve receives the driving signal. Then, go to Step402.Step408: End of driving.

Step300and Step400may be achieved by the microprocessor11. The microprocessor11then triggers the microcontroller unit13to execute Step302and Step402. Step304,306,307,406, and407are also performed by microprocessor11. As a person skilled in the art can readily understand the operation of each step shown inFIGS. 3A, 3BandFIG. 4from the above-mentioned paragraphs, and further description is omitted here for brevity.