Comments
Figures ▾
Tables ▾

PURPLE · Volume 11

PURPLE — Volume 11 — Building a PURPLE — Wiring, Controller and Verification

From the wiring tables to 1,650 soldered straps, a line interface that runs the cipher path both ways, a controller that only chooses which magnet to pulse, and the test that proves the machine reads the Pearl Harbor message

11.1 About This Volume

Volume 10 chose the parts. This volume puts them together. It starts with the strapping — the 1,650 connections between bank contacts and output buses that turn telephone switches into a cipher — and the cables that join the stages. It then describes the electronics: the line interface that drives the cipher path and reads its far end, the magnet drivers, and the resistor ladders that let the controller read every switch’s position. It then covers the two teletypes: the five-unit code, the DeRamp interface boards that drive their loops, and a discrete loop circuit as a fallback. It gives the controller’s logic as code, its timing, and a relay alternative that does without it, and then the complete schematic in ten sheets. It ends with verification: a bring-up sequence that tests each switch and each strap against the simulator, and an acceptance test against the published decipherment of Part 1 of the 14-part message.

The reference for all of it is the simulator, 03-outputs/tools/purple_sim.py. It holds the wiring tables of Freeman, Sullivan and Weierud (2003), prints them as wiring lists, generates the expected output of every test in this volume, and checks itself against the published material. As in Volume 10, nothing here has been built yet; the markers show where the account of the build will go.

Figure 1 — Inside PURPLE Analog No. 1 at the National Cryptologic Museum: six-level stepping switches with the strapping soldered to their bank terminals. Every contact on every cipher level carries a wire to…
Figure 1 — Inside PURPLE Analog No. 1 at the National Cryptologic Museum: six-level stepping switches with the strapping soldered to their bank terminals. Every contact on every cipher level carries a wire to one of the output buses; this is the work the wiring lists in this volume describe. — Photo: Arnold Reinhold, CC BY-SA 4.0, https://commons.wikimedia.org/wiki/File:PURPLE_analog_number_1_stepping_switches_1.jpg

11.2 The Simulator as Reference

purple_sim.py is plain Python 3 with no dependencies. Its self-test checks fifteen things against published material and must pass before any of its output is trusted:

$ python3 purple_sim.py --selftest
PASS  1 wiring tables: 4 x 25 rows, every row a permutation
PASS  2 twenties #1 position 20 is the identity [FSW p.9]
PASS  3 connection balance of Fig. 5 and p. 9 (sixes 4/5, twenties doubled x5)
PASS  4 no input repeats its output at successive positions [FSW p.19]
PASS  5 stepping sequence of Fig. 10 (slow steps at sixes 24, middle at 25)
PASS  6 all six motions: 24 alphabets of Fig. 11 and their fast/middle steps
PASS  7 daily alphabet 6 Dec 1941 and indicator 15739 -> 59317 -> 62527
PASS  8 path of ZTX -> FOV, switch by switch, as Fig. 18
PASS  9 Part 1, first 216 letters, decipher = plaintext printed in [FSW]
PASS  10 Part 1, all 1285 letters, decipher = [BN] test plaintext
PASS  11 Part 1 re-enciphered reproduces every legible intercepted letter
PASS  12 Appendix E key 13-25,23,12-32 reaches 13-1,6,3 after 200 letters [FSW p.38]
PASS  13 identity counts: sixes 25/150, twenties 15,610/312,500 [FSW p.22]
PASS  14 period of the whole machine is 15,625 letters
PASS  15 encipher/decipher round trip, all six motions, 3,000 letters each
PASS: 15/15 checks passed

The wiring tables in the file were parsed from the text of Freeman, Sullivan and Weierud’s paper (Cryptologia 27, 2003, Figs 6–9; Library copy) and agree cell for cell with the independent transcription in Brian Neal’s purple package (github.com/gremmie/purple). The Part 1 ciphertext is Frode Weierud’s transcript of the archive copy (CryptoCellar); the expected plaintext of all 1,285 letters is the one in Neal’s test suite, and the first 216 letters are also checked against the plaintext printed in the paper. One defect in the published material came to light: the paper’s Figure 11 prints the twenties letter X as “Y” in every alphabet. Y is a sixes letter and cannot appear there; with that one substitution all 480 letters of the figure agree with the tables.

The same simulator also runs in a web page, as a working front panel: PURPLE simulator (it opens in its own page). Its second panel is this replica’s operating panel as designed: the two displays, the four SET buttons, the motion selector, MODE and RESET of sheet 8, and the double plugboard of Volume 10 with its stereo cords. It is a way to rehearse the machine before it is built: patching, setting a key with SET and a typed position, and watching which switch steps on each letter. Its JavaScript engine is checked against purple_sim.py on 301 test messages.

Figure 2 — The simulator's replica panel, after the first 40 letters of Part 1: displays reading 24 01 and 13 07 (sixes, #1, #2, #3), the motion selector at 231, MODE at DECIPHER, and the plugboard patched fo…
Figure 2 — The simulator's replica panel, after the first 40 letters of Part 1: displays reading 24 01 and 13 07 (sixes, #1, #2, #3), the motion selector at 231, MODE at DECIPHER, and the plugboard patched for 6 December 1941, with the last letter's cords traced in orange and green. The panel layout arranges the parts of sheet 8 and is not yet a mechanical drawing. — Screenshot of the simulator made for this series (03-outputs/simulator/purple-simulator.html)

11.3 Strapping the Banks

11.3.1 What one strap is

Each cipher level of a switch has one input — its wiper, reached through the wiper’s brush spring — and 25 bank contacts. Each bank contact is strapped to one of the switch’s output buses: six buses for the sixes switch, twenty for a twenties stage. The wiring table says which. For the sixes, row p, column L of Volume 4’s table is the bus that contact p of level L must be strapped to, in the deciphering direction. One level is 25 straps; the sixes switch is 150; each twenties stage is 500. The machine has 1,650 straps in all, matching the “almost 2,000 wired connections” Freeman, Sullivan and Weierud count once the inter-stage wiring is added (FSW, p. 7; Library copy).

Figure 3 — One level strapped: level 5 of the sixes switch (machine letter U), the level Freeman, Sullivan and Weierud draw in their Figure 4. Each of the 25 bank contacts drops to one of six coloured output …
Figure 3 — One level strapped: level 5 of the sixes switch (machine letter U), the level Freeman, Sullivan and Weierud draw in their Figure 4. Each of the 25 bank contacts drops to one of six coloured output buses, as row p, column 5 of the sixes table directs. — Diagram drawn for this series (03-outputs/diagrams/diagrams_B.py); data from purple_sim.py

The simulator prints the lists to work from, one line per level:

$ python3 purple_sim.py --wiring sixes
# sixes, decipher wiring: input level L, bank contact P -> output bus O
L1  1:2 2:6 3:1 4:4 5:3 6:2 7:6 8:3 9:5 10:4 11:2 12:5 13:3 14:4 15:1 16:5 17:6 18:2 19:1 20:3 21:6 22:1 23:6 24:4 25:5
L2  1:1 2:3 3:5 4:3 5:6 6:1 7:5 8:6 9:4 10:5 11:1 12:4 13:1 14:2 15:6 16:4 17:2 18:3 19:2 20:1 21:5 22:3 23:4 24:6 25:2
...
$ python3 purple_sim.py --wiring t3
# t3, decipher wiring: input level L, bank contact P -> output bus O
L1  1:7 2:15 3:2 4:16 5:12 6:13 7:4 8:9 9:5 10:11 11:19 12:1 13:3 14:9 15:8 16:18 17:14 18:17 19:10 20:20 21:11 22:16 23:6 24:8 25:13
...

