The power supply provides the following DC voltages from the AC mains 
input : 
\begin{description}
\item[+5V] : Logic power supply
\item[+12V] : Supply for the ROM selection inputs, and for the analogue 
parts of the storage system.
\item[-12V] : Used to provide the ROM bias supply and also for the 
analogue parts of the storage system
\item[+16V] : Supply for the PMOS RAMs
\item[+20V or +19.5V] : Actually referenced to the +16V supply, this is the 
bias rail for the PMOS RAMs.
\item[+24V] : This is only present in the HP9810 and HP9820 machines, and 
is used for the printer motor and thermal printhead.
\end{description}

The power supply also provides the {\bf Init/} signal which sets the 
processor microcode program counter to 1717 when the power is first 
turned on.

The power supply consists of the mains input circuitry mounted mostly on
the rear panel of the machine., This feeds a double-wound transformer
which supplies lower voltage AC to the PSU PCB(s). The outputs of the
transformer are rectified and smoothed, and then regulated down to the
voltages given above. In all cases, the +5V regulator is s switch-mode
design, while all other voltages are produced by linear regulators. 

Although the HP9830 power supply is physically different from that in the 
other 2 machines, the circuitry is very similar and thus all the power 
supplies will be described together. The main physical difference is that 
in the HP9810 and HP9820, the transformer secondary windings are wired to a 
pair of edge connectors mounted in the base of the machine. Two of the 
power supply PCBs plug both into those connectors and into connectors on 
the main backplane, These PCBs connect to the appropriate transformer 
secondary connections on the case-mounted connectors and provide the DC 
voltage to the main backplane. One of these PCBs also passes AC to the 
third PSU PCB which only plugs into the main backplane. In the HP9830, 
the transformer secondary windings are connected to a free edge connector 
which is plugged into the rear edge of the main backplane, The AC outputs 
of the transformer are fed over the backplane to the single PSU PCB, the 
regulated outputs from which are again fed over the main backplane.

\section{Mains input and transformer}
AC mains enters the machine via a standard IEC60320 C14 plug\footnote{This
is a stanard mains input connector as used on many other devices, Miud
you, if you have trouble finding where to feed the mains in I think you
will have even greater trouble repairing the processor.}. The live (phase)
wire is fused at 6A, and the supply is connected to 2 or 3 (depending on
the machine) IEC sockets (EN60320-2-2 Sheet F type) which can be used to
power peripheral devices. Mains is also fed through an interference filter
circuit (which may either be an encapsulated module or discrete
components) and then to an in-line connector for the mains switch fitted
to the keyboard. 

When the switch is turned on, the mains is then applied to the primary of
the power transformer via a further fuse (1A for 220V or 240V mains, 2A
for 110V or 120V mains). When the switch it turned off, a 1M$\Omega$
resistor is connected across the output of the mains filter, ensuring the
capacitors are discharged when the mains plug is removed and preventing
(admittedly very minor) electric shocks from the exposed plug pins. 

The mains transformer has 2 primary windings, each 120V with a tap at 
the 100V position, A pair of slide switches on the rear of the machine 
connects these windings for different mains voltages as follows : 
\begin{description}
\item[100V] : Mains is supplied to the two 100V sections of the primary 
windings connected in parallel
\item[120V] : The two 120V primary windings are connected in parallel 
across the mains
\item[220V] : One entire 120V winding and the 100V section of the other 
winding are connected in series. Mains is connected to the ends of this 
combination.
\item[240V] : Both primary windings are connected in series across the mains.
\end{description}

The machine's cooling fan has a 120V AC (shaded-pole) motor and is 
connected across one of the 120V primary windings. For 120V mains, it 
ends up being simply connected to the mains, for other mains voltages the 
transformer primary windings act as an autotransformer to supply 120V to 
the fan.

Whether the mains transformer has one multiply-tapped secondary winding, 
or several with the centre taps joined together is something that I have 
no determined. Electrically it makes no difference. The center-tap of 
the winding is connected to the system ground rail via the PSU PCB, 
symmetrical outputs voltages from the transformer are bi-phase rectified 
and smoothed by the PSU circuitry.

\section{Regulators}
The regulators are based round a type 723 IC, which contains a reference
voltage source and an error amplifier. The operation of a linear regulator
circuit is to compare a voltage derived from the appropriate output
voltage with a known reference voltage using the error amplifier and use
the output of the latter to control a pass transistor which in turn controls 
that voltage output of the supply. The +12V supply uses the internal 
reference of the associated 723, all other supplies use the +12V supply as 
their reference.

The DC inputs to the regulator circuits are produced by bi-phase 
rectifiers and smoothing capacitors.

All the voltage outputs apart from +19V have crowbar circuits. Each
crowbar circuit consists of an SCR (thyristor) triggered by a zener diode.
If the power supply voltage exceeds that of the zener diode, the SCR
receives gate current, turns on, and thus shorts that power supply rail to
ground, protecting the rest of the machine. 

\subsubsection{A couple of RPL programs}
I investigated the operation of the regulators using my HP49G calculator, 
and found the following RPL programs to be helpful : 

`PAR' calculates the equivalent resistance of 2 resistors in parallel : 
\begin{verbatim}

PAR : \<< INV SWAP INV + INV \>>

\end{verbatim}
`PDIV' calculates the voltage ratio for a potential divider : 
\begin{verbatim}

PDIV : \<< SWAP OVER + / \>>

\end{verbatim}

\subsection{+12V regulator}
Since the +12V supply is used as a reference for most of the other 
voltage rails, I shall begin with this one. It is based round U1 on the 
{\bf +/-12V PSU} PCB in the HP9810 and HP9820, or U2 on the {\bf PSU} PCB 
in the HP9830. The output of this regulator IC controls an 
emitter-follower pass transistor which in turn controls the voltage of 
the +12V output The {\bf +12Sense} signal is connected to the +12V rail 
on the backplane, and measures the voltage there. This means that the 
voltage drop across the PCB edge connector is irrelevant, the voltage at 
the load is what is measured.

The operation of the 723 in this circuit is to try to make the voltages 
on its 2 inputs equal. The voltage on {\bf In+} is easy to determine. 
It's simply the reference voltage, {\bf Vref} from that IC, and the data 
sheet gives a typical value of 7.15V for this. 

The voltage at {\bf In-} is determined by the output voltage and a 
potential divider. The first thing to do is to calculate the division 
ratio : 
\begin{verbatim}

499. 788. 11500. PAR PDIV

\end{verbatim}
Now, due to the operation of the 722, the output voltage multiplied by 
that ratio will be the reference voltage. So : 
\begin{verbatim}

7.15 SWAP /

\end{verbatim}
will give the output voltage, which is very close to 12V. 
The 11.5k$\Omega$ resistor may have a different value in different 
machines to compensate for slight changes in the reference voltage of the 
723.

The current sensing inputs of the 723, {\bf IL} and {\bf IS} are 
connected across the sense resistor (1$\Omega$ in the HP9810 and HP9820, 
0.75$\Omega$ in the HP9830). If too much current is drawn from the power 
supply, the increased voltage drop across this resistor will cause the 
723 to remove the drive from the pass transistor, shutting the supply down.

\subsection{-12V regulator}
This regulator, being designed to give a negative output voltage, is 
possibly the most difficult to understand. The pass transistor is a PNP 
device and is biased on by the resistor connected between its collector 
and base. The output of the 723 (U2 on the {\bf +/-12V PSU} PCB in the 
HP9810 and HP9820 or U4 on the {\bf PSU} PCB in the HP9830) reduces the 
absolute vale of the the base voltage of this transistor, reducing the 
output voltage. As a result of this, the 'sense' voltage is applied to 
{\bf In+} and the 'reference' voltage to {\bf In-}. As before, {\bf 
=12Sense} is connected to the -12V rail on the backplane.

