Irrigation Controller (up to 16 valves with Shift Registers)
-
Added your project to the main site togeter with @petewill excellent new video.
@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. -
Excellent work. I need help with android code. Anybody can help me with this?
thanks
-
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.
-
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.
@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.
-
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. -
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.@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.
-
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: -
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:@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?
-
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.
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?
-
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 outputif 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
-
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 outputif 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
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.
-
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 outputif 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
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. -
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.maybe we can add a rain sensor this season. It is a good idea to include it.
-
maybe we can add a rain sensor this season. It is a good idea to include it.
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.
-
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.
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.
-
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)
-
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)
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.
-
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.
-
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.
-
@BulldogLowell thanks for the reply i will post pictures when i get it finished