1. The Idea -- use a standard electric sprinkler valve and garden hose adapters to control the flow of water using a parallel port based C program in Linux. Scheduling accomplished by running a cronjob.
2. The Parts-- Gather the parts.
3. Build the Electronics -- Assemble the parts.
4. Plumbing-- Use the Thread Tape
5. Software -- Install linux compile some software and create a yard fountain. (see below)
6. Scheduling -- sudo Crontab -e
7. Other Notes-- more thoughts on the project.
Remove these ads by
Signing UpStep 1: The Idea...
The plan is to use a standard electric sprinkler valve two garden hose adapters a relay and old 12v power supply to control the flow of water from and old linux computer. This will allow the fine tuning of watering time using cronjobs.










































Visit Our Store »
Go Pro Today »




m - minute after the hour
h - hour of the day
dom - day of month
mon - month of year
dow - day of week (0=sunday)
command - shell command to execute
So the first entry will execute "/usr/bin/parcon 1h 2h 3h 4h 5h 6h 7h 8h" at 7:30 every monday, wednesday, and friday
42!
Could you tell me how to hook up the Omron G5V-1 relay??
I would really like to build that circuit to control a 12V LED lamp from my PC.
#include <asm/io.h>
with
#include <sys/io.h>
to compile parcon.c
And my computer doesn't have enough power to switch the relay :(
Pin 1 will be always be (Normally Closed) NC or on, and Pin 10 will be Normally Open (NO) or off. Pin 5 and 6 are ground pins.
Powering the coil will close the circuit between pin 10.and pins 5 and 6.
In short, connect the parallel port to pins 2 and 9, and wire one leg of your led lamp into pin(5 or 6) and pin 10. Be sure to check the milliamps needed by your relay and the milliamp output of your parallel port.
You may be able to do the same thing with a TIP120 transistor as well.
similar to www.arduino.cc/playground/uploads/Learning/relays.pdf
I think most sprinkler valves are based on 24v.
I was using X10 to control my valves. I'm switching to Irrigation Caddy which is a networked controller controlled by a web browser.
Beyond your initial project, I'd look at drip irrigation. It's better to water the roots then the leaves and it uses much less water.
I'd also add, at the least, a vaccum break upstream of the valve(s). It keeps water from being sucked back up the hose when the valves shut. It's required in some communities. It should be less then $5.
I will look into the vacuum break, I had not heard of those. Thank you for the advice.
I have thought about using linux to include moisture sensors AND valve control where you have different plantings requiring different levels of moisture.
However, I, too, would advise against using this, simply because of the amount of power that's being wasted for something that's used 30 minutes per day. (Less, if you only count the amount of CPU time required to send the on/off commands. The rest of the time is spent idle.)
Different story, if you're adding functionality to a computer that's on for other purposes during the day anyway.
P.S. Cron can be adjusted to the start of a minute, not second.
I believe the correct method for doing this is to connect your P-Port pin to an opto-isolator through a current-limiting resistor and have the opto-isolator switch the relay (possibly supplied by the PC's 12v rail) along with a diode for reverse emf protection.
Just my 2 cents, use it/ dont use it :)
~Rob.
I like the idea of supplying 12volts from the computers power supply. I did not think of that during construction.
Thank you for your feedback.
Brandon
PS. Please try to use commas in your writing :) It will help us in reading.
Hope this helps.
You can also add additional chips (cheap) so you can add more relays, but the programming gets a bit more complicated. Most good robot books tthat support the pc can give you more details.
You must make the change that carbonman mentioned to get carbon man to compile.
It would probably be better to place a transistor between the parallel port output and use a regulated 5volt power source to throw the relay. But i was using what I had on hand.
Thank you for your comment.
You must make the change that Carboman mentioned to get the parcon program to compile
Change: #include <asm/io.h>
To: #include <sys/io.h>
Thanks again,
Thank you,