How to hook strange things up to your computer The HOWTO Page

The HOWTO Page

How to set up a computer controlled power switch

Before I started using X10 products, my appliances were all toggled by parallel port controlled relays. This document provided me with all the information to get started. While using X10 for lamps and other simple appliances makes more sense, especially when you've got a large number of them distributed throughout a house, relays are still useful in instances where you're replacing manual switches. This can be anything from a power switch to the buttons on a remote control, to the levers on a RC car remote.

The following schematic is a simple design to trigger a relay from the parallel port. The VCC can be any DC voltage which is required by the relay coil. Most small dc relays are in the range of 3-24 volts. The parallel port data pin is one of the pins 2-9 and the ground pin is 18. You can easily control up to 8 separate relays for each parallel port. You can control many more than this if you build external circuitry to take multiple bytes of data but that is beyond the scope of this document.

I wrote a client and server program set to control the switch. The server program recieves a request to turn the switch on or off and then sends the appropriate value to the parallel port. A client program then sends a command to the server to toggle the lamp. This was a simple process at first, but now the server program has been expanded to include a large number of different devices. You can grab a stable version here. This program has been tested to compile and work on several different distributions of linux, but there is currently no port available for Windows based operating systems.