Electronic Projects Online - Ultimate Screen Saver
Originally published by Paul Stenning in Everyday Practical Electronics, February 1995


Most laptop computers have sophisticated power management facilities, which shut down the screen and hard disk after a period of inactivity to save battery life.  Until recently these facilities have not been available on desktop computers.  Some 'Green' PC's are now becoming available, with the aim of reducing power consumption when they are not actually being used.  However if your existing PC is OK, spending over a thousand pounds on a new one just to save a few pounds worth of electricity does not make economic sense!

scrnpic1 Software screen savers are available, mostly running under Microsoft Windows, but all these do is prevent a static image burning into the phosphor of the CRT.  Indeed some of these are sold more on their amusement value than their original purpose!

The unit described here takes the screen saver idea to its logical conclusion.  If the keyboard and mouse are not used for a preset period, the monitor is switched off.  As soon as you touch the keyboard or mouse, the monitor is switched back on again.  This not only prevents phosphor burn, but also saves electricity.  In addition it will reduce the emission of electromagnetic radiation and positive ions, if these things concern you.  Also, it costs no more than a screen saver software package.

If you leave your computer on all the time but only use it for a few hours each day, this unit could save you over £70 per year in electricity costs alone!  (Calculation based on six hours use for five days each week, 125VA monitor and electricity costing 8p per unit = £71.76 saving over 52 weeks).

The time period before switching off can be anything from 15 seconds to over one hour, selectable by internal DIP switches.  The unit is powered by the 5V supply to the keyboard, consuming just 20mA.  Because of this, it will also power down the monitor when the PC is switched off - even if the two units have separate mains feeds.

The monitor is controlled by an opto-isolated triac, which being solid-state should have a longer working life than a relay.  The maximum current is 3A continuous.

The design as shown is intended for a serial mouse, connected to a COM port on the PC.  It is probably possible to use it with a bus mouse, if a suitable signal can be found on the connection to the PC and the appropriate connectors can be obtained.  Alternatively you can just use the keyboard.

Take Care

SECTIONS OF THIS CIRCUIT OPERATE AT POTENTIALLY LETHAL MAINS VOLTAGES.  DO NOT BUILD IT IF YOU ARE IN ANY DOUBT ABOUT YOUR ABILITY TO DO SO SAFELY. YOU SHOULD SEEK THE ADVICE OF A QUALIFIED PERSON.

ALTHOUGH THIS UNIT REMOVES POWER FROM THE MONITOR, IT DOES NOT PROVIDE ISOLATION FROM THE MAINS.  ALL MAINS CONNECTIONS MUST BE REGARDED AS LIVE AND DANGEROUS, EVEN IF THIS SCREEN SAVER HAS OPERATED.

Circuit Description

C1, R1 and IC1c form a simple oscillator, running at (ideally) 1.07Hz.  The frequency is not precise, but it is more than adequate for our purposes.  This oscillator arrangement will only work with logic CMOS gates having Schmitt trigger inputs.  The oscillator can be stopped by taking pin 9 of IC1c low.

The clock signal is fed to the clock input of binary counter IC2.  The outputs of this will count up in the usual binary pattern.  Once 16 clock pulses (approx 15 seconds) have been received, Q5 will go high.  If the top switch of SW1 is closed and the others are open, this high level would arrive at the inputs of IC1d, via the diode AND gate.  The output of IC1d will therefore go low, disabling the oscillator, and switching off TR1 and the LED in the opto-isolator IC3.

The MOC3041 opto-isolators contain full zero crossing circuitry, and a triac output stage.  They are ideally suited to driving triacs in this manner, since they do all the hard work for you!  The LED current for guaranteed operation is 15mA max.  Other devices in this useful family include the MOC3040 which needs a 30mA input (it is slightly cheaper), and the MOC3020 which does not have the zero crossing circuit.

The triac used in the prototype was a BT138 type, however most 600V TO220 packaged triacs should be suitable, including C206M, C225M, C226M, BT137, BT139, BTA08-600B etc.  C4 and R11 form a snubber network to ensure the triac switches off cleanly with an inductive load.  C4 MUST be a Class X rated component, suitable for direct connection across the mains

Timing

