Announcement

Collapse
No announcement yet.

Emergency Water Shutoff, with 12V motor controlled valve

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Emergency Water Shutoff, with 12V motor controlled valve

    There are several places I could have posted this, since the basis is the Arduino control and it relies on the Arduino plug-in, I thought this might be the best forum.

    Over in another thread I mentioned that I used a KLD water valve for my emergency water shutoff. One of the members asked if I would do a write up of the control wiring and events. The valve I chose was from KLD in China, it is a KLD20S with B3S wiring. It is a full bore 3/4" stainless valve with end switch feedback. I purchased it direct from China for about $65 delivered.

    Here is the basic wiring for the valve. On the motor drive side there is a common "-", an open drive and a close drive connection. For the limit switches there is a common and an N.O. switch for closed and open.



    One thing I discovered when I received the valve is that the designers planned on the valve being operated by supplying open or close drive, and leaving that drive applied the whole time the valve is opened or closed. It only draws about 60ma at fully opened or closed, but I don't think that is necessary. The valve is a standard ball valve, so it is not going to creep if there is no current applied. Unfortunately the open or close limit switches only stay actuated when motor drive is applied. I'm sure I probably could have hacked the valve so that the switches would show the valve in the open position without drive applied, but I didn't see the point.

    I used an Arduino Mega just because I have had better luck with them because they have more memory than the Uno. I only needed 4 pins, so a Uno would work. I used an Arduino POE Ethernet Shield and a Velleman KA05 I/O shield. I only assembled the board for the two inputs and outputs I needed. The board makes for a nice clean installation with screw terminals for the inputs and outputs, a relay and drive circuit for output and LEDs to show the status of the inputs and outputs. I put the Arduino near the valve to mitigate any noise I might pickup on the Arduino inputs. Ethernet connects the Arduino to my home network.

    Then it was two virtual devices, two Arduino inputs and two Arduino outputs. Below is a shot of the associated devices.




    First is a "Fault" virtual device that will trip any time the valve fails to fully open or close within a reasonable time frame. Full travel on the valve is about 6 seconds, so I set the failure time at 30 seconds as I will show in an event below. The Fault device will trigger a pushover message and give me a visual reminder that a fault had occurred until it is cleared by normal valve operation

    The second device is is another virtual device for valve control. It is used to trigger the events below to open and close the valve. Below that are the two Arduino outputs to drive the valve open or closed and the two Arduino inputs that recognize when the limit is reached in each direction.


    Then there are two events for Open, one to trigger when the virtual position device is changed to "Open" and another to trigger when the valve has hit the limit switch for fully open.



    The Open event sets the Arduino Open drive output to ON and the Close drive output to OFF. An immediate script changes the string value for the position device to "Opening". A timer is started to be used in fault detection in another event.

    The Opened event is triggered by the Arduino Open Limit Input, waits three seconds than turns the Open Drive output Off. An immediate script sets the string value of the position device to "Open". The Arduino Open Drive Output is turned off, the timer is stopped and reset and if there was a prior fault, it is cleared or turned Off.


    Then there is an event for failsafe on the motor drive. If the valve drive has been On for 30 seconds or more, it is turned Off.




    The Valve Close, Valve Closed and Valve Closes -Failsafe events are duplicates of the Open counterparts, just using a different Arduino input and output.






    The Water Valve Operation Fault event simply looks at the timer, if an open or close event has not completed within 30 seconds, the "Fault" virtual device is turned On, an immediate script changes the position virtual device string to "Fault'. The timer is reset and a Pushover message is sent.




    Here is a quick video of the Device Manager screen showing the devices in operation.




    Since my valve is buried inside a basement wall, I couldn't get pictures of my actual installation. Here is a spare valve and Arduino bread boarded on my workbench for demonstration.



    There are many different valves and many different ways of controlling them. I have had such good luck with Arduino controls this was my choice. If you have any questions, please don't hesitate to ask.
    Last edited by randy; June 17, 2017, 11:45 AM.
    HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

    #2
    Randy, need to say more than just thank you! This is awesome. You've gone all out as usual sharing your insight and creativity! Thank you again


    Sent from my iPhone
    Tom
    baby steps...starting again with HS3
    HS3Pro: Z-NET & 80 Z wave Devices,
    HSTouch: 4 Joggler (Android Kitkat), 2 iPhone, 3 iPads
    Whole House Audio: 5 SqueezePlay Jogglers w Bose Speakers
    In The Works: 10 Cameras Geovision, new Adecmo/Envisalink Alarm, Arduinos
    System: XP on Fanless Mini-ITX w/ SSD

    Comment


      #3
      Originally posted by TomTom View Post
      Randy, need to say more than just thank you! This is awesome. You've gone all out as usual sharing your insight and creativity! Thank you again


      Sent from my iPhone
      Glad to help. Hopefully there are some ideas in this that you or others can build or improve upon.
      HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

      Comment


        #4
        awesome write up. There are a few projects that have peaked my interest for the arduino plugin, this may spur me on to be the starting point of playing with that.

        Can you recommend a source for where you got the valve from?

        Comment


          #5
          Originally posted by ORNVM View Post
          awesome write up. There are a few projects that have peaked my interest for the arduino plugin, this may spur me on to be the starting point of playing with that.

          Can you recommend a source for where you got the valve from?
          I bought it direct from China by emailing the manufacturer. Several others had purchased directly from them. The valve wa about $43 and the DHL shipping was $35. It got here in about 3 days.

          The person I dealt with was avagu@kld.cn their website is www.kld.cn.

          You can choose the valve body size and material, the wiring and voltage of the actuator. Our main supply is 3/4" so I chose 3/4" stainless. I put the full description in the post above.
          HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

          Comment


            #6
            Originally posted by rprade View Post
            I bought it direct from China by emailing the manufacturer.
            Gotcha, thanks for the clarification. I didn't think a foreign manufacturer would be interested in one off sales like that. I guess the whole distributor network and retailers is why prices are double+ over here though for comparable items!

            Comment


              #7
              Here relating to the KDS valve went in on a Water Valve Group Buy group buy on Cocoontech that started in 2013. Note too that the group buy on CT was originally started by a Homeseer user Dan (Drozwood). It was a lot of work for the person that did it in that he had to front monies up front for purchasing these in bulk.

              Thinking Charlie from the forum here also got involved in the same group buy The purchase of the specific model of KDS evolved.

              That said its much easier to do what Randy did. Hector (Rotech) did the same in the purchase of his water valves.

              All said it is much easier to DIY a water valve that includes the bells and whistles of monitoring switches and voltage inputs rather than one that includes some sort of automation technology. You get more this way.

              On a tangent one home is using all electrical conduit and the other not. Personally prefer modding the panel here with electrical conduit versus there with romex (even though I have done it). Old fashioned a bit here prefer my electric to run in conduit versus tacked romex on the insides of walls.

              I did use all 3 wire plus ground romex on a new build in 2000 which worked for me relating to automation.

              I have my water valve connected to my OmniPro II panel along with my flood switches Its really a simple connection. (note I am all LV hardwared with direct connects to the panel.).

              Two newer homes today too are all copper (my preference over PVC) making these DIY endeavors sort of slow as over the years I have had to learn to sweat copper pipes. With PVC those its much simpler and faster to do.

              Personally with this kind of stuff I want 100% reliability not any less. That is me though.
              - Pete

              Auto mator
              Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
              Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
              HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

              HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
              HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

              X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

              Comment


                #8
                Originally posted by Pete View Post

                All said it is much easier to DIY a water valve that includes the bells and whistles of monitoring switches and voltage inputs rather than one that includes some sort of automation technology. You get more this way.
                Could you please elaborate on this? How do you "get more"?


                Two newer homes today too are all copper (my preference over PVC) making these DIY endeavors sort of slow as over the years I have had to learn to sweat copper pipes. With PVC those its much simpler and faster to do.

                Are you telling me that you're installing copper drains instead of PVC? I suppose you could do that...... Or put a down payment on a boat or something.
                Originally posted by rprade
                There is no rhyme or reason to the anarchy a defective Z-Wave device can cause

                Comment


                  #9
                  Could you please elaborate on this? How do you "get more"?
                  Base of the high end valve has more built in.

                  Said price of high end valve though here is dictated by those bells and whistles of automation. A quality automated valve is a valve is a valve.

                  I have multiple water related pumps here. The best one is made by Davey (in Australia). It is made to last forever. I can and have taken it apart to clean and it is easy. That said purchased a pump here 10 years ago at a big box store with a lifetime warranty. It was a piece of crap and failed in less than 2 years and while I did get a new replacement I will probably never use it because of its poor construction. (its an unused backup today). The lifetime warranty on the pump didn't pay for the damage the failure of the pump caused (insurance paid for that). Went to Zoeller for a couple of other pumps. The Zoeller pumps are levels above the crap I see at the big box stores. Well again that is me.

                  IE:



                  Note all of the switches built in to the KDS valve that Randy is using.

                  IE: having a separate 12VDC input and switches for monitoring valve position (either way) adds redundancy checking.

                  You do not get this with a base automated $400 water valve.

                  You are paying a premium for the plug n play automation pieces but not so much for the quality of the basic pieces of the valve itself.

                  The issue of that whole 100% accuracy though relates to how many pieces you put between the valve and the control of the valve. Dependences of more hardware and software which depend on other dependences like wireless or wired network with no redundancy can cause issues.

                  Are you telling me that you're installing copper drains instead of PVC? I suppose you could do that...... Or put a down payment on a boat or something.
                  No just my water line feeds are all copper. The two new homes are using PVC for drains.

                  @SF thinking you come from the world of HVAC eh?

                  My old home zoned system lasted 30 years with regular maintenance.

                  The new homes (~ 10 years old) systems lasted less than 10 years with required and normal maintenance. One though is a piss poor design.

                  The failure of the system here was very bad relating to WAF and it did take 2 days for a new system to be installed which was still slow for me.
                  Last edited by Pete; June 26, 2015, 08:35 AM.
                  - Pete

                  Auto mator
                  Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
                  Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
                  HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

                  HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
                  HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

                  X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

                  Comment


                    #10
                    Originally posted by Pete View Post

                    @SF thinking you come from the world of HVAC eh?

                    My old home zoned system lasted 30 years with regular maintenance.

                    The new homes (~ 10 years old) systems lasted less than 10 years with required and normal maintenance. One though is a piss poor design.

                    The failure of the system here was very bad relating to WAF and it did take 2 days for a new system to be installed which was still slow for me.
                    Originally posted by rprade
                    There is no rhyme or reason to the anarchy a defective Z-Wave device can cause

                    Comment


                      #11
                      Thank you SF

                      Is this a heating or cooling system you describe?
                      Just a regular forced air set up in the MW and similiar (sort of) in Florida.

                      Once this technology is ported to ducted systems it's going to be a game changer for heating and cooling.
                      Mini splits are eviscerating all other HVAC markets.
                      Understood.

                      Your knowledge base of efficiency and methodologies have brought the future to your home. Well that said; we should be already there and we are not.
                      Last edited by Pete; June 26, 2015, 10:48 AM.
                      - Pete

                      Auto mator
                      Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
                      Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
                      HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

                      HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
                      HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

                      X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

                      Comment


                        #12
                        Randy,
                        I'm starting down, hopefully short, road . Talked to Ms Gu and ordered the valve. Was a bit scary using western union having read all their warnings, but all seems to going well.

                        Second Arduino:
                        I'm going to get a Mega 2560- Arduino site is out of stock.
                        But found this on ebay for Mega 2560 $13

                        Arduino POE Ethernet Shield- w5100 - on ebay for $10? Seems to have a lot of sales of both.
                        These are probably "compatible' remakes. Are people using these with success and would they be ok?
                        Tom
                        baby steps...starting again with HS3
                        HS3Pro: Z-NET & 80 Z wave Devices,
                        HSTouch: 4 Joggler (Android Kitkat), 2 iPhone, 3 iPads
                        Whole House Audio: 5 SqueezePlay Jogglers w Bose Speakers
                        In The Works: 10 Cameras Geovision, new Adecmo/Envisalink Alarm, Arduinos
                        System: XP on Fanless Mini-ITX w/ SSD

                        Comment


                          #13
                          Originally posted by TomTom View Post
                          Randy,
                          I'm starting down, hopefully short, road . Talked to Ms Gu and ordered the valve. Was a bit scary using western union having read all their warnings, but all seems to going well.

                          Second Arduino:
                          I'm going to get a Mega 2560- Arduino site is out of stock.
                          But found this on ebay for Mega 2560 $13

                          Arduino POE Ethernet Shield- w5100 - on ebay for $10? Seems to have a lot of sales of both.
                          These are probably "compatible' remakes. Are people using these with success and would they be ok?
                          I was worried about Western Union as well, but there were no problems. If it had been over $100 I probably wouldn't have done it.

                          As far as Arduino clones, i have had some work fine and had trouble with others. The problems I was having with clones (especially Ethernet) was frequent dropped connections. I am sticking with genuine Arduino now and have enjoyed rock solid operation.

                          The link you gave is not for a POE Ethernet shield. It is "POE Ready". That means a POE module needs to be soldered to it.
                          HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

                          Comment


                            #14
                            Thanks for catching that. Where did you get your Mega and Ethernet Shield from. And which Ethernet shield are you using?
                            Is it this ?
                            Originally posted by rprade View Post
                            The link you gave is not for a POE Ethernet shield. It is "POE Ready". That means a POE module needs to be soldered to it.
                            Tom
                            baby steps...starting again with HS3
                            HS3Pro: Z-NET & 80 Z wave Devices,
                            HSTouch: 4 Joggler (Android Kitkat), 2 iPhone, 3 iPads
                            Whole House Audio: 5 SqueezePlay Jogglers w Bose Speakers
                            In The Works: 10 Cameras Geovision, new Adecmo/Envisalink Alarm, Arduinos
                            System: XP on Fanless Mini-ITX w/ SSD

                            Comment


                              #15
                              FANTASTIC work Randy!!!
                              RJ_Make On YouTube

                              Comment

                              Working...
                              X