Teletype Model 33 ASR
Teletype Model 33 ASR Restoration Series Playlist:
Unlike its rock-solid and older military/industrial brethren, the ASR33 is a much more fragile and finnicky consumer grade Teletype. Our example was also in particularly bad shape. It took no less than 10 episodes to get ours back online! The upside is that you get to see a lot of the mechanisms and associated adjustments, as about every single section failed to work properly at first.
The Teletype Model 33 ASR
The Teletype Model 33 is a successor to the earlier 5-bit Baudot Teletypes. The Model 33 is an "8-bit" teletype, using the newly developed ASCII standard. But actually, it is really a 7-bit ASCII teletype: the 8th bit is only used for parity in models that have the parity option, or is always 1 or always 0 in the teletypes that do not have the option. There is no provision for lower case ASCII either, so it's all caps like its predecessors. It works using a convenient 20 mA/12V current loop and is mostly meant for short distance connections to a computer or a modem, although there is an option to wire it to operate in the 60 mA mode for long distance operation.
The ASR variant stands for Automatic Send Receive, meaning it has an automatic paper tape punch and reader, a keyboard and a printer, and possibly an integrated modem. The word "Automatic" simply refers to the ability to start and stop the tape reader by sending Xon and Xoff codes to the Teletype. There was a KSR version (Keyboard Send Receive) that did not have the tape punch equipment (it's an optional module that is added to the left of the machine), and some Receive Only versions lacking the keyboard altogether. But the ASR is one of the most popular versions, particularly as a terminal interface for early 1960's computers, before the advent of so-called "glass terminals", the modern screen-based terminals as we know them today.
The 33 ASR was made with affordable pricing in mind, and is much flimsier than the industrial/military Model 15 and 19 that we previously restored. I mean a lot flimsier: it's nowhere close to the same league. All the parts are thin, stamped, and undersized. It uses lots of plastic. Parts hold together rather precariously and there is a lot of play everywhere. Unlike the Model 15, the little steel used in the 33 actually does rust. But it is still a very complex machine - no simplification there. It's a miracle of cost cutting and good enough engineering that it works as well as it does. Unlike the Model 15, it is not rated for continuous, 24/7 usage. It's maximum usage rating is 20% duty cycle, whatever that means. There was an industrial cousin to the ASR33, the ASR35. The 35 is rated for 24/7 operation, is much larger and was much more expensive. It is consequentially far rarer. The ASR33 has a little bit of electronics in it, although simple and unrefined, particularly compared to its mechanical complexity. It uses a lot of power resistors that heat up like crazy - PCBs invariably look burned out, and the thing smells like an overheated piece of old electronics.
Nevertheless, its relatively low price, combined with the fact that you get 4 or 5 instruments in one (a keyboard, a printer, a tape reader, a tape punch, and on the models so equipped, a modem), the 7-bit + parity ASCII coding scheme, and a 20 mA current loop compatible with a computer, made it an incredibly good deal. It became very popular from the 1960's all the way to the early 1980's.
Annotated HP 2752A Schematics
As is the case of other Teletypes, the mechanical bits are a lot better documented than the electrical bits, and given that the mechanical documentation is already hardly comprehensible, the electrical is downright nonsensical. Electrical diagrams are drawn like mechanical ones, and spread over many pages without rhyme or reason. They often show out of context assemblies or connectors details with pinouts, coded wire color and codes of where the other end of the wire might go, without any hint of function or location. Components or assemblies are referred to by non-documented nicknames, relay contacts and relationship with their coils are not shown properly, something that IBM knew how to do since the 1920s! And there is little help to locate assemblies on the machine or even know what they look like or what they are supposed to do.
Fortunately, in the HP 2752A manual, which is a straight copy of the ASR 33 manual, there is one added page: a full schematic drawn by people that actually understand electronics. The HP 2752A was an ASR33 with an added small board made by HP, for a computer signal to be able to remote-control the paper tape reader, and the addition of an HP-specific connector. The schematics were redrawn by HP primarily to document the HP board modification. But I suspect they got as annoyed as I did by the poor Teletype documentation and redrew the whole thing in a way that actually makes sense. Thank you HP engineers. My annotated version is shown below.
Tweeting from the Teletype
In this video, I explain my setup for sending and receiving tweets from the Teletype. My hardware interface, which is in the same vein as the one for the Model 15, is documented below. In principle, you should even be able to make it work straight with Linux without hardware help, but in practice I have found it impossible on Debian 8, as the support for Teletype has either disappeared, is non-functional.
CuriousMarc's ASR33 TTY Interface
The 20 mA current loop to RS 232 is handled by a commercially available board, which is really very nicely designed - no point to make another one as this one is just almost perfect (if it were me I'd just add a switch so it can be quickly disconnected to use the native current interface when needed). And on top of it, it is quite affordable:
It plugs right in connector #2 at the back of the Teletype, and draws power from the 28V AC available there.
This then connects to an Arduino Mega, which handles the TTY 110 Bauds 7 bits Even Parity Two Stops (110 7E2) conversion the Arduino USB adapter at 9600 Bauds, 8 bits, No Parity. It handles buffering and implements Xon/Xoff flow control to prevent the computer from overrunning the slower Teletype. It also has 7 switches that enable the following filtering functions, which I have found necessary to run most Linux ASCII routines:
- Pin #32: Send extra NUL character after CR (helps to not loose first char of new line)
- Pin #30: Send LF character after CR
- Pin #28: Transpose alpha to lower case. Prefix for uppercase is CTRL-@ (DLE, B00010000=16).
- Pin #26: Send CR before LF (useful for Linux)
- Pin #24: Autowrap lines at 72 cols
- Pin #22: Strip escape sequences
- Pin #36: Turn on character substitutions
Pins are active low.
A combo of these switches should make it work. Typically on Linux I use the 32, 28, 24, 22 and 36 switches. Sometimes 26 depending on the program I am running. This seems to allow me to run every command line-based operation that does not rely on CRT capabilities.
The source code for the project is included in the zip file download below:
Prototype interface version as seen in the video
Final version implemented with an Arduino proto-shield.
Obtaining a console login prompt on the USB Port in Linux
It should have been completely straightforward, but I found it excessively difficult to get to a TTY login console over the USB port in a semi modern Linux. The commands that are documented (and used to work) are disallowed in several ways, from not letting the user having permission to access the /dev/ttyACM0 USB serial device, to silently preventing the /sbin/agetty to do its job as intended, probably by an overactive security watchdog. This should have worked:
sudo /sbin/agetty -L 9600 /dev/ttyACM0 tty33
But it didn't. And I checked, it didn't work for others infuriated Linux users either.
In the end, the following script starting a service worked. It is an ugly, complicated and poorly documented workaround for something that should otherwise be very simple. Linux is starting to resemble Windows...
ttystart shell script:
sudo chmod 666 /dev/ttyACM0
sudo -F stty /dev/ttyACM0 9600 ixon
sudo systemctl enable serial-getty@ttyACM0.service
sudo systemctl start serial-getty@ttyACM0.service
To stop the console, a similar script can be used.
ttystop shell script:
sudo systemctl stop serial-getty@ttyACM0.service
I am not sure to specify a terminfo option through these commands, which for the ASR33 should be 'tty33' as in the agetty command, so that was handled instead by my interface, as you'll see below.