Read the first line as: on level 1, contact 1 goes to bus 2, contact 2 to bus 6, contact 3 to bus 1, and so on. The lists use the switch’s own contact numbering, 1 to 25. Post Office uniselectors number their contacts 0 to 24 (P.O. Telephones 3/2; Library copy); on those, cipher position 1 is contact 0 and every list entry shifts by one. On an AE Type 45, the primary switch of Volume 10, position 1 is the first bank contact after the brush step. It does not matter which physical contact is called position 1, provided the same choice is made on every level of every switch and on the sense level.

11.3.2 Method

Twenty buses per stage, each collecting 25 wires from 20 levels across two switches, is the “rat’s nest” of 1940. Three practices keep it tidy and checkable.

  1. Buses on tag strips, not in the air. Each stage gets a strip of 20 numbered tags (6 for the sixes) behind its two switches. Every strap runs from a bank contact to a tag; the bus is the tag. The inter-stage cable leaves from the same tags.
  2. Colour by bus. Twenty colours of hook-up wire, one per bus, so that a wrong strap shows as a wrong colour at the tag. The six sixes buses reuse six of them. The colour drawings at the end of this volume use the resistor code for the sixes (lead 1 brown to lead 6 blue) and the telephone 25-pair code for the twenties (lead 1 white-blue to lead 20 yellow-slate), which is how exchange wiremen told twenty-odd wires apart.
  3. One level at a time, ticked off. Print the wiring list (end of this volume), strap one level (25 wires), tick it, and test it before starting the next (below). A level done and tested is never touched again.

At the 0.2 mm² size a strap is easy to dress; slide a short sleeve over each bank terminal before soldering, since adjacent contacts are a few millimetres apart.

Figure 4 — How the Army did it in 1944: the strapping of one twenties stage of the improved PURPLE analog at the National Cryptologic Museum. The switch contacts are brought up to a red perforated terminal bo…
Figure 4 — How the Army did it in 1944: the strapping of one twenties stage of the improved PURPLE analog at the National Cryptologic Museum. The switch contacts are brought up to a red perforated terminal board, and the cross-connections are soldered across the board in a dense mat of cloth-covered wire; the empty pins at right show the grid the straps land on. A tag strip behind the switches does the same job in this build, in a form that can be checked one level at a time. — Photo: ArnoldReinhold, CC BY-SA 4.0, via Wikimedia Commons, https://commons.wikimedia.org/wiki/File:Purple_improved_analog_wiring_maze_at_National_Cryptologic_Museum.agr.jpg

11.3.3 The two switches of a stage

In each twenties stage, switch “a” carries levels for inputs 1–10 and switch “b” inputs 11–20 (Volume 10). Their straps go to the same 20 buses: the bus is a property of the stage, not of the switch. The wiring list for input level L is the same whichever switch carries it.

11.3.4 Between the stages

The stages join bus to wiper. In the deciphering direction:

  • the plugboard’s twenty twenties lines (machine letters B to Z, in order) go to the wipers of stage #3, input 1 = B, input 2 = C, … input 20 = Z;
  • the 20 buses of stage #3 go to the 20 wipers of stage #2, bus n to input n;
  • the 20 buses of #2 go to the 20 wipers of #1;
  • the 20 buses of #1 go back to the plugboard’s other side, bus n to machine letter n.

The sixes are simpler: plugboard to wipers, buses back to plugboard. Because every connection conducts both ways, these same wires carry the enciphering direction with no change at all.

Figure 5 — Between the stages on the 1944 improved analog: a row of terminal tags along the back of the machine, laced into a cable, and two plug-in connectors marked L and ROT that join the stages with heavy…
Figure 5 — Between the stages on the 1944 improved analog: a row of terminal tags along the back of the machine, laced into a cable, and two plug-in connectors marked L and ROT that join the stages with heavy cloth-covered cables. — Photo: ArnoldReinhold, CC BY-SA 4.0, via Wikimedia Commons, https://commons.wikimedia.org/wiki/File:Purple_improved_analog_stage_connectors_at_National_Cryptologic_Museum.agr.jpg

11.4 The Line Interface

The interface puts current into one plugboard line and reports which line it comes out of. It has 52 lines — the tip and ring of each of the 26 typewriter jacks (Volume 10) — and each line has both a driver and a sensor.

  • Drivers. A chain of seven 74HC595 shift registers on one SPI port feeds seven TBD62783A source-driver arrays, eight channels each. A set bit puts 24 V on that line through a 100 Ω resistor, which limits the current into a line shorted at the plugboard to about 0.24 A for the few milliseconds it is driven. The TBD62783A is rated 50 V and −500 mA per channel with clamp diodes on every output; the path draws about 10 mA.
  • Sensors. Each line also runs to ground through the LED of one channel of a TLP291-4 quad optocoupler in series with 2.2 kΩ, setting about 10 mA from 24 V. The phototransistors feed a chain of seven 74HC165 shift registers read on the same SPI port.

A letter is read like this. In decipher mode, the controller drives the tip line of the pressed key, waits 5 ms for the path to settle, and reads all 52 sensors. Exactly two must be lit: the driven line itself, whose own sensor sees its own 24 V, and one ring line — the output letter. Anything else is a fault and is reported: no ring line lit means a broken path or a wiper between contacts; two lit means a short between straps. In encipher mode the controller drives the ring line and looks for one lit tip line. The drive is then switched off, and only then may any magnet be pulsed: no wiper ever moves while current is flowing, so the contacts never break a live circuit.

11.5 Magnet Drivers

Each of the seven switches has its own magnet driver: an IRL540N logic-level MOSFET and a 1N4007 flyback diode across the coil, mounted at the coil. The IRL540N’s on-resistance is specified only from a gate voltage of 4 V, so the Pico’s 3.3 V outputs do not drive the gates directly: a 74HCT541 buffer on the 5 V rail, whose HCT inputs accept 3.3 V logic, gives each gate a full 5 V through 1 kΩ, with 100 kΩ from gate to ground. The buffer’s output enables share the line chain’s enable pin, which a pull-up holds off while the Pico boots; with the buffer off, the pull-downs hold every gate low and no magnet can fire. A Type 45’s 100 Ω coil draws 0.48 A from 48 V, so a letter, which pulses three magnets, takes about 1.5 A; the firmware never energises more than four at once. The two switches of a twenties stage have separate drivers, pulsed together, so that either can be stepped alone when re-synchronising after a fault.

Pulse timing comes from the switch data. STC’s uniselector sheet asks for a make of at least 20 ms and a break of at least 10 ms (STC/SASCO p. 564; Library copy); AE gives 18 ms to operate and 5 ms to release for its Type 45 (AE 1964, Fig. 18). The design uses 40 ms on, then at least 25 ms off before the position is read, generous on both counts. The wipers move during the release, not during the pulse.

Figure 6 — The controller and its interfaces. A Raspberry Pi Pico 2 runs the 52-line drive chain (74HC595 into TBD62783A source drivers) and sense chain (TLP291-4 optocouplers into 74HC165) on one SPI port, t…
Figure 6 — The controller and its interfaces. A Raspberry Pi Pico 2 runs the 52-line drive chain (74HC595 into TBD62783A source drivers) and sense chain (TLP291-4 optocouplers into 74HC165) on one SPI port, the MCP3208 position ADC on another, seven MOSFET magnet drivers on GPIO pins, the two teletype loops on PIO and the displays on I2C. — Diagram drawn for this series (03-outputs/diagrams/diagrams_B.py)

11.6 Reading Positions

Every switch has one level given over to reporting its position. Its 25 bank contacts are the taps of a resistor ladder: 24 equal 1 kΩ, 1 % resistors in series, with a 2 kΩ resistor at each end, between 3.3 V and ground. The level’s wiper, through its brush, goes to one channel of an MCP3208 12-bit ADC, with a 1 MΩ resistor to ground. With the wiper on contact p, the ADC sees (p + 1)/28 of 3.3 V: 0.236 V at contact 1, rising 0.118 V — about 146 counts — per position, to 3.06 V at contact 25. A 1 nF capacitor at each ADC input gives the converter a stiff source and lets an open input fall to 0 V within a few milliseconds. With the wiper between contacts, or on a broken wire, the 1 MΩ pulls the input to 0 V, below any valid reading, and the controller reports a fault.

On an AE Type 45 the 26th, brush, step reads the same way, because on it the sense wiper touches no bank contact. The controller tells the two apart by what it expects. A switch pulsed from position 25 is expected to land on the brush step, read open, and receive one more pulse, after which it must read 1; an open reading at any other moment is a fault. The extra pulse is given before the next letter is accepted, so the cipher only ever sees positions 1 to 25, and the stepping rule of Volume 4 is applied to those positions alone.

Figure 7 — The position-sense ladder on a switch's spare level. Twenty-four 1 kΩ resistors with a 2 kΩ resistor at each end divide 3.3 V; contact p sits at (p + 1)/28 of the supply. The level's wiper goes to …
Figure 7 — The position-sense ladder on a switch's spare level. Twenty-four 1 kΩ resistors with a 2 kΩ resistor at each end divide 3.3 V; contact p sits at (p + 1)/28 of the supply. The level's wiper goes to an MCP3208 channel, with 1 MΩ to 0 V so that a wiper between contacts reads as a fault. — Diagram drawn for this series (03-outputs/diagrams/diagrams_B.py)

The MCP3208 has eight channels: seven read the switches, one each, and the eighth watches the 48 V rail through a 150 k/10 k divider, so that a blown magnet fuse is reported as such rather than as seven missed steps. The controller reads all eight after every step and converts each reading to a position by rounding. This reading, not the controller’s count, is what the displays show and what the log records.

11.7 The Teletype Interface

Each teletype of Volume 10 works on two 60 mA current loops, a keyboard loop through its keyboard contacts and a printer loop through its selector magnet. The main build makes those loops with two of Mike Douglas’s DeRamp Model 15 interface boards, one per teletype, and talks to the boards over UART0 at 9600 baud in Baudot pass-through, so that the controller keeps all the teletype logic and the boards only drive the loops (sheet 9). A discrete loop circuit, with its own 150 V supply, remains as the fallback (sheet 10).

11.7.1 The code

A teletype character is a start unit (space, no current), five code units and a stop unit (mark, current). At 60 words a minute a unit is 22 ms, 45.45 baud, and the stop unit is 1.42 units long — the “7.42 unit code” of Teletype’s own catalogue (Teletype P.D. 130, 1969). The letters case of the International Telegraph Alphabet No. 2, which the American Teletype code shares, is below; 1 is mark, and unit 1 is sent first (Wikipedia, “Baudot code”).

Table 1 — The code

LetterUnits 1–5LetterUnits 1–5LetterUnits 1–5FunctionUnits 1–5
A11000J11010S10100LTRS11111
B10011K11110T00001FIGS11011
C01110L01001U11100space00100
D10010M00111V01111carriage return00010
E10000N00110W11001line feed01000
F10110O00011X10111blank00000
G01011P01101Y10101
H00101Q11101Z10001
I01100R01010

PURPLE’s ciphertext and plaintext are the 26 letters, so the cipher traffic never leaves the letters case. Three things need the figures case. Garbles print as a hyphen, which is FIGS-A; the controller sends FIGS, A and, before the next letter, LTRS. Key setting: the top row Q W E R T Y U I O P gives the digits 1 to 0 in figures case, so a position is typed on the input machine as FIGS, the digits, LTRS, followed by SET on the panel. Hyphen as garble on input: on the input machine, FIGS-A — the hyphen — is the garble key, matching the hyphens of the archive transcript; space, carriage return, line feed, LTRS and blank are ignored and do not step the machine, so ciphertext can be typed in groups of five exactly as it stands on the intercept.

Two figures-case codes have side effects and are never sent: on Model 15s fitted with the motor-control feature, FIGS-H stops the motors of every machine on the circuit (Teletype S-5359, 1944), and US sets ring their bell on FIGS-S (P.D. 130) — which the controller uses on purpose, once, when it stops on a fault. Some machines also drop back to letters on every space (“unshift on space”); the controller always sends LTRS before a letter that follows anything in figures case, so it does not depend on the setting, and it can be told whether the input machine does it.

The output is laid out as the intercept sheets were: groups of five letters separated by a space, twelve groups to the line — 71 characters, inside the 72 to which message printers were adjusted (Teletype Specification S-5409, 1943) — and each line ends carriage return, line feed, LTRS, the last two giving the carriage two character times to return before the next letter is printed.

LTRS_CASE = "_E\nA SIU\rDRJNFCKTZLWHYPQOBG#MXV*"   # index = code, unit 1 (sent first) = LSB
CODE = {c: i for i, c in enumerate(LTRS_CASE) if c.isalpha()}
LTRS, FIGS, SPACE, CR, LF = 0x1F, 0x1B, 0x04, 0x08, 0x02

def from_keyboard(code):                         # each code the input teletype sends
    global shift
    if code in (LTRS, FIGS):
        shift = code
        return None
    if code in (SPACE, CR, LF, 0):
        if code == SPACE and UNSHIFT_ON_SPACE:
            shift = LTRS
        return None                              # spacing never steps the machine
    ch = LTRS_CASE[code]
    if shift == FIGS:
        if ch == "A":
            return GARBLE                        # the hyphen key
        if ch in "QWERTYUIOP":
            return DIGIT, "1234567890"["QWERTYUIOP".index(ch)]
        return None                              # other figures are ignored
    return ch                                    # a letter for the cipher path

def to_printer(ch):                              # each output letter, or "-" for a garble
    global out_shift, column
    if ch == "-":
        send(FIGS); send(CODE["A"]); out_shift = FIGS
    else:
        if out_shift != LTRS:
            send(LTRS); out_shift = LTRS
        send(CODE[ch])
    column += 1
    if column % 60 == 0:
        send(CR); send(LF); send(LTRS); out_shift = LTRS
    elif column % 5 == 0:
        send(SPACE)

send puts a code in the transmit queue; in the main build each code goes out on UART0 as one byte, the code in its low five bits, whenever board B’s handshake allows. The output machine prints about six characters a second, and the machine enciphers up to ten letters a second, so the queue absorbs the difference; a typist on the input machine is limited to the same six characters a second and never gets ahead of the switches.

11.7.2 The DeRamp boards

The board is described on its author’s page and in its manual and schematic (DeRamp; manual, Sep 2026; schematic Rev A, 2022; video, “Interfacing the Teletype Model 15”). From 15 V, through a 50 Ω trimpot and a resistor R2 — 0 Ω for a pulling-magnet selector of 200 to 220 Ω, 150 Ω 1 W for a holding magnet of about 55 Ω — it drives the selector magnet through a 250 V MOSFET. When the loop opens for space, the magnet’s collapsing field charges two 1 µF, 250 V capacitors to 40 to 60 V through fast diodes; at the next mark a solid-state relay puts that charge back into the loop, so the current rises quickly without a high-voltage supply. The keyboard jack is a 15 V sense circuit read by the PIC. The trimpot is set to 60 mA with a meter across the current-sense jumper J2, which “must ALWAYS have a shorting jumper or a current meter in place”.

Wiring. Board A (A901) takes the input teletype, TT1: its keyboard jack to TT1’s keyboard contacts, its printer jack to TT1’s selector magnet. Board B (A902) takes the output teletype, TT2: its printer jack to TT2’s selector; its keyboard jack to TT2’s keyboard if it is a KSR, or a shorted ¼-in plug, which holds the keyboard input at mark. The manual requires each teletype’s two loops to be wired separately, not in series, and nothing else in either loop.

The host side. The board’s RJ-14 port carries ground, R (data in), T (data out) and H (handshake out). R enters through 10 kΩ, with 51 kΩ to ground and clamp diodes, into the PIC’s comparator: it is built for true RS-232 polarity. T and H leave the PIC through 220 Ω at 0 and 5 V, in RS-232 sense (schematic). The Pico’s 3.3 V UART is the other way up, so a MAX3232 on a small adapter board (U901, on +5 V from J10, with its four 0.1 µF charge-pump capacitors and a fifth for decoupling) inverts both directions and makes the negative drive. One UART serves both boards: GP0 goes through the MAX3232’s first driver to board B’s R; board A’s T comes back through its first receiver to GP1; board B’s H comes back through the second receiver to GP28; and the second driver, its input tied high, holds board A’s R at mark. Board A’s H and board B’s T are not connected. The receivers’ 5 V outputs reach GP1 and GP28 through the 10 k/15 k dividers R201/R202 and R205/R206.

Flow control. The host runs at 9600 baud and the teletype at about six characters a second, so the board throttles the host: “The host is throttled by a flow control line from the interface board.” The RP2350’s UART0 CTS pins are already in use, so the controller polls GP28 and sends the next byte only while board B’s handshake, inverted by the MAX3232, reads low. Its own queue holds the backlog.

Settings. Each board is set from a PC terminal through its monitor before it is connected to a teletype — “within three seconds” of power-up press ESC, answer N to the firmware prompt — and the settings are saved in the board.

Table 2 — The DeRamp boards

Menu itemBoard A (TT1, input)Board B (TT2, output)Why
1 Full/Half DuplexHALF (or the J6 jumper)FULLA prints each keystroke on TT1, as the input typewriter did
2 Printer TranslateBaudot pass-throughBaudot pass-throughthe controller sends ITA2 codes
3 Keyboard TranslateBaudot pass-throughBaudot pass-throughthe controller decodes the keyboard itself
4 Auto CR/LF at column0 (off)0 (off)the controller ends each line after twelve groups
5 CR DelayONONLTRS padding after a carriage return
6 Character Timing7.427.42the Model 15’s own timing
7 Voltage BoostOFFOFFonly if the range is narrow, with L1 fitted
8 Unshift On Spacematch the machinematch the machinethe controller sends LTRS before letters anyway
9 WPM606045.45 baud

Menu items and defaults from the DeRamp manual. The manual does not say whether auto CR/LF and CR delay act in pass-through mode; switching auto CR/LF off removes the question, and CR delay at worst adds LTRS characters, which print nothing.

Why pass-through and not ASCII. In ASCII mode the board would translate, and the controller could send ordinary text. Pass-through is chosen because the replica needs control of every code: the garble hyphen and its LTRS, FIGS-H never sent, the bell on a fault, and the input decoded exactly as typed, including FIGS-A as the garble key and digits for key setting. In ASCII mode the board keeps “a separate shift state for the printer and the keyboard” and adds its own escape sequences on the BLANK key, which are useful at a computer console and a hindrance here.

11.7.3 Fallback: a discrete loop interface

For a machine the DeRamp board does not suit — a Model 28 in a configuration its author has not cleared, a selector that cannot be converted from polar working, or no boards to hand — sheet 10 is a self-contained loop interface on its own board. It plugs into the same J10, so the controller changes only its firmware setting: the loops run on PIO instead of UART0, and GP28 reads loop current instead of a handshake. The code above is unchanged; only send and the receiver differ.

11.7.3.1 Serial at 45.45 baud

Without the DeRamp boards the controller has to make 45.45 baud itself, and the RP2350’s hardware UARTs cannot be divided down that far: their baud-rate divisor tops out at 65,535 sixteenths of the peripheral clock, about 143 baud from 150 MHz. The two fallback loops therefore run on PIO state machines, which are free to take any pins. Each runs at 64 cycles per code unit — a clock of 2,909 Hz, a divider of about 51,563 — so that a unit is 64 cycles, the start unit 64 and the stop unit 96: five data bits, no parity, one and a half stop units (5N1.5), which a receiving teletype accepts because any stop unit of at least 1.42 units will do. The receiver waits for the line to drop to space, waits 96 cycles to the middle of unit 1, samples five units 64 cycles apart, and checks that the stop unit is mark. A space lasting more than about 150 ms is not a character: it is the input machine’s BREAK key or an open keyboard loop, and the controller reports it as such. The same PIO program, with its divider changed, runs a Model 28 geared for 75 or 100 words a minute (about 57 or 74 baud).

11.7.3.2 The keyboard loop

The keyboard loop is the input machine’s sending circuit — its keyboard contacts — in series with its own selector magnet, so that it prints what is typed, as the input typewriter of the Japanese machine did. On a Model 15 the sending and receiving jacks are joined in series; a Model 28 KSR is normally wired that way already. The loop runs from +LOOP through fuse F6 and the 2.4 kΩ ballast resistor R1002 to TB1001.1, through the teletype, back on TB1001.2, through the LED of optocoupler U1001 and the 10 Ω current-sense resistor R1006, to 0V_LOOP.

A PC817’s LED is rated for 50 mA, so R1004, 22 Ω, sits across it: of the 60 mA, about 52 mA passes the resistor and about 8 mA the LED. The phototransistor is wired as an emitter follower, collector to +5 V and emitter to R1010 (10 kΩ to 0 V), so its output is high when current flows — mark — and low on space. With a current-transfer ratio of at least 50 %, 8 mA in the LED gives at least 4 mA, against the 0.5 mA R1010 needs. The output reaches the logic board on J10.4 and the Pico’s GP1 through the existing 10 k/15 k divider, R201 and R202, at 3.0 V. Mark is high, as a UART line idles, so the PIO receiver needs no inversion.

11.7.3.3 The printer loop

The printer loop runs from +LOOP through F7, the ballast R1003, the LED of U1002 (with its own 22 Ω shunt, R1005) and TB1001.3 to the output machine’s selector magnet, and back on TB1001.4 to the drain of Q1001, an IRF840 rated 500 V. Q1001’s source returns to 0V_LOOP through R1007, 10 Ω.

Q1001 is on unless told otherwise. R1008, 470 kΩ from +LOOP, feeds its gate about 0.3 mA, and a 12 V zener, D1002, holds the gate at 12 V above the source. The phototransistor of U1003 sits across gate and source; when its LED lights, it pulls the gate down and the loop opens: space. The LED runs from +3V3 through R1009, 390 Ω, into GP0, about 5 mA when GP0 is low (the pin’s drive is set to 8 mA). GP0 high — the UART’s idle state — leaves the LED dark and the loop at mark. So does a Pico that is unpowered, booting or crashed: the output teletype sits quietly at mark instead of “running open”, the endless clatter of a teletype whose loop is broken.

When Q1001 opens, the selector magnet’s stored energy has to go somewhere. D1001, a 1.5KE300A transient suppressor from drain to 0V_LOOP, clamps the drain at about 300 V; the current then falls in about 1.6 ms, as quickly as it rises, and Q1001 never sees more than about 300 V of its 500 V rating. U1002 reports the printer loop’s current on J10.7 to GP28, through R205 and R206 (the pin that carries the board’s handshake in the main build). Whenever the transmitter is idle at mark, GP28 must read high; if it reads low, the loop is open — F7, TB1001 or the teletype’s plug — and the controller says so instead of sending letters into nothing.

