If there’s only one lesson to be learned from converting (alnwlsn) an IBM Selectric typewriter into a serial terminal for Linux, it’s that we’ve been hanging around in the wrong dumpsters. Because that’s where he found the donor machine for this project, and it wasn’t even the first one he found in the trash. The best thing we’ve ever done is a nasty old microwave.
For being a dumpster find, the Selectric II was in pretty decent shape. The first few minutes of the video after the break shows not only the minimal repairs needed to get the typewriter back on its feet, but also a whirlwind tour of the remarkably complex mechanisms that turn keystrokes into characters on the page. It turns out that knowing how mechanical linkages work is the secret behind turning the Selectric into a teletype, completely within the original enclosure and with as few modifications as possible to the existing mechanism.
Keystrokes are mimicked with just thirteen solenoids: six for the “latch togglers” that interface with the famous whiffletree mechanism that converts binary input to a specific character on the typeball, and six more that control like the control and cycle bail keys. The thirteenth solenoid controls an additional bell, because every good teletype needs a bell. To detect keystrokes (this is a duplex terminal, after all) (alnwlsn) pulled a page from the Soviet Cold War field manual and used optical switches to monitor the positions of the latch sliders as keys are pressed, and more so for control keys.
The electronics are pretty straightforward: a bunch of MOSFETs to drive the solenoids, plus an AVR microcontroller. The terminal speaks RS-232, as you’d expect, and within the keyboard limitations and character set differences over the 50+ years since the Selectric was introduced, it works fantastic as a Linux terminal. The back half of the video is loaded with demos, some of which aptly demonstrate why many Unix commands look the way they do, but also some cool hybrid stuff, like a ChatGPT client.
Kudos to (alnwlsn) for tackling a difficult project while maintaining the integrity of the original hardware.