FauxTTY

I have never owned a real teletype and after seeing some at the Living Computer Museum in Seattle I decided I wanted to build one of my own. I started simple, I took a Smith Corona SL80 electric typewriter and my plan was to wedge a serial interface somehow between the keyboard and the output printer.

I decided to make this easy on myself - rather than getting all complicated with the hardware I was going to let an Arduino platform do the heavy lifting for me.
The real advantage of this is that it moves most of the problems into software, which I'm much better equipped to handle personally and getting bugs fixed becomes a whole lot simpler process - just tweak the software and re-upload it to the Arduino.
The only hardware necessary would be some kind of level-shifter for kicking the TTL serial voltages from the Arduino platform up to valid RS232 levels, the Arduino itself, and a convenient prototyping board to make building things out easier. I went with the Arduni Mega 2560 as it was the only Arduino that provided enough lines - there were 17 lines on the keyboard cable, so I assumed I needed at least twice that to make this work.

Smith Corona SL80 Cover removed Keyword with microribbon Mainboard PCB Trial fit of Arduino Cable snafu
Large [750k] Large [652k] Large [690k] Large [680k] Large [674k] Large [714k]

Keyboard

The first trick was to be able to read and interpret keystrokes from the SL80's keyboard. The keyboard was connected via a microribbon cable to the mainboard, and the lines out of the ribbon connector pretty much all went straight to the Intel 8052 microcontroller that drove the SL80. The only exceptions were the high pins on the ribbon (lines 1-7) which ran through a resistor bank, pulling them to GND.
I first removed the ribbon connector from the mainboard and then resoldered this to the prototype board. The keyboard has 17 lines, and I wired each to a pin on the Arduino (pins 8, 22, 24, 26 - 52).

Learning how the keyboard worked was not so much of a chore as simply a fair learning curve. The keyboard uses a row/column scanned matrix - so holding a key down, when a column is tied low, will pull low one of the row lines. But you can't pull all of the columns low at the same time, or you won't be able to tell which key has been pressed when someone is rapidly typing as several rows will be grounded at the same time. So you pull the columns low in turn, and scan the rows to see which column/row is now pulled low, which you can then decode against a known keymap to figure out which key was actually pressed. It's easier done than explained, see the code.

To do