Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. My Project
  3. Irrigation Controller (up to 16 valves with Shift Registers)

Irrigation Controller (up to 16 valves with Shift Registers)

Scheduled Pinned Locked Moved My Project
371 Posts 56 Posters 247.8k Views 52 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • hekH hek

    Added your project to the main site togeter with @petewill excellent new video.

    http://www.mysensors.org/build/irrigation

    https://youtu.be/l4GPRTsuHkI

    C Offline
    C Offline
    charlybrown
    wrote on last edited by
    #106

    @hek said:

    Added your project to the main site togeter with @petewill excellent new video.

    http://www.mysensors.org/build/irrigation

    https://youtu.be/l4GPRTsuHkI
    Excellent project.
    Can you help me with the android code, to send instrucctions from my cell phone to Arduino? like on-off light , bomb, etc.

    thanks for your time!
    best regards.

    1 Reply Last reply
    0
    • C Offline
      C Offline
      charlybrown
      wrote on last edited by
      #107

      Excellent work. I need help with android code. Anybody can help me with this?

      thanks

      1 Reply Last reply
      0
      • S Offline
        S Offline
        shemmozhipandian
        wrote on last edited by
        #108

        Hi,

        I made the circuit, but later i realize it required vera controller to sync all the data. Is there other way or idea to send data to the built system.

        petewillP 1 Reply Last reply
        0
        • S shemmozhipandian

          Hi,

          I made the circuit, but later i realize it required vera controller to sync all the data. Is there other way or idea to send data to the built system.

          petewillP Offline
          petewillP Offline
          petewill
          Admin
          wrote on last edited by
          #109

          @shemmozhipandian Sorry for the delayed reply. It does require a controller (like Vera) but there are free ones out there. Take a look here: http://www.mysensors.org/controller/

          I know Domoticz is free and seems to be fairly popular here. There are others as well. If you find one you like you may want to write a quick post to check compatibility. I personally use Vera so I'm not sure how the others work.

          My "How To" home automation video channel: https://www.youtube.com/channel/UCq_Evyh5PQALx4m4CQuxqkA

          1 Reply Last reply
          0
          • ? Offline
            ? Offline
            A Former User
            wrote on last edited by
            #110

            Hello Pete, thanks for your hard work on this. Superb!
            I want to build a irrigation controller like your project but can't figure out hows the wiring. On the wiki an image is shown but I can't see what the connections are in this "virtual proto board"
            Is there something clearer or like a pinout to pin list?
            I'm using an Arduino Nano, so things will be something different.
            Thank you very much.

            petewillP 1 Reply Last reply
            0
            • ? A Former User

              Hello Pete, thanks for your hard work on this. Superb!
              I want to build a irrigation controller like your project but can't figure out hows the wiring. On the wiki an image is shown but I can't see what the connections are in this "virtual proto board"
              Is there something clearer or like a pinout to pin list?
              I'm using an Arduino Nano, so things will be something different.
              Thank you very much.

              petewillP Offline
              petewillP Offline
              petewill
              Admin
              wrote on last edited by
              #111

              @Sergio Jim (@BulldogLowell) posted some more details above but here is my fritzing project as well. Hopefully you can zoom in where you need to see more.

              Fritzing Irrigation Controller Wiring.fzz

              My "How To" home automation video channel: https://www.youtube.com/channel/UCq_Evyh5PQALx4m4CQuxqkA

              1 Reply Last reply
              0
              • ? Offline
                ? Offline
                A Former User
                wrote on last edited by A Former User
                #112

                Mmm... I finally assembled the device. But I'm having problems with it. It doesn't activate/deactivates the relays. I'm getting the power for the relay board from the nano itself. Could that be the problem?
                Also, my domoticz doesn't receive the off signal from the controller. (doens't turn the light off) and sometimes throws some error telling that can't contact the node.
                BTW I tried to contac Bulldogloweel without success :sob:

                petewillP 1 Reply Last reply
                0
                • ? A Former User

                  Mmm... I finally assembled the device. But I'm having problems with it. It doesn't activate/deactivates the relays. I'm getting the power for the relay board from the nano itself. Could that be the problem?
                  Also, my domoticz doesn't receive the off signal from the controller. (doens't turn the light off) and sometimes throws some error telling that can't contact the node.
                  BTW I tried to contac Bulldogloweel without success :sob:

                  petewillP Offline
                  petewillP Offline
                  petewill
                  Admin
                  wrote on last edited by
                  #113

                  @Sergio said:

                  Mmm... I finally assembled the device. But I'm having problems with it. It doesn't activate/deactivates the relays. I'm getting the power for the relay board from the nano itself. Could that be the problem?

                  Yes, that is most likely the problem. Most of the relays I have used need more power than what the arduino can supply. Try feeding it more power (like from a phone charger).

                  Also, my domoticz doesn't receive the off signal from the controller. (doens't turn the light off) and sometimes throws some error telling that can't contact the node.

                  Check the serial monitor with debug enabled. Does this happen every time? It could be radio issues. Do you have a 4.7uf cap on the radio? Is it close enough to your gateway?

                  My "How To" home automation video channel: https://www.youtube.com/channel/UCq_Evyh5PQALx4m4CQuxqkA

                  1 Reply Last reply
                  0
                  • BulldogLowellB BulldogLowell

                    @moffen666

                    I don't have Domoticz but I suspect that the callback isn't functioning.

                    try populating the array with the desired times for each sequence. replace this:

                    int allZoneTime [NUMBER_OF_VALVES + 1];
                    int valveSoloTime [NUMBER_OF_VALVES + 1];
                    

                    with something like this:

                    int allZoneTime [NUMBER_OF_VALVES + 1] = {0, 10, 10, 10, 5,<... how many valves you have with zero in the first position>} ;
                    int valveSoloTime [NUMBER_OF_VALVES + 1] = {0, 5, 5, 5, 5,<... how many valves you have with zero in the first position>};
                    

                    This will load in the times that the program uses as your 'default' values. Then, you can check with Domoticz experts on getting the V_VAR variables working.

                    fusion_manF Offline
                    fusion_manF Offline
                    fusion_man
                    wrote on last edited by
                    #114

                    @BulldogLowell

                    I need to add a relay for a master valve. This will open when any zone valves open. I think it could be mapped to All On 0(1) but I am not sure how to accomplish this. I don't know the code for that or electrical connection. I also noticed we are about maxed out of data (99%) using ProMini. Any ideas?

                    1 Reply Last reply
                    0
                    • BulldogLowellB Offline
                      BulldogLowellB Offline
                      BulldogLowell
                      Contest Winner
                      wrote on last edited by BulldogLowell
                      #115

                      If you are worried about Program Space you can turn off Serial debug to rid yourself of a bunch of overhead in the sketch. I am not using String class so there is PLENTY of RAM and I've been using this for a while with no stack corruption issues:

                      #define DEBUG_ON   // comment out to surpress serial monitor output
                      

                      if you propose to turn ON the master valve when each valve is cycled on, then I believe all you need to do is add that valve to the bitmask (logical OR) each time you updateRelays().

                      void updateRelays(int value)
                      {
                        if(value)
                        {
                          value |= 0b0000000010000000;  // master is the eighth relay, there are 7 controlled in this example (active HIGH in this example)
                        }
                        digitalWrite(latchPin, LOW);
                        shiftOut(dataPin, clockPin, MSBFIRST, highByte(value));
                        shiftOut(dataPin, clockPin, MSBFIRST, lowByte(value));
                        digitalWrite(latchPin, HIGH);
                      }
                      

                      not tested

                      fusion_manF 2 Replies Last reply
                      0
                      • BulldogLowellB BulldogLowell

                        If you are worried about Program Space you can turn off Serial debug to rid yourself of a bunch of overhead in the sketch. I am not using String class so there is PLENTY of RAM and I've been using this for a while with no stack corruption issues:

                        #define DEBUG_ON   // comment out to surpress serial monitor output
                        

                        if you propose to turn ON the master valve when each valve is cycled on, then I believe all you need to do is add that valve to the bitmask (logical OR) each time you updateRelays().

                        void updateRelays(int value)
                        {
                          if(value)
                          {
                            value |= 0b0000000010000000;  // master is the eighth relay, there are 7 controlled in this example (active HIGH in this example)
                          }
                          digitalWrite(latchPin, LOW);
                          shiftOut(dataPin, clockPin, MSBFIRST, highByte(value));
                          shiftOut(dataPin, clockPin, MSBFIRST, lowByte(value));
                          digitalWrite(latchPin, HIGH);
                        }
                        

                        not tested

                        fusion_manF Offline
                        fusion_manF Offline
                        fusion_man
                        wrote on last edited by
                        #116

                        @BulldogLowell

                        By commenting out the DEBUG, it went from 99% to 63% used memory.
                        The modification to void updateRelays worked very nicely. I only wish the master control valve would remain ON during cycling through each valve (subjected to VALVE_RESET_TIME) as I am using it to control a chemical feed pump to prevent hydrogen proxide (30%) from entering my irrigation system.

                        Awesome job and I am very pleased with your design.
                        The only problem I had when building the controller was getting the LCD to communicate.
                        I added this comment to my program under Instructions.

                        • If your LCD is unresponsive, download sketch http://forum.arduino.cc/index.php?topic=128635.0 then check serial monitor for LCD address. Insert your address below.
                        1 Reply Last reply
                        1
                        • BulldogLowellB BulldogLowell

                          If you are worried about Program Space you can turn off Serial debug to rid yourself of a bunch of overhead in the sketch. I am not using String class so there is PLENTY of RAM and I've been using this for a while with no stack corruption issues:

                          #define DEBUG_ON   // comment out to surpress serial monitor output
                          

                          if you propose to turn ON the master valve when each valve is cycled on, then I believe all you need to do is add that valve to the bitmask (logical OR) each time you updateRelays().

                          void updateRelays(int value)
                          {
                            if(value)
                            {
                              value |= 0b0000000010000000;  // master is the eighth relay, there are 7 controlled in this example (active HIGH in this example)
                            }
                            digitalWrite(latchPin, LOW);
                            shiftOut(dataPin, clockPin, MSBFIRST, highByte(value));
                            shiftOut(dataPin, clockPin, MSBFIRST, lowByte(value));
                            digitalWrite(latchPin, HIGH);
                          }
                          

                          not tested

                          fusion_manF Offline
                          fusion_manF Offline
                          fusion_man
                          wrote on last edited by
                          #117

                          @BulldogLowell

                          I ended up going a different approach. I modified the program so I could use Arduino digital pin6 as an output powering my master valve relay. I then added digitalWrite (masterValvePin, HIGH) where you have updateRelays(BITSHIFT_VALVE_NUMBER) to turn ON the valve. To turn off the valve I added a delay then digitalWrite (masterValvePin, LOW) to if (state == STAND_BY_ALL_OFF). This has tested perfectly for my situation.
                          The only thing missing from the Controller is the ability to add the RainBird rain sensor to the board. I think the way of achieving this is an input to my Vera controller.

                          BulldogLowellB 1 Reply Last reply
                          0
                          • fusion_manF fusion_man

                            @BulldogLowell

                            I ended up going a different approach. I modified the program so I could use Arduino digital pin6 as an output powering my master valve relay. I then added digitalWrite (masterValvePin, HIGH) where you have updateRelays(BITSHIFT_VALVE_NUMBER) to turn ON the valve. To turn off the valve I added a delay then digitalWrite (masterValvePin, LOW) to if (state == STAND_BY_ALL_OFF). This has tested perfectly for my situation.
                            The only thing missing from the Controller is the ability to add the RainBird rain sensor to the board. I think the way of achieving this is an input to my Vera controller.

                            BulldogLowellB Offline
                            BulldogLowellB Offline
                            BulldogLowell
                            Contest Winner
                            wrote on last edited by
                            #118

                            @fusion_man

                            maybe we can add a rain sensor this season. It is a good idea to include it.

                            fusion_manF 1 Reply Last reply
                            0
                            • BulldogLowellB BulldogLowell

                              @fusion_man

                              maybe we can add a rain sensor this season. It is a good idea to include it.

                              fusion_manF Offline
                              fusion_manF Offline
                              fusion_man
                              wrote on last edited by
                              #119

                              @BulldogLowell

                              I already did and it is up and running. I used A0 as the input for the rain sensor. I can see the rain sensor in Vera as a motion sensor. I didn't post the code as I didn't want to offend the designer. Being a newbie, I didn't know how to handle this update.

                              BulldogLowellB 1 Reply Last reply
                              0
                              • fusion_manF fusion_man

                                @BulldogLowell

                                I already did and it is up and running. I used A0 as the input for the rain sensor. I can see the rain sensor in Vera as a motion sensor. I didn't post the code as I didn't want to offend the designer. Being a newbie, I didn't know how to handle this update.

                                BulldogLowellB Offline
                                BulldogLowellB Offline
                                BulldogLowell
                                Contest Winner
                                wrote on last edited by
                                #120

                                @fusion_man

                                why not just post your code? I'm sure the guy who wrote the original code won't mind, if you include his original notes and credits.

                                1 Reply Last reply
                                0
                                • Mark JeffordM Offline
                                  Mark JeffordM Offline
                                  Mark Jefford
                                  wrote on last edited by
                                  #121

                                  Quick question, semi also referenced on the openhab binding.

                                  Looking to use this with Openhab, I have managed to get it to work with the serial gateway, however i don't see a way i can pass out any configuration of a valve time, i can however trigger valves with a runtime of 0 seconds.

                                  Any ideas how i can amend this to either use a fixed runtime in the project (happy to run it in 1min increments trigged from openhab hydro sensor results)

                                  BulldogLowellB 1 Reply Last reply
                                  0
                                  • Mark JeffordM Mark Jefford

                                    Quick question, semi also referenced on the openhab binding.

                                    Looking to use this with Openhab, I have managed to get it to work with the serial gateway, however i don't see a way i can pass out any configuration of a valve time, i can however trigger valves with a runtime of 0 seconds.

                                    Any ideas how i can amend this to either use a fixed runtime in the project (happy to run it in 1min increments trigged from openhab hydro sensor results)

                                    BulldogLowellB Offline
                                    BulldogLowellB Offline
                                    BulldogLowell
                                    Contest Winner
                                    wrote on last edited by
                                    #122

                                    @Mark-Jefford

                                    In that case, I would just treat each zone as a separate relay/lamp and use Openhab to control the individual ON times... I think.

                                    johnecyJ Mark JeffordM 2 Replies Last reply
                                    0
                                    • BulldogLowellB BulldogLowell

                                      @Mark-Jefford

                                      In that case, I would just treat each zone as a separate relay/lamp and use Openhab to control the individual ON times... I think.

                                      johnecyJ Offline
                                      johnecyJ Offline
                                      johnecy
                                      wrote on last edited by
                                      #123

                                      can I use pin D6 instead ok pin D8 to control the shift register. I am making the controller on the easy/newbie pc board and there is nothing connected to pin D8 on this board.

                                      BulldogLowellB 1 Reply Last reply
                                      0
                                      • johnecyJ johnecy

                                        can I use pin D6 instead ok pin D8 to control the shift register. I am making the controller on the easy/newbie pc board and there is nothing connected to pin D8 on this board.

                                        BulldogLowellB Offline
                                        BulldogLowellB Offline
                                        BulldogLowell
                                        Contest Winner
                                        wrote on last edited by
                                        #124

                                        @johnecy

                                        const int latchPin = 8;
                                        

                                        I think you should be OK to try that

                                        johnecyJ 1 Reply Last reply
                                        0
                                        • BulldogLowellB BulldogLowell

                                          @johnecy

                                          const int latchPin = 8;
                                          

                                          I think you should be OK to try that

                                          johnecyJ Offline
                                          johnecyJ Offline
                                          johnecy
                                          wrote on last edited by
                                          #125

                                          @BulldogLowell thanks for the reply i will post pictures when i get it finished

                                          1 Reply Last reply
                                          1
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          7

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.0k

                                          Posts


                                          Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular