Obviously in order to repair the machine you need to dismantle it, but 
before I describe that procedure, a few words about the tools and test 
equipment that are necessary (or at least useful).

\section{Tools}
The basic tools needed to take an HP9800 apart and perform electronic 
repairs include:
\begin{description}
\item[Screwdrivers] : Flat-blade, Phillips and Pozidriv screwdrivers are 
needed in various sizes. To prevent damage to the screw heads, make sure 
you know the difference between Phillips and Pozidriv, and use the 
correct one.
\item[Spanners and Nutdrivers] : The HP9800 machines are assembled with 
most American UNC fasteners. Therefore you need imperial-sized spanners 
to fit the nets. It is useful to have open-ended spanners, ring spanners 
and nutdrivers covering the range 3/16'' to 3/8''. A couple of such tools 
not found in most sets are an 11/32'' open-ended spanner which is 
essential for removing the rear panel of the machine and a 1/8'' 
nutdriver to remove the end cover from the card reader motor in the 
HP9810 and HP9820.A 9mm open-ended spanner can be used in place of the 
11/32'' one (11/32'' = 8.73mm) if you can't get the latter, but the right 
tool is a lot better.
\item[Hex keys] : There are not many hex-headed screws in these machines, 
but there are some, and a set of imperial-size hex keys is necessary.
\item[Pliers] : Not to be used as a substitute for a spanner, these are 
needed for forming wire leads and similar applications
\item[Small side cutters] ; Most likely you will have to replace some 
components, and you will need to cut off the excess lead length on the 
new ones.
\item[Small external circlip pliers] : External circlips are used on the 
spindles in the mechanical sections of these machines, you will need to 
remove them. 
\item[Tweezers] : Very useful for fitting small parts in the mechanical 
sections of the machine. Get non-magnetic stainless steel ones, there is 
nothing more annoying than a pair of tweezer that will not drop the part 
where you want it (Actually, there is, It's a pair of magnetic or 
magnetised tweezers that also manages to move other parts around for you). 
\item[Soldering iron and solder] : The PCBs in these machines 
are generally double-sided (although a few are multiple-layer) with 
plated-through holes. I would seriously recommend a temperature-controlled 
soldering iron to avoid damaging the PCBs. Some thin (22swg or thinner) 
resin-cored solder is needed to fit the replacement components. Of course 
this is the `real' lead/tin solder
\item[Desoldering tool] : Either a desoldering pump ('Solder Sucker') or 
braid, whichever you prefer. Remember that in most cases the PCB is much 
more valuable than the component that you are removing and it may be 
worth cutting the pins off the component and removing them one at a time 
from the PCB.
\item[Drill] : Either a hand drill of the wheelbrace type or a small 
electric drill, and a selection of twist drill bits. The connectors on 
the rear of the machine are riveted to an internal bracket, and if these 
need replacement you have to drill out the rivets.
\item[UNC taps and dies] ; Some of the screws were initially assembled 
with a locking adhesive, and in some cases, particularly in the keyboard 
assembly, they screw into tapped bushes in a brittle plastic moulding. I 
would recommend that you clear out the threads after removing them by 
running a tap into the hole and a die over the screw. Strictly these 
should be thread-clearing rather than thread-cutting tools, but in 
practice it makes little difference. You need (at least) sizes 4-40 and 
6-32 UNC.
\end{description}

When we come to repairing the HP9810 and HP9820 card reader, and to a 
lesser extent the internal printer, I will, unfortunately, recommend the 
use of small machine tools. 

It is well worth buying good quality tools. They will last a lot longer 
and more importantly will not 'chew' screw heads, damage PCBs, and the 
like. You are working on a valuable machine, it is worth taking care of 
it. I have often said `I am not rich enough to buy cheap tools'.

\section{Card reader roller puller}
If you are repairing an HP9810 or HP9820 it is very likely you will have
to replace the drive roller in the card feed mechanism, To remove the 
roller without damage you need a special puller tool, which unlike the 
tools mentioned above is not available commercially. It can be made in a 
reasonably well-equipped home workshop. Some means of doing coordinate 
drilling and light milling, for example a small lathe with a vertical 
slide, is very useful.

The puller consists basically of a steel `cage' which fits around the old 
roller with a bolt to press on the end of the spindle and thus force the 
roller off. 

The top plate of the tool is a piece of 1/4'' thick steel measuring 2.5'' 
by 2''. Taking one corner as the `origin' and the shorter edge as the `Y 
axis', drill 4mm holes at (0.25, 0.25), (1.25, 0.25), (2.25,0.25), (0.25, 
1.5) and (2.25,1.5) (all dimensions being in inches, of course). Then 
drill a 10.6mm hole (which is the tapping size for M12) at (1.25,1.5). 
and tap it M12. Although I have specified metric fasteners throughout 
this tool, it can obviously be made with any bolts of a similar size (for 
example1/2'' UNC in place of M12, 6-32 or 8-32 UNC in place of M4) if 
the hole sizes are adjusted to suit. 

