The printer that wouldn't print: Fixing an IBM 1401 mainframe from the 1960s

The Computer History Museum has two operational IBM 1401 computers used for demos, but a few weeks ago one computer suddenly couldn't print anything. I helped track down the problem, but it was more tricky than we expected; along the way we had to investigate the printer error checking circuits, the print buffer, and even low level core memory signals. This blog post discusses our investigation and how we traced the problem to a failed germanium transistor.

The IBM 1401 mainframe computer (left) at the Computer History Museum printing the Mandelbrot fractal on the 1403 printer (right).

The IBM 1401 mainframe computer (left) at the Computer History Museum printing the Mandelbrot fractal on the 1403 printer (right).

The IBM 1401 computer was announced in 1959, and went on to become the best-selling computer of the mid-1960s, with more than 10,000 systems in use. The 1401 leased for $2500 a month (about $20,000 in current dollars), a low price that let even medium-sized businesses use the 1401 for payroll, accounting, invoicing, and many other tasks. The IBM 1401 computer was constructed from small circuit boards (called SMS cards) plugged into units called "gates"—these are gates in the sense of something that swings open, not logic gates. The photo below shows the 1401 with one of the gates open, revealing dozens of brown SMS cards plugged into the gate.

The IBM 1401 computer, with one of the gates opened, showing the dozens of circuit boards (SMS cards) in each gate. 
The fan on the front of the gate keeps the cards cool.

The IBM 1401 computer, with one of the gates opened, showing the dozens of circuit boards (SMS cards) in each gate. The fan on the front of the gate keeps the cards cool.

One key selling point of the IBM 1401 was its high-speed line printer (the IBM 1403), which could hammer out 10 lines per second. (IBM claimed this was four times as fast as competing printers, but others dispute this.) The 1403 printer had excellent print quality, said to be the best printing until laser printers were introduced in the 1970s.1 IBM claims that "Even today, it remains the standard of quality for high-speed impact printing."

Closeup of the type chain (upside down) for an IBM 1403 line printer.

Closeup of the type chain (upside down) for an IBM 1403 line printer.

The 1403 printer used a chain of type slugs (above) that rotated at high speed above the paper, with an inked ribbon between the paper and the chain. Each of the 132 print columns had a hammer and an electromagnet. At the right moment, when the desired character passed the hammer, the electromagnet drove the hammer against the back of the paper, causing the paper and ribbon to hit the type slug, printing the character.2

Printing mechanism of the IBM 1401 line printer. From 1401 Reference Manual, p11.

Printing mechanism of the IBM 1401 line printer. From 1401 Reference Manual, p11.

Unfortunately, the printer at the Computer History Museum recently had a problem: whenever a line was printed, the computer would halt due to a "print check" error. Fortunately the museum has a team of volunteers to help keep the system running; people helping with this printer problem included Ron Williams, Frank King, Marc Verdiell, Carl Claunch, Michael Marineau, Robert Garner and Alexey Toptygin. By the time I arrived to help, Ron had written a simple test program that repeatedly attempted to print a line; he toggled the program into the computer by hand, and he disabled the error check. The printer printed the characters properly, so we suspected the problem was in the error reporting circuitry inside the computer. Our strategy was to find the error signal and then trace it back through the computer to determine why it was being generated.

We started by examining the latch circuit that holds the print check error condition and sends it to the rest of the computer. To find the circuit, we consulted the documentation: binders of cryptic computer-generated wiring diagrams, called Automated Logic Diagrams (ALD). A small piece of an ALD is shown below showing the print check latch (PR CHK LAT). Each box on the ALD corresponds to a circuit on an SMS board and the lines show how the boards are wired together. Deciphering the text inside the box on the right indicates a board of type 2JMX implementing a "2+AO" function, which in modern terms is AND-OR-Invert. The text in each box also indicates the location of the card: its gate (physical swing-out gate, not logic gate), gate 01A6 in this case, and the card's position in the gate (F10). Thus, to check the output (labeled H) of the latch with the oscilloscope, we swung out gate 01A6, found card F10, and hooked the oscilloscope to pin H. We found pin H went low (error) when pins F and G went high, which was the proper behavior for the latch. Pin G (PR CK SAMPLE) was essentially a clock to sample the error state, while pin F was the error signal itself. Our next task was to determine what was triggering the error signal on pin F.

Excerpt of an Automated Logic Diagram (ALD) for the IBM 1401, showing the print check latch (PRT CHK LAT). This page is denoted 36.37.21.2.

Excerpt of an Automated Logic Diagram (ALD) for the IBM 1401, showing the print check latch (PRT CHK LAT). This page is denoted 36.37.21.2.

The documentation also includes logic diagrams that show the circuitry at a logical level, which is slightly easier to understand than the physical connections on the ALD diagrams. The logic diagram below shows the printer error circuitry. At the right, the print check error signal (PRT CHK ERROR) comes out of the latch (PR CHK LAT) that holds the error signal. (This is the same latch as in the ALD diagram above, and you can match up the signal names.) To the left of the latch, several different error conditions are detected and combined to form the error signal fed into the latch. (Note that IBM's logic symbols didn't match standard symbols. The semicircle is an OR gate, not an AND gate. The triangle is an AND gate. An "I" in a box is an inverter.)

Logic diagram of the error checking logic for the IBM 1401/1403. From Instructional Logic Diagrams page 77 "Print Buffer Controls".

Logic diagram of the error checking logic for the IBM 1401/1403. From Instructional Logic Diagrams page 77 "Print Buffer Controls".

Several different conditions can trigger a print check error3 and we thought the "hammer fire" check was a likely candidate. Recall that the printer uses 132 hammers, one per column, to print a line of characters. To make sure the hammers are operating correctly, the computer has two special planes in core memory. (The 1401 contains 4,000 characters of core memory4; each bit of memory is a tiny ferrite ring that is magnetized one way to store a "1" and the other way for a "0". A grid of 4000 cores forms a plane, storing a 1-bit slice of memory. Multiple planes are stacked up to form the storage unit.) Each time the computer decides to fire a hammer, it records this in core memory in the "equal check" plane. When a hammer actually fires, the current pulse from the electromagnet stores a bit in the "hammer-fire" plane.5 Each print scan cycle, the computer compares the two core planes to see if a hammer was fired when it wasn't supposed to, or if a hammer failed to fire when it should have; a mismatch triggers the "hammer fire" check error.

Closeup of the hammer electromagnets in the IBM 1403 printer. An electromagnet (when energized through its pair of wires) pulls a metal armature, which drives the hammer, paper and ribbon against the type slug. There are 132 hammers, one for each column, arranged in two rows of 66.

Closeup of the hammer electromagnets in the IBM 1403 printer. An electromagnet (when energized through its pair of wires) pulls a metal armature, which drives the hammer, paper and ribbon against the type slug. There are 132 hammers, one for each column, arranged in two rows of 66.

After some difficulty6, we determined that the problem wasn't the hammer fire check, but a different check: "print line complete" (PLC). This check ensures that for each line, either exactly one character was printed in each column or the column was blank. This check uses a third special core plane, the "print line complete" plane. Each time a character is printed in a column, the corresponding bit is set. (For a blank or unprintable character, a separate circuit sets the column's bit.) At the end of the line (during scan 49), the print line complete cores are checked; if any core is zero, the printer failed to print that column and an error is reported. (You can see the PLC CHECK signal and the logic that generates it on the earlier logic diagram.)

Oscilloscope probing (below) showed that the PLC CHECK (yellow) was triggered because the system thought a second character was being printed in the same column. The cyan signal is the (inverted) PLC bit from core (PR LINE COMP LATCH); each low pulse indicates a character has been printed in that column. The pink pulse (PRINT COMPARE) indicates a new character is being printed. The problem is that the cyan and pink signals go low at the same time, indicating both an existing character and a new character in the column. This generates the extra blue pulse (PLC CHECK), which triggers the yellow pulse (PRINT CHK ERROR from the latch). (This circuit can be seen in the earlier logic diagram, labeled "Trying to print position twice".)

Oscilloscope trace from debugging the IBM 1401's printer.

Oscilloscope trace from debugging the IBM 1401's printer.

Several things could cause the system to think two characters were being printed in the column. Looking at the printer's output we saw that it printed just the expected character on the paper, so the circuit to print a character seemed to be working correctly (PRINT COMPARE, the single pink pulse above), We tested the blank / unprintable circuit and it was detecting blank and non-blank columns correctly. So the most likely problem was reading a 1 from core memory (the cyan line above, PR LINE COMP LATCH) when it should be a 0. But was the problem the wrong value going in to core, or the wrong value coming out?

