[TriLUG] software-addressable power switches?

Ed Hill ed at eh3.com
Fri May 2 11:04:15 EDT 2003


On Fri, 2003-05-02 at 07:54, Andrew Perrin wrote:
> Is there a device, reasonably cheap and addressable in linux, that will
> let me turn a plug on and off? I'm finding that my cable modem often
> (e.g., every 2-3 days) loses its signal, but a power cycle brings it right
> back.  I'd like to script this so when the computer can't ping out it
> tries to power cycle the modem. But that would require some sort of device
> that lets my computer tell a plug to turn off, wait 60 seconds, and turn
> back on again. If such a device exists, I'm sure some TriLUGger will know
> of it!


Hi Andy,

We do this sort of thing in our lab a lot and theres *many* ways to go
about it.

  1) expensive but easy: buy a PCI or other card that has 
     optically-isolated relays and that comes with Linux drivers.
     For instance, I've used the Mesa Electronics ISIO card:

       http://www.mesanet.com/parallelcardinfo.html

     for simple switching apps.  Its relatively cheap and you get 
     four opto-isolated relays for switching four circuits off 
     of the parallel port.

  2) cheap but time-consuming: get a soldering iron and build 
     a simple circuit that drives an opto-isolated relay from 
     one of your IO ports.  You can get descriptions of how to 
     do this from various sites including:

http://www.ibiblio.org/pub/Linux/docs/HOWTO/mini/IO-Port-Programming
http://www.epanorama.net/circuits/rspower.html


Note that its pretty easy to drive relays off of the parallel or serial
ports.  And its very easy to write code that will drive those ports.  I
have all sorts of small C/C++ codes written to drive oddball devices
connected to RS-232 and I'll be happy to share them.  Or, I'd help you
write a custom one if you want to go the build-it-yourself route.

Ed

ps - Heres a set of relays controlled over either RS-232 or USB:

       http://www.ontrak.net/ADU200.htm

     and I'm sure google can turn up more...

-- 
Edward H. Hill III, PhD 
Post-Doctoral Researcher
Division of ESE, Colorado School of Mines, Golden, CO 80401
Email: ed at eh3.com  ehill at mines.edu
Phone: 303-273-3483
URLs:  http://cesep.mines.edu/people/hill.htm  http://eh3.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://www.trilug.org/pipermail/trilug/attachments/20030502/65d202cc/attachment.pgp>


More information about the TriLUG mailing list