






Step 1: How do you drive the solenoids?

The sprinkler controller is built on the base of my Adruino Ethernet controller.  The Arduino ethernet controller provided a basic network connected ATMega328 chip, and had a number of spare I/O lines. 

I extended the PCB design to provide 6 solid state outputs, each able to drive +12v at 300mA, which is enough for a watering solenoid.

Each solenoid output is driven from a NPN transistor, as shown by the attached picture.  To turn on the transistor, the port pin is simply driven high.  I decided to use individual transistors, as they cost $0.03 each, and if they are destroyed, they are individually replaceable easily.

There is also a DS1302 RTC chip on the PCB - it is simply driven directly off 3 pins of the Arduino.

The whole board is driven by a 12VDC plug pack transformer.

It is not sensible to describe the full details of the Ethernet controller here, just check out the Arduino Ethernet controller (which is basically an Arduino and a NuElectronics shield) for info.

You will find the full schematic diagram attached as a PDF.

<p>It is great project. It work for me. I used Arduino UNO with enc28j60 shield.</p><p>But sometime it can not connected to the network until reset.</p><p>I tried to used Arduino Mega2560 for more buffer size ,it could installed the code but not work. </p><p>So many thank for your projects.</p>
<p>Hi,</p><p>you can use ULN2003 or ULN2803 chips for driving the solenoids. They have inputs perfectly suitable for 3V3 or 5V drive (with current-limiting resistors), and open collector outputs with integrated flyback diodes. Makes the electronics even simpler... and I made a device (lead type casting machine controller, actually) that uses four of these chips for controlling 31 compact solenoid valves for compressed air. The PCB fits on a Raspberry Pi (and is a &quot;proper&quot; HAT). It would be possible, but very impractical with discrete transistors :).</p><p>Nice PCB design, and clean execution too :).</p>
<p>This project is awsome. thanks for putting it out there. I re designed your idea and made it networked with security. No flaws sofar. I set it up to my phone and i can control the sprinklers before i get home or just to show off...</p>
<p>Your project is great, was and still is, but by now, selfbuilding it is just not wise anymore. the chip will cost me 4 euro, the magjack 5 (al locally sourced) but for an entire ready made board from china I now pay abt 4 euro.</p><p><a href="https://www.dx.com/p/enc28j60-ethernet-lan-network-module-for-51-avr-stm32-lpc-150604" rel="nofollow">https://www.dx.com/p/enc28j60-ethernet-lan-network...</a><br>Dont get me wrong, it is a great thing you did and at the time the best solution, but u have been overtaken by cheap foreign labour :-)</p>
Hello, congratulations for the project, very good!! <br>Can you help me? <br>I want to do this project with atmega8, would pass me the HEX file? is it possible? <br> <br>thank you
Hi,<br><br>Unfortunately, the project is designed for the Arduino platform, so I do not have any hex files.
Newbie question: <br> <br>Why does the part list say ATMega168 but the instruction mentions ATMega328 several times? Are these interchangeable? <br> <br>
The 328 is an upgraded 168 chip - more memory - cheaper :-) <br> <br>
Here are some pics
Just out of general interest for the watering code in ACT. Is there just a code for using sprinklers or a hose on odd or even days or is it even forbidden to go around with a can to give thirstuy plants some relief. <br> <br>As I am sure everybody is still allowed to take a bath everyday, would it be allowed ot water your garden with bathwater, even if it is not 'your day'? <br> <br>I know it ha slittle to do with this project, I was just interested
Thats a briliant question.<br><br>The focus of the law was to reduce water consumption from a tap. You could bath every day, and use a watering can every day - it just affected fixed sprinklers.<br><br>It worked beautifully, changing peoples habits - we are now off water restrictions, but the usage is still low :-)<br><br>
great. by just using some common sense i reduced my water consumption with 75%. Not that it makes much difference in my bill as the actual price of water is nothing comapred to the levy's rights and taxes i have to pay on it :-).<br><br>with regard to the use of bath water, i was just wondering if you'd be fined if police would see yr sprinklers working on an 'off day' even if you'd be doing it with bath water :-)<br><br>sprinklers are a very wasteful way of watering plants anyway<br><br>Anyway, that is purely academic now, as yr off water restrictions.
I decided that it wasn't needed for configuring this board, and that if I needed to, I could use the EEProm in the AtMega chip instead for config data.<br><br>Doug<br>
Hi,<br>This is a very good Instructable. <br>I am new at all this and i have been searching for the ENC26J60 library with all the members you are using, and i just can not find one. May be i am just missing a part of the project. Could you please help me to find de Library?<br>Thanks in Advance!
Hi,<br><br>Thats not great - did you use the Sparkfun jack? Does the link light light up when you insert the cable? Does it go out when you remove it?<br><br>Doug<br>
Awesome project. <br>I love web controlled thingies.
No problems - Which libraries do you need?
Wonderful Instructable Doug! I am in the planning stages for a similar controller for my garden irrigation, though I plan to use zigbee to interface with the computer. <br><br>I was wondering on the odd/even day of the week determination whether you had considered using the modulo function. By dividing by 2, the modulo would always be either 1 or zero, so to determine whether to water or not, you would just have to determine if the modulo of the date results in a 1 or zero.
having alot of problems with the come &quot;Time time;&quot;<br><br>and do i need to download anything if so where?
Please Can you make one with 6-Zones. And possible with a port for bluetooth or can i use programming port?<br><br>A++ for pump mode
I have a strange problem with my setup. The web examples don&rsquo;t work but the link lights come on. and the leds flash appropriately for the loading of the enc chip and if i load the ping sketch it will respond but destination as unavailable. the leds blink with traffic but it seems like part of this are not working right. anyone run into this type of issue?
Hi,<br><br>The standard reason that people have problems wit hthis project is that they don't use a magjack - or that they have a transposition error between the TX and RX lines on the Ethernet side, or that the computer is on a diferent network number range to the project.<br><br>If the LEDs flash on boot, then the communications between the micro and the Ethernet controller are correct. just check the use of a Magjack, and make sure you are either (1) plugged into a hub, or (2) using a crossover ethernet cable from your computer.<br><br>Also, double check your network settings - it is important that you are on the same network as the project, as it has no routing capability. Also double check the address you set up in the code.<br><br>Take care,<br><br>Doug<br>
how much if i asked you to make me one ?
Awesome. This is exactly the project I wanted to do for our home irrigation system, since the commercial watering controllers have horrible UIs.<br><br>You mention that you protect your boards with a solder-through spray lacquer -- do you have a brand name or a supplier?<br><br>
It is an Australian Brand called Servisol.<br><br>It can be purchased from Jaycar.<br><br>http://www.jaycar.com.au/productView.asp?ID=NA1002&amp;keywords=lacquer&amp;form=KEYWORD
Amazing instructables!<br>It is possible do the same with wireless conection?
<br> That is an awesome idea - I am sure that it could be done, using some of those inexpensive rf data link modules.&nbsp; I am not aware of a way that I could get 802.11 actual wireless networking into the design.<br> <br> With an rf data link module, I suspect that the architecture would change completely - we wouldn't have to implement a web server in the box, because we could simply implement a simple remote control protocol.<br> <br> I don't think I would go to the extent of having wireless solenoid controllers.&nbsp; The current drain when they are operating would destroy batteries very quickly :-)<br>
Wireless option would be awesome! Then you could easily feed data to a computer that runs 24/7 and create graphs and such from there.<br><br>(Patiently waiting for the WiFi version)
Actually if you have an open plug near where you are you could use a Wireless Network Bridge WNB. This lets you plug it into the computer for your info then you plug it ino the ethernet port on your system after programmed and it should latch onto any wireless network it is programmed to.
Regular solenoids (in North America) prefer 24 Volts AC. Since I have 12 Volt DC draught (remote property, solar) I would like to use that to run my irrigation solenoids. Can I feed 12VDC to a 24VAC solenoid and make it function?
Simple answer is NO. AC and DC are different power systems. DC will burn out AC coils.
I will add to the above comment. I am a qualified electrician, I live in Australia. The local 24 volt coils will not work on DC; if they do work, the local heat 40 degrees C in the summer will overheat the coils.
Thats interesting - Thanks for your thoughts.<br> <br> I never water during the heat of the day - it is really bad for the plants - and the local council only allows watering between 7pm and 10pm in any case.<br> <br> Do you know what is different between an AC and a DC coil?&nbsp; What manufacturing difference is there?<br>

About This Instructable




Add instructable to: