Peripheral Power Control With Screen Saver





Introduction: Peripheral Power Control With Screen Saver

First: this project plugs into the printer port of a computer. I will not be held responsible for someone torching their motherboard. PLease, please, please be careful and triple check all your connections if you are going to attempt something like this. sending 110v through your printer port is spectacular, but short lived fun.


I tend to leave my computer on all the time. It's a combination of laziness and need. I sit on line quite a bit, and the kids use it as well. I don't think I'm unique here.

Recently moved to a smaller apartment, and finally noticed the somewhat shocking electric bill. When I was in a house, I used to put it down to the baseboard electric heaters, or the watter heater or something. Now, it appears that it pretty much has to be the computer. With the monitor, printer, speakers and other crap I have going all the time, it has to be sucking up the power while it's just idling along. Putting the computer into screen saver still leaves all the external stuff turned on.

Last Christmas I grabbed a bunch of solid state relays off Ebay to use in a computer controlled lighting display. It's came out pretty cool, and left me with 8 spares.

For those who don't know, a solid state relay is something like an electronically controlled switch. More info here:

When I was looking for ways to control my Christmas lights, I came across some software for controlling the LPT (printer) port pins. The raw software is available here:

After thinking about my power problem for a while, I decided to try and rig something up to turn on and off a bank of power sockets triggered by the screen saver.

Step 1: Construction

I started by building a basic box big enough to hold the 8 relays and the sockets. the control end of each relay connects to one of the control pins and one of the ground pins on the LPT connector. the other side works as a switch for the socket above it. This allows me to control each socket separately.

Step 2: Software

This is the VB6 code and compiled EXE. All you really need to run it is the inpout32.dll and LPT.exe. start the program. When it detects the screen saver kicking in, it will turn off all the LPT pins. When the system comes out screen saver, it will re-enable the pins. when it's running, it will appear down in the task tray.

Step 3: Finsh, and To-do

(Mostly) finished project. it works pretty well. The dust (plaster) is from another art project. Only a few things to do.

1. Add sides so the kids and cat don't mess with the wiring.
2. right now, the software only works if your logged in. have to figure out how to actually make a service out of it.
3. Add an option for manually turning sockets on and off at will.



    • Epilog Challenge 9

      Epilog Challenge 9
    • Pocket-Sized Contest

      Pocket-Sized Contest
    • Science of Cooking

      Science of Cooking

    We have a be nice policy.
    Please be positive and constructive.




    You forgot to explain how does it detect the screen saver? :D

    A nice and safe alternative is to use a Wattstopper power unit which is UL approved, has zero voltage switching and as a bonus has DC output at about 150 mA to power your controller. One such unit (B-120 EP) is available from Amazon for about $15. - Enjoy.

    can you send me the schematic of the relay circuit you used in this project?

    well, no. There really is no circuit. The relay used is a simple solid state relay like such:

    The two wires from the LPT port attach to two of the contacts on the relay, usually labeled "5V" or "TTL". The two contacts from the 110V side connect to the switched contacts on the other end.

    If you wanted to be safe you could add an opticoupler on the 5V side.

    The Solid State Relays already have a opticoupler connecting the low and high volt sides

    would you be able to write an script that would power up or down one of the pins based on a hotkey? Like if I hit 8 on the numpad it would power up or down the relay connected to the 8th pin?

    hrm.. probably.. It would be more likely something like ctrl>f>(number) or some such. It would have to be something that would not normally be used. I can look at it if you want?

    That looks like a pretty sweet setup. My original code was DOS/W95 based, so it would most likely not work well, if at all under XP. There are a lot of resources for doing so however.

    I would check here:

    He seems to have it under control.