A PROTECTION DEVICE FOR THE COMMODORE 64 04-05-06.


           A PROTECTION DEVICE FOR THE COMMODORE 64    
             Latest updates and/or corrections 4-15-06


    This over-voltage protection unit is designed to prevent damage to
the Commodore 64 computer due to a failing power supply. One of the
ways the Commodore "black brick" supply can fail is from a shorted
internal 5 volt regulator. That fault puts excessive voltage into the
computer and damages chips such as RAM very quickly... and silently.
The protector is essentially a fast acting electronic circuit breaker.
It functions to quickly cut off the 5 volt supply line to the computer
if the voltage exceeds about 5.5 volts. Built from readily available
parts, the protection circuit is installed in series with the 5 volt
line between the power supply and the computer. 
     The use of a power hungry add-on like a RAM expansion unit is not
recommended with the original black brick power pack. That RAM unit 
originally shipped with its own power supply, one that provided 2.5 
Amps for the 5 volt line. That beefier supply makes the computer saver 
unnecessary since it's a switcher and not vulnerable to failure like 
the brick. If you have an expander but no supply for it, consider 
getting a C128 power supply and installing a power connector that fits 
your C64. With that hookup, again, you don't need a saver. 
    There are several ways to add the protection device to your system.
One way is to install the components inside the computer itself. That
way, it is protected from any supply that is plugged into it. If you
have more than one computer, a protector can be installed in each one.
Cost of parts should be less than US$10 for each unit. Since the parts
count is low, I didn't bother making a circuit board for my internal
protectors. I used some silicone rubber sealer as glue to hold the relay 
in place on the motherboard, then wired the other components on top
of it. Wires to and from the added components complete the installation.
Look on my schematics site for photos of three installations in several
versions of the C64. They are located in the C64 and C64C directories
at http://staff.washington.edu/rrcc/uwweb
    To install the protector circuit inside a C64, it is necessary to
open the +5 volt line on the circuit board. Input and output lines of
the protector are wired to each end of the now open circuit. If your
C64 board differs from the pictures on my site, you will have to locate
the correct area of your board to make the connections. In the brown
case C64, look for a small coil called L5. Disconnect one end of that
part and install the input and output connections of the saver across
the open circuit as shown in the picture. On a C64C short board, a PC
board trace must be cut to install the saver. As shown in the picture,
the copper trace near capacitor C58 is the place to cut and install
the new connections. It is important that the input and output lines
of the protector go to the appropriate places on the board. The easiest
way to identify which is which: disconnect L5 (or cut the trace if a
C64C short board) and measure continuity (zero ohms) with an ohmmeter
from pin 7 of any of the RAM chips and one of the open connections at
L5 (with the power switch on and PS disconnected, of course). The 
-output- of the protector (the normally open relay contact) goes to 
that connection. The -input- side of the protector gets +5V directly 
from the power supply through the added fuse.
    As an alternative, the protector can be built in a small box as a
stand-alone device. That way, you can use it with any supply or
computer, but that has the disadvantage of needing two DIN connectors
and an enclosure. If the protector box is wired directly onto the power
supply cable, that eliminates the need for the added connectors, but
it will work with only that supply unless physically transferred. You
can choose the implementation that works best for you. The circuit is
the same regardless of how it's installed.
    The stand-alone protector requires a 7 pin male DIN plug on one
end that fits the power socket on the computer, and a 7 pin female DIN
socket on the other to receive the plug from the power supply. Note
that although a 7 pin connector is used, only four pins are active.
The socket can be an in-line or chassis mount connector, but the plug
should be wired to a short length of cable which allows the protector
box to be moved out of the way of the user. My prototype model used a
cut off 2' length of cable from an old dead supply. I found a chassis
mount female DIN socket from a junked piece of electronics gear and
installed it in the protector box. A male DIN plug was pigtailed out
of the other side of the box.
    If the protector is going to be added directly to the supply cable:
route the cable through the box by notching the ends of the box to
allow a loop of cable to go through it when the cover is reattached.
Cut open the outer jacket of the loop of cable in the box. The red
wire (+5V) inside the cable needs to be cut and the ends wired to the
protector input and output lines. The end from the supply goes to the
input of the protector and the one to the computer goes to the output
end. The uncut black wire (ground or negative lead) should have a
small bit of insulation removed so it can be attached to the protector
circuit ground. The other two wires of the supply cable (usually blue
and brown) are the 9VAC lines and should not be opened.

How it works:
    The circuit for the protector is simple and strightforward. A 4.7
