parallel_port_hardware_hacking

This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.



Subject: Re: linux sprinkler
From: Nick Moffitt <nick@zork.net>
Date: Wed, 5 Apr 2000 15:05:27 -0700

begin  Derek Vadala quotation:
> From my tests, it seems that the unit has a voltage regulator inside
> and by applying anywhere from +4V to +5V to a given post, you can
> adjust the amount a valve opens and control the water intensity to a
> given zone. Remove power and the watering is done.

	You're in luck, as I believe that the power from the parallel
port is either +5 or -5V.  It should be trivial to hook the pins up.

===
Subject: Re: linux sprinkler
From: Markus Gutschke <markus@gutschke.com>
Date: Wed, 05 Apr 2000 16:07:23 -800

You're in luck, as I believe that the power from the parallel
> port is either +5 or -5V.  It should be trivial to hook the pins up.

Before you do that, check how much current the circuit draws. If you
are not careful, this will blow out your parallel port. Given that
today's machines usually have the parallel port integrated with the
motherboard's chipset, this could be an expensive excercise. You'd
be better advised to get some opto-couplers to galvanically
disconnect the sprinklers from your computer. Sorry, I don't have
schematics handy, but a quick search on the web should help. Maybe,
this URL can get you started:
http://www.us-epanorama.net/pc/interface.html#parallel


===

Subject: Re: linux sprinkler
From: Nick Moffitt <nick@zork.net>
Date: Wed, 5 Apr 2000 17:10:38 -0700

begin  Derek Vadala quotation:
> It is. In fact, I think the serial port has the same voltage output.
> The question: what's my best bet as controlling the serial port in
> this way? Perl, Pyhthon, are their modules that have dealt with this
> kind of low-level support or do I need to break out some assembler
> books.

	If you want to hand-poke pin states on your serial/parallel
port, you can do it with simple ioctl()s.

	It should be trivial to write a little C program that accepts
simplified input and raises pin current depending on the args or input
or whatever.  Then you can script around the rest with your beloved
scripting languages.

===

Subject: Re: linux sprinkler
From: Nick Moffitt <nick@zork.net>
Date: Wed, 5 Apr 2000 17:08:17 -0700

begin  Markus Gutschke quotation:
> Given that today's machines usually have the parallel port
> integrated with the motherboard's chipset, this could be an
> expensive excercise. You'd be better advised to get some
> opto-couplers to galvanically disconnect the sprinklers from your
> computer. 

	Actually, this isn't such a bad idea.   Opto-couplers are
basically an LED and a photosensitive triode.  The idea is that if one
side blows, the two sides of the circuit pass information with light
and not electricity.  Thus, the two sides of the circuit are
electrically isolated.  It is advised to keep your separate sides on
separate boards, even.  

	I like opto-couplers.

	Actually, with an opto-coupler, you'd be able to build a
separate power source and tune it to whatever the box needs.  Think of
it as being a really simple amp.

===

Subject: Re: linux sprinkler
From: Eric Fixler <fix@idiom.com>
Date: Wed, 5 Apr 2000 18:39:28 -0700


Actually, serial port voltage can be anywhere from +- 8v to +- 12v. 
They don;t use the same 0/5v voltages that standard digital logic 
does.  Also, the hi-lo states are inverted.

It's really easy to convert serial port voltages to TTL (0-5) logic. 
There's a whole class of IC's called "Serial Line Drivers" or "Level 
Converters" that do this.  Check out the maxim ic WWW site -- 
www.maxim-ic.com.  You can get free samples.  I usually use the MAX 
3222, MAX208, or MAX232.  These devices convert the voltage and 
invert the logic.

Alternately you can use a 5.1V zener diode, bled to ground, which 
will convert the +X voltages to 5V and the negative voltages to 0V. 
The logic will not be inverted.

The easiest way to do simple binary logic with an RS232 port is to 
use hardware handshaking.  You assert  a handshaking line and it goes 
high till it's de-asserted.

Most serial ports can drive about 10mA.  They're supposed to have 
current protection resistors, but it's a good idea to put 100-200 
ohms or so between the serial port and your project, even if you are 
using optoisolation (if you are powering the optocoupler device from 
the serial port you still need short-circuit protection).

===


Subject: Re: linux sprinkler
From: Greg Herlein <gherlein@quicknet.net>
Date: Wed, 5 Apr 2000 19:54:30 -0700 (PDT)

It should be trivial to write a little C program that accepts
> simplified input and raises pin current depending on the args or input
> or whatever.  Then you can script around the rest with your beloved
> scripting languages.

Sorry, I missed the original question - I have a simple GPL
serial library I can share.  It has quite a bit of support for
this kind of thing.  What exactly do you need?

===

Subject: Re: linux sprinkler
From: Derek Vadala <derek@cynicism.com>
Date: Wed, 5 Apr 2000 22:47:50 -0700 (PDT)

On Wed, 5 Apr 2000, Greg Herlein wrote:

> Sorry, I missed the original question - I have a simple GPL
> serial library I can share.  It has quite a bit of support for
> this kind of thing.  What exactly do you need?

Need to be able to cross the voltage pins with other pins that are custom
wired and regulate the voltage output.

===


the rest of The Pile (a partial mailing list archive)

doom@kzsu.stanford.edu