Introduction: Peripheral Power Control With Screen Saver

Picture of 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

Picture of 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

Picture of 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.


ofir60 (author)2015-03-16

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

globrite (author)2013-07-11

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.

vlancSoft (author)2007-09-07

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

photozz (author)vlancSoft2007-09-10

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.

Computothought (author)photozz2010-08-02

Yeas and seal any 120v connections.

thermoelectric (author)photozz2008-07-14

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

egriff (author)2008-12-14

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?

photozz (author)egriff2008-12-14

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?

egriff (author)photozz2008-12-15

I want to use it with Voice Activated Controls

I also found these

photozz (author)egriff2008-12-15

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.

Computothought (author)photozz2010-08-02

I highly recommend also.

egriff (author)photozz2008-12-15

jeez that some heavy reading.

photozz (author)egriff2008-12-15

Oh. I know.. LPT control is much fussier under XP. In Win95/DOS you can control the port directly. In Win2k/WinXP you need to use a device driver to interface.

There is a driver available here:

as well as some simple example code. I found another controller board that looks the same as the one you listed:

The description says that it comes with the software, so that may be a good option as well.

egriff (author)photozz2008-12-15

yeah the software basically allows you to create timed events, I'm looking to hotkey the pins because thats how voice activated commands work.

lieuwe (author)2008-12-29

about the 'not working when logged out' problem, if you could create a program that pulls all the pins to low when activated, you could just rename it to a .scr and use that as a screensaver

Derin (author)2008-06-25

JUST WHAT I NEED!!!!!!!!!!!! YOU ARE AWESOME!!!!!!!! just one question:can a timer control the software not your screensaver? im askin because i need a simple timer to charge nimh cells

Mr.Devious (author)2006-12-31

So the moral is? Use moderation in what you plug in I guess. If you had money for a x11 system, that might be a bit better perhaps? But who knows, this website is for creativity and CHEAP THINGS!!! Rock err instructable on people

photozz (author)Mr.Devious2007-01-01

adding x11 to t\he screen saver function is a cool idea.. .. having it turn off the room lights of something as well.. hm..

Mr.Devious (author)photozz2007-01-01

And even yet, adding settings to the screensaver to have the lights only dim to a certain %. That would be easy enough to do and would probably yeild more ideas with the x11 system. I don't know if they have outlets for stuff like stoves, but you could set the temp on your stove and then have the computer turn it on when you get home (time would have to be set) and then you can have it all heated up for when you get in the door so you can make supper? Dumb Idea I guess XD

tyleestuff (author)Mr.Devious2007-08-20

I have a small X10 system and really want to try this. I'm always leaving the lights on. :) Hopefully I can get some code working because I would want it to detect the screen saver on my windows computer, and that isn't whats running the X10 software. My linux box is. Any suggestions?

photozz (author)tyleestuff2007-08-21

Well, that's a tricky one. There are libraries for controlling the LPT port on Linux: But I have never used them. Or, You could have the software running on the Windows box. When it trips the relay, you could actually have the relay connected to an X10 remote or some such.
If you cracked a remote open, you could solder the switch terminals so that it would send the signal to turn your stuff off.

25Kilovolt (author)2007-08-20

this is very cool i just did the exact same thing except with a large 10 amp relay and a program with a timer. i am going to see if I could make it work with serial port instead and use it a windows power device.

extremistmike85 (author)2006-12-01

Have any of you actually noticed a drop in electric bill because of this? If so then i may have to build one of these suckers! HAPPY DECEMBER!

trebuchet03 (author)2006-11-19

Thanks for sharing :) I'll have to see if my external drive disconnecting will bring the machine off screen saver. But this sounds like a good way to save a few more dollars on the bills - not to mention a little greener than keeping everything on all the time :P

Daykun (author)trebuchet032006-11-27

If it's a harddrive... please don't shut it down if you don't know if its doing something... You might be copying something to it and then the screensaver starts and goodbye uncorrupted data !

_diyMATT (author)2006-11-20

This will allow you to run any .exe as a service. The last time I used it you could do one .exe for free, but if youu wanted more they wanted you to register and buy.

There are other ways, but this one is easy peasy.

Lamity (author)_diyMATT2006-11-22

They still have a free verson available:

photozz (author)_diyMATT2006-11-20

Bingo: found something for free. Available from Microsoft:

"Instrsrv.exe installs and removes system services from Windows NT and Srvany.exe allows any Windows NT application to run as a service."

