RaspTI: Convert a Vintage Computer (TI-99/4A) Into a RaspPi Workstation - Part 1 - Keyboard

31K6919

Intro: RaspTI: Convert a Vintage Computer (TI-99/4A) Into a RaspPi Workstation - Part 1 - Keyboard

This is the first in a series of Instructables that document the process of converting a vintage computer (in this case, a TI-99/4A) into a RaspberryPi workstation. You should know that the only thing we're preserving about the old computer is its physical form. We will not be using any original hardware or software, with the exception of the awesome keyboard. 

Part 1 will show you how to convert the TI's passive keyboard matrix to a USB keyboard. We will be re-installing it into the TI-99 body, but once it's been programmed, it can be used for anything.

NOTE: this process can be used to convert any push-button matrix into a USB keyboard input device.

Thanks and Salutes:
Ido Gendel for his advice on how the code should be structured.
Sean McIntyre for his help with debugging the code.

Code for the Teensy can be found here: https://github.com/matthewepler/raspTI_keyboard


Supplies:
Teensy++ 2.0 microcontroller
Micro USB cable
Bread board and standard gauge wire
30x female headers
55x male headers
ribbon cable (regular wire will do but this will make your project less of a wire nest. you need at least 7 wires in the ribbon)
10x 10K resistors
Wire cutters and stripper
Solder and Iron
4x small zip ties
TI-99/4A or any vintage computer keyboard with wired output similar to the one shown here.

If you have questions, feel free to contact me via the address on my site: http://mepler.com

STEP 1: Break Open the TI

The screws aren't hidden. Just unscrew the ones on the case to get inside. Then liberate the logic and power boards by unscrewing them from the plastic base. 

Carefully unhook the keyboard as shown in the picture. Your connector cable may not be exactly like mine, but it will work the same. 

Save all the pieces and screws!!!

[image coming]

STEP 2: Prepare the Breadboard and Teensy

1. Solder male headers to every pin on your Teensy.

2. Add wires to the bread board that will connect the power and ground lines on either side.

3. Add wires for power and ground to the Teensy.

4. Insert Teensy, aligning the power and ground pins with the wires you put in the breadboard.

5. Insert a row of 15 male headers further down on the breadboard.

6. Insert a 10K resistor for each of these headers and connect it to ground.

7. Make two sets of cable using the ribbon cable and female headers. One should have 7 wires, the other 8. Solder the stripped ends of the wire into the female end of the header.

8. Connect the first 8 male header lines (counting from left) to the Teensy:
    Header 1 -> C0
    Header 2 -> C1
    Header 3 -> C2
    Header 4 -> C3
    Header 5 -> C4
    Header 6 -> C5
    Header 7 -> C6
    Header 8 -> C7

9. Connect the last 7 male header lines to the bottom
    Header 9   -> F7
    Header 10 -> F6
    Header 11 -> F5
    Header 12 -> F4
    Header 13 -> F3
    Header 14 -> F2
    Header 15 -> F1 

10. Connect the keyboard's connector cable to the male headers.

11. Connect the Teensy to your computer.

STEP 3: Understanding the Matrix

Before we get to the code, let's take a look at how this keyboard works. As you'll see in the diagram (found here), the keyboard is made up of 8 rows and 7 columns in the circuit. The connector pins are for the original chip, NOT the Teensy. Ignore the pin numbers shown in the diagram.

Notice on the diagram the columns and rows are attached to pins that are numbered 1 through 15 from top to bottom. We are doing the exact same thing, only from left to right. The reason we split the keyboard's connector wire into 2 groups, one with 8 connections and the other with 7 connections, is to mirror this column/row setup shown in the diagram. Half of the wires will be Outputs, the other half Inputs. 

Here's the plain text version of the diagram. This appears in the header of the code for your reference:

       #12  #13  #14  #15  #9  #8  #6
#5    =         .       ,        M    N    /  
#4  spac    L      K       J     H    ;
#1  entr     O       I       U     Y   P
#2              9       8       7     6   0
#7  fctn      2      3        4     5   1  lock
#3  shft      S      D       F    G   A
#10 ctrl     W      E       R    T   Q
#11            X      C       V    B   Z

Watch the video for an explanation of how these circuits are used to detect a connection.

RaspTI Keyboard Matrix from matthew epler on Vimeo.


STEP 4: The Code

RaspTI Code Walkthrough from matthew epler on Vimeo.

If you haven't already, install the latest version of Arduino and the Teensy uploader (available at their website). When installing the Teensy loader, also install all the library options.

Then copy and paste the code at the link below into a new Arduino sketch. Save the sketch then upload it to the Teensy board.

https://github.com/matthewepler/raspTI_keyboard/bl...

Then watch the video for a walkthrough of the code.

STEP 5: It's Alive!!!!

RaspTI demo from matthew epler on Vimeo.


Here is a demo of the keyboard working. 

Hope it worked for you. If not, just email me at the address on my site: http://mepler.com

10 Comments

why the teensy 2++ in particular?
Do you NEED the extra eeprom programming space to make this work?
or is that simply what you had on hand?
I ask because that is the MOST expensive version of that board, and the
extra eeprom space is the only reason I can fathom for requiring that version for this project.

Since you're using rows and columns, all 3 teensy versions have plenty of I/O pins.
At first, I thought you might have gone with the 2++ and simply wired every key to it's own IO pin... but that's 48 mapped keys, and the 2++ only has 46 i/o pins.
Great point! You are correct - it's what I had on hand. I do plan on making the Teensy accessible in the final mod design and it may be of some use then.

For folks like me who aren't sure, what would you suggest as a better alternative?

Thanks!
Hi! Thanks for this! I'm using a Teensy 2++ and followed your wiring/coding guide. However, only 2 keys are working on my TI 99 keyboard - 'o' and 'enter'. Do you think my keyboard is broken? Any tips on troubleshooting?
Sorry it took me a while to respond. Your keyboard might be broken. You can use the diagram in my videos that show how it is wired and us a multimeter to check for connections. Hope you get it working!
No worries. Life is crazy for all of us these days. I haven't played with a multimeter before. That's a good suggestion. I may even learn something! Thanks!
I take it back. Looks like i o u and enter work. Now I'm thinking my keyboard is old and broken

Hello! Thanks for the awesome how to! I am doing the same thing but with an Arduino Leonardo. I have corrected the pins and all is working but I am having an issue with the Bounce Lib and was hoping you had ran into this issue before and had a solution... When a key is pressed like "p" i get that key repeated about 50 times or so. I have updated the code to use Bounce2 but have also tried with Bounce1 with the same result. Any help would be great! Thanks again!

Thanks Greg! The writers at Make said they had some issues with my build due to the version of Teensy (there is a newer version). Perhaps that would help? If not, feel free to email me and I'll take a look. http://makezine.com/2014/08/07/the-ti-pi-a-raspberry-pi-powered-ti-994a/
Hello,

I bought a Teensy 2.0 ++ and wired up my 1989 Toshiba T3200SX Laptop keyboard to the breadboard just like you showed. But I am having one heck of a time trying to figure out some of the coding stuff. Can you please give me a copy of the code you used for yours so I can use it as a template. I would reallt appreciate it. I'm building an awesome desktop PC inside of an old fasion laptop and the keyboard it the last part.

If you can't post it here, can you please email it to me. It would help so much.
casey.b.bassett@gmail.com

THANK YOIU!
Absolutely! Code is here: https://github.com/matthewepler/raspTI_keyboard/blob/master/raspTI_keyboard.ino

As a note, I got this to work fine on my Mac but when I plugged it into a Linux machine, it repeated keys endlessly and was not usable. Not sure why.