The DIL switches in SW1 are binary weighted and give the following times (from top):- 15 sec, 30 sec, 1 min, 2 min, 4 min, 8 min, 16 min and 32 min.  The diode AND gate arrangement allows these times to be added if more than one switch is closed - thus to obtain a time of 40 minutes the 32 min and 8 min switches would be closed.

The precision of the timer is about +/- 10%, which is adequate for the intended purpose.  Repeatability is better as would be expected, about +/- 2%.

IC2 is reset every time the keyboard or mouse is used.  The keyboard sends a burst of serial data on pin 2 whenever a key is pressed.  This line is normally high, and pulses low.  Since these are normal logic levels, the line is connected directly to IC1b, with a series resistor and clamping diodes to protect against the unknown!

The mouse output is a low level RS232 signal, and requires a little more processing.  The output from my cheap-and-nasty Tiwanese rodent is normally at -2.5V and pulses to +2.5V whenever it is operated.  These levels are actually below the minimum RS232 specification of +/- 3V, but it worked OK.  It is assumed that some other breeds will have a larger output, so we have tried to cater for all variants.

C2, D1 and R2 shift the signal so that the negative level is at about 0V, and the pulses are positive.  This passes to IC1a via R3, and if the level is above 5V peak to peak it is clamped by D2 and D3.

Construction

scrnpic2
All the components are mounted on a single sided PCB. The IC's may be mounted in sockets if desired, but since they are all low cost devices this is not strictly necessary.  IC1 and IC2 are static sensitive, so should be fitted last and handled with due care.

Terminal pins may be used for the off-board connections.  Do not forget the four links.  The triac should be secured to the PCB with an M3 screw and nut.  Take extra care when assembling the high voltage section - that to the right of the double line.  This double line indicates the safety isolation barrier - a band at least 5mm wide between the high voltage and low voltage sections.

Do not fit IC3 at this stage.  Instead, fit a spare LED temporarily between pins 1 and 2, with the anode to pin 1.  The LED will be removed and the IC fitted once the low voltage sections have been tested.

Case

The prototype was constructed in a plastic case, however this is not really suitable.  A suitable metal case should be used, which must be properly earthed for safety.  The lid must be secured by screws, so that it cannot be removed without the use of a tool.  A suitable label should be fixed to the lid, warning of the high voltages inside.

The PCB should be held in place with M3 screws and spacers.  Ensure the triac mounting screw clears the case by at least 5mm.  Suitable cutouts should be made in one end for the keyboard (normally 5 pin DIN) and mouse (9 pin D) connectors.  Four holes are needed in the other end, to accommodate the cables.  These should be fitted with grommets or cable clamps, and the cables adequately secured against being pulled out.  An additional hole is required for securing an earth tag. 

Testing

Before making any connections to your PC, switch it off at the mains.  If this is not done there is a small possibility of causing damage - it's not worth the risk!

Set the top switch (nearest IC1) in SW1 on, and the rest off.  Leave the case cover off for now - since the unit will not be connected to the mains.

Unplug the keyboard and mouse from your PC, and connect them to the sockets on this unit.  Connect the leads on this unit to the appropriate sockets on the back of the PC.  Do not change the monitor connections at this stage.

Switch the PC back on, and watch the screen carefully as the PC goes through it's power-on self test, and boot up.  If any error messages appear or the mouse driver fails to load, switch off immediately and carefully recheck your wiring.

If the LED in the screen saver did not light when the PC was switched on, it should have come on at some point during the booting up process.  If you don't touch the keyboard or mouse for about 15 seconds the LED should go off.

Operate the keyboard and the LED should immediately come on again, and extinguish after you have stopped typing for 15 seconds.  The same situation should occur with mouse movement.  Again, in the event of any problems, check your wiring carefully.

Switch the top switch off, and the second one on.  The delay should now be about 30 seconds.  You may wish to check some of the longer delays, if you have the patience!

Now switch the PC off.  Remove the temporary "test" LED from the screen saver, and fit IC3.  Set the DIP switches to give a delay of one minute, and fit the cover securely.

Disconnect the power lead from the back of your monitor, and connect it via this unit.  Switch the PC on, the monitor should also be on by the end of the boot-up.  As previously, if you don't operate the keyboard or mouse for about one minute, the monitor should turn off.

Switch-off Delay