linlin (author)2006-11-20

Can you give some more specs on the SSRs you used for the project? How much current/voltage is produced from the LPT port when that pin is "on"? Also a question or two about SSRs, is it nessecary to have a (relativly high) AC current flowing through the other side of the device? Can a SSR be used like a normal relay in a sence where the switched side acts like a switch itself, or must it switch something with power? (I have been told that there always needs to be power flowing from the AC side for a SSR to function, this can be easily overcome with another mechanical relay, but its just more work) Thanks, nice project... :)

photozz (author)linlin2006-11-21

well, the specific model is a General Electric cr120sr105d. I just noticed that I mis-quoted below. I meant to say 3 amps. In reality, each relay is rated for up to 5 amps each, 8 in the box for a total of 40 amps worth of service. a typical PC draws about 1.25A. The TTL logic side will trigger on 3 to 30 volts, and the AC side is rated for 110 volts at 5 amps.

As far as the switching, I *believe* they will work as a normal switch. I have used lower power SSRs in this manner with no problems. I honestly can't say I have tried these AC relays that way, I just have not had any call to do so. Wiki has some good info though

As far as the current draw for the LPT port, this site has some good info:

Normal UM82C11-C IEEE 1284 level II
Data output (>2.4V) 2.6 mA 2 mA 14 mA
Data line sink (<0.4V) 24 mA 24 mA 14 mA
Control output (>2.4 V) 0.5 mA* 1.5 mA ?
Signal lines (short circuit) 1 mA ? ?
Control line sink (<0.4V) 7 mA 7 mA 14 mA

Generally, you don't want to mess around with trying to draw too much current off the port. once it's burned out, it's done. and that's a new motherboard.

bobdole (author)2006-11-20

Wouldn't it be easier to write a screensaver wrapper or a frontend? like take your code, add a line at the end to run your favorite screensaver, compile and rename to .scr, throw it in your system32 directory and away you go

photozz (author)bobdole2006-11-21

yep.. it would. I was lazy. just tweaked some old code I already had. At least this way, it allows you to use whatever screensaver you want, if you are not killing the power to the monitor.

bchafy (author)2006-11-20

Cool project. Another use is just add some colored spotlights and you have a hombrew disco. I think there's a plugin for xmms or winamp that controls the parallel port like a vu meter.

One rant, your box is made of pressed wood sawdust. Not the best for fire prevention. Id gut an old metal PC case and use that instead, just in case something shorts and starts to burn.

BTW, Ive done a similar project:
It's dpms based, uses a mechanical relay and other junkbox parts.

I also have the mentioned epson printer. Great printer, but the 10+ minute selftest on powercyle drains all the ink away. Also mine consumes the parallel port.

photozz (author)bchafy2006-11-20

Yeah.. I was waiting for someone to mention the wood. it's actually chunks from an old entertainment center I had. I'm thinking of it as more of a proof-of-concept piece at the moment. I'm going to make something fancier. On the bright side, it's on a power strip with a breaker, and it would have to generate a hella lota heat to ignite 3/4 inch board.

Logic (author)2006-11-20

Do the relays get warm at all while operating? Because if so, on average they may be using more power during their on time than the appliances would use in their standby state...I'm just saying this because it's the kind of thing that would happen to me, and someone would point out after I'd done all the work. Time for a little math?

photozz (author)Logic2006-11-20

No noticeable heat increase... I got the relays from Ebay.. paid I think 60$ for a board with 30 of them. they are seriously over-rated for the application at about 30 amps each. the LPT side is just TTL logic, so the draw is quite small. It is a good note to add that you should buy relays rated at least twice the capacity you need. Thinking on that, I may add a breaker to the entire thing as well.... just in case.

LasVegas (author)2006-11-19

Just don't use this to power up and down an Epson printer. Every time power is removed from an Epson, the heads are automatically cleaned. Could be a real waste of ink... Most modern monitors go into Energy Star Compliant mode when the video signal is off. This mode uses very little electricity. Just enough to sense the video signal's return and perhaps an amber LED. Now… If you're using a Teletype for your printer, most definitely shut the thing down when you're not using it!

photozz (author)LasVegas2006-11-19

yeah.. using a 40$ Epson. hehe.. but the monitor is a double flat screen, and the speakers never go to sleep... I have a light on my desk, and whatnot as well.

About This Instructable




More by photozz:Staying Warm..On Hoth.Techniques for making a few simple boxesPhotozz's Workshop
Add instructable to: