Revisiting parallell port mains control

Since my last post on this topic, there has been quite a lot of interest; this post is to cover some slight tweaks to the box itself and to include some extra details. I’ve added a second parallel socket to the side of the box and connected each pin to the corresponding pin on the other socket. This allows one socket to be connected to the computer and the other connected to further parallel devices. I plan to build several more similar boxes, which will be able to be controlled simultaneously from a single parallel port.

The socket box with the faceplate off to one side in order to show the connections.

There are a couple of caveats. The second parallel cable must never be connected to a second computer; this can short the data lines and cause damage to one or both of the machines. Additionally a parallel port can only be trusted to source 12mA, with boxes like this requiring about 2mA each it would be unwise to connect more than 5 on the same data line; you can of course use up to 5 on each of the 8 different lines.

Here is a circuit diagram for the whole system:
A scematic showing the whole circuit

You’ll notice that there is only a single diode on the diagram whereas my circuit has 4; the other 3 are not really required for a circuit this simple. The choice of components for the circuit isn’t particularly important; any transformer and relay that work at the same voltage will be fine, most npn bipolar transistors will do the trick for switching the relay and any old diode and electrolytic capacitor can be used for the power supply.

3 thoughts on “Revisiting parallell port mains control

  1. Pingback: Controlling the mains via the parallel port | Products of Mike's Mind

  2. Aleza (@aleza84)

    Found what I was looking for with your post and the code, but is there a way to use each pin from the lpt, each for a different relay?

    I was looking to start simple like you did and scale to various items 🙂

    Let me know if you got any ideas.

    Reply
    1. Mike Post author

      Using this system, you can control 8 separate channels and connect up to 5 separate relays (using the above design) to each channel. You simply issue the command ” ./parallel_control [number] 1″ where number is between 0-7 inclusive then connect the “data” input in the above circuit to pin 2-10 respectively.

      Reply

Leave a Reply