The next thing to do is to calculate those two voltages. Let the output 
voltage be `V' Then the voltage on {\bf In+} can be calculated by : 
\begin{verbatim}

4530. DUP PDIV 'V' *

\end{verbatim}
Or you could notice that a potential divider with equal resistors divides 
the voltage in half.

The voltage on {\bf In-} is first calculated relative to the +12V rail 
and then 12 is added to the result to make it relative to the 
ground rail : 
\begin{verbatim}

3010. 9090. PDIV 'V' 12. - * 12. + 

\end{verbatim}
The operation of the 723 is to make those equal, so set them equal on the 
calculator and isolate 'V' : 
\begin{verbatim}

= 'V' ISOL

\end{verbatim}
This gives an output voltage close to -12V as expected.

In this negative regulator, the internal current limit system of the 
723 cannot be used. Instead, the B-E junction of a PNP transistor is 
connected across the current sense resistor. When the voltage drop across 
this resistor exceeds 0.7V, the transistor is biased on, and removes the 
base drive from the pass transistor.

\subsection{+16V regulator}
The +16V regulator, based around U1 on the {\bf +16V/+20V/+24V PSU} PCB 
in the HP9810 and HP9820 or U3 on the {\bf PSU} PCB in the HP9830 is very 
similar to the +12V regulator. The operation of the 723, its pass 
transistor and the current limiter is identical. 

In the case of the HP9810 and HP9820, the `reference' voltage at {\bf In+} 
is given by : 
\begin{verbatim}

681. 953. PDIV 12 * 

\end{verbatim}

The operation of the 723 means that this is equal to the output voltage 
divided by the potential divider circuit connected to the {\bf In-} 
input. This division ratio is calculated by
\begin{verbatim}

887. 698. PDIV

\end{verbatim}
And of course 
\begin{verbatim}

INV *

\end{verbatim}
gives the output voltage, which is close to 16V

For the resistor values used in the HP9830, the output voltage can be 
calculated by : 
\begin{verbatim}

499. 698. PDIV 12 * 887 698 PDIV INV * 

\end{verbatim}
which is again close to 16V

\subsection{+20V (or +19.5V) regulator}
The (very low current) memory bias supply is provided by a simple zener 
diode circuit `on top of' the +16V rail. In the HP9810 or HP9820, the 
current is provided by a resistor from the +24V supply. In the HP9830, a 
constant current source based round Q10 on the {\bf PSU} PCB is used for 
this purpose.

\subsection{+24V regulator (HP9810 and HP9820 only)}
This circuit is again similar to the +12V regulator. The {\bf In+} 
input is held at +16V, and therefore the output voltage, determined by the 
potential divider on the {\bf In-} input is given by : 
\begin{verbatim}

16. 806. 1620. PDIV /

\end{verbatim} 
which is close to 24V. The current limiting circuit of this regulator 
senses the base current of the pass transistor, dropped across the 
4.7$\Omega$ resistor, and is not particularly effective. A short-circuit 
from the +24V rail to ground often burns out the 0.51$\Omega$ series 
resistor

\subsection{+5V regulator}
The +5V supply uses a switch-mode regulator. The control transistor 
(known as the chopper) is either saturated or cut off and 
therefore dissipates little power. When the output voltage is too low 
(compared to the reference voltage), the 723 (U1 on the {\bf +5V PSU} PCB 
in the HP9810 or HP9820 or on the {\bf PSU} PCB in the HP9830) turns on 
the chopper, applying the raw input voltage to the load via the series 
inductors. Due to the inductance of the latter, the output voltage does 
not rise instantaneously, but relatively slowly as the magnetic field 
around the inductor builds up. When the output voltage exceeds the 
reference voltage, the 723 cuts off the chopper transistor. The magnetic 
field around the inductor begins to collapse, and supplies power to the 
load via the flyback diode. Thus the output voltage has a small ripple 
(essentially determined by the hysteresis of the 723 error amplifier) 
around the required voltage.

The {\bf +5Sense} signal is connected to {\bf In-} on the 723, and thus 
the output voltage is equal to the reference voltage, set by the 
potential divider on {\bf In+} which is given by : 
\begin{verbatim}

698. 511. PDIV 12. *

\end{verbatim}
which is close to 5V. There is no overcurrent protection in the +5V
regulator, but if the output is shorted to ground (possibly via the crowbar
circuit) then the NPN transistor connected to the {\bf Comp} input of the
723 will be turned on. This will clamp {\bf Comp} to ground, disabling the
drive to the chopper transistor and thus shutting the regulator down. 

\section{Init signal}
The {\bf Init/} initialisation signal used to set all bits of the 
microcode program counter is produced by a monostable circuit based round 
U2 on the {\bf +5V PSU} PCB in the HP9810 and HP9280 or U5 on the {\bf 
PSU} PCB in the HP9830. This is triggered by the resistor-capacitor 
network on its input shortly after power-on and during its time period it 
asserts {\bf Init/} via the NPN transistor buffer connected to its output.