The logic diagram below shows the circuit that writes to the Print Line Compare core memory. At the right, PR LINE COMP INH is the (inverted) signal written to core.8 On scan 49 (the error-checking print cycle after printing all 48 characters), this line is set high, clearing the memory. If a character is being printed, the PRINT COMPARE EQUAL signal will set the core. At the left, logic gates detect a blank or unprintable character. And if a 1 bit was already in core (PR LINE COMP LATCH), the 1 bit is rewritten to core.

Logic diagram of the print line complete logic for the IBM 1401/1403. From Instructional Logic Diagrams page 77 "Print Buffer Controls".

Logic diagram of the print line complete logic for the IBM 1401/1403. From Instructional Logic Diagrams page 77 "Print Buffer Controls".

We detected that this circuit was writing erroneous 1 bits to core because it was reading erroneous 1 bits from core. But that put us in a circle, not knowing if the initial problem was the read or the write. To resolve this, we triggered the oscilloscope on print scan 49, which is when the PLC bits get cleared, and then looked at the next print scan, which reads the cleared bits back. We saw 0's being written (i.e. PR LINE COMP INH high), but unexpectedly saw 1's coming back (PR LINE COMP LATCH). So we knew something was going wrong at a low level in the core memory.

I should mention that in the base 1401 system, the printer check bits were stored in the main core memory module, but our system used a separate "print storage" core memory for improved performance. The performance issue is due to how the printer uses core memory: each time a hammer lines up with a type slug, the computer reads the corresponding character from core memory and fires the hammer if the character in storage matches the character under the hammer. Since core memory is constantly in use while printing a line, the computer can't do any computation while printing. The solution was the print storage feature: an additional 132-address core memory that functioned as a print buffer.7 With print storage, a line to be printed was first rapidly copied from the main core memory to the print storage core memory. Then the computer could continue doing computation using the main core memory while the print circuitry read from the print storage core memory. Each option on the IBM 1401 had a monthly charge; IBM charged an extra $386 a month for the print storage feature.

This print storage gate has the circuitry to drive the printer buffer core memory. The core memory unit in the upper right has bundles of yellow wires attached.

This print storage gate has the circuitry to drive the printer buffer core memory. The core memory unit in the upper right has bundles of yellow wires attached.

The photo above shows the gate that implements the print storage feature. The core memory module is the block on the upper right with yellow wires attached. (Individual cores can be seen in the photo below.) Core memory requires a lot of supporting circuitry. To select an address, driver cards generate X and Y signals. To write a core, the inhibit signal is combined with the clock by a gate, and then a driver card amplifies the signal and sends it through the inhibit line that passes through all the cores in the plane.8 When a core is read, it induces a pulse on a sense wire. This pulse is amplified by a sense amplifier card, and then the bit is stored in a latch. The numerous SMS cards in the print storage gate provided these support functions.

The cores inside the print buffer. The wiring is not the usual core memory grid because each printer hammer is wired directly to a hammer check core. The image quality is bad because of the plastic cover over the cores.

The cores inside the print buffer. The wiring is not the usual core memory grid because each printer hammer is wired directly to a hammer check core. The image quality is bad because of the plastic cover over the cores.

We probed the sense amplifier and latch cards on the reading side of the core memory and they seemed to be operating correctly, so we moved to the writing side. The HN inhibit driver card seemed a candidate for failure since it operates at high current, but we swapped the card with a replacement and the printer still failed. Next, I tried looking at the input to that card, but found there was no signal on that line, which seemed very suspicious.

Oscilloscope of the bad "CHWW" NAND gate card: pink (3) and blue (4) are inputs, cyan (2) is the output, stuck high.

Oscilloscope of the bad "CHWW" NAND gate card: pink (3) and blue (4) are inputs, cyan (2) is the output, stuck high.

The missing signal was generated by a card of type CHWW, a NAND gate that combines the inhibit signal with the clock before sending it to the driver card. I hooked up the oscilloscope to the inputs and output of the NAND gate, yielding the trace above. This trace was the smoking gun: the output (cyan 2) remained high even when the two inputs (pink 3 and blue 4) went high. This showed that the NAND gate had failed and its output was stuck high. This explained everything: with this output stuck high, only 1's would be written to the PLC core plane. Then, when a character was printed, the print circuitry would read the 1 from core, think a character had already been printed in this column, the PLC check would fail, and the print check error would be triggered.

The printer successfully operating, printing out powers of 2.

The printer successfully operating, printing out powers of 2.

We swapped this card with a spare, and the printer started printing without any errors (above). This proved that we had finally traced the problem; it was a simple NAND gate in the depths of the printer buffer core memory circuit. The failed card is shown below. It implements three NAND gates (details) using diode-transistor logic (which IBM calls CDTL—Complemented Transistor Diode Logic). Each two-input gate uses one germanium transistor (circular metal can) and two diodes (striped glass components on the right). Pull up resistors (striped) and inductors (beige) on the left complete the circuits.

The failed CHWW card from the IBM 1401. This card implements three NAND gates. The lower left transistor failed, and has been replaced.

The failed CHWW card from the IBM 1401. This card implements three NAND gates. The lower left transistor failed, and has been replaced.

I tested the card with a signal generator and found that while two of the three NAND gates worked, the other was stuck at a high output, confirming what we saw inside the 1401. Next I tested the transistors using the diode test mode on a multimeter. The good transistors had voltage drops of 0.23V. (This may seem low, but remember that these are germanium transistors not silicon transistors.) In comparison, the bad transistor had a Vbe drop of 0.95V, much higher. Finally, we removed the transistors and checked them on a vintage Tektronix 577 curve tracer. We thought the bad transistor might just be too weak to operate the gate, but it was entirely dead—totally flatlined on the curve tracer.

We opened up the transistor on a lathe and looked inside. The transistor is an IBM 083 NPN germanium alloy transistor (germanium was used before silicon transistors). The transistor consists of a tiny germanium die (the shiny metallic square below), forming the base. Two wires are attached for the emitter and collector, connected to dots of tin alloy, a larger dot on the front for the collector and a smaller dot on the back for the emitter. Under the microscope, it looked like there was some corrosion on the alloy dots and the emitter wire didn't look solidly connected, so we suspect that is the root cause of the failure.

Inside a failed IBM 083 germanium transistor. The silver-colored square in the middle is the germanium die, wired to the base pin. The dot in the middle is tin alloy, forming the collector, with a wire to the collector pin on the left. A smaller dot on the other side of the germanium die forms the emitter, wired to the pin on the right.

Inside a failed IBM 083 germanium transistor. The silver-colored square in the middle is the germanium die, wired to the base pin. The dot in the middle is tin alloy, forming the collector, with a wire to the collector pin on the left. A smaller dot on the other side of the germanium die forms the emitter, wired to the pin on the right.

Conclusions

This was a harder problem to diagnose than most of the IBM 1401 issues. But we managed to track down the problem, replace the bad card, and get the printer back in operation. One nice thing about the IBM 1401 compared to modern systems is that it's not a black box—you can look inside all the circuitry, down to the individual transistors. In this case, we were able to find the bad transistor that was causing the system failure, and even determine that it was probably corrosion that killed the transistor.

I announce my latest blog posts on Twitter, so follow me at @kenshirriff for future articles. I also have an RSS feed. The Computer History Museum in Mountain View runs demonstrations of the IBM 1401 on Wednesdays and Saturdays so if you're in the area you should definitely check it out (schedule).