Once you are happy that the unit works satisfactorily, set the DIP switches to a suitable delay and tuck the unit tidily behind the PC (do not obstruct any ventilation holes or the fan).  Always switch off at the mains before removing the cover to operate the DIP switches.

It is suggested that a delay of about 20 or 30 minutes would be reasonable in most cases.  Times of less than about five minutes are probably not practical, and indeed this sort of repeated switching may cause undue stress to the monitor.

If you have a software screen saver you could set this to come in two or three minutes before the Ultimate Screen Saver to act as an early warning.

Modifications

The following suggestions are offered for experimentation by experienced constructors only, and have not been tested.

As it stands, this unit may be of limited use to PC game players, since it does not detect joystick activity.  However it should be a relatively simple matter to replace the 9 pin D mouse connectors with 15 pin types to suit the joystick.  Terminal SK3 on the PCB would need to be connected to the main Fire button connection (probably pin 2 or 4).  This should work regardless of the fire signal polarity, because of the capacitor coupling (C2) and pull down resistor (R2).

There is no easy method of monitoring the keyboard, mouse and joystick together with the design as it stands.  It may be possible to devise an arrangement using diode logic on one of the existing inputs, depending on the polarity of the fire signal from the joystick.

If you have a bus mouse, you will need to replace the 9 pin D connectors with types to suit your mouse.  You will then need to pick off the connection for the left button or one of the direction signals to connect to SK2 on the PCB.

If your keyboard or mouse uses 6 pin miniature DIN (PS2 type) connectors, you will need to obtain these and fit them in place of the types suggested.  For the keyboard you will need to connect through all lines except pin 2.  Pin 4 is +5V, pin 3 is 0V and pin 1 is Data - these need to connect to the PCB.  I have not been able to establish the PS2 mouse connections, although I would imagine they are similar to the keyboard since the same type of plug is used.  You will need some very thin 6 core cable for these!

Access Time

If you wish to access the DIP switches without dismantling the unit, the connections can be extended so that the switch fits through a hole in the case.  The easiest arrangement would be to mount the switch on the underside of the PCB, so that it is accessible through a hole in the base of the case.  The switch body must fit through the hole so that there is no possibility of anything entering the case through the cutout.  You may need to use one or two IC sockets, possibly wirewrap types, to extend the switch to fit your cutout.

An LED can be connected in series with R8 if required, to show the state of the unit.  R8 should be reduced to about 150R in this case.  This LED will light when the monitor is on.

You may want a light to indicate that the monitor is off.  The easiest way to achieve this is to connect a neon indicator across the triac output pins (SK5 and SK6).  Sufficient current will be able to pass through the monitor to illuminate this neon, providing the switch on the monitor itself is on.

The timing period is set by R1 and C1.  Increasing either of these will increase the delay.  If R1 is increased to 220K the delays achieved will be about twice those stated previously - giving a range of 30 seconds to over two hours.  390K should give about 1 minute to four hours - although leakage currents may affect this.

Parts List

Resistors (all 0.25W, 5% or better)

R1,R2                        100K
R3,R4,R5,R7                  10K
R6                           22K
R8                           220R
R9,R11                       100R
R10                          270R

Capacitors

C1,C3                        10u 25V Radial Elect
C2                           100n Ceramic (0.2" pitch)
C4                           100n 250VAC Class X

Semiconductors

IC1                          4093
IC2                          4040
IC3                          MOC3041
TR1                          BC548 or similar
TR2                          BT138 or similar (see text)
D1-D13                       1N914 or 1N4148

Miscellaneous

SW1                          8 pole SPST DIP Switch
                             5 Pin 180 degree panel DIN Socket
                             5 Pin 180 degree cable DIN Plug
                             9 Pin D Socket
                             9 Pin D Plug
                             9 Pin D Cover
                             6 core screened cable
                             IEC (Euro) Mains Cable Plug
                             IEC (Euro) Mains Cable Socket
                             6A three core mains flex
                             Choc-block connector
                             PCB
                             Case
                             Grommets or Cable Glands
                             LED for Testing

The opto-isolator is stocked by Maplin as Order Code RA56L. When selecting C4, be sure to choose a component that is rated for direct connection across the mains - Maplin type JR34M is suitable. SW1 should be readily available - Maplin XX27E is suitable. PS2 type mini-DIN connectors are also stocked by Maplin - Plug is JX04E, socket is JX10L.