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. Battery-powered irrigation controller

Battery-powered irrigation controller

Scheduled Pinned Locked Moved My Project
47 Posts 13 Posters 17.6k Views 14 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.
  • gohanG Offline
    gohanG Offline
    gohan
    Mod
    wrote on last edited by
    #15

    Don't worry about the wire mess, it is normal when building a prototype (breadboards and jumper wires exist for a reason :) )
    So the node every minute checks if any commands have been sent to switch on or off the valves, right? How much battery life are you getting? I guess it will depends on how much time the valves are on. In theory you could swap the AA batteries with a 18650 to save some space, right?

    U 1 Reply Last reply
    0
    • gohanG gohan

      Don't worry about the wire mess, it is normal when building a prototype (breadboards and jumper wires exist for a reason :) )
      So the node every minute checks if any commands have been sent to switch on or off the valves, right? How much battery life are you getting? I guess it will depends on how much time the valves are on. In theory you could swap the AA batteries with a 18650 to save some space, right?

      U Offline
      U Offline
      user2684
      Contest Winner
      wrote on last edited by user2684
      #16

      @gohan that's correct, I'm using exactly the same principle in my boiler controller with the sensor checking in periodically for new commands since battery powered. I do expect a decent battery life since the valves I'm using are pulse-based so it doesn't matter for how long they stay on (as in my boiler controller I'm using a latching relay and since January moved from 3v to 2.75 now.). And yes, 18650 would be ideal for this project. Only concern with that battery is that when the solenoid triggers, it draws a lot of current and I'm not 100% sure a rechargeable battery is as good as a standard one to handle it.

      1 Reply Last reply
      0
      • gohanG Offline
        gohanG Offline
        gohan
        Mod
        wrote on last edited by
        #17

        as rule of thumb 18650 can deliver continuous 2C, so they could take a higher load for a brief moment (depends how long those valves take to open or close)

        U 1 Reply Last reply
        0
        • gohanG gohan

          as rule of thumb 18650 can deliver continuous 2C, so they could take a higher load for a brief moment (depends how long those valves take to open or close)

          U Offline
          U Offline
          user2684
          Contest Winner
          wrote on last edited by
          #18

          @gohan thanks good to know, I will give it a try, a 3 AA pack is actually using too much space!

          1 Reply Last reply
          0
          • gohanG Offline
            gohanG Offline
            gohan
            Mod
            wrote on last edited by
            #19

            Remember that lithium batteries suffer heat, so put the box in shade :)

            U 1 Reply Last reply
            0
            • gohanG gohan

              Remember that lithium batteries suffer heat, so put the box in shade :)

              U Offline
              U Offline
              user2684
              Contest Winner
              wrote on last edited by
              #20

              Oh didn't know that, I'll stay with the 3 AA batteries then for now since the box is in full sunshine and can become pretty hot during summer time at this latitude ;-) Thanks

              1 Reply Last reply
              0
              • TmasterT Offline
                TmasterT Offline
                Tmaster
                wrote on last edited by Tmaster
                #21

                That's an interesting project!
                how are these valve working after almost a month of work?some bi-state valves have reputation of get stuck opened or closed. They are cheap enough to i like them if the don't get stuck :)

                And what about time to control the valvs. Are you requesting from gateway?
                For power you can use a 4v or 5 v solar panel to charge 1 li-io cell with this charge regulators((https://cdn.instructables.com/FSH/L5F0/IO0G95Y5/FSHL5F0IO0G95Y5.MEDIUM.jpg?width=614)) if regular batteries have poor life, and of course you can hide battery box under a flat rock or a tile because sun heat.

                There are common 9v valves that are bi-state as well ,like the ones used on rain bird 9v programmers

                my irrigation controller (24v Ac controlled by 5v Dc) its about to be presented here as well soon :) i'm finishing tests on attached sensors and stability tests and upload on emoncms.com

                i'm a arduino fan .Even sometimes don't undestanding how to use it :P

                U 1 Reply Last reply
                0
                • TmasterT Offline
                  TmasterT Offline
                  Tmaster
                  wrote on last edited by Tmaster
                  #22

                  And about selenoids ,this is how i control them:
                  0_1495452921961_upload-d313d700-aca7-4ad8-8a3d-94079bc0972a

                  on arduino pwm pins you can define how much voltage you send to solenoid with "analogwrite" .
                  You can use any mosfet or transistor that can handle the 3.5v 1a(buy double or triple value of curente for safe)

                  i'm a arduino fan .Even sometimes don't undestanding how to use it :P

                  1 Reply Last reply
                  0
                  • TmasterT Tmaster

                    That's an interesting project!
                    how are these valve working after almost a month of work?some bi-state valves have reputation of get stuck opened or closed. They are cheap enough to i like them if the don't get stuck :)

                    And what about time to control the valvs. Are you requesting from gateway?
                    For power you can use a 4v or 5 v solar panel to charge 1 li-io cell with this charge regulators((https://cdn.instructables.com/FSH/L5F0/IO0G95Y5/FSHL5F0IO0G95Y5.MEDIUM.jpg?width=614)) if regular batteries have poor life, and of course you can hide battery box under a flat rock or a tile because sun heat.

                    There are common 9v valves that are bi-state as well ,like the ones used on rain bird 9v programmers

                    my irrigation controller (24v Ac controlled by 5v Dc) its about to be presented here as well soon :) i'm finishing tests on attached sensors and stability tests and upload on emoncms.com

                    U Offline
                    U Offline
                    user2684
                    Contest Winner
                    wrote on last edited by
                    #23

                    @Tmaster actually I came real here just a few days ago so difficult to say right now. I did notice though a couple of situations in which the command was not executed (which is really annoying since having irrigation going for hours would create a lake :P) but I'm not sure if it is because of the valve or some missing messages from the radio (since quite away from the gw). I was also evaluating a bunch of "close" commands sent periodically by the controller to be sure the valve does not stay open forever but it is not very clean.

                    Yes, the open/close logic is in the controller which is sending out a turn on/off message during the scheduled timeframes (https://sourceforge.net/p/my-house/forum/general/thread/2d98b751/).

                    Thanks for the advise regarding the batteries. I'm noticing when the valve toggle a huuuge impact on the battery. After a few tests changed from 4.5v to 3.8v. If confirmed, I will be obliged to move to a rechargeable solution.

                    Do you have a link of those 9v valves you are using? Just to have a good backup solution in case my approach would somehow fail ;-)
                    Regarding the solenoid, I'm using the following to control it from the arduino: https://www.aliexpress.com/item/2-DC-motor-drive-module-reversing-PWM-speed-dual-H-bridge-stepper-motor-Mini-victory-L298N/32648692160.html and seems to work just fine.
                    Thanks

                    1 Reply Last reply
                    0
                    • TmasterT Offline
                      TmasterT Offline
                      Tmaster
                      wrote on last edited by Tmaster
                      #24

                      i think that AA batteries hardly approach the 1A discharge if its your selenoid rate.
                      Another thing you can change is NEVER trust on a incoming signal to shutdown you valve. if power fails or signal is missing ,you selenoid will be open all life because gw never send the signal in time .

                      what i did is: call time from GW , store it on irrigation node ,and then after time out(2 hours) it shuts off alone .in fact i don't have any code to control valves from gw . Gw only receive status for domotics. all time for valves On and Off its on the node.
                      See the timeaware sensor example to know how get time from gw and how handle it
                      you can just use for ex:
                      if(hour()==09) { //if its 9 hour AM TURN ON
                      digitalwrite (valve, HIGH)
                      }
                      if(hour()==10) { //if its 10 hour AM TURN OFF
                      digitalwrite (valve,LOW)
                      }

                      Or on shutdown implement a "time out"timer (if millis have been passed turn off) like on "blink without delay" example

                      https://github.com/mysensors/MySensorsArduinoExamples/blob/master/examples/TimeAwareSensor/TimeAwareSensor.ino

                      i'm a arduino fan .Even sometimes don't undestanding how to use it :P

                      U 1 Reply Last reply
                      0
                      • TmasterT Tmaster

                        i think that AA batteries hardly approach the 1A discharge if its your selenoid rate.
                        Another thing you can change is NEVER trust on a incoming signal to shutdown you valve. if power fails or signal is missing ,you selenoid will be open all life because gw never send the signal in time .

                        what i did is: call time from GW , store it on irrigation node ,and then after time out(2 hours) it shuts off alone .in fact i don't have any code to control valves from gw . Gw only receive status for domotics. all time for valves On and Off its on the node.
                        See the timeaware sensor example to know how get time from gw and how handle it
                        you can just use for ex:
                        if(hour()==09) { //if its 9 hour AM TURN ON
                        digitalwrite (valve, HIGH)
                        }
                        if(hour()==10) { //if its 10 hour AM TURN OFF
                        digitalwrite (valve,LOW)
                        }

                        Or on shutdown implement a "time out"timer (if millis have been passed turn off) like on "blink without delay" example

                        https://github.com/mysensors/MySensorsArduinoExamples/blob/master/examples/TimeAwareSensor/TimeAwareSensor.ino

                        U Offline
                        U Offline
                        user2684
                        Contest Winner
                        wrote on last edited by user2684
                        #25

                        @Tmaster that's a very good advice, especially if keeping it open for too long could create any damage. But I'd rather keep the logic on the controller otherwise I'd need to flash a new sketch on a weekly basis. The timeout approach would probably be more close to my requirements, even if millis() doesn't work for sleeping nodes, I can still work with the time as you suggested.
                        Another issue I'm experimenting with this valve is the loss of pressure, which is of course expected but it is so strong I cannot cover my garden correctly :-/ So an alternative I was evaluating is to hack my legacy irrigation controller which is very basic but I need to find a way to handle the rotary encoder. But on the same time I don't want to move away so soon from those valves ;-)

                        1 Reply Last reply
                        0
                        • TmasterT Offline
                          TmasterT Offline
                          Tmaster
                          wrote on last edited by
                          #26

                          the only desvantagem you have is ; not having main power there .Because if you have it you coud use standart 24v AC irrigation valves ,controlled by 5vDC as i did and then if power fails it just goes off, because they need current(+-200mha) for work. And they are cheap. the bi state 9v version cost more than 30€ and i never use it

                          i'm a arduino fan .Even sometimes don't undestanding how to use it :P

                          U 1 Reply Last reply
                          0
                          • gohanG Offline
                            gohanG Offline
                            gohan
                            Mod
                            wrote on last edited by
                            #27

                            Timeout is a nice safe feature, but also could be that if you loose connection to controller for more than X minutes it should shut everything down.

                            1 Reply Last reply
                            0
                            • TmasterT Tmaster

                              the only desvantagem you have is ; not having main power there .Because if you have it you coud use standart 24v AC irrigation valves ,controlled by 5vDC as i did and then if power fails it just goes off, because they need current(+-200mha) for work. And they are cheap. the bi state 9v version cost more than 30€ and i never use it

                              U Offline
                              U Offline
                              user2684
                              Contest Winner
                              wrote on last edited by
                              #28

                              @Tmaster that's my issue, I don't have power there so I was trying to find out a way to have this working with batteries. But regardless of the issues I'm experiencing, the idea to add an additional safe guard is definitely great, thanks again for the advice!

                              1 Reply Last reply
                              0
                              • U Offline
                                U Offline
                                user2684
                                Contest Winner
                                wrote on last edited by
                                #29

                                Just to share this pointer from a similar project: http://rayshobby.blogspot.it/2010/06/minty-water-valve-controller.html. It is actually way beyond my knowledge to understand all the steps but I guess could be useful for somebody here.

                                Changing valve and stepping up to 24v seems too complex for my requirements but adding a big capacitor could be something worth trying also here.

                                1 Reply Last reply
                                0
                                • U Offline
                                  U Offline
                                  user2684
                                  Contest Winner
                                  wrote on last edited by
                                  #30

                                  Yet another quick update on this. I think I was able to mitigate somehow the few issues I had:

                                  • Regarding the abnormal battery consumption, I placed two 330uF capacitor between gnd and Vcc of the H-bridge powering the valve and they seem to help. After a few on and off the battery went from 4.70V to 4.68V so it was not affected at all. Not sure if it is a good idea or not but I thought could help the valve to be more gentle against the battery. I've also added a sleep of two seconds just after the digitalOutput pulse so to allow the board not to suffer of the voltage drop before sending the ack back to the controller (it was sometimes lost before).
                                  • Regarding the pressure lost at the valve, I was able to gain this pressure somewhere else. First of all I bought new, high quality irrigation sprinklers and they cover with exactly the same pressure almost 50% more ground than the old one. Then I removed a few junctions which were losing additional pressure. Now at least it is usable since I have full coverage of the garden (about 100 square meters) with a single sprinkler.
                                  • Regarding the safeguard, I've added a very simple timer to my sketch. When a valve is turned on, the time starts (it just counts the number of cycles to make it simple). If too many cycles have passed by and the valve is still on, turns it off automatically.

                                  Bottom line, I was about to give up with this but now I'm back on track :)

                                  1 Reply Last reply
                                  1
                                  • TmasterT Offline
                                    TmasterT Offline
                                    Tmaster
                                    wrote on last edited by
                                    #31

                                    @user2684 said in Battery-powered irrigation controller:

                                    Regarding the abnormal battery consumption, I placed two 330uF capacitor between gnd and Vcc of the H-bridge powering the valve and they seem to help. After a few on and off the battery went from 4.70V to 4.68V so it was not affected at all. Not sure if it is a good idea or not but I thought could help the valve to be more gentle against the battery. I've also added a sleep of two seconds just after the digitalOutput pulse so to allow the board not to suffer of the voltage drop before sending the ack back to the controller (it was sometimes lost before).

                                    AA bateries can't handle much current. You are feeding an solenoid (coil) that probably requires 1A for switch state and it drains too much from aa battery. Buy a 12v /7a battery from chinese brand for 10€ and use a voltage regulator from ebay and you have you problems gone.

                                    i'm a arduino fan .Even sometimes don't undestanding how to use it :P

                                    U 1 Reply Last reply
                                    0
                                    • TmasterT Tmaster

                                      @user2684 said in Battery-powered irrigation controller:

                                      Regarding the abnormal battery consumption, I placed two 330uF capacitor between gnd and Vcc of the H-bridge powering the valve and they seem to help. After a few on and off the battery went from 4.70V to 4.68V so it was not affected at all. Not sure if it is a good idea or not but I thought could help the valve to be more gentle against the battery. I've also added a sleep of two seconds just after the digitalOutput pulse so to allow the board not to suffer of the voltage drop before sending the ack back to the controller (it was sometimes lost before).

                                      AA bateries can't handle much current. You are feeding an solenoid (coil) that probably requires 1A for switch state and it drains too much from aa battery. Buy a 12v /7a battery from chinese brand for 10€ and use a voltage regulator from ebay and you have you problems gone.

                                      U Offline
                                      U Offline
                                      user2684
                                      Contest Winner
                                      wrote on last edited by
                                      #32

                                      @Tmaster thanks, I'll give it a try as well! regarding the voltage regulator, is there anything able to provide >1A as output as far as you know? Thanks

                                      1 Reply Last reply
                                      0
                                      • rozpruwaczR Offline
                                        rozpruwaczR Offline
                                        rozpruwacz
                                        wrote on last edited by rozpruwacz
                                        #33

                                        Hi all, I just wan't to share with You my idea about controlling bi-stable solenoids (let it be valves or latching relay, doesn't matter). And I wonder why nowbody considering this solution. I'm talking about this kind of circuit http://www.avrfreaks.net/sites/default/files/Latching relay driver.jpg. And those two transistors that have to be controlled with two pins may be replaced with a push-pull driver like L293 (or L203DD which has built-in clamping diodes) which can be cotrolled with just one pin (HIGH - open; LOW - closed). This L293 will make the hardware interface the same as with monostable relays.
                                        So pros are:

                                        1. simple circuit (relay, capacitor, L293 IC and additional capacitor for power supply filtering)
                                        2. simple interface (use it like normal relay)
                                        3. safe - bi-stable solenoids have maximum pulse with, with this circuit there is no possibility to cross that requirement (the pulse width is defined by the RC constant of the capacitor and solenoid)

                                        Cons are:

                                        1. the capacitor between relay and the ground has to be quite large about 1-2mF so its size is significant
                                        2. the l293 ic maybe not very cheap
                                        1 Reply Last reply
                                        2
                                        • U Offline
                                          U Offline
                                          user2684
                                          Contest Winner
                                          wrote on last edited by
                                          #34

                                          Hi, just to spend a final word on this project. Despite the battery consumption is not that great (even if I believe by better sizing the capacitor the result would be much better), three AA battery lasted for more than two months powering the valve on and off twice a day and checking in with the controller every minute. I've changed the battery recently just because the valve operates at 3.6v and I was unsure there was enough power to still perform in a good shape for long. Below the battery discharging trend:

                                          0_1501939556969_Untitled.png

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


                                          19

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.1k

                                          Posts


                                          Copyright 2025 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