3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

How to make a Linux powered garden sprinkler system.

Step 5Software...

Software...
«
  • ubuntu.jpg
  • IMG_1306.JPG
Install your linux os of choice. I run ubuntu for other things arround the house so I will be installing it. everything should work the same on linux.

I am by no means a programmer. I have dabbled in web programming and PHP code but never any system level codeing. I was able to download and compile parcon.

parcon is available here
http://bigasterisk.com/projects/parallel

After downloading and compiling running
 
./parcon 5h 3h
 
will provide 5v power logic out of the number 5 pin. I found that on my computer this circuit did not have enough power to switch the relay. I overcame this by wireing two pins and ground together in parallel. ( yo dawg )  This provide the power needed to throw the relay and I was rewarded with the sound of water rushing.

./parcon 5l 3l

powers off the relay and allows the valve to close.

almost to automated awesomness
« Previous StepDownload PDFView All StepsNext Step »
4 comments
Jul 18, 2010. 12:23 PMjinchuuriki says:
Awesome tutorial, no wonder I became a certified Linux engineer, now I remember why. :
Jun 24, 2010. 1:18 AMgaluise says:
Regarding using TTL (transistor-transistor level) outputs to drive a relay directly. I would agree with Rob. I'm not only posting to agree with Rob, but figured I would offer the advice I learned in engineering school: You would want to use something like a darlington arrray. This would provide enough source current to close the relay and would isolate the computer from any back emf from driving an inductive load like a relay. They come in a relatively cheap package. I can recall using a ULN2003 chip (which contains 7 of these) when building a few projects back in college. The ULN2003 itself is able to source 500ma (600ma peak) worth of current itself. So depending on the needs of the relay this chip would probably suffice. I also have to agree with Brandon (the author) as the diode will protect the computer from back emf. Probably not so much of a problem with a PC's parallel port. However, when we tried driving an inductive load directly from an embedded systems chip. The reactance of the inductive load caused the microprocessor to malfunction in unpredictable ways. It would just act like it "lost it's marbles" so to speak. :) Just my 2 cents as well. I figure it might be useful to someone who comes along to read. -Greg
May 20, 2010. 1:07 PMrobthepyro says:
Perhaps I don't know what I'm talking about but I'm pretty sure that "wireing two pins and ground together in parallel" is a bad idea. basically you risk damaging your P-Port by drawing far to much current with out current-limiting resistors, secondly reverse emf feedback from the coil could be bad for the P-Port

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.

May 20, 2010. 10:20 AMbahi says:
Awesome, LINUX POWER!

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
14
Followers
2
Author:bkimmons