Saturday, May 10, 2025

Computeriter Emulator Hardware Design

As described here, the System Source Computer Museum asked me to build an electronic replacement for the non-repairable Soroban Computeriter used with the recently-acquired CDC 160A computer.

One of my previous projects for the museum was board that plugged into the electronics of a Tempest-shielded Teletype Model 28. The Model 28 uses the 5-bit US-TTY character set, in our case at 75 bits per second (10 cps or 100 wpm), and the museum wanted to be able to connect it to a glass terminal like an ADM-3A that uses 7-bit ASCII at 9600 bps (960 cps) over RS232. This board used a Microchip PIC16F886 to bit-bang the serial interface to the Teletype and handled the code translations. A MAX3232 provided level translation to RS232C voltage levels.

(Factoid: Most people refer to this 5-bit code as "baudot" after inventor Émile Baudot. However, true "Baudot code" hasn't been used in over a century. The code used by most 5-bit Teletype machines is US-TTY, or its close cousin ITA2.)

The plan is to connect the Computeriter emulator between a laptop PC and the CDC 161 electronics, allowing the PC to substitute for the Computeriter. The laptop will talk to the emulator using a terminal emulation program like PuTTY (Windows) or Minicom (Linux), so bidirectional translation between ASCII and the Computeriter's odd 6-bit character set would be needed. Adapting the character set translation code from the Model 28 adapter only took a couple of hours.

Since I expected the emulator to connect to a laptop rather than a dumb terminal, I decided to use a PIC with a built-in USB interface. Based on the number of inputs and outputs required I chose the Microchip PIC18F45K50, to be powered by the USB host.

One of the issues in interfacing with the CDC 161 Typewriter electronics is its signal levels. It's built using germanium PNP transistors (2N404 and others), and the logic circuits are supplied with both +20V and -20V referenced to ground. And by "ground" I mean chassis ground, the metal frame of the unit. I drew up some circuits that would adapt the CDC 161's signal levels to the PIC's +5V interface, but decided it would be better to electrically isolate the PIC (and the PC's USB interface) from the CDC 161.

My first thought for emulating the Computeriter's keyboard-activated switches was a set of small relays, about half of which would need to be SPDT and the rest SPST. Small signal SPDT relays are fairly inexpensive, but they are kind of large and require 40 to 70 mA or more to activate. Next I looked at reed relays, which are more expensive but smaller and faster, and only require 25 mA to activate. The PIC is rated for an absolute maximum of 25 mA per I/O pin and 125 mA total, so either of these would require driver transistors and freewheeling diodes to safely drive the relay coils.

A full-speed USB 2.0 device is limited to consuming 100 mA unless it negotiates with the host for more. Sending a 6-bit character would require activating seven or more relays simultaneously, and even the reed relays would require almost double that. Then I thought about using solid-state relays. These are like bidirectional opto-isolators and require much less power than electro-mechanical relays.

I didn't expect to find a SPDT SSR, but then I came across the IXYS LCC110. It has one normally-open circuit and one normally-closed circuit, and requires only 8 mA to switch the states of both circuits. I'm guessing the NC circuit uses some sort of depletion-mode FET, but that magic is beyond my pay grade. Where only SPST contacts are needed I chose the IXYS CPC1017N, which is smaller and cheaper than the LCC110 and requires only 5 mA to turn on. Finally, there's one switch which must maintain the 0.5V logic level while also illuminating a small incandescent bulb which draws 95 mA; for this I chose the IXYS CPC1019N.

For printing, the Computeriter has a set of seven solenoids that are driven by the CDC 161 electronics. Six select the character to be printed, and the seventh triggers it to print. These have a DC resistance of about 28 mA. In the CDC 161, these are powered by an unregulated -15V supply and are pulled to ground by drivers capable of sinking 1.25A each. I thought about using electro-mechanical relays, with the PIC sensing the relay contacts. But since I was already using optically-isolated SSRs I decided to use LTV-817 opto-isolators to emulate the solenoids. Resistors in series with the LTV-817's LEDs limit the current to about 10 mA each, a tiny fraction of the 550 mA each solenoid would draw. I considered whether the CDC 161's drivers might leak enough to turn these on, but that doesn't appear to be the case.

Any time I build something for the museum I always ask how they might use it in the future. One idea that came up was using a dumb terminal rather than a laptop in the museum display. To support this I added a MAX3222 and a DE-9P connector to provide an RS232C interface, and a switch to select which interface would be active. When using the RS232C port, a cheap USB charger will power the emulator through the USB port.

Here's a photo of the resulting board, nestled in its enclosure:

The PIC is in the lower right of the board, next to the USB-B connector. In the upper right is the MAX3222 and the DE-9P connector. The interface mode switch is between the two connectors. On the left edge is the DD-50P connector for the CDC 161 interface.

The pin headers along the lower edge are for debugging, while the shrouded header above the PIC is the programming interface.

No comments:

Post a Comment