Introduction: Arduino Sprinkler System + Web Control
A smart sprinkler system for the rest of us... No soldering involved ! Just pile up a couple of shields on top of an arduino and control your sprinkler system from anywhere.
A couple of friends wanted to replicate the sprinkler system presented in this instructable but were scared by the complexity of it.
Well, it truly isn't complicated and it does not even require to solder anything if you pick the right parts... Since I long wanted to make the system more compact, I took the opportunity to make this solder-free arduino instructable. The system is very similar to (exactly the same as?) the previous instructable and just as open (supports scheduling, twitter etc...).
Connecting this arduino to your sprinkler system will allow you to remotely turn your garden watering on and off from any web-enabled device. From there you can make it as fancy or as simple as you wish.
Enjoy !
Step 1: Collect Parts
For this instructable you will need:
- 1 x arduino board
- 1 x ethernet shield (e.g. Ethernet Shield V1.0 for Arduino from http://www.nuelectronics.com )
- 1 x relay shield (http://seeedstudio.com/wiki/Relay_Shield)
- 1 x 10vDC adaptor (a recycled phone charger)
- 1 x momentary push button
You will not need:
- a soldering iron.
Step 2: Put It Together
To put everything together, just follow the pictures, it should be fairly self-explanatory...
The push button is optionnal, it allows you to cycle manually through the sprinklers. Otherwise your only mean of control is the web interface... which is good too !
Step 3: Arduino Sketch
The sketch is very close to the one posted in my original instructable (here)
Quick comments:
- The following code turns on the pull-up resistor of the analog input. A good thing to know.
pinMode(analogInPin, INPUT);
digitalWrite(analogInPin, HIGH); // turn on pull-up resistor
- I added a check on the size of the buffer that holds the page, so you have an indication that bad things happened if the buffer was too small.
- The manual button cycles through the valves (and uses A0,A1,A2 for convenience reasons).
- The web interface can turn on/off any combination of valves.
- The valves are turned off automagically after 60 minutes (can be modified, time in seconds, 0 disables the functionality).
- Up to 4 valves can be controlled.
- Startup logic as been added to prevent spurious turn on.
Step 4: Voila ?
Everything else is covered in my previous instructable (here).
- connect the valves.
- use the web interface.
- make the system wireless.
- (optional) scripting.
Voila.
39 Comments
Question 4 years ago
Where does one get a completely enclosed irrigation box like that? What brand and model is it?
4 years ago
How can control dust sensor to Arduino to sprinkler system???? Please give ans
Question 5 years ago on Step 2
I want to control 40 valves please send details
Thanks
7 years ago
How could we add to this system a water level sensor, so if use water from a bucket it checks if the level of water is to low and than notifies me trough let say pushbullet.
Reply 6 years ago
Hi:
I have used the barometrically operated micro switches from Washing machines to indicate if a tank of water is full. It does require a minimum of approx ten inches of water column to act, but the switch offers both NO and NC positions to operate. (Normally Open, and Normally Closed. Closed means On.)
7 years ago
sir,in my project of smart sprinkler ,the sprinkler should automatically get on for a set duration(for ex- if i set the timer on for 5-6 am everyday the sprinkler should get on automatically on the assigned days.)So, can it be done using a RTC(real time clock module for arduino.)??It wil keep a good eye on the activities of the user
7 years ago
where is the HTML code's please tell me i could not find the HTML code
8 years ago on Introduction
Would it be possible to make it so it can control 8 valves?
Reply 7 years ago
Did you ever find out if this could be modified to 8? I need a system that can handle 12 zones.
8 years ago on Introduction
I am very interested in this project could you email me the details to muzjanny@gmail.com
8 years ago on Introduction
Hi,
I’m irinakim and I’m work in the Wiznet.
Thank you for using our product.
I want to upload the previous post together.
Can I post your product on our Web site?
8 years ago on Introduction
10 years ago on Introduction
I still cant find the _arp code on the zip file is it possible to clip it out from somewhere else?
Reply 8 years ago on Introduction
Did you come right with tracking down the piece of code in the end as I have unzipped the correct etherShield_1.1.zip into the library directory and still nothing. When you open the ethershield.h you can see its missing these :
void ES_make_arp_answer_from_request(uint8_t *buf); // Added by Stuart
uint8_t ES_eth_type_is_ip_and_my_ip(uint8_t *buf,uint16_t len); // Added by Stuart
void ES_make_tcp_ack_from_any(uint8_t *buf,uint16_t len);
but i still get a compiling issue with Arduino IDE on line [es.ES_make_tcp_ack_from_any(buf);] saying:no matching funciton for call 'EtherShield::ES_make_tcp_ack_from_any(uint8_t[1001])'
I may be setting this up incorrectly :/
9 years ago on Introduction
Nice job, I'm curious has the momentary button method changed in any way?
gd job.....
11 years ago on Introduction
Hey,
its pretty good idea, so i thought to apply for my lawn, but i am getting error which says that "Timer1 was not declared in the scope".....just for your reference, i already include the TimerOne.h file in my library.
Reply 11 years ago on Introduction
Make sure your TimerOne.h file contains:
extern TimerOne Timer1;
and that your TimerOne.cpp file contains:
TimerOne Timer1;
If they don't, use the version of TimerOne.zip I have added to this instructable (extract into hardware\libraries)
Good luck !
N.
Reply 11 years ago on Introduction
Hey thanks for replying so fast, however i used your eterShild library for my eternet shield, it is still give me below errors, what should i do?
Web.cpp: In function 'void loop()':
Web:183: error: 'class EtherShield' has no member named 'ES_make_arp_answer_from_request'
Web:187: error: 'class EtherShield' has no member named 'ES_eth_type_is_ip_and_my_ip'
Web:205: error: 'class EtherShield' has no member named 'ES_make_tcp_ack_from_any'
Web:242: error: 'class EtherShield' has no member named 'ES_make_tcp_ack_from_any'
Web:243: error: 'class EtherShield' has no member named 'ES_make_tcp_ack_with_data
Reply 11 years ago on Introduction
Make sure the file hardware/libraries/etherShield/etherShield.h contains:
[...]
class EtherShield
{
public:
[...]
void ES_make_arp_answer_from_request(uint8_t *buf);
uint8_t ES_eth_type_is_ip_and_my_ip(uint8_t *buf,uint16_t len);
etc...
[...]
If it does, then your script is not including it, given the errors you have.
If it doesn't, then replace the whole hardware/libraries/etherShield by the zipped file I attached to this instructable.
N.
Reply 9 years ago on Introduction
Hi could you please tell me if you have continued with this project??? I am receiving these same errors and have spent ages trying to sort them out with no result. I have even used Arduino IDE 0022 and still the same issues. Have you got a more up to date script?? many thanks