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.
  • petewillP Offline
    petewillP Offline
    petewill
    Admin
    wrote on last edited by
    #100

    Hey Everyone,

    I just made a follow up video to this irrigation controller that shows my logic I'm using to save water. It's pretty specific to my environment but hopefully you can use some of the ideas to save water in your environment. I have attached the logic I used in my PLEG device.

    Pete

    PLEG Irrigation.pdf

    https://youtu.be/_voDZH2EBgw

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

    1 Reply Last reply
    1
    • epierreE Offline
      epierreE Offline
      epierre
      Hero Member
      wrote on last edited by
      #101

      Hello,

      looking at the project, I'm wondering why you propose 3.3V only, is this for the shift register and the screen ? Why not stay in 5V ?

      z-wave - Vera -> Domoticz
      rfx - Domoticz <- MyDomoAtHome <- Imperihome
      mysensors -> mysensors-gw -> Domoticz

      petewillP 1 Reply Last reply
      0
      • epierreE epierre

        Hello,

        looking at the project, I'm wondering why you propose 3.3V only, is this for the shift register and the screen ? Why not stay in 5V ?

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

        @epierre Where did you see that I don't remember? Perhaps for the NRF radio?

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

        1 Reply Last reply
        0
        • epierreE Offline
          epierreE Offline
          epierre
          Hero Member
          wrote on last edited by
          #103

          @petewill it is here: http://www.mysensors.org/build/irrigation

          it is hard to know the BOM from the page, so I was wondering why you would neeed the powering adaptation if you input 5V

          z-wave - Vera -> Domoticz
          rfx - Domoticz <- MyDomoAtHome <- Imperihome
          mysensors -> mysensors-gw -> Domoticz

          BulldogLowellB 1 Reply Last reply
          0
          • epierreE epierre

            @petewill it is here: http://www.mysensors.org/build/irrigation

            it is hard to know the BOM from the page, so I was wondering why you would neeed the powering adaptation if you input 5V

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

            @epierre

            If you watch the video, you can see he's using the voltage regulator to supply power to the radio.

            Are you getting ready to build?

            epierreE 1 Reply Last reply
            0
            • BulldogLowellB BulldogLowell

              @epierre

              If you watch the video, you can see he's using the voltage regulator to supply power to the radio.

              Are you getting ready to build?

              epierreE Offline
              epierreE Offline
              epierre
              Hero Member
              wrote on last edited by
              #105

              @BulldogLowell said:

              @epierre
              Are you getting ready to build?

              I've ordered the 8 switch, I have soil moisture, leaf moisture, ground humidity, rain gauge and found some evapotranspiration algorithm so I have all inputs and now need to have outputs in parallel of my rainbird scheduler (too dumb...)

              So I'm ready to build as you say ;-)

              z-wave - Vera -> Domoticz
              rfx - Domoticz <- MyDomoAtHome <- Imperihome
              mysensors -> mysensors-gw -> Domoticz

              1 Reply Last reply
              1
              • 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
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          8

                                          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