Instructables

Peripheral Power control with screen saver

Featured
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.

So,

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: http://relays.globalspec.com/LearnMore/Electrical_Electronic_Components/Relays_Timers/Solid_State_Relays

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: http://neil.fraser.name/

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.
 
Remove these adsRemove these ads by Signing Up
globrite1 year ago
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.
vlancSoft6 years ago
can you send me the schematic of the relay circuit you used in this project?
photozz (author)  vlancSoft6 years ago
well, no. There really is no circuit. The relay used is a simple solid state relay like such:
http://www.globalspec.com/FeaturedProducts/Detail/TeledyneRelays/Commerical_DC_SolidState_Relay/39618/0?fromSpotlight=1

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.
Yeas and seal any 120v connections.
The Solid State Relays already have a opticoupler connecting the low and high volt sides
egriff5 years ago
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)  egriff5 years ago
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 photozz5 years ago
I want to use it with Voice Activated Controls http://www.dwvac.com/

I also found these

http://www.hobbyengineering.com/H1268.html

photozz (author)  egriff5 years ago
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: http://www.epanorama.net/circuits/parallel_output.html

He seems to have it under control.
I highly recommend http://www.epanorama.net also.
egriff photozz5 years ago
jeez that some heavy reading.
photozz (author)  egriff5 years ago
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:
http://logix4u.net/Legacy_Ports/Parallel_Port/Inpout32.dll_for_Windows_98/2000/NT/XP.html

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

http://electronickits.com/kit/complete/elec/ck1601.htm

The description says that it comes with the software, so that may be a good option as well.
egriff photozz5 years ago
yeah the software basically allows you to create timed events, I'm looking to hotkey the pins because thats how voice activated commands work.
lieuwe5 years ago
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
Derin6 years ago
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.Devious7 years ago
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.Devious7 years ago
adding x11 to t\he screen saver function is a cool idea.. .. having it turn off the room lights of something as well.. hm..
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
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)  tyleestuff6 years ago
Well, that's a tricky one. There are libraries for controlling the LPT port on Linux: http://parapin.sourceforge.net 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. http://www.iautomate.com/phr04.html
If you cracked a remote open, you could solder the switch terminals so that it would send the signal to turn your stuff off.
25Kilovolt6 years ago
this is very cool i just did the exact same thing except with a large 10 amp relay and a vb.net 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.
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!
trebuchet037 years ago
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
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 !
http://www.firedaemon.com/

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.
They still have a free verson available:

http://forums.firedaemon.com/viewtopic.php?t=27
photozz (author)  ColumbusCOOK7 years ago
Bingo: found something for free. Available from Microsoft:
http://www.microsoft.com/downloads/details.aspx?displaylang=en&familyid=9D467A69-57FF-4AE7-96EE-B18C4790CFFD

"Instrsrv.exe installs and removes system services from Windows NT and Srvany.exe allows any Windows NT application to run as a service."
linlin7 years ago
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)  linlin7 years ago
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 http://en.wikipedia.org/wiki/Solid_state_relay

As far as the current draw for the LPT port, this site has some good info: http://www.tkk.fi/Misc/Electronics/circuits/lptpower.html

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.
bobdole7 years ago
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)  bobdole7 years ago
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.
bchafy7 years ago
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:
http://www.ccs.neu.edu/home/bchafy/pstrip/dpmspowerstrip.html
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)  bchafy7 years ago
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.
Logic7 years ago
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)  Logic7 years ago
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.
LasVegas7 years ago
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)  LasVegas7 years ago
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.