11.7.3.4 The loop supply

T1001, a Triad N-68X isolating transformer with its primaries in parallel for 120 V mains, gives 115 V at up to 50 VA from a primary fused at 500 mA (F5). BR1001, a 600 V bridge, and C1001, 220 µF 250 V, make about 160 to 185 V DC with the loops open and about 150 V with both running. The loops take 2 × 60 mA = 0.12 A, which puts 4.7 V of 120 Hz ripple on C1001 — ±1.6 % on the loop current. R1001, 47 kΩ 2 W, bleeds C1001 below 50 V within about 15 s of switch-off.

The ballast resistors set the current: (150 V − 3.3 V across a 55 Ω magnet − 1.2 V across the opto shunt − 0.6 V across the sense resistor) ÷ 60 mA = 2.4 kΩ. Each dissipates 8.7 W, so each is a 25 W aluminium-housed resistor bolted to the chassis; the traditional “2K 10W resistor” of a 120 V supply “will get quite hot” (Aetheric). With the inductance of a selector magnet, about 4 H (Trammell Hudson), and 2.46 kΩ in the loop, the current rises with a time constant of 1.6 ms, comfortably inside a 22 ms unit. TP1001 and TP1002, measured against 0V_LOOP, read 0.60 V at 60 mA; if the mains or the transformer put the current outside 57 to 63 mA, the ballast is changed to 2.2 kΩ or 2.7 kΩ.

A constant-current regulator in place of each ballast — for example a depletion-mode MOSFET with a source resistor — would hold 60 mA whatever the mains did, and some loop supplies are built that way; it dissipates the same 8 W and gains little here. Teletype’s own answer, the 177010 Selector Magnet Driver, drove a Model 28 or Model 15 selector from a 40 V transistor supply with a circuit to shorten the marking pulse’s rise (Teletype 177010 description); a regenerative interface board of the same kind has been built for the Model 15 (Deramp). The main build’s DeRamp boards are a descendant of that idea.

11.8 The Controller’s Logic

The controller’s job, letter by letter, is short. Each letter arrives from from_keyboard above (or from the fallback keyboard) and each result goes to to_printer. In outline (MicroPython-style; the real code adds debounce, the transmit queue and error recovery):

FAST, MIDDLE, SLOW = motion_selector()          # e.g. motion 4 -> ("t2", "t3", "t1")
STAGE = {"sixes": ["S"], "t1": ["1a", "1b"], "t2": ["2a", "2b"], "t3": ["3a", "3b"]}

def which_twenties_steps(pos):
    # decided from the positions BEFORE anything moves (Volume 4)
    if pos["sixes"] == 24 and pos[MIDDLE] == 25:
        return SLOW
    if pos["sixes"] == 25:
        return MIDDLE
    return FAST

def one_letter(key):
    pos = read_all_positions()                  # from the sense ladders
    check(pos == expected)                      # a missed step stops the machine here
    if key == GARBLE:                           # SPACE: step without enciphering
        out = "-"
    else:
        out = path_lookup(key, mode)            # drive one line, read the far side
    stage = which_twenties_steps(pos)
    moved = STAGE["sixes"] + STAGE[stage]
    pulse(moved, on_ms=40, off_ms=25)
    absorb_brush_step(moved, pos)               # Type 45: any switch that left 25 now reads
                                                # open on its brush step; pulse it once more
    expected = advance(pos, stage)              # what the ladders must read next time
    log(n, key, out, pos)                       # n,in,out,sixes,t1,t2,t3
    to_printer(out)                             # the output teletype
    return out

path_lookup is the only place a letter is produced, and it produces it by sensing which wire the current arrived on; the controller holds no copy of the wiring tables in the switch build. advance adds one to the sixes and to the chosen stage, wrapping 25 to 1, and check compares the next reading with it. absorb_brush_step does nothing on switches without a brush step; on Type 45s it checks that every switch that stood at 25 now reads open, pulses those switches once more and waits for the ladders to read 1. On a mismatch the machine stops, rings the output teletype’s bell, prints the position it expected and the one it found, and refuses further letters until the operator re-synchronises: one SET press steps a lagging switch, and the log shows exactly which letter was affected.

Setting a key. Pressing SET on a switch makes the controller pulse it, one step at a time with the normal timing, until its ladder reads the position typed on the input teletype (FIGS, the digits from the top letter row, LTRS); holding SET steps it continuously. The brush step is absorbed here too, so a switch never rests on it. The 1944 analog had start-position buttons on its panel for the same purpose. With the two switches of a stage stepped together, they always agree; if a ladder shows they do not, the lagging one is stepped alone.

Figure 8 — One letter in decipher mode. The input line is driven for about 12 ms and the output read in the middle of that window; the drive is off before any magnet is energised. The sixes magnet and one twe…
Figure 8 — One letter in decipher mode. The input line is driven for about 12 ms and the output read in the middle of that window; the drive is off before any magnet is energised. The sixes magnet and one twenties stage's magnets are held for 40 ms; the wipers move on release; the sense ladders are checked about 25 ms later. A letter takes about 100 ms, so the machine runs at up to ten letters a second; once in 25 letters a switch leaving position 25 needs one more pulse on its brush step, adding 65 ms. — Diagram drawn for this series (03-outputs/diagrams/diagrams_B.py)

11.8.1 The relay alternative

The SIS analog chose the stepping switch with contacts, and a replica can too. Wire out contacts 24 and 25 of a spare level on the sixes switch and contact 25 of a spare level on each twenties stage. A three-pole, six-way motion switch connects “fast”, “middle” and “slow” to the three stage magnets. The stepping pulse, from a cam or a key contact, goes to the sixes magnet and to the “fast” stage, unless the sixes’ contact 25 is made, which diverts it to “middle”, or the sixes’ contact 24 and the middle stage’s contact 25 are both made, which diverts it to “slow” — two relays and the motion switch. Because the contacts are read while the wipers stand still, before the pulse, the “latched” condition of Volume 4 comes for free. With Type 45s, one spare level per switch with all 25 contacts strapped together absorbs the brush step: when its wiper finds no contact, a relay sends that switch one more pulse. This is close to how the 1940 machine worked; it gives up the controller’s missed-step detection, its logging and its quick key-setting.

Figure 9 — The front of the improved PURPLE analog at the National Cryptologic Museum, with the museum's label: "The analog to the Japanese diplomatic cipher, called PURPLE by the U.S. Army cryptanalysts, was…
Figure 9 — The front of the improved PURPLE analog at the National Cryptologic Museum, with the museum's label: "The analog to the Japanese diplomatic cipher, called PURPLE by the U.S. Army cryptanalysts, was first built in 1940 by the U.S. Army's Cryptanalytic Branch." The row of sockets along the top of the panel is the plugboard. — Photo: Arnold Reinhold, CC BY-SA 4.0, https://commons.wikimedia.org/wiki/File:Purple_improved_analog_left_at_National_Cryptologic_Museum.agr.jpg

11.9 The Complete Schematic

The ten sheets below are the whole machine, wire for wire, at the level a builder solders from. Every part has a reference designator, and every connection between assemblies — logic board, switch rack, plugboard, panel, loop board and teletypes — runs through a named connector, so a fault found on one sheet can be followed onto the next. The strapping is the one place the drawing stops short: 1,650 straps are not redrawn, and sheet 7 shows the stack at the level of switches and buses, with one level strapped in full as the pattern for the rest; the strap-by-strap lists come from the simulator, as described above.