volt zener diode on the 5 volt line continuously monitors that DC level.
The resistor in series with the zener diode limits the current to the
base of the first transistor Q1, and the resistor from base to ground
keeps the transistor cut off until the threshold voltage is exceeded.
The zeners 4.7 volts plus Q1 transistors 0.6V B to E drop totals
slightly over 5 volts, the trip point of the device. If the supply
voltage rises above that level, the zener diode conducts, turns on the
transistor and pulls its collector lead to ground. That lead is wired
to a normally conducting second transistor Q2 which drives a relay.
The diode across the relay coil is there to protect the transistor
from back EMF "spikes" from the coil which could destroy the transistor.
    The relay contacts are used to pass the +5 supply voltage to the
computer when the relay is energized in normal operation. The relay is
de-energized only during an over-voltage condition. If the supply fails
in that manner, the relay drops out and opens the previously closed
contacts cutting off the +5VDC supply voltage to the computer. The
circuit is designed to keep the 5 volt line open as long as the fault
persists. It is self-resetting.
    There is one fuse inside the C64 that protects the 9VAC line but
neither the C64 or standard Commodore PS "brick" 5VDC lines are fused.
One has been added to the protector circuit. That fuse will open if
an external overload (short) is accidently applied to the computer
ports or if an internal component such as an IC shorts in the computer.
The new fuse protects the saver relay (too much current can weld the
contacts together) as well as the power supply from excessive current
draw.

Some notes about the parts used:
    The relay is a SPDT (single pole, double throw) but an SPST (single
pole single throw) can substitute if the indicator LEDs are not used. It
has a 5 volt coil and contacts rated at 2 Amps. Since the computer only
draws about 800mA, a 1 Amp relay would also work but a margin of safety
is a good idea. This design is different than a previous one that turned
on the relay during an overvoltage fault condition. One problem with
that design is that a 5 volt relay will overheat and eventually burn out
if left connected to a failed (internal regulator shorted) power supply.
That is because the voltage goes upwards to 12 volts which will be more
than twice normal operating voltage. In such a design, if the coil
burned out, the relay would deactivate and the computer would not be
protected. That's why the design was changed.
    It's best to use a relay with a 5 or 6 volt coil, but one that has
a high DC resistance. Relays used in my early protectors had coil
resistances of about 60 ohms. One drawback to that is it puts an
additional load on an already marginal power supply. The higher the DC
resistance of the relay coil, the less load it represents, so a coil
resistance of 200 ohms or more is preferable in this application.
    The transistors can be any low power silicon NPN type rated at
500mA or more. The voltage rating is not critical either. Generic
types such as the 2N2222 or 2N3565 are OK as is their equivalent such
as the old Sylvania ECG123A or NTE123A. A higher power NPN transistor
will also work, such as tab mount or TO-220 "flatpack" types although
they are physically larger. Note also that the metal tab or case of
such a transistor is normally connected to one internal element...
usually the collector, so its metal case must be isolated from
surrounding metal or wiring.
    The zener diode can be a 1/2 or 1 Watt but its voltage rating is
important since that sets the "trip" point of the device. The silicon
diode across the relay coil is a standard power diode (1N2004) but
can be a small signal type such as a 1N914. Its current and voltage
ratings are not critical as it's only there to absorb "spikes" from
the coil when it de-energizes. Polarity is critical for any diode.
They usually have a band around the cathode (K) end. The resistors
are all 1/4 to 1/2 Watt carbon or carbon film types. 1 Watt resistors
of the same resistance value can also be used although they will be
physically larger. Space is limited inside the computer, especially
in the C64C which has a metal shield over the PC board. Make sure
nothing shorts out when you put that cover back on!!!
    If desired, LEDs or a buzzer can be used to monitor the relay
status and indicate the fault condition, but their use is optional.
A green LED may be used to indicate normal operation and a red LED
(or alarm buzzer) indicates PS overvoltage. You can substitute a
buzzer or other 5 to 9 volt alarm device for the RED LED if desired.
In such a case, eliminate the series resistor as its only function
is to limit the current to the LED if one is used.


   1.5A fuse
 ___[]~~~[]____________________________________
+5VDC       |           |        |   C        | com
from        \           |      K_|_  O        0
 PS         / 470       |      A /\  I         \ relay
            \ ohms      |        |   L     0    \0
  4.7V   K  |           /        |___|   NO|     |NC
 zener   \__|__         \ 2.2K   |         |--------- +5V out to
 diode   A  /\ \        /        |         |     |     computer
            |           \        |         \     /
            |           |        |         /     \  two
            |           |     C__|         \     / 470 ohm
            |           |    |/            /     \ resistors
            |           |____|  Q2         \     /
            |         __|  B |             |     |
            |       |/ C     |\__          |A    |A
            |_______| Q1       E |  green _\/_  _\/_ red
            |     B |            |         |K    |K
            /       |\__         |         |     | indicator
       470  \          E|        |         |     |   LEDs
      ohms  /           |        |         |     |
            |           |        |         |     |
  GND (-) __|___________|________|_________|_____|_____ GND


Ray Carlsen CET
Carlsen Electronics