Notes and references

  1. One reason for the IBM 1403's high quality printing was its use of a type chain instead of typebars or a drum. Many earlier line printers used rows of typebars or a rotating drum of characters. Any timing imprecision would change the vertical positioning of characters, yielding ugly wavy text. The 1403, on the other hand, used a horizontally rotating chain of characters so misalignment caused a hardly-noticeable change in the spacing between characters. 

  2. You might expect that the 132 hammers align with 132 type slugs, so the matching hammers all fire at once, but that's not what happens. Instead, the hammers and type slugs are spaced slightly differently, so only one hammer is aligned at a time, and a tiny movement of the chain lines up a different hammer and type slug. (Essentially they form a vernier.) Specifically, every 11.1 microseconds, the chain moves 0.001 inches. This causes a new hammer / type slug alignment. For mechanical reasons, every third hammer lines up in sequence (1, 4, 7, ...) until the end of the line is reached; this is called a "subscan" and takes 555 microseconds. Two more subscans give each hammer in the line an option to fire, forming a print scan of 1.665 milliseconds. 48 print scans give each hammer a chance to print each character, and then the 49th print scan is used for error checking. (For more details of this timing, see Manual of Instruction, page 37.)

    The mechanism of scans and subscans may seem excessively complicated. But what it accomplishes is matching up the fast "electronic world" with the slower "mechanical world." Specifically, every 11.1 microseconds, a hammer and type slug line up. The computer reads the character in that column from core, compares it to the character on the type slug, and if they match, it fires the hammer. The important thing here is that a core memory cycle matches the time between hammer alignments, making it possible to read the character from core for each hammer alignment. If you want more information on how the print chain works, I have an animation here.

    One subtlety is that a hammer takes 1.52 milliseconds to impact (Manual of Instruction, p32). Thus, it's not really the case that the hammer fires when it lines up with the type, but when it will be lined up 1.52 milliseconds in the future. 

  3. It may seem excessive that the 1401 had multiple checks to ensure that the printer was operating properly. But for a business computer, print errors could be catastrophic: imagine if a day's payroll checks had a digit printed wrong or tax forms were printed incorrectly. IBM's scientific computers had much less error checking than the business computers, on the assumption that scientists would notice problems. 

  4. The 1401 stores 4,000 characters in core memory, not 4096, because it is a decimal machine (i.e. BCD), with decimal addresses. Its memory can be expanded to 16,000 characters with a dishwasher-sized memory expansion unit; I wrote about repairing this unit here. I wrote more about the 1401's core memory here

  5. Recording each hammer fire in core memory isn't done by the computer writing to core memory. Instead, each hammer is physically wired directly to a particular core; 132 wires from the hammer electromagnets to the cores. When a hammer fires, the current pulse from the hammer's electromagnet goes through a wire wrapped through the corresponding core, magnetizing that core. (You can see these wires in the earlier picture of the cores.) 

  6. It was tricky to determine which signal was triggering the error input F, due to the 1401's use of wired-OR. Because transistors were expensive when the IBM 1401 was built, IBM used many tricks to reduce the transistor count. One trick is the wired-OR—instead of using an OR gate, signals are simply wired together so if any signal is high it will pull the line high. Thus, We couldn't simply probe the signals feeding into pin F because they were all wired together. Instead, we needed to disconnect cards so we could test one signal at a time. 

  7. The print storage core memory has 12 core planes; that is, it stores 12 bits at each location. Like a regular core location, it uses 6 bits to store each BCDIC character, as well as a bit for the word mark (metadata indicating field locations), and a parity bit. In addition, the print storage has four planes for error detection: a hammer fire sense plane (recording the hammers that fired), equal check plane (recording the hammers that should fire), print line complete plane (recording columns with a character printed), and an error check plane (indicating the column that triggered an error). 

  8. The process to write to core memory may seem backwards, using a high signal on the inhibit line to write a 0. This is due to how cores function. The key that makes cores work is that they require a high current pulse to flip the core's magnetic state; a pulse with half the current has no effect on the core. Cores are arranged in a grid, with X and Y address lines that are pulsed to select a core. Multiple planes are stacked, one for each bit. Each line is pulsed with half the necessary current, so only the core where both lines cross has enough current to flip to the 1 state. Each plane has an inhibit line that passes through all the cores in the plane. To write a 1 to a plane, the inhibit line gets no current, causing the addressed core to flip to 1 as described. To write a 0 to a plane, the inhibit line gets half current in the opposite direction. The result is that none of the cores get enough current to flip, and the addressed core remains in the 0 state. Thus, by setting each plane's inhibit line appropriately, the desired 0's and 1's can be written to the address in the core stack. 

  9. For information on how the print checks work, see Instruction Logic, page 98. The 1403 printer is documented in IBM 1403 Printer Component Description, 1403 Printers Field Engineering Maintenance Manual and 1403 Printers Field Engineering Manual of Instruction. See also this brief article about the 1403 printer in the IEEE Spectrum. For a detailed description of the IBM 1401, see IBM 1401: a modern theory of operation

Glowing mercury thyratrons: inside a 1940s Teletype switching power supply

We recently started restoring a Teletype Model 19, a Navy communication system introduced in the 1940s.14 This Teletype was powered by a bulky DC power supply called the "REC-30 rectifier". The power supply uses special mercury-vapor thyratron tubes, which give off an eerie blue glow in operation, as you can see below.
The thyratron tubes in the Teletype REC-30 power supply give off a blue glow. The orange light is a neon bulb used as a voltage reference.
The thyratron tubes in the Teletype REC-30 power supply give off a blue glow. The orange light is a neon bulb used as a voltage reference.

The power supply is interesting, since it is an early switching power supply. (I realize it's controversial to call this a switching power supply, but I don't see a good reason to exclude it.) While switching power supplies are ubiquitous now (due to cheap high-voltage transistors), they were unusual in the 1940s. The REC-30 is very large—over 100 pounds—compared to about 10 ounces for a MacBook power supply, demonstrating the amazing improvements in power supplies since the 1940s. In this blog post, I take a look inside the power supply, discuss how it works, and contrast it with a MacBook power supply.

What is a Teletype?

A Model 19 Teletype.  Image from BuShips Electron, 1945.
A Model 19 Teletype. Image from BuShips Electron, 1945.

Teletypes are a brand of teleprinter, essentially a typewriter that could communicate long distances over a wire. You may be familiar with Teletypes from old newsroom movies, where they chatter out news bulletins, or you may have seen computers that used an ASR33 Teletype as a terminal in the 1970s. (Much of the terminology used by serial ports on modern computers dates from the Teletype era: start and stop bits, baud rate, tty, and even the break key.) Teletypes could also store and read characters by punching holes in paper tape, using a 5-bit code2 (below).
"Teletype is here to stay." This image shows the 5-hole paper tape used by Teletypes. Image from BuShips Electron, 1945.
"Teletype is here to stay." This image shows the 5-hole paper tape used by Teletypes. Image from BuShips Electron, 1945.

Teletypes were introduced in the early 1900s. In that pre-electronic era, character selection, serialization, and printing were accomplished through complex electromechanical mechanisms: cams, electromagnets, switches, levers and gears. Pressing a Teletype key closed a combination of switches corresponding to the character. A motorized distributor serialized these bits for transmission over the wire. On the receiving side, electromagnets converted the received data bits into movement of mechanical selectors. The selector pattern matched the notches on one of the typebars, causing that typebar to move and the correct character to be printed.1
Partially disassembled Model 19 Teletype.
Partially disassembled Model 19 Teletype.

The current loop

