OpenSprinkler Forums Hardware Questions water flow sensor and valve current sense

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #22794

    rhillman
    Participant

    Hi,

    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).
    Also I have a flow sensor installed on my cyber rain irrigation controller. With all the possibilities developing and adding to the existing code, I’d like to switch over to the OpenSprinkler (or the Pi version). Any suggestions on connecting the flow sensor to the board or if you plan on supporting these two features in hardware?

    Are both Opensprinkler as wel as OsPi both easy to modify so I can make my own algorithm for watering times, as well as implementing the flow sensor and current monitoring. I’d like it to notify me if a valve has too much water flow and have it email me… or weekly email my account a water usage report and any concerns/zones. Perhaps if you could point me to the code and which product you recommend I’ll dive in. Like the OsPi idea but would also like to see a display screen like the Opensprinkler. And I’ll need to use the expansion boards to get at least 24 zones.

    For the shift register it looks like an HC part (high speed CMOS). The rise times of these are somewhat fast for a cable. Is there a schematic I can look at showing how it’s connected? Worried substantial clock issues might occur and want to make sure it’s a good quality signal to the expansion boards (impedance controlled cables and series terminated driver?) I read another person posting a comment about having the shifted data run back to the micro, that sounds like a great idea.

    On a side note – was thinking about using any extra I/O’s to control my garage door opener. Perhaps using TASKER on my droid phone to command my garage door to open while i’m driving up my driveway, and maybe even a sensor to detect if it’s open when I leave (so it closes automatically?) Much lower priority on my wish list, but since most people probably have their sprinkler controller in the garage, it might be a desirable feature for others.

    My cyberrain system works ok but is quite buggy. Sometimes it waters when it rains (it has been doing that a lot lately) and they can’t seem to fix such a simple thing for months. I’d like to use the opensprinkler system and have it water only if it hasn’t rained yesterday and won’t rain today or tomorrow (perhaps a 3 day window).. and calculate watering times of each zone based on humidity, temperature, etc. Right now their algorithm will water today even if it rained like crazy yesterday. and with their software bugs, it waters on the rainy days too.. Glad to see you have come up with opensprinkler, sounds like fun!

    -Robert

    #26189

    Ray
    Keymaster

    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.

    #26190

    rhillman
    Participant

    Hi Ray, the concern about signal integrity is the rise time of 4ns that may ring quite a bit. Adjusting the frequency won’t help with the rise time or impedance mismatch, but if you haven’t observed any problems I may buy one and put a scope probe on it to see if my simulations match reality.

    Thank you for the info on the relay, sounds great. As for current sensing – if we know the water flow rate is reasonable then the valve must be working. Flow rate is most important because I have a lot of area to cover and a busted pipe somewhere is important to fix quickly. I plan on having it check a certain flow rate for each valve and if it’s outside that range too low it would notify me, if too high it would notify and skip to the next valve.

    I’ve observed the flow sensor connected to my cyberrain system and essentially when you turn on the valve you get a lot of water flowing until the line is full, and then it stabilizes once all the sprinklers have the air out. This could take up to 2 minutes in my case when you are dealing with longer /large pipes. So usually you can set how long it waits before it samples the flow rate.

    Also the flow sensor is helpful when all the valves are off to let you know if you have a leak somewhere before the valves. I had a problem with one hose bib/faucet opening up full blast all night and it would have been nice for something to text/email me an alert if the water was on for more than a certain number of minutes while the valves are off.

    For water conservation right now I’m exporting the reports from cyberrain and running a perl script to calculate how much water each zone uses and how much it costs per month, along with any deviation on flow rate compared to last month (in case a leak is starting to occur). I hope to integrate some of these features into your opensprinkler so it’s more automated and share if someone else is also interested.

    Sorry for the long post – one more thing. Not sure if you considered perhaps having a second opensprinkler on the network that is a secondary along with a primary controller. So for example in my case I have two controller locations. It would be nice if one location was the primary with 32 valves, and the secondary location was another 32 valves. Then the secondary location could just take commands from the primary one in terms of open valve X etc. while the primary controller could run all the schedules and ‘control’ more than 32 valves. I suppose alternatively you could just run both opensprinklers separately instead of communicating together but this would allow a single schedule so you don’t have to worry about the two controllers watering at the same time and messing up the flow sensor readings etc (if they use the same flow sensor which mine do). Maybe not a lot of people wanting more than 32 zones or more controllers though…

    Thanks for the reply and also for such a cool product. Looking forward to it!

    #26191

    rhillman
    Participant

    Hi Ray I only see one relay and it looks like it’s connected to the 24VAC to switch that in or out? (or maybe I’m looking at the wrong schematic?)
    Could you point me in the right direction where the relay is that will allow me to short two wires together on my garage door opener button? Thanks.

    #26192

    Ray
    Keymaster

    @rhillman: about flow sensor, do you have a brand/model you’d recommend?

    About primary-secondary opensprinkler options — yes this question has come up in the past, and I think it’s doable. There are a few possible implementations, probably the simplest can be: on the primary controller, define some stations that are associated with the secondary controller. When operating any of these stations, the primary controller, instead of sending signal to its shift register, sends an HTTP command to the secondary controller. This does require some firmware code changes, but it should be fairly easy to implement an ad-hoc solution.

    #26193

    Ray
    Keymaster

    Hi Ray I only see one relay and it looks like it’s connected to the 24VAC to switch that in or out? (or maybe I’m looking at the wrong schematic?)
    Could you point me in the right direction where the relay is that will allow me to short two wires together on my garage door opener button? Thanks.

    The relay is not wired to 24VAC — the three mapped-out pins NO (normally open), CO (change-over), NC (normally closed) are not connected to anything internally. To use it to control garage door, solder the two wires to NO and CO. This way, when the relay is activated, NO and CO will be shorted together. On OpenSprinkler 2.1, the relay is activated by setting a high on pin 14.

    #34432

    Erik
    Participant

    Hi Ray.

    I am totally new anything you stand for with the OpenSprinkler concept and haven’t spent much time yet looking into this so I hope to not completely throw you off with my post/reply here. However, from what I can tell so far this is a super interesting product with endless opportunities. I am managing 4 houses with irrigation systems and it would be sweet to control them all from one platform remotely. Your system seems to obviously be able to do this. Now, the reason I am replying here is that to really make this work perfectly for me is to monitor water usage and specifically if the water is flowing when it shouldn’t. Getting an alarm per e-mail can save a lot of water in case a pipe is busted or a sprinkler doesn’t shut off correctly.

    Did you make a flow sensor work with your system and if so, do you have a recommendation for a specific product?

    Thank you for your patience with this total newbie to forums and open source programming…. 🙂

    Best

     

    #34458

    Ray
    Keymaster

    A while back I was able to get this type of flow meter to work with OpenSprinkler:
    http://www.amazon.com/Liquid-Flow-Meter–Plastic-Threaded/dp/B00K0TFZN8/

    The meter has a hall effect sensor inside that generates clicks which can be detected by a hardware counter pin (using a counter pin is more efficient than polling or interrupt). However, my understanding is that this type of flow meter is not inline, and it’s better to use a proper flow meter like this one:
    http://www.amazon.com/Dwyer%C2%AE-Multi-Jet-Pulsed-WMT2-A-C-04-1-Economical/dp/B00D2ME6FI

    I think they work the same way, but I haven’t had time to verify it yet.

    #34818

    Erik
    Participant

    Hi Ray, would this work with any of the opensprinkler options or do i need a specific one? I don’t want to spend too much time to build my own if i can buy the fully assembled version (http://rayshobby.net/cart/opensprinkler/os) and make it work without issues. 
    <div style=”color: #222222; font-family: arial; font-size: small; line-height: normal;”>I am just wondering if I need GPIO for the flow meter to be read. It does not appear that the fully assembled version has those GPIOs.</div>
    <div style=”color: #222222; font-family: arial; font-size: small; line-height: normal;”>Thank you for your assistance.</div>
    <div style=”color: #222222; font-family: arial; font-size: small; line-height: normal;”>Erik</div>

    #34826

    Ray
    Keymaster

    Yes, this would work on both the fully assembled and DIY versions. On both versions, the spare GPIO pins are available at the top of the circuit board. Of course for the DIY version you will see those while assembling the controller; for the fully assembled, you can open the enclosure (there are four screws at the back of the enclosure) and check the circuit board.

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.

OpenSprinkler Forums Hardware Questions water flow sensor and valve current sense