Peripheral Power Control With Screen Saver

34,508

44

38

Published

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.

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.

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.

Share

    Recommendations

    • Water Contest

      Water Contest
    • Creative Misuse Contest

      Creative Misuse Contest
    • Clocks Contest

      Clocks Contest

    38 Discussions

    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.

    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.

    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?

    7 replies

    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?

    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.

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

    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

    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

    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

    3 replies

    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?