Teletypes communicated with each other using a 60 milliamp current loop: if current is flowing, it's called a mark (corresponding to a hole in the paper tape), and if current is interrupted, it's called a space. Each character was transmitted by sending a start bit, 5 data bits, and a stop bit. (If you've used serial devices on your PC, this is where the start and stop bit originated. And the baud rate is named after Émile Baudot, inventor of the 5-bit code.) The REC-30 power supply produced 900 milliamps at 120V DC, enough current for a room of 15 Teletypes.
You might wonder why Teletypes don't just use voltage levels instead of the strange current loop. One reason is that if you're sending signals over a wire to the next city, it's hard to know what voltage they are receiving because of voltage drops along the way. But if you're sending 60mA, they'll be getting the same 60mA (assuming no short circuits). 3 The hefty current was necessary to drive the electromagnets and relays in Teletypes. Later Teletypes often used a 20 mA current loop instead of 60 mA.

Why a switching power supply

There are several ways of building a regulated power supply. The most straightforward is a linear power supply, which uses a component such as a tube or transistor to regulate the voltage. The component acts as a variable resistor, dropping the input voltage to the desired output voltage. The problem with linear power supplies is they are generally inefficient, since the extra voltage turns into waste heat.
Most modern power supplies, instead, are switching power supplies. They rapidly switch on and off, making the voltage averages out to the desired output voltage. Because the switching element is either on or off, not resistive as in a linear power supply, switching power supplies waste very little power. (Switching power supplies are usually much smaller and lighter too, but apparently the designers of the REC-30 didn't get that memo.4 The REC-30 is over two feet wide.) Most of the power supplies you'll encounter, from your phone charger to the power supply in your computer, are switching power supplies. Switching power supplies became popular in the 1970s with the development of high-voltage semiconductors, so tube-based switching power supplies are a bit unusual.
REC 30 Teletype power supply in its case painted Navy gray. The power cords exit the top. The tubes are behind the door on the right.
REC 30 Teletype power supply in its case painted Navy gray. The power cords exit the top. The tubes are behind the door on the right.

Inside the REC-30 power supply

The photo below shows the main parts of the REC-30 power supply. AC power enters at the left and is fed into the large autotransformer. The autotransformer is a special single-winding multi-tap transformer that converts the input AC voltage (between 95V and 250V)6 into a fixed 230V AC output. This allows the power supply to accept a variety of input voltages, simply by connecting a wire to the right autotransformer terminal. The 230V output from the autotransformer feeds the plate drive transformer, which outputs 400 volts AC to the thyratron tubes.5 The thyratron tubes rectify and regulate the AC into DC, which is then filtered by capacitors (not visible in photo) and inductors (chokes), to produce the 120V DC output.
REC-30 power supply, showing the main components.
REC-30 power supply, showing the main components.

Ignoring the switching for a moment, the AC-to-DC conversion in the REC-30 power supply uses a full-wave rectifier and center-tapped transformer (the drive transformer), similar to the diagram below. (The thyratron tubes provide rectification rather than the diodes in the diagram.) The transformer windings provide two sine waves, out of phase, so one will always be positive. The positive half goes through one of the thyratron tubes, producing pulsed DC output. (In other words, the negative half of the AC waveform is flipped to produce a positive output.) The power supply then smooths out these pulses to provide steady voltage, using inductors (chokes) and capacitors as filters.
A full wave rectifier circuit (center) converts AC (left) to pulsed DC (right). Image by Wdwd, CC BY 3.0.
A full wave rectifier circuit (center) converts AC (left) to pulsed DC (right). Image by Wdwd, CC BY 3.0.

Unlike the diodes in the diagram above, the thyratron tubes in the power supply can be controlled, regulating the output voltage. The basic idea is to turn the thyratron on for a fixed part of the AC cycle, as shown below. If it is on for the full cycle, you get the full voltage. If it is on for half the cycle, you get half the voltage. And if it is only on for a small part of the cycle, you get a small voltage.7 This technique is called phase angle control because it turns the device on at a particular phase angle (i.e. a particular point between 0° and 180°in the AC sinusoid). (This is very similar to a common light dimmer switch, which uses a semiconductor TRIAC rather than thyratron tubes.11)
Diagram of phase control. Top shows the fraction of the pulse used. Bottom shows the point at which the thyratron switches on. Image by  Zureks, CC BY-SA 2.5.
Diagram of phase control. Top shows the fraction of the pulse used. Bottom shows the point at which the thyratron switches on. Image by Zureks, CC BY-SA 2.5.

The thyratron tubes in the power supply resemble vacuum tubes, but have argon and mercury vapor inside their glass shell (unlike vacuum tubes which not surprisingly contain a vacuum). These thyratron tubes are constructed from three components: the filament, the plate, and the grid. The filament, kind of like a light bulb filament, heats up and gives off electrons. The plate, connected to the top of the tube, receives electrons, allowing current to flow from the filament to the plate. Finally, a control grid between the filament and the plate can block the electron flow. When electrons flow to the plate, the mercury vapor in the tube ionizes, turning on the tube and producing the blue glow you can see below. (In contrast, a regular vacuum tube has a flow of electrons, but nothing to ionize.) The ionized mercury provides a highly conductive path between the filament and the plate, allowing a large (1.5 amp) current to flow. Once the mercury ionizes, the grid no longer has control over the tube and the thyratron remains on until the voltage between the filament and plate drops to zero. At this point, the ionization ceases and the tube shuts off until it is turned on again.
REC-30 Teletype power supply, showing the thyratron tubes with their blue glow and the neon bulb voltage reference glowing orange. The timer/relay is visible in the upper left.
REC-30 Teletype power supply, showing the thyratron tubes with their blue glow and the neon bulb voltage reference glowing orange. The timer/relay is visible in the upper left.

The grid voltage on a thyratron controls the tube. The negative voltage on the grid repels the negatively-charged electrons, preventing electron flow between the filament and the plate. But when the voltage on the plate gets high enough, electrons will overcome the grid repulsion, causing the tube to turn on. The important factor is that the more negative the grid, the more repulsion and the higher the plate voltage needs to be for the tube to turn on. Thus, the grid voltage can control the point in the AC cycle at which the tube turns on.
The control circuit regulates the power supply's output voltage by changing the grid voltage and thus the thyratron timing.9 I used the power supply's adjustment potentiometer to show below how changing the timing changes the voltage. I could set the output voltage (blue) between 114 and 170V. The regulation circuit changed the grid voltage (pink), resulting in the thyratron timing (cyan and yellow) changing accordingly.10 The oscilloscope trace is a bit tricky to interpret; see the footnote for details.12 The main thing to notice is how the ends of the cyan and yellow curves move back as the voltage increases, indicating the thyratrons fire earlier.
Change in phase angle as Teletype REC-30 power supply is adjusted from 130V to 170V output. Yellow and cyan are the voltage across the thyratrons. Pink is the grid control signal. Blue is the (inverted) output voltage.
Change in phase angle as Teletype REC-30 power supply is adjusted from 130V to 170V output. Yellow and cyan are the voltage across the thyratrons. Pink is the grid control signal. Blue is the (inverted) output voltage.

The schematic below shows the circuitry of the REC-30 power supply (larger schematic here). The AC input circuit is highlighted in green, with the autotransformer adjusting the input voltage to 230V and feeding the drive transformer. These thyratron tubes have the interesting requirement that they must be heated up before use to ensure that the mercury is vaporized; a bimetallic timer waits 20 seconds before powering up the drive transformer.8 On the secondary side of the drive transformer, the 400V drive voltage is in red, the regulated output voltage from the thyratrons is orange, and the low side of the output is blue.13 The regulation circuit (at the bottom) is a bit more complicated. The grid control tube (a 6J6 pentode) provides the control voltage to the grids of the thyratrons, controlling when they will turn on. The grid control tube takes a feedback voltage (pin 5) from the output via a potentiometer voltage divider. The output from this tube (pin 3) sets the thyratron grid voltage to keep the output voltage regulated. The voltage drop across the neon bulb is almost constant, allowing it to act as a voltage reference providing a fixed voltage for the control tube's cathode (pin 8).
Schematic of the REC-30 Teletype power supply. For some reason, the schematic indicates ohms with a lower-case ω rather than the usual upper-case Ω.
Schematic of the REC-30 Teletype power supply. For some reason, the schematic indicates ohms with a lower-case ω rather than the usual upper-case Ω.

Comparison with a MacBook power supply

It's interesting to compare the REC-30 power supply to a modern MacBook power supply, to see how much switching power supplies have improved in 70 years. An Apple MacBook power adapter is roughly comparable to the REC-30 power supply, producing 85 watts of DC power from an AC input (versus 108 watts from the REC-30). However, the MacBook power supply is about 10 ounces, while the REC-30 is over 100 pounds. The MacBook supply is also considerably less than 1% the size of the REC-30 power supply, showing the incredible miniaturization of electronics since the 1940s. The bulky thyratron tubes to switch the power have been replaced by compact MOSFET transistors. The resistors have shrunk from the size of a finger to smaller than a grain of rice. Modern capacitors are smaller, but haven't miniaturized as much as resistors; capacitors are some of the largest components in the MacBook charger, as you can see below.
Inside an Apple MacBook 85W power supply.  
Despite its small size, the MacBook power supply is much more complex than the REC-30.
It contains a Power Factor Correction (PFC) circuit to improve power line efficiency.
Multiple safety features (including a 16-bit microcontroller) monitor the power supply, shutting it down if there is a fault.
Inside an Apple MacBook 85W power supply. Despite its small size, the MacBook power supply is much more complex than the REC-30. It contains a Power Factor Correction (PFC) circuit to improve power line efficiency. Multiple safety features (including a 16-bit microcontroller) monitor the power supply, shutting it down if there is a fault.

Most of the weight reduction in the Macbook charger comes from replacing the enormous autotransformer and plate drive transformer with a tiny high-frequency transformer. The MacBook power supply operates at about 1000 times the frequency of the REC-30, which allows the inductors and transformers to be much, much smaller. (I wrote more on the MacBook charger here and more on power supply history here.)
The following table summarizes the differences between the REC-30 power supply and the MacBook power supply.

REC-30MacBook 85W
Weight104.5 lb0.6 lb
Dimensions25" x 8" x 11" (1.3 ft^3)3 1/8" x 3 1/8" x 1 1/8" (0.006 ft^3)
Input AC 95-250V AC, 25-60 Hz 100-240V 50-60Hz
Output108W: 120V DC at 0.9A85W: 18.5V DC at 4.6A
Idle (vampire) power consumption60W&lt0.1W
Harmful substances insideMercury, lead solder, probably asbestos wire insulation No: RoHS certified
Output controlBimetallic timer / relay 16-bit MPS430 microcontroller
Switching elements323 thyratron tubes11A N-channel power MOSFETs
Voltage referenceGE NE-42 neon glow discharge bulbTSM103/A bandgap reference
Switching control6F6 pentode tubeL6599 resonant controller chip
Switching frequency120 Hz~500 kHz
I measured the quality of the REC-30's output voltage (below). The power supply provides much higher quality output than I expected, with only about 200 mV of ripple (the waves in the horizontal blue line) which is close to Apple-level quality. There are also narrow spikes (the vertical lines) of about 8 volts when the thyratrons switch. These spikes are fairly large compared to an Apple power supply but still better than a cheap charger.
Output from the REC-30 power supply, showing a small amount of ripple and switching spikes.
Output from the REC-30 power supply, showing a small amount of ripple and switching spikes.

Conclusions

The REC-30 power supply provided over 100 watts of DC power for Teletype systems. Introduced in the 1940s, the REC-30 was an early switching power supply that used mercury-filled thyratron tubes for efficiency. It was a monstrously large unit for a 100 watt power supply, weighing over 100 pounds. A comparable modern power supply is under 1% of the size and weight of this unit. Despite its age, the power supply worked flawlessly when we powered it up, as you can see in Marc's video below. The power supply is beautiful in operation, with a blue glow from the thyratrons and orange from the large neon bulb.

I announce my latest blog posts on Twitter, so follow me at @kenshirriff for future articles. I also have an RSS feed. Thanks to Carl Claunch and Marc Verdiell for work on the power supply.

Notes and references

  1. For more information on how Teletypes operate, see this page. For comprehensive information, see Fundamentals of Telegraphy (Teletypewriter), Army Technical Manual TM 11-655, 1954. More REC-30 schematics are here and documentation is here
  2. In the 1870s, Émile Baudot invented the 5-bit Baudot code. A different 5-bit code was created by Murray in 1901 and standardized as ITA2. Both codes look like the characters are in random order; the original Baudot code used a Gray code, while the Murray code was optimized to use the fewest holes for common characters, reducing wear and tear on the machinery. (It wasn't until ASCII in the 1960s that putting the alphabet in binary order became a thing.) 
  3. Note that in contrast to voltage-based signals, the components of the current loop must form a topological loop for the current to flow. Removing a device will break the circuit unless provisions are made to close the loop. As a result, the Teletype system is full of jacks that short when you unplug a component, to keep the loop intact. 
  4. The main reason the REC-30 power supply is so heavy and bulky compared to modern switching power supplies is that it switches at 60 Hz (and even down to 25 Hz), while modern power supplies switch at tens of kilohertz. Since the transformer's EMF is proportional to the frequency, a high-frequency transformer can be much smaller than the corresponding low-frequency transformer (details). 
  5. Isolation between the AC input and the DC output is a key safety feature in most power supplies, from chargers and PC power supplies to the REC-30, preventing a shock from the DC output. In the REC-30, the plate drive transformer has the critical role of providing isolation. (Note that the autotransformer doesn't provide any isolation protection because it has a single main winding; touching its output is like touching the AC input.) The rest of the circuitry is carefully designed so there is no direct path between the AC input and the output: the control circuitry is all on the secondary side, the filaments are powered by isolated windings off the autotransformer, and the relay provides isolation in the timer. Also note that for safety the 120V DC output is floating, rather than grounding either side; this means you'd need to touch both sides to get a 120V shock. 
  6. The power supply accepts a wide variety of input voltages (95, 105, 115, 125, 190, 210, 230, 250V AC) as well as multiple frequencies: 25, 40, 50, and 60 Hz. While modern switching power supplies can automatically adjust to handle the input voltage, the REC-30 required a wire to be moved to the proper autotransformer tap to support a different voltage. 25 Hertz might seem like a strange frequency for a power supply to support, but many parts of the United States used 25 Hertz power in the 1900s. In particular, Niagara Falls generated 25 Hertz electricity due to the mechanical design of its turbines. In 1919, more than two thirds of power generation in New York was 25 Hertz and it wasn't until as late as 1952 that Buffalo used more 60 Hertz power than 25 Hertz power. Because of the popularity of 25 Hz power, many of IBM's punch card machines from the early 1900s could also operate off 25 Hertz (details). 
  7. Modern switching power supplies use pulse-width modulation (PWM) schemes to switch on and off thousands of times a second. This results in a smaller power supply and gives smoother output than switching once per AC cycle, but requires more complicated control systems. 
  8. In the REC-30 power supply, the 20 second delay before powering up the tubes is accomplished by a timer and relay. The timer uses a bimetallic strip with a heater. When you turn on the power supply, the filaments are powered immediately to heat up the tubes. Meanwhile, a heater inside the timer warms the bimetallic strip; eventually the strip bends enough to close the contacts and energize the tubes. At this point, the relay latches the contacts closed. 
  9. Initially, I assumed that as the load increased, the thyratrons would switch on for longer periods of time to provide more current. However, I did oscilloscope measurements under varying load and found no phase shift. This turns out to be the expected behavior; a transformer provides essentially constant voltage regardless of the load. Thus, the thyratron timing remains essentially the same as the load changes and the transformer just provides more current. You can see the thyratrons brightening as the current increases in this video
  10. Under low load, the power supply sometimes skips entire AC cycles, rather than switching the thyratrons mid-cycle. This is visible as the thyratrons start to flicker rather than glow steadily. I'm not sure if this is a bug or a feature. 
  11. The modern solid-state equivalent of the thyratron is the silicon controlled rectifier, also known as the SCR or thyristor (combining "thyratron" and "transistor"). The SCR has four semiconductor layers (rather than a 2-layer diode or 3-layer transistor). Like the thyratron, the SCR is normally off until triggered by the gate input. It then remains on, acting like a diode, until the voltage drops to 0, at which point is switches off. A TRIAC is a semiconductor device similar to a SCR, except it can pass electricity in either direction, making it more convenient for AC use. 
  12. In the oscilloscope trace, the yellow and cyan curves are the voltage across the two thyratrons. The flat part (where the voltage difference is approximately zero) is where the thyratron is firing. The two thyratron tubes are not totally symmetrical for some reason, with the yellow one usually firing later. (This is visible while watching the thyratrons, as one glows more than the other.) The pink line is the grid control voltage. Note that it increases to make the output voltage increase, causing the thyratrons to fire earlier. A vertical spike is visible in the pink line; this is noise as the thyratron fires. The blue line at the bottom is the output voltage (inverted); the line goes down as the voltage increases.
    One puzzle is that there is always one thyratron firing; either the yellow or cyan line is always at 0. I would expect a gap between the zero point of the plate voltages and when the other thyratron fires. My suspicion is the large inductors are pulling the filament negative so even when the plate is negative, there is still a positive voltage between the filament and the plate. 
  13. The filament circuit for the power supply is a bit tricky since the thyratron filaments are used both to heat the tubes and as the cathode. The filaments are provided with 2.5V by the autotransformer. In addition, the filaments act as the cathodes in the thyratrons, so they produce the output voltage and are connected to the high side of the output. To perform these two tasks, the split winding of the autotransformer superimposes the 2.5V filament voltage but passes the output voltage straight through. The two thyratrons use a total of 35 watts just for the filaments, so you can see that filament heating wastes a lot of energy and gives off a lot of heat, somewhat negating the advantages of a switching power supply. 
  14. The introduction of Teletypes for Navy use was described in BuShips Electron, Sept 1945. The development of radio-connected Teletypes (RTTY), typically using frequency-shift keying, allowed the adoption of Teletypes for Navy use. The Navy first used radio Teletypes for communication between shore stations, and then moved to shipboard use. The biggest advantage of a Teletype was it was at least four times as fast as a radio operator transmitting by hand. In addition, paper tape allowed messages to be automatically copied and relayed. Teletypes could also be integrated with cryptographic equipment such as SIGTOT which used a one-time pad. More on Teletypes in World War II here

Inside the die of Intel's 8087 coprocessor chip, root of modern floating point

Looking inside the Intel 8087, an early floating point chip, I noticed an interesting feature on the die: the substrate bias generation circuit. In this article I explain how this circuit is implemented, using analog and digital circuitry to create a negative voltage.

Intel introduced the 8087 chip in 1980 to improve floating-point performance on 8086/8088 computers such as the original IBM PC. Since early microprocessors were designed to operate on integers, arithmetic on floating point numbers was slow, and transcendental operations such as trig or logarithms were even worse. But the 8087 co-processor greatly improved floating point speed, up to 100 times faster. The 8087's architecture became part of later Intel processors, and the 8087's instructions are still a part of today's x86 desktop computers.1

I opened up an 8087 chip and took die photos with a microscope yielding the composite photo below. The die of the 8087 is fairly complex, with 40,000 transistors (according to Intel) or 45,000 transistors (according to Wikipedia). The photo shows the metal layer of the chip, the connections on top of the chip. The thickest white lines provide power and ground connections to all parts of the chip. Hidden underneath the metal are the polysilicon and silicon that form the chip's transistors. (Click the photo for a large image.)

Die photo of the Intel 8087 floating point coprocessor chip.

Die photo of the Intel 8087 floating point coprocessor chip.

The bottom half of the chip holds the 80 bit wide arithmetic circuitry: an adder, shifters, mathematical constant storage and registers. The large rectangle in the middle of the chip is the microcode that controls the chip. At the top is control logic and bus circuitry that interfaced with the 8086 processor. (I'll discuss the inner workings of the 8087 in more detail in later blog posts.)

The black lines around the outside of the die photo are the tiny bond wires connecting the pads on the die to the 40 pins of the chip. By studying the 8087 datasheet, it's not too hard to figure out which pad on the die corresponds to each pin of the chip; the chip's 40 pins (numbered counterclockwise) are wired in order to 40 pads on the chip. The diagram below zooms in on the center right part of the die, labeling some of the pads. (Note that the ground and +5V power (Vcc) pads have multiple wires in parallel to carry more current.) However, one puzzle appeared—an extra pad and wire located between pads 40 and 1, not associated with any of the chip's pins.

Each pad on the die of the 8087 FPU chip is wired to one of the 40 pins of the chip. But there is one extra wire between pins 1 and 40. It is connected to the chips's substrate.

Each pad on the die of the 8087 FPU chip is wired to one of the 40 pins of the chip. But there is one extra wire between pins 1 and 40. It is connected to the chips's substrate.

Looking at the bond wires on the chip (below) revealed that the mystery pad wasn't connected to one of the pins but to a tiny cubical block to the right of the die. Since the cube is on the same metallic base as the die, it connects to the die's underlying silicon, the substrate. I did some reverse-engineering and determined that this is part of the 8087's substrate bias circuit, which uses this connection to put a negative voltage on the substrate. The rest of this blog post explains how this circuit works.

The die of the 8087 FPU chip, showing the bond wires from the die to the package.

The die of the 8087 FPU chip, showing the bond wires from the die to the package.

What is substrate bias?

High-density integrated circuits in the 1970s were usually built from NMOS transistors. The diagram below shows the structure of an NMOS transistor. The integrated circuit starts with a silicon substrate, and transistors are built on this. Regions of the silicon are doped with impurities to create diffusion regions with desired properties. The transistor can be viewed as a switch, allowing current to flow between two diffusion regions called the source and drain. The transistor is controlled by the gate, made of a special type of silicon called polysilicon. A high signal voltage on the gate lets current flow between the source and drain, while a low signal voltage blocks current flow. An insulating oxide layer separates the gate from the silicon underneath; this insulating layer will be important later. These tiny transistors can be combined to form logic gates, the components of microprocessors and other digital chips.

Structure of a MOSFET as implemented in an integrated circuit.

Structure of a MOSFET as implemented in an integrated circuit.

For high-performance integrated circuits, it was beneficial to apply a negative "bias" voltage to the substrate. 2 To obtain this substrate bias voltage, many chips in the 1970s had an external pin that was connected to -5V.3 However, engineers didn't like chips that required an inconvenient extra voltage. Even worse, chips of that era often required a third voltage,4 so systems required three power supplies to support these chips. In addition, the number of pins on ICs was limited (typically just 18 pins for memory chips), so using up two pins for extra voltages was unfortunate. Part of the solution, developed around the end of the 1970s, was for chips to generate the negative bias voltage internally. The result was chips that used a single convenient +5V supply, making engineers happier.

Inside the 8087's substrate bias circuit

You might wonder how a chip can turn a positive voltage into a negative voltage. The answer is a circuit called the charge pump, which uses capacitors to generate the desired voltage.

The 8087's bias generator has two charge pumps working in alternation. The schematics below show the operation of one of the charge pumps. The charge pump is driven by an oscillating signal (Q) and its inverse (Q). In the first step, the upper transistor is switched on, causing the capacitor to charge to 5 volts with respect to ground. The second step is where the magic happens. The lower transistor turns on, connecting the high side of the capacitor to ground. Since the capacitor is still charged to 5 volts, the low side of the capacitor must now be at -5 volts, producing the desired negative voltage at the output. When the oscillator flips again, the upper transistor is turned on and the cycle repeats.5 The charge pump gets its name because it pumps charge from the output to ground. If you view the diodes as check valves, the charge pump is analogous to a manual water pump.

Schematic of the charge pump used in the Intel 8087 to provide negative substrate bias.

Schematic of the charge pump used in the Intel 8087 to provide negative substrate bias.

To reverse engineer the charge pump circuitry, I examined the die with a microscope. The metal layer obscures the transistors underneath, making it difficult to see the circuitry. But by dissolving the metal layer with hydrochloric acid, I exposed the polysilicon and silicon layers, revealing the transistors and capacitors, as seen below. (The colorful regions are simply interference patterns due to some oxide that wasn't fully removed.) The die photo below shows the two charge pumps: one to the left of the pad, and one below. Each charge pump matches the schematic above, with two diodes, a large capacitor, and two drive transistors.

The substrate bias circuit of the 8087. The metal layer has been removed in this die photo.

The substrate bias circuit of the 8087. The metal layer has been removed in this die photo.

The capacitors are the most visible feature of the substrate bias circuitry. Although microscopic, they are huge by chip standards. The area used by the capacitors is about the same as 72 bits of register storage, over 400 transistors. Each capacitor consists of polysilicon over a silicon region, separated by insulating oxide; the polysilicon and silicon form the plates of the capacitor. In the photo, the capacitors are studded with squares; these squares are contacts between the polysilicon or silicon and the metal layer on top. (The metal layer is not visible as it was removed.)

The four drive transistors are much larger than regular transistors since they must handle high current. The red lines are the polysilicon wires forming the gates. The green lines are contacts to the metal layer, connecting the transistors to +5V or ground. The diodes next to the pad are formed from transistors by connecting the gate and drain together (details).

The charge pumps are driven by the ring oscillator at the bottom of the above image. This ring oscillator consists of five inverters in a loop as shown below. Because the number of inverters is odd, the system is unstable and will oscillate. For instance, if the input to the first inverter is 0, the output from the fifth inverter will be 1. This will flip the first inverter, and the "flip" will travel through the loop causing oscillation. To slow down the oscillation rate, two resistor-capacitor networks are inserted into the ring. Since the capacitors will take some time to charge and discharge, the oscillations will be slowed, giving the charge pump time to operate.

The ring oscillator circuit in the 8087's charge pump.

The ring oscillator circuit in the 8087's charge pump.

Before explaining the ring oscillator, I'll show how a standard NMOS inverter is implemented in silicon. The diagram below shows an inverter, its schematic, and how it appears on the die. The inverter uses a transistor and a pull-up resistor (which is really a transistor). If the input is low, the transistor is off and the pull-up resistor pulls the output to +5V. If the input is high, the transistor is on, pulling the output to ground. Thus, the circuit inverts the input.

How an inverter is implemented with NMOS logic, and how it appears on the chip die.

How an inverter is implemented with NMOS logic, and how it appears on the chip die.

In the die photo above, the inverter's physical layout matches the schematic. The large beige regions are doped silicon. The thinner yellow areas bordered with purple are polysilicon. The input is a polysilicon wire. Where it crosses the doped silicon it forms the gate of a transistor between ground (below the input) and the output (above the input). The pull-up resistor is implemented with a transistor that has the gate and drain tied together; the indicated contact forms this connection between the transistor's polysilicon gate and its silicon drain. The polysilicon also forms the output wire. Thus, an inverter is implemented on the chip with two transistors.

The ring oscillator in the 8087 FPU chip, as seen on the die.

The ring oscillator in the 8087 FPU chip, as seen on the die.

The photo above shows how the ring oscillator appears on the die. The five inverters are outlined. Each inverter has a different orientation to optimize the layout, but careful examination shows the same transistor and pull-up structure explained above. The resistors and capacitors for the R-C delays are also indicated. The resistors are simply transistors with a long distance between source and drain, reducing the current flow. These capacitors are constructed like the charge pump capacitors, but are much smaller; the silicon on the bottom and the polysilicon on top form the capacitor plates, separated by the thin insulating oxide layer.

Conclusions

The substrate bias generator on the 8087 chip is an interesting combination of digital circuitry (a ring oscillator formed from inverters) and an analog charge pump. Substrate bias generator circuits were introduced in the late 1970s, helping memory chips and microprocessors to operate from a single +5V supply, much more convenient than requiring three different voltages. The substrate bias generator produces a negative voltage from the positive supply voltage by using a charge pump.

While the bias generator may seem like an obscure part of 1970s computer history, bias generation is still part of modern integrated circuits but has become much more complex, with multiple carefully regulated biases in multiple power domains. There is even a standard (IEEE 1801 power format) that allows IC design tools to generate the necessary circuitry.6

Likewise, even though Intel's 8087 floating point unit chip was introduced 38 years ago, it still has a large impact today. It spawned the IEEE 754 floating point standard used for most modern floating point arithmetic, and the 8087's instructions remain a part of the x86 processors used in most computers.

I'll end with one more 8087 die photo; this one shows the polysilicon and silicon after stripping off the metal. You may recognize the substrate bias generator circuit at the center right. (Click for a large image.)

Die photo of the Intel 8087 floating point unit. The metal layer has been stripped off with acid, revealing the polysilicon and silicon underneath.

Die photo of the Intel 8087 floating point unit. The metal layer has been stripped off with acid, revealing the polysilicon and silicon underneath.

I announce my latest blog posts on Twitter, so follow me at @kenshirriff for future 8087 articles. I also have an RSS feed. Thanks to Ed Spittles and Eric Smith for comments.

Notes and references

  1. The 8087 introduced a bunch of new instructions to the 8086, such as FADD (floating add), FDIV (floating divide) and FPTAN (tangent). These instructions were implemented using the 8086's ESC "escape" instruction, which was designed to let the 8086 processor interact with a coprocessor.

    The 8087 led to the IEEE 754 floating point standard in 1985; this defines the floating point used by most computers today. For more information on how the 8087 works, see The Intel 8087 numeric data processor by John Palmer or The 8087 Primer

  2. Putting a negative bias voltage on the substrate had several benefits. It decreased parasitic capacitance making the chip faster, made the transistor threshold voltage more predictable, and reduced leakage current

  3. Early DRAM memory chips and microprocessor chips often required three supplies: +5V (Vcc), +12V (Vdd) and -5V (Vbb) bias voltage. In the late 1970s, improvements in chip technology allowed a single supply to be used instead. For example, Mostek's MK4116 (a 16 kilobit DRAM from 1977) required three voltages while the improved MK4516 (1981) operated on a single +5V supply, simplifying hardware designs. (Amusingly, some of these chips still kept the Vbb and Vcc pins for backwards compatibility but left them unconnected.) Intel's memory chips followed a similar path, with the 2116 DRAM (16K, 1977) using three voltages and the improved 2118 (1979) using a single voltage. Similarly, the famous Intel 8080 microprocessor (1974) used enhancement-mode transistors and required three voltages. An improved version, the 8085 (1976), used depletion-mode transistors and was powered by a single +5V supply. The Motorola 6800 microprocessor (1974) used a different approach for a single supply; although the 6800 was built from the older enhancement-load transistors it avoided the +12 supply by implementing an on-chip voltage doubler, a charge pump that increased the voltage. 

  4. The third (+12V) supply in old chips is unrelated to the substrate bias. This supply was used because early MOS integrated circuits used enhancement-mode transistors as pull-up loads in gates. These transistors couldn't pull signals all the way up to the +5V level, so chips added an an even higher +12V supply. In the mid 1970's, new technology (ion implantation) allowed the creation of depletion-load transistors, which functioned much better as pull-up loads and eliminated the need for the +12V supply. For details, see Wikipedia, StackExchange and VLSI design techniques for analog and digital circuits page 539. 

  5. I've simplified the charge pump discussion slightly. Due to voltage drops in the transistors, the substrate voltage will probably be around -3V, not -5V. (If a chip requires a larger voltage drop, charge pump stages can be cascaded.) For the pump direction, I'm referring to current flow. If you think of it as pumping electrons, the negative electrons are being pumped the opposite direction, into the substrate. 

  6. Bias generators are now available as IP blocks that can be licensed and be plugged into a chip design. For more information on bias in modern chips, see Body bias, Multi bias domain implementation, or this presentation

Silicon die analysis: inside an op amp with interesting "butterfly" transistors

Some integrated circuits have very interesting dies under a microscope, like the chip below with designs that look kind of like butterflies. These patterns are special JFET input transistors that improved the chip's performance. This chip is a Texas Instruments TL084 quad op amp and the symmetry of the four op amps is visible in the photo. (You can also see four big irregular rectangular regions; these are capacitors to stabilize the op amps.) In this article, I describe these components and the other circuitry in the chip and explain how it works. This article also includes an interactive chip explorer that shows each schematic component on the die and explains what it does.

Die photo of the TL084 quad op amp. The bond wires got a bit bent while cleaning the chip.

Die photo of the TL084 quad op amp. The bond wires got a bit bent while cleaning the chip.

An integrated circuit consists of a tiny piece of silicon. To make an integrated circuit, regions are treated with various atoms to change the properties of the silicon, giving them different colors under a microscope. On top of the silicon, a thin layer of metal connects different parts of the chip. This metal is clearly visible in the photo as yellowish traces and regions. Under the metal, a thin, glassy silicon dioxide layer provides insulation between the metal and the silicon, except where contact holes in the silicon dioxide allow the metal to connect to the silicon. Around the edge of the chip, thin bond wires connect the metal pads to the chip's external pins.

NPN transistors inside the IC

Transistors are the key components in a chip. This op amp chip uses several types of transistors: NPN and PNP bipolar transistors as well as JFETs. (Many newer op amps use low-power CMOS transistors instead.) If you've studied electronics, you've probably seen a diagram of an NPN transistor like the one below, showing the collector (C), base (B), and emitter (E) of the transistor, The transistor is illustrated as a sandwich of P silicon in between two layers of N silicon; the N-P-N layers make an NPN transistor. It turns out that transistors on a chip look nothing like this, and the base often isn't even in the middle!

Symbol and simplified structure of an NPN transistor.

Symbol and simplified structure of an NPN transistor.

The photo below shows one of the transistors in the TL084 as it appears on the chip. The different brown, purple and green colors are regions of silicon that has been doped differently, forming areas called N and P regions (negative with an excess of electrons, and positive lacking electrons). The yellow areas are the metal layer of the chip on top of the silicon—these form the wires connected to the collector, emitter, and base. Underneath the photo is a cross-section drawing showing approximately how the transistor is constructed. There's a lot more going on than just the N-P-N sandwich you see in books, but if you look carefully at the vertical cross section below the 'E', you can find the N-P-N that forms the transistor. The emitter (E) wire is connected to N+ silicon. Below that is a P layer connected to the P+ base contact (B). And below that is an N layer connected (indirectly) to the collector (C).1

Structure of an NPN transistor in the TL084 op amp

Structure of an NPN transistor in the TL084 op amp

While most of the transistors follow the above pattern, some of the transistors in the TL084 chip are optimized in confusing ways, such as the part of the die below. In this circuit, two transistors share one collector (C), while a resistor (blue line) runs between them. (This took me a while to figure out, even with the schematic.)

A complex part of the TL084, where two transistors share a collector while a resistor runs through them.

A complex part of the TL084, where two transistors share a collector while a resistor runs through them.

The output transistors (below) in the TL084 are larger than the other transistors and have a different structure in order to produce the chip's high-current output. The output transistors must provide milliamps of current, compared to microamps for the internal transistors. Note the interlocking "fingers" of the emitter (E) and base (B), surrounded by the large collector (C). Although the NPN and PNP transistors look similar, the dark purple P silicon is visible on the base of the NPN transistor and the emitter and collector of the PNP transistor, showing their opposite construction.

High-current NPN and PNP transistors drive the output of the TL084 op amp

High-current NPN and PNP transistors drive the output of the TL084 op amp

How capacitors are implemented in silicon

The TL084 contains four capacitors to provide stability for the op amps. You can see the four capacitors in the die photo; they are the largest structures on the chip. A capacitor in the chip is essentially a large metal plate separated from the silicon by an insulating layer. The main drawback of capacitors on ICs is they are physically very large. The TL084's capacitors have a very small capacitance value (a few picofarads) but take up a large fraction of the chip's area.2

JFET transistors3

A special type of transistor called a JFET is the key to the high performance of the TL084 chip. The JFET transistor is related to the more common MOSFET transistor: they both controls current between the source and the drain, under control of the gate. But while the MOSFET has has an insulating oxide layer between the gate and the body of the device, the JFET lacks this layer and has a silicon P-N junction instead (and thus is called a Junction FET). The chip used P-channel JFETS, where current flows through a channel of P silicon; the schematic symbol and basic structure is shown below. Normally, current flows between the source (S) and drain (D) through the channel. As the voltage on the gate increases, it "pinches" the channel closed, reducing and then stopping the current flow. An important feature of a JFET is that very, very little current flows through the gate; the gate resistance is an amazingly large 1012Ω. (This is because the gate junction acts as a reverse-biased diode, blocking current flow.) This high input impedance is an important feature for an op amp.

Symbol and simplified structure of a JFET transistor (P-channel).

Symbol and simplified structure of a JFET transistor (P-channel).

On the chip, the JFETs are constructed like the diagram above but rotated horizontally. The diagram below shows a JFET as it appears on the die (left), along with a close-up slice. (The JFET channel is wide and snakes around in order to pass more current. It also has drains on both sides of the source.) The cross section below shows the internal structure of the JFET. The P region connects the source and the drain, and it is surrounded above and below by the gate's N region. (The connection to the lower N region is outside the region shown.) The JFETs in this chip are built with ion implantation, which shoots accelerated ions into the chip to produce the P and N regions. Ion implantation provides accurate control of the doping and dimensions of the P channel between the source and drain, allowing the input JFETs to be built for high performance.

Cross section of an input JFET transistor, showing the construction of the JFET.

Cross section of an input JFET transistor, showing the construction of the JFET.

Manufacturing JFET op amp ICs was difficult when they were first sold decades ago. Hybrid (two separate dies in one package) JFET op amps were introduced in 1970. These were followed shortly afterwards by monolithic (i.e. a single die) op amps, but difficulties in manufacturing consistent JFETs caused these op amps to have poor characteristics. In 1974, National Semiconductor engineers developed the ion implantation technique for fabricating consistent, high quality JFETs and used this "BIFET" technique to build better JFET op amps. Two years later Texas Instruments introduced their JFET op amps, including the TL084 which was the first four-in-one op amp using the BIFET process.4

You might have noticed that each op amp has four input JFETs on the die (forming the butterfly pattern below), even though the op amp only has two inputs. The explanation for this is that for good performance the input transistors in an op amps should have identical electrical characteristics. But unfortunately chips can have thermal gradients (i.e. hotter on one side than the other) that affect the transistor characteristics and unbalance the inputs. A standard solution used in the TL084 is that each input uses two cross-coupled transistors, diagonally opposite from each other. If one side of the chip is hotter than the other, both inputs will have an affected transistor, canceling out the effect of the temperature gradient.

To insure the input transistors are matched, each input transistor is actually two connected transistors, diagonally opposite. Wiring connects each transistor pair.

To insure the input transistors are matched, each input transistor is actually two connected transistors, diagonally opposite. Wiring connects each transistor pair.

IC component: The current mirror

There are some subcircuits that are very common in analog ICs, but may seem mysterious at first. Before explaining how the TL084 works, I'll first give a brief overview of the current mirror and differential pair circuits.

Schematic symbols for a current source.

Schematic symbols for a current source.

If you've looked at analog IC block diagrams, you may have seen the above symbols for a current source and wondered what a current source is and why you'd use one. The idea of a current source is you start with one known current and then you can "clone" multiple copies of the current with a simple transistor circuit.

The following circuit shows how a current mirror is implemented.5 A reference current passes through the transistor on the left. (In this case, the current is set by the resistor.) Since both transistors have the same emitter voltage and base voltage, they source the same current, so the current on the right matches the reference current on the left.

Current mirror circuit. The current on the right copies the current on the left.

Current mirror circuit. The current on the right copies the current on the left.

A common use of a current mirror is to replace pull-up resistors. Resistors inside ICs are both inconveniently large and inaccurate. It saves space to use a current mirror instead of a resistor whenever possible. Also, the currents produced by a current mirror are nearly identical, unlike the currents produced by two resistors.

IC component: The differential pair

The second important circuit to understand is the differential pair, the most common two-transistor subcircuit used in analog ICs.6 You may have wondered how the op amp subtracts two voltages since it's not obvious how to make a subtraction circuit. This is the job of the differential pair.

Schematic of a simple differential pair circuit. The current source sends a fixed current I through the differential pair. If the two inputs are equal, the current is split equally.

Schematic of a simple differential pair circuit. The current source sends a fixed current I through the differential pair. If the two inputs are equal, the current is split equally.

The schematic above shows a simple differential pair. The key is the current source at the top provides a fixed current I, which is split between the two input transistors. If the input voltages are equal, the current will be split equally into the two branches (I1 and I2). If one of the input voltages is a bit lower than the other, the corresponding transistor will conduct more current, so one branch gets more current and the other branch gets less. As one input continues to increase, more current gets pulled into that branch. Thus, the differential pair is a surprisingly simple circuit that routes current based on the difference in input voltages. The TL084 uses JFETS instead of bipolar transistors in the differential pair, but the principle is the same.

The internal blocks of the op amp

The internal circuitry of the TL084 op amp is similar to the 741 op amp, which has been explained in many places7, so I'll just give a brief description of the main blocks. The interactive chip viewer below provides more explanation.

The two input pins are connected to the differential amplifier, which is based on the differential pair described above. The output from the differential amplifier goes to the second (gain) stage, which provides additional amplification of the signal. Finally, the output stage has large transistors to generate the high-current output, which is fed to the output pin. The capacitor stabilizes the op amp to avoid oscillation. The current mirror at the top provides currents to other parts of the chip. The current mirror at the bottom functions as an active load increasing the gain of the differential pair.

Die for the TL084 op amp, showing the main functional units.

Die for the TL084 op amp, showing the main functional units.

Interactive chip viewer

The image and schematic8 below are an interactive exploration of the TL084. Click a component to see its location on the die and in the schematic highlighted. The box below will give an explanation of the component. The die image below shows one of the four op amps on the chip; the others are essentially identical.

Click components in the image below for more information.

How I photographed the die

Getting to the die of an integrated circuit can be difficult since integrated circuit usually come in a black epoxy package. I'd rather avoid using dangerous concentrated acid to dissolve the epoxy package and see the die. Fortunately some ICs, such as the TL084, are available in ceramic packages that can be easily opened with a chisel. The photo below shows the chip package after removing the lid. The four large capacitors are visible on the die even without a microscope.

The TL084 op amp. The ceramic package has been opened, exposing the die inside. A couple pins fell off when the package was opened.

The TL084 op amp. The ceramic package has been opened, exposing the die inside. A couple pins fell off when the package was opened.

To obtain the die photos, I used a metallurgical microscope, which shines light from above through the lens, unlike a normal microscope which shines light from below. A metallurgical microscope is the secret to getting clear photos at higher magnification, since the die is brightly illuminated. I used Hugin to stitch multiple images together into high-resolution pictures. Below is a second die photo; the bond wires are removed in this one.

Die photo of the TL084 op amp with the bond wires removed.

Die photo of the TL084 op amp with the bond wires removed.

Conclusions

Texas Instruments introduced the TL084 in 1976 as one of the first high-performance quad op amps. I was motivated to study this chip by the pretty butterfly-like patterns on the die, but found some interesting circuitry inside the chip. The butterfly-like structures turned out to be JFET transistors that improved the chip's performance by providing high impedance for the op amp inputs. If you enjoyed this look inside an analog silicon chip, you may also like my analysis of the 741 op amp and 555 timer. Follow me on Twitter at @kenshirriff for my latest blog posts, or use my RSS feed. The chip was provided by Eric Schlaepfer (@TubeTimeUS).

Notes and references

  1. You might have wondered why there is a distinction between the collector and emitter of a transistor, when the simple picture of a transistor is totally symmetrical. Both connect to an N layer, so why does it matter? As you can see from the die photo, the collector and emitter are very different in a real transistor. In addition to the very large size difference, the silicon doping is different. The result is a transistor will have poor gain if the collector and emitter are swapped. 

  2. The capacitor in the op amp is located at a special point in the circuit where the effect of the capacitance is amplified due to something called the Miller effect. This allows the capacitor to be much smaller than it would be otherwise. Given how much of the die is used for the capacitor already, taking advantage of the Miller effect is very important. 

  3. Yes, I realize that "JFET transistor" is a redundant acronym. Since some readers may not be familiar with JFETs, I want to remind them that JFETs are transistors. 

  4. For an extremely detailed history of op amps, including the development of JFET op amps in the 1970s, see Op Amp History by Walt Jung. My section on JFET op amp history is based on this source. 

  5. For more information about current mirrors, you can check Wikipedia or chapter 3 of Designing Analog Chips. If you're interested in how analog chips work, I strongly recommend you take a look at Designing Analog Chips. 

  6. Differential pairs are also called long-tailed pairs. According to Analysis and Design of Analog Integrated Circuits differential pairs are "perhaps the most widely used two-transistor subcircuits in monolithic analog circuits." (p214) For more information about differential pairs, see Wikipedia, any analog IC book, or chapter 4 of Designing Analog Chips

  7. The TL084 op amp's design is similar to the 741 op amp, which is described in Wikipedia, Operational Amplifiers, IC Op-Amps Through the Ages and UNCC class notes. See any of those sources for more details on how op amps are constructed. 

  8. The schematic is from the TL084 datasheet