The bottom plate is 1/8'' steel of the same dimensions. Drill five 4mm
holes at the same coordinates and a 1/8'' (or 3.2mm) hole at (1.25,1.5)
and then mill a slot from that hole to the nearest long edge. In use, the
card reader spindle will be slipped into this slot with the bottom plate
`behind' the roller and an M12 bolt running in the tapped hole in the top
plate will press on the end of the spindle

The plates are joined by 5 pillars made from 3/8" steel rod. Each pillar 
should be 2" long (the exact length is not too critical, but it is 
obviously important to make them all the same length). Each end of each 
pillar and drilled centrally at 3.5mm and tapped with an M4 thread (this 
is easy to do on a lathe with a drill bit held in a tailstock chuck). 

The puller frame is assembled using M4 bolts in the obvious way. I found 
that hexagonal-socket (`Allen') cap-head screws were the easiest to use here.

It is worth making 2 puller bolts. One is simply an M12 bolt around 60mm 
long with the end faced off to make it perpendicular to the axis. The 
second is a bolt prepared in the same way and then a 3.3mm hole is 
drilled along the axis (from the end furthest from the head) to a depth of 
about 0.5'', If you have a `D-bit' to make a flat-bottomed hole then use 
it, otherwise a twist will is adequate. 

In use, the latter bolt is used first with the reader spindle fitting 
into this hole.  This will guide the spindle and hopefully prevent it 
getting bent. Once the roller has moved, if it still won't slide off 
by hand, the plain bolt can be used to move it further along the spindle.

\section{Test equipment}
Unfortunately you can't see the logic signals in the HP9800 machines 
directly, so you need a few items of electronic test equipment:
\begin{description}
\item[Multimeter] : This needs to have DC voltage ranges covering the 
outputs of the power supply and AC voltage range to check the output of 
the power transformer. Resistance ranges to check for continuity and 
short circuits are essential too. Other ranges my be nice to have, but 
they are certainly not essential
\item[Logic probe] : Even with a logic analyser (see below) it is very
useful to have a simple instrument that indicate it a point is stuck high
or low. Most of the signals in the machine are at TTL levels and just
about any logic probe will handle those, being able to monitor the 16V
signals on the PMOS RAMs is very useful. However remember that even if 
your logic probe indicates a signal is changing, it doesn't tell you 
anything about the {\em timing} of the signal. One solution to this was 
HP's excellent `LogicDart' which is a very useful instrument for 
debugging these machines and means a separate logic analyser is 
unnecessary in many cases. However this is not an easy instrument to obtain
\item[Logic analyser] : As you know, the HP9800 machines are bit-serial 
with most of the signals changing all the time. You need to be able to 
display the relative timing of several of these signals at once to trace 
most faults. This means a logic analyser. The machine clocks at 8MHz, so 
just about any analyser is fast enough, but the more channels the better. 
It's useful to be able to trace the processor microcode which takes 8 
channels and possibly display some other signals at the same time.
\item[Oscilloscope] : This is not a particularly useful instrument for 
debugging the digital side of these machines, but it can be useful when 
repairing the analogue sections of the magnetic storage system
\item[Bench power supply] : This is by no means essential, but an 
adjustable DC power supply going up to at least 24V can be useful for 
checking motors, lamps, solenoids, etc.
\item[Insulation tester] : Although I have never found an insulation 
breakdown in any HP desktop calculator, you may wish to check the 
insulation of the mains transformer and related components for your own 
safety. A high-voltage insulation tester (commonly called `Megger') is 
useful for this. 
\end{description}

Again, it is worth buying good-quality test equipment. If the instruments 
give you misleading information you can spend a lot of time looking for 
faults that aren't there or conversely missing the faults that are there. 

I should also point out that no piece of test equipment is a `magic box' 
that will tell you just what is wrong with an HP9800 machine (or 
anything else for that matter). All it can do is provide you with 
evidence as to what is actually going on in the machine. It is up to you 
to interpret that evidence and find the fault.

\section{Safety}
I will credit my readers with some common sense which means this section 
will not contain warnings that soldering irons get hot, or that it's a 
bad idea to try to balance a power transformer on your nose. I shall 
concentrate on the less-obvious hazards not just to you, the repairer, 
but also to the machine itself\footnote{It is perhaps worth pointing out 
that HP9800 machines are a lot rarer than enthusiasts who would like to 
repair them\ldots}.

The only real danger to the repairer is the mains supply. The outputs 
from the power transformer are at a fairly low voltage (although I suspect 
the 52V between the ends of the winding in an HP0910 or HP9820 could give 
a `tingle') and are isolated from the mains. The voltages on the logic PCBs 
are, of course, much too low to be harmful.

The mans voltage wiring is mostly out of the way on the inside of the 
rear panel of the machine where it is unlikely to be a danger. However 
the power switch on the front of the keyboard is of course connected to 
the mains and is much easier to touch. When I describe how to dismantle 
the machine I will recommend removing this switch form the keyboard 
chassis so that mains and logic are kept well apart. 

It is almost impossible to operate this switch when it is removed from 
the keyboard without touching the terminals, and for this reason I do not 
recommend trying to use it during testing. If you have switched mains 
sockets on your workbench, I recommend turning the machine on and off 
there. Otherwise, make up a special mains lead with a double-pole 
switch (breaking both the live and neutral wires) and optionally a neon 
indicator in the middle. Make sure the earth wire is connected straight 
through, of course. Use that switch to turn the machine on and off for 
testing.

Even with the mains switch turned off or unplugged at its in-line 
connector, many of the components on the rear panel are still connected 
to the mains. Therefore, unplug the mains lead from the input connector 
before working on any part of the rear panel. 

The main hazards to the machine also relate to high (or at least 
higher-than-normal) voltages. Although the power supply has crowbar 
protection circuits, it is well worth checking the supply before using 
it to power the logic boards and I will describe the procedure later on.

Another source of high voltage is, of course static electricity. The TTL
logic ICs used in the HP9800s are not likely to be damaged in this way,
but the ROMs and the PMOS RAMs can be, and of course these ICs are
difficult to replace (the ROMs being custom-programmed for the machine and
the RAMs being long out of production). When you remove a memory board
from the machine. put it in an anti-static (conductive) bag. Use an
earthed soldering iron when replacing components on these PCBs, and if
possible work at an anti-static workstation. It is probably a good idea to
avoid stroking your cat when repairing the HP9800 memory
system\footnote{What?  You don't have a cat? No wonder you are having
problems with your HP9800}. 

\section{Practical hints}

\subsection{Don't mix up the screws}
When you take one of these machines apart, particularly when you come to 
work on the mechanical sections you will soon have quite a number of 
nuts, bolts, washers, clips and the like. Purchase one of those plastic 
boxes with many compartments -- the older ones with fixed partitions are 
best, I've found the movable partitions tend to come loose at the worst 
possible time -- and put associated hardware, for example the rear panel 
fixings, or the parts from the printer motor, in a particular 
compartment. If you still think you may forget what went where, you can 
put a little slip of paper in the compartment to label it. 

\subsection{Finding your way around}
When you first look inside an HP9800 you'll see a mass of PCBs and will 
wonder how you will ever find anything.

The PCB ejector handles are colour-coded. The guides for the PCB are the 
same colours as the handles which simplifies getting the PCBs back in the 
right places. And the colours give the last 2 digits of the PCB part 
number using the resistor colour code. There is one exception to this 
code. The older HP9810 display PCB is an 09810-66541 while the later one is 
09810-66542. Both of them have yellow and brown ejector handles (and the 
guides are yellow and brown in all machines). Since the 2 PCBs are 
entirely compatible, it made more sense to keep the  handles matching the 
guides.

Directional arrows such as `rear' or `LHS' on the schematics assume the 
machine is in the normal operating position in front of you.

The ICs on each PCB are numbered as follows. Looking at the PCB, and with 
the edge connector fingers pointing down, IC1 is the one nearest the top 
left corner. The numbers then increase to the right along the top row of 
ICs, then carry on with the left most IC in the second row and so on. If 
in doubt, check that the IC number is the one you expect or even trace a 
few of its connections.

\subsection{Managing without extender boards}
The plug-in PCBs in an HP9800 machine are so close together that it is
impossible in most cases to conenct probes to IC pins when the PCB in in
the machine. Of course some signals are brought out on the test 
connectors, and some IC pins, particualrly those near the top edge of the 
PCBs, but there are many importat signls your can't get to.

While a set of exender boards would be very useful, it is possible to
manange without them by removing the PCB under investigtion and soldering
short lengths of wire to the connections of interest. A peice of
multi-core cable or `rainbow' ribbon cable about 10cm-15cm long and
dismantled into its individual wires is ideal for this. Put the PCB back
in place and connect test equipment to the free ends of (some of) the
wires.  Make sure the wires do not `short' to anything they shouldn't,
including the chassis of the machine. Turn on the machine and make the
measurements, then turn it off, and based on the results of the
measurements resolder the wires to new locations to check more signals I
generally find that 2 or 3 attempts will locate the fault. 

\subsection{Expander signals are not TTL level}
The signals between the expander U2, and the And-Or-Invert gate U3 on the 
{\bf Data Path} PCB are not at normal TTL levels, they are the inputs to 
the `totem pole' output stage of U3. They cannot easily be monitored, and 
shorting the inerted signal to +5V will damage U3. This is fairly clear 
from the data sheets on these devices, but you may not think to check this.

\subsection{Make notes}
I find a notebook  to be very useful when repairing such a machine. 
Record anything that's not obvious (such as the order of parts and 
washers on a bolt, wiring colours if you have to desolder anything, and so 
on). Also record any measurements (voltages, etc) if you want to be able 
to refer to them later. 

I suppose you could use a portable computer for this, but a (paper) 
notebook seems more convenient.

