(warning ! this text assumes my personal conditions, other locations might use other net voltages like 380V or 110V instead of 220V) OUTPUT ====== This is the schematic of an output device. When the SIG wire is connected to ground (or a logic 0 from yout parallel port), it will switch the relais to inactivated state. When the SIG wire is connected to a 5Volt potential (or a logic 1 from your parallel port or any ttl device), it will switch the relais to activated state. It needs a 12V Vcc to operate the relais. I build the resistor R1 and transistor T1 seperatelly from R1, D1, D2, REL1. I then put the ttl to 12V convertor in the MER (Main Equipment Room). From there a wire goes to the actual switching location (inside a lamp, tv, wall socket, whatever) and is connected with the relais control (R2, D1, D2, REL1). If you have a couple of units spread over the premises, concentrate all bundles and split off where necessary (thus creating a sort of 'backbone'). This means you can use a general feed of +12V and gnc shared by all units (thus using only 1 wire) instead of multiple feeds for individual units. +12V | ________________| | |_________________ | __|__ | _|_ / \ D1=1N4007 |_ | | /___\ \ | | R2 = 1K | / REL1=12V, use a |___| | \ model for 220V | | __/ and as much amperes __|__ | | as neccesary (1A,5A) \ | / D2=LED | | _\|/_ |________________| | | |_______________| | | | C | / | / ____ B |/ IN ---|____|----| T1=bc547 R1= |\ 10K | _\| | \ | E | | __|__ ___ _ Input ===== There are several types of input. One of them is infra red (for remote controls). I used the excellent schematics which are on one of the several lirc homepages. The gpc homepage (chaos.concepts.nl/~gmc or www.bitcon.nl/~gmc) has links to four different lirc sites. The lirc solution includes an excellent linux driver for the module (just 5 parts, really easy to build) and software for (mostly american) remote controls. I had to redo the software for european rc's, and that code is included in the gpc distribution. Another form of input is a simple on/off switch. Maybe one of your lightswitches. Normally the switches on the walls you use to turn on/off your light are wired with 220V. Once you have installed an output module (see first schematic) on the light, you can disconnect the switch from the 220V circuit since it isn't needed anymore. You could use virtually any switch you can get your hands on btw. Now hook up 12 or 5 volts to the one end of the switch, and another wire to the SWITCH wires of one of the below schematic (respectively for 5V or 12V). This device will filter out any interference, and will output a nice TTL signal to your parallel port. For 12V: +5V | | | | C | / | / ____ B |/ SWITCH----|----|____|-----| T1=bc547 | R2=4k7 |\ _|_ | \| R1= | | | - \ 10K | | | | E |___| | | |______________ TTL (to parallel port) | | __|__ _|_ ___ | | _ | | R3=1K |___| | | __|__ ___ _ For 5V: SWITCH----------------------TTL (to parallel port) | _|_ | | | | R1=1K (ain't electronics like magic?) |___| | | __|__ ___ _ Well have phun experimenting but remember ! Never hold the high voltage lines while they are operative (I did a couple of times and it gave me an unpleasant buzz :) signed, gmc