Irrigation Controller (up to 16 valves with Shift Registers)
-
@BulldogLowell said:
You could try a bigger pullup resistor, maybe the pin floats for a brief moment or it is somehow energized...
Ok, I'll do some testing with that. I don't think I'll get the chance today but I should be able to do some tomorrow. It works perfectly after the first start up so hopefully a bigger resistor will help.
-
@BulldogLowell said:
You could try a bigger pullup resistor, maybe the pin floats for a brief moment or it is somehow energized...
Ok, I'll do some testing with that. I don't think I'll get the chance today but I should be able to do some tomorrow. It works perfectly after the first start up so hopefully a bigger resistor will help.
yeah, I see in the code that the pushbutton is using interrupt pin, but still needs to be set to input
pinMode(PushButton, INPUT_PULLUP);start there, sorry!
-
@BulldogLowell said:
yeah, I see in the code that the pushbutton is using interrupt pin, but still needs to be set to input
I thought I added it already with this:
pinMode(waterButtonPin, INPUT_PULLUP);Is that correct? Maybe that's my problem...
-
@BulldogLowell said:
were you not getting a compile error? on the PushButton variable being undeclared?
Ok, I still think I have some things to learn about interrupts. I thought PushButton was the method being called when the interrupt was triggered. I didn't think it was the pin. I thought the pin was the first item 1 in this case. But, I thought 1 isn't even the pin. It's the interrupt number which is pin 3 in the case of a Pro Mini. I also thought I needed to declare the pinMode even if it's already in the interrupt. So confusing... Am I totally off?
-
@BulldogLowell said:
were you not getting a compile error? on the PushButton variable being undeclared?
Ok, I still think I have some things to learn about interrupts. I thought PushButton was the method being called when the interrupt was triggered. I didn't think it was the pin. I thought the pin was the first item 1 in this case. But, I thought 1 isn't even the pin. It's the interrupt number which is pin 3 in the case of a Pro Mini. I also thought I needed to declare the pinMode even if it's already in the interrupt. So confusing... Am I totally off?
post deleted, my bad! your understanding is 100% correct!
your PushButton is the ISR, so you are right
Try the extra pullup or pull-down
really sorry for confusing you! I'm mega jet lagged
-
@BulldogLowell said:
Try the extra pullup
Well, I had almost no time to work on MySensors stuff this weekend. :( I did do a quick test last night and it seems the external pullup worked! I power cycled the node 3 times and each time it worked flawlessly. I'll continue to test but so far so good. Thank you!
-
@BulldogLowell said:
Try the extra pullup
Well, I had almost no time to work on MySensors stuff this weekend. :( I did do a quick test last night and it seems the external pullup worked! I power cycled the node 3 times and each time it worked flawlessly. I'll continue to test but so far so good. Thank you!
-
I put together an extension of the multi-Relay controller for use as a controller for your irrigation project if you have more zones than available pins on your Arduino.
This sketch features the following:
- Allows you to cycle through All zones or individual zone control.
- Use the (n+1)th device to activate each zone in numeric sequence (zero to n) using
Variable1 as the "ON" time in minutes in each of the vera devices created. - Use the individual zone controller to activate a single zone. This feature uses
Variable2 as the "ON" time for each individual device/zone. - Connect according to pinout in the sketch and uses an 74HC595 (or equiv) Shift Register as to
allow the MySensors standard radio configuration and still leave available digital pins - Compiles to ~12,000 Bytes, so will run on any Arduino
- Turning on any zone will stop the current process and begin that particular process.
- Turning off any zone will stop the current process and turn off all zones.
- Sketch must collect your desired intervals so it takes several minutes to startup.
- If you change your desired time intervals for your zones, simply restart your arduino
and it will self update to reflect those changes.
Example, I am using with 8 relays:
This will create 9 devices. Zero through 7 are the individual relays. Eight is the Sequencer, so to speak (refer to attachment).
Once you create this and add it using the gateway, go to each of zero through 7 and edit Variable1 and Variable2 for what time you want to use for the Sequencer or Zone respectively. Then save the settings. Then, restart your arduino; your arduino will extract these settings and save them to an array.
When you turn on device 8 (aka the Sequencer) the relays will actuate in order from zero to seven, each one staying on for the period entered in the Variable1 field. There is a 5 second delay at the start of a new zone to allow for the valves to hydraulically reset.
When you turn on any of devices zero through 7, it will run that zone only for the period of time entered in Variable2.
Selecting any new zone (0-8) will stop the current process and start as per above.
Hope you have a use for it. If you see any opportunity to improve, or find a bug, let me know.
Jim
modified. Attached wrong file, whoops!@BulldogLowell Thanks for posting this. A sprinkler controller to replace my Rainbird controller is next on my list of projects.
For those looking for a good and relatively cheap soil moisture sensor, these ones are pretty good and use a capacitive sensor: http://www.ebay.com/itm/261675851824. They transmit on 433 MHz. I currently use them with RFXCom and HomeSeer, but for those that don't have RFXCom, the protocol should be relatively easy to reverse engineer and then use directly with MySensors and a 433MHz receiver. I've also bought a few from here: https://www.plantcaretools.com/en/webshop/wireless-moisture-sensor-en-detail. Both sellers were good to deal with. The only drawback to them is that the antenna (and therefore range) is not very good, but there is an easy mod to improve that: http://www.domoticz.com/forum/viewtopic.php?f=13&t=2712
Cheers
Al -
Added your project to the main site togeter with @petewill excellent new video.
-
Added your project to the main site togeter with @petewill excellent new video.
-
@BulldogLowell said:
MySensors Community Rocks!
Agreed!!! Thanks to both @BulldogLowell and @hek for making this possible. I love seeing it hanging on my wall every time I go into the basement :)
-
Great Work Guys!!
-
@BulldogLowell Thanks for posting this. A sprinkler controller to replace my Rainbird controller is next on my list of projects.
For those looking for a good and relatively cheap soil moisture sensor, these ones are pretty good and use a capacitive sensor: http://www.ebay.com/itm/261675851824. They transmit on 433 MHz. I currently use them with RFXCom and HomeSeer, but for those that don't have RFXCom, the protocol should be relatively easy to reverse engineer and then use directly with MySensors and a 433MHz receiver. I've also bought a few from here: https://www.plantcaretools.com/en/webshop/wireless-moisture-sensor-en-detail. Both sellers were good to deal with. The only drawback to them is that the antenna (and therefore range) is not very good, but there is an easy mod to improve that: http://www.domoticz.com/forum/viewtopic.php?f=13&t=2712
Cheers
Al@Sparkman I like the sensors, I just built some and was dbating the way to make smaller, what kind of battery life do those moisture sensors have?
@petewill Time to change my current 16 valve arduino sprinklers to a little smarter version like yours! I love this community.
You have been coming on with some awesome videos and contributions! -
@Sparkman I like the sensors, I just built some and was dbating the way to make smaller, what kind of battery life do those moisture sensors have?
@petewill Time to change my current 16 valve arduino sprinklers to a little smarter version like yours! I love this community.
You have been coming on with some awesome videos and contributions! -
@BulldogLowell Sorry For not giving the credit where it is due! Major Props @BulldogLowell !
-
@Sparkman I like the sensors, I just built some and was dbating the way to make smaller, what kind of battery life do those moisture sensors have?
@petewill Time to change my current 16 valve arduino sprinklers to a little smarter version like yours! I love this community.
You have been coming on with some awesome videos and contributions! -
@BulldogLowell Sorry For not giving the credit where it is due! Major Props @BulldogLowell !