OpenSprinkler Forums Hardware Questions water flow sensor and valve current sense Re: Re: water flow sensor and valve current sense



How would you recommend implementing it so the board senses the current and can record it for each valve (so we know if one valve is not working properly or if a valve failed or wire disconnected/shorted).

There are several options. One possibility is to add a current sensor on the 24V AC line to sense the current change when a valve is open or closed. This is somewhat tricky because I am not familiar with AC current sensors. In an early prototype of OpenSprinkler I considered another option of applying low DC voltage (5V) and using a single analog pin to detect shorted solenoids. It works but I am concerned that the behavior of solenoids may be different under AC vs DC voltage, such that a solenoid that looks fine under 5V may still be defective under 24V AC. I don’t have enough experimental data to tell. In the end, I opted for the simple option of adding a fuse, which is simple enough to replace upon shorting.

There is another thread on the forum on flow sensors. Looks like flow sensors work by sending pulses, so an interrupt pin, or even just polling a GPIO pin should allow you to interface with flow sensors. I have ordered a flow sensor but haven’t tested it yet. Will report back when I do.

If you are worried about clock issues on the shift registers, the good news is that the clock can be adjusted to any speed you want — it’s done by simply toggling the clock pin high and low in the code. You can introduce some delay in the loop to slow down the clock. Check my replies in the other thread you posted.

About extra I/Os to control garage door opener: note that all current versions of OpenSprinkler (including Pi and Beagle) have an on-board mini-relay, the purpose of which is exactly for more general-purpose switching such as garage door opener. The software hasn’t been updated to include relay control yet, but the hardware feature is already there. The pin assigned to the mini-relay can be found in the schematic, and feel free to ask me if it isn’t clear in the schematic.