Designators follow the sheets: 2xx on the controller sheet, 3xx the line interface, 5xx the magnet drivers, 6xx position sense, 8xx the panel, 9xx the teletype interface and 10xx the fallback loop circuit; the two DeRamp boards are A901 and A902, and the teletypes themselves are TT1 (input) and TT2 (output). The seven stepping switches are SS1 (sixes), SS2 and SS3 (#1 “a” and “b”), SS4 and SS5 (#2), SS6 and SS7 (#3); their bus tag strips are TS1 (sixes) and TS2 to TS4 (#1 to #3). Where the text above leaves a value open, the schematic chooses one: a 3.3 V regulator (LD1117V33) for the logic rail, so that the Pico’s own regulator is not loaded; a 100 Ω resistor in series with every line driver; 1 nF at each ADC input; an eighth ADC channel watching the 48 V rail; a 74HCT541 buffer giving the MOSFET gates 5 V rather than 3.3 V; panel buttons and the fallback keyboard read through a chain of 74HC165 shift registers rather than a matrix, of which only the first is fitted in the teletype build; the teletype boards on UART0 at 9600 baud through a MAX3232, with board B’s handshake polled on GP28, which uses the last of the Pico 2’s 26 GPIO pins; two four-digit displays at I2C addresses 0x70 and 0x71; fuses of 3.15 A, 500 mA and 3.15 A on the 48 V, 24 V and 5 V outputs; and, for the fallback loops only, an isolated supply of about 150 V with a 500 mA primary fuse, a 100 mA fuse and a 2.4 kΩ, 25 W ballast in each loop, and optocouplers between every loop and the logic.

Figure 10 — Sheet 1, power and interconnect. A fused, switched IEC inlet feeds the three supplies; each output has its own fuse (F2-F4) and their returns meet at one star point, E1, bonded once to the chassis.…
Figure 10 — Sheet 1, power and interconnect. A fused, switched IEC inlet feeds the three supplies; each output has its own fuse (F2-F4) and their returns meet at one star point, E1, bonded once to the chassis. T1001 and F5, the isolated loop supply, are fitted only for the discrete fallback. The table lists the harnesses: J5 (magnets) and J6 (sense) to the switch rack, J7 and J8 (typewriter tips and rings) to the plugboard, J12 and J13 (machine tips and rings) from the plugboard to the rack, J9 to the panel, J10 to the serial adapter (or a fallback loop board or printer), J901 and J902 from the adapter to the two DeRamp boards, the boards' ¼-in loop cords to the teletypes, and J11 for the fallback's second line interface. — Diagram drawn for this series (03-outputs/diagrams/schematic_purple.py)
Figure 11 — Sheet 2, the controller. The Raspberry Pi Pico 2 with every header pin assigned: UART0 on GP0-GP1 for the two teletype boards (PIO in the fallback), SPI0 on GP2-GP4 with latch, load and output-enab…
Figure 11 — Sheet 2, the controller. The Raspberry Pi Pico 2 with every header pin assigned: UART0 on GP0-GP1 for the two teletype boards (PIO in the fallback), SPI0 on GP2-GP4 with latch, load and output-enable on GP5-GP7 for the line chain, I2C0 on GP8-GP9 for the displays, SPI1 on GP10-GP13 for the MCP3208, GP14-GP20 for the seven magnet gates, GP21, GP22 and GP27 for the button chain, GP26 (ADC0) for the motion selector and GP28 for board B's handshake (the loop-current monitor in the fallback). The MAX3232's 5 V outputs reach GP1 and GP28 through 10 k/15 k dividers. The logic rail comes from an LD1117V33; the Pico takes 5 V into VSYS through a Schottky diode. — Diagram drawn for this series (03-outputs/diagrams/schematic_purple.py)
Figure 12 — Sheet 3, the line interface. Line 1 (TWTIPA) in full: a 74HC595 bit drives a TBD62783A output, which puts 24 V on the line through 100 Ω; the line's sensor is one channel of a TLP291-4 in series wi…
Figure 12 — Sheet 3, the line interface. Line 1 (TW_TIP_A) in full: a 74HC595 bit drives a TBD62783A output, which puts 24 V on the line through 100 Ω; the line's sensor is one channel of a TLP291-4 in series with 2.2 kΩ, whose phototransistor pulls a 74HC165 input low. Below, the chains: seven 595s into seven TBD62783As, thirteen optocouplers, seven 165s, and the J11 expansion connector at the end of both chains. — Diagram drawn for this series (03-outputs/diagrams/schematic_purple.py)
Figure 13 — Sheet 4, the line map. All 52 lines — the typewriter-row tips A-Z (lines 1-26) and rings A-Z (27-52) — with their connector pin and every chip pin they use: 74HC595 output, TBD62783A input and outp…
Figure 13 — Sheet 4, the line map. All 52 lines — the typewriter-row tips A-Z (lines 1-26) and rings A-Z (27-52) — with their connector pin and every chip pin they use: 74HC595 output, TBD62783A input and output, TLP291-4 channel and 74HC165 input. — Diagram drawn for this series (03-outputs/diagrams/schematic_purple.py)
Figure 14 — Sheet 5, the magnet drivers. Seven identical channels: a Pico GPIO drives one input of a 74HCT541 buffer on 5 V, whose output drives an IRL540N gate through 1 kΩ with 100 kΩ to ground; the buffer i…
Figure 14 — Sheet 5, the magnet drivers. Seven identical channels: a Pico GPIO drives one input of a 74HCT541 buffer on 5 V, whose output drives an IRL540N gate through 1 kΩ with 100 kΩ to ground; the buffer is disabled with the line chain while the Pico boots; the drain runs through J5 to the coil on the rack, which has its 1N4007 flyback diode across it at the coil. A 470 µF capacitor holds up the 48 V rail during a three-magnet pulse. — Diagram drawn for this series (03-outputs/diagrams/schematic_purple.py)
Figure 15 — Sheet 6, position sense. The 25-tap ladder on a switch's sense level (level 7 on the sixes, level 11 on each twenties switch), its wiper through J6 to an MCP3208 channel with 1 MΩ and 1 nF to groun…
Figure 15 — Sheet 6, position sense. The 25-tap ladder on a switch's sense level (level 7 on the sixes, level 11 on each twenties switch), its wiper through J6 to an MCP3208 channel with 1 MΩ and 1 nF to ground, the eighth channel's 48 V monitor, and the reading expected at every position. An open reading is the Type 45's brush step after position 25, or a fault at any other time. — Diagram drawn for this series (03-outputs/diagrams/schematic_purple.py)
Figure 16 — Sheet 7, the cipher path in the deciphering direction. The plugboard's typewriter and machine rows with one cord in place; the sixes switch SS1 with its six-tag bus strip; the three twenties stages…
Figure 16 — Sheet 7, the cipher path in the deciphering direction. The plugboard's typewriter and machine rows with one cord in place; the sixes switch SS1 with its six-tag bus strip; the three twenties stages, each two switches strapped to one 20-tag bus strip, chained #3 to #2 to #1 and back to the plugboard. Below, one level in full: SS6 (#3a) level 1, its 25 contacts strapped to the bus the wiring table gives. — Diagram drawn for this series (03-outputs/diagrams/schematic_purple.py)
Figure 17 — Sheet 8, the operating panel. The four SET buttons, RESET and the mode toggle each have their own input of U801, a 74HC165 on three Pico pins; U802-U805 and 29 keys are fitted only for the fallback…
Figure 17 — Sheet 8, the operating panel. The four SET buttons, RESET and the mode toggle each have their own input of U801, a 74HC165 on three Pico pins; U802-U805 and 29 keys are fitted only for the fallback keyboard, chained behind it, with R809 holding the chain's end low when they are absent. The motion selector taps a seven-resistor ladder read on ADC0; two HT16K33 four-digit displays sit on I2C; a fallback thermal printer takes 5 V and the loop connector J10 in place of the loop board. — Diagram drawn for this series (03-outputs/diagrams/schematic_purple.py)
Figure 18 — Sheet 9, the teletype interface of the main build. J10 feeds a small serial adapter: U901, a MAX3232 on +5 V with its charge-pump capacitors, inverts the Pico's UART0 to RS-232 levels. Its first dr…
Figure 18 — Sheet 9, the teletype interface of the main build. J10 feeds a small serial adapter: U901, a MAX3232 on +5 V with its charge-pump capacitors, inverts the Pico's UART0 to RS-232 levels. Its first driver sends GP0 to board B (A902), its first receiver brings board A's (A901) data to GP1, its second receiver brings board B's handshake to GP28, and its second driver holds board A's input at mark. Each DeRamp board, on its own 15 V adapter, drives one teletype's keyboard and printer loops on ¼-in jacks: A901 the input machine TT1 in half duplex, so it prints what is typed, and A902 the output machine TT2. The table gives each board's monitor settings, Baudot pass-through both ways. — Diagram drawn for this series (03-outputs/diagrams/schematic_purple.py); DeRamp board after Mike Douglas's schematic Rev A, https://deramp.com/model15_interface.html
Figure 19 — Sheet 10, the fallback: a discrete loop interface for machines the DeRamp board does not suit. The loop supply: T1001 isolating transformer, BR1001 bridge and C1001 give about 150 V, floating. The …
Figure 19 — Sheet 10, the fallback: a discrete loop interface for machines the DeRamp board does not suit. The loop supply: T1001 isolating transformer, BR1001 bridge and C1001 give about 150 V, floating. The keyboard loop runs through F6, ballast R1002, the input teletype TT1's keyboard contacts and selector magnet, and the LED of U1001, whose emitter-follower output is LOOP_RXD; the printer loop runs through F7, ballast R1003, U1002 (the current monitor), the output teletype TT2's selector magnet and Q1001, which R1008 and D1002 hold on (mark) unless U1003, lit from GP0, pulls its gate down (space). D1001 clamps the magnet's kick; TP1001 and TP1002 read 0.60 V at 60 mA. — Diagram drawn for this series (03-outputs/diagrams/schematic_purple.py)

The fallback of Volume 10 uses the same sheets with the switch rack left out: its second line interface — another seven 74HC595s and TBD62783As, thirteen TLP291-4s and seven 74HC165s — chains on at J11, and the plugboard’s J12 and J13 go to it instead of to the rack.

11.10 Bringing It Up

The machine is brought up in stages, each tested before the next is built on it. If the all-electronic fallback (Volume 10) was built first, each switch stage replaces its simulated counterpart in turn, and every test below can compare the real stage against the simulated one.

11.10.1 The teletypes and their interface boards

The teletypes come first, because every later test types on one and reads the other. Each teletype has been cleaned, oiled and run on its own, and its keyboard and printer loops wired as two separate loops, before it is connected (Restoring a Teletype). The DeRamp manual sets the order: board first, teletype after.

  1. Build and power each board alone. Fit R2 for the machine’s selector (0 Ω pulling, 150 Ω 1 W holding), leave L1 out, fit the J2 jumper, and check the regulator’s 5 V with nothing plugged in.
  2. Configure from a PC. Connect each board to a PC terminal (9600 8N1, hardware handshake), press ESC within three seconds of power-up, answer N, and set the menu as in the table above: board A half duplex, board B full duplex, both Baudot pass-through both ways, auto CR/LF 0, timing 7.42, boost off, 60 wpm. Type X to save.
  3. Set the loop current. With a meter across J2 in place of the jumper and the trimpot at half-way, plug in the teletype’s printer cord with the teletype switched off and power the board: the selector armature clicks in, and the trimpot is set for 60 mA. Refit the jumper. Do this for both machines.
  4. Serial adapter. Plug J901 and J902 into the adapter and P10 into J10. With the controller in a test mode, board B’s handshake must read on GP28, and a byte sent on GP0 must reach board B only.
  5. Output teletype. Start TT2’s motor; it must stand silent at mark. Send a line of RYRY… — R is 01010 and Y 10101, so every code unit reverses from one character to the next — then THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG and a line of figures, as Baudot bytes. A machine that prints RYRY cleanly is in synchronism; take a range with the range finder (Inside the Teletype Mechanism) and set it in the middle. Only if the range stays narrow, fit L1 and try the voltage boost.
  6. Input teletype. Type the alphabet, the figures row and a garble on TT1: TT1 prints each key as it is typed (board A’s half duplex), and the controller’s log must show the same codes. Press BREAK and check that the controller reports it and recovers.
  7. Copy. In the controller’s copy mode, every letter typed on TT1 is printed on TT2 in groups of five, twelve groups to a line, with nothing passing through the cipher path. This is the I/O the rest of the bring-up rests on.

With the discrete fallback (sheet 10) instead, steps 1 to 4 become: measure the supply alone (+LOOP 160 to 185 V, 0V_LOOP open to chassis and E1, C1001 below 50 V within 15 s of switch-off); run the printer loop into a 56 Ω, 1 W dummy load and trim the ballast for 0.60 V at TP1002 with GP28 high, then hold GP0 low and see the current and GP28 fall; and check TP1001 for 60 mA with TT1 connected.

11.10.2 Each switch alone

Before any strapping, mount each switch, wire its magnet driver and its sense ladder, and step it through 25 full cycles while the controller logs the ladder after each pulse — 650 pulses on a Type 45, whose cycle of 25 positions includes a 26th, brush, step. Every reading must be the previous one plus one, then open on the brush step, then 1. Any repeat is a missed step; any jump of two is a double step. Clean, adjust and lubricate until 25 cycles run clean three times, then repeat at ten steps a second. A switch that cannot do this will not do it later.

11.10.3 Each level as it is strapped

After strapping a level, step the switch to each position in turn and check continuity from the level’s wiper to the bus the list names. The controller can do this automatically if the stage is temporarily wired with its buses to the sense chain: drive the wiper’s line, step through 25 positions, and compare the lit bus with the list. Twenty-five probes test the level’s 25 straps.

11.10.4 Each stage in the machine: the sweep

With the whole path connected and the plugboard plugged straight through (cord A to A, B to B and so on), hold three switches still and step the fourth through all 25 positions, measuring the complete 26-letter alphabet at each. The controller measures an alphabet by driving each of the 26 input lines in turn. The simulator gives what each alphabet must be:

$ python3 purple_sim.py -k 1-1,1,1-12 --sweep t3
t3     in : AEIOUYBCDFGHJKLMNPQRSTVWXZ
1         : EAIUOYRWKHCSJZDPVTXLMBGNFQ
2         : EAIUOYFVNQPTXHSWLMJRKCDZBG
3         : EAIUOYQKCPSWMJLNZFTHRDBXGV
4         : EAIUOYDHPLMCZWBQGXNKJSFVTR
...

Read the first row as: with every switch at 1 and #3 at 1, typing machine letter A prints E, E prints A, I prints I, B prints R, and so on. The six sixes letters do not change down the column, because only #3 moves. Because the other two twenties stages hold one fixed permutation throughout the sweep, every one of #3’s 500 straps is exercised once, and any wrong strap shows as a wrong letter in a row whose position and input identify it. Four sweeps (--sweep sixes, t1, t2, t3), 100 alphabets in all, test all 1,650 straps.

11.10.5 Stepping

With a straight plugboard, set the key 21-1,25,5 and motion 123 and press the garble key eight times. The display and log must follow Volume 4’s stepping figure, which the simulator prints:

$ python3 purple_sim.py -k 21-1,25,5-12 --steps 7
letter  sixes  #1  #2  #3   next to step
     1     21   1  25   5   sixes + #1 (fast)
     2     22   2  25   5   sixes + #1 (fast)
     3     23   3  25   5   sixes + #1 (fast)
     4     24   4  25   5   sixes + #3 (SLOW)
     5     25   4  25   6   sixes + #2 (middle)
     6      1   4   1   6   sixes + #1 (fast)
     7      2   5   1   6   sixes + #1 (fast)

Repeat for all six motions, and run one long test of 15,625 garbles from 1-1,1,1 to confirm that the machine comes back to 1-1,1,1 after exactly one period, and not before. At ten letters a second that takes 26 minutes, and it exercises every switch through every position many times.

11.11 Verification Against the Simulator

11.11.1 The log

The controller logs one line per letter: letter number, input, output, and the positions of the four switches before the letter, read from the ladders. The simulator writes the same format:

$ python3 purple_sim.py -k 9-1,24,6-23 -a NOKTYUXEQLHBRMPDICJASVWGZF -d ZTXODNWKCCMAVNZXYWEE --log
n,in,out,sixes,t1,t2,t3
1,Z,F,9,1,24,6
2,T,O,10,1,25,6
3,X,V,11,1,1,6
...
17,Y,U,25,1,15,6
18,W,I,1,1,15,7
19,E,M,2,1,16,7
20,E,I,3,1,17,7

Line 17 shows the middle switch (#3) about to step, and line 18 the result: #3 has gone from 6 to 7 and #2, the fast switch, held at 15 for one letter. A machine log and a simulator log for the same key and text are compared with diff; any line that differs gives the letter, the input and both switches’ positions at the moment the machine went wrong.

11.11.2 Acceptance test: Part 1 of the 14-part message

The acceptance test is the message the machine is famous for. Set the key of Volume 12 — switches 9-1,24,6, motion 4 (23), alphabet NOKTYUXEQLHBRMPDICJASVWGZF — and type the 1,285 transcribed letters of Part 1, using the garble key for each of the 28 letters the intercept operator marked as uncertain or the archive copy leaves unreadable. Compare the log with:

$ python3 purple_sim.py -k 9-1,24,6-23 -a NOKTYUXEQLHBRMPDICJASVWGZF -d PART1 --log

(PART1 selects the transcript built into the simulator.) The machine passes if every line agrees. The printed plaintext must begin FOVTA TAKID ASINI MUIMI, as Weierud’s notes on the message say it does (CryptoCellar), and must reach, at letter 105, THEGOVE-NMENTOFJAPANLFLPROMPTEDBYAGENUINEDESIRE — the English of the note handed to Secretary Hull on 7 December 1941 (Volumes 7 and 12). Three further checks complete acceptance:

  1. Encipher reproduces the intercept. In encipher mode, typing the plaintext (with X for each garble) must reproduce every legible letter of the intercepted ciphertext — the simulator’s check 11.
  2. Round trips in all six motions. For six random keys, one per motion, encipher 500 random letters and decipher them again.
  3. Appendix E position check. From key 13-25,23,12, motion 321 (32), 200 garbles must leave the machine at 13-1,6,3, the position Freeman, Sullivan and Weierud give for group 41 of their second test message (FSW, p. 38; Library copy).

11.12 The Fallback’s Verification

The all-electronic fallback runs the same tests with a different meaning. Its substitution comes from the tables in its firmware, which are the simulator’s own; the self-test of purple_sim.py runs on the Pico at power-up and must print 15/15 before the machine accepts a key. The sweeps then test not the strapping but the plugboard, the line interface and the cords, and the Part 1 acceptance run tests the whole chain from the input teletype to the output teletype. When the switch stack later replaces the firmware stage by stage, the same tests, run again, are the proof that each stage is right.

11.13 The Drawing Set and Wiring List

Six large-format sheets and a bench wiring list go with this volume. They are PDFs made for printing at plan size or zooming on a screen; the thumbnails below show what each holds. Sheets 1 and 2 are introduced in Volume 4. All of the strapping on them comes from the wiring tables of Freeman, Sullivan and Weierud by way of purple_sim.py. The only parts not on record are the stepping-control wiring of Sheet 1, drawn dashed in orange.

How to read the strapping. Every contact (pin) of every wafer (level) gets one strap to one lead, the bus that carries a letter on to the next stage. Contacts are strapped together only when they go to the same lead, and each lead collects exactly 25 contacts, one at each pin number from 1 to 25. On the sixes, for example, pins 3, 15, 19 and 22 of wafer 1 all go to lead 1, and lead 1 also takes 21 contacts from the other five wafers. In the colour sheets, wire colour is lead, so everything strapped together is one colour.

Figure 20 — Thumbnail of Sheet 3: the sixes switch drawn as its six wafers, each contact wired in the colour of its lead (resistor code, lead 1 brown to lead 6 blue) to six coloured buses, with wafer 1 enlarge…
Figure 20 — Thumbnail of Sheet 3: the sixes switch drawn as its six wafers, each contact wired in the colour of its lead (resistor code, lead 1 brown to lead 6 blue) to six coloured buses, with wafer 1 enlarged. The full sheet is a large PDF (ARCH D, 36 × 24 in, about 0.2 MB), linked below. — Drawing made for this series (03-outputs/diagrams/analog_sixes_wafers.py); data from Freeman, Sullivan and Weierud 2003 via purple_sim.py

Sheet 3 — The sixes switch, wafer by wafer, in colour (large PDF, 36 × 24 in, 0.2 MB)

Figure 21 — Thumbnail of Sheet 4: twenties switch #1 drawn as its 20 wafers, 500 wires in the telephone 25-pair colours of their leads, with each wafer's pins grouped by lead along the bottom. Sheets 5 and 6 d…
Figure 21 — Thumbnail of Sheet 4: twenties switch #1 drawn as its 20 wafers, 500 wires in the telephone 25-pair colours of their leads, with each wafer's pins grouped by lead along the bottom. Sheets 5 and 6 do the same for #2 and #3. Each full sheet is a large PDF (ARCH E, 48 × 36 in, about 6 MB), linked below. — Drawing made for this series (03-outputs/diagrams/analog_twenties_wafers.py); data from Freeman, Sullivan and Weierud 2003 via purple_sim.py
Figure 22 — A page of the bench wiring list: one block per wafer, each pin with the lead it is strapped to and a tick box, the pins grouped by lead at the foot, and boxes for "wafer done" and "tested". Part 2 …
Figure 22 — A page of the bench wiring list: one block per wafer, each pin with the lead it is strapped to and a tick box, the pins grouped by lead at the foot, and boxes for "wafer done" and "tested". Part 2 lists the same 1,650 straps by lead, for the continuity check. The list is a 32-page US Letter PDF (about 2 MB), linked below. — Made for this series (03-outputs/diagrams/analog_wiring_list.py); data from Freeman, Sullivan and Weierud 2003 via purple_sim.py

Bench wiring list — all 1,650 straps, by wafer and by lead (PDF, 32 pages, US Letter, 2 MB)

Each wafer block gives its place both in Analog No. 1 (deck and level of the four six-level switches) and in this replica (SS1–SS7 and level, as in the strapping section above).


Next — Volume 12: Running PURPLE — Keys, Procedures and a Message Worked in Full. How a Japanese code clerk keyed the machine in December 1941, how the Americans read the same keys, and Part 1 of the 14-part message deciphered from indicator to plaintext — then a new message enciphered the 1941 way.

Comments (0)

  1. Loading…

Comments are held for moderation — nothing appears until approved.