The Prototype Keyboard

A project log for VT-69 Handheld Terminal

It's a dumb terminal. You can connect a Raspberry Pi to it.

BenchoffBenchoff 03/02/2019 at 20:050 Comments

I'm buying a thousand silicone keyboards, months before I have finalized hardware. I need a way to test the samples of these keyboards, and the easiest way is to turn them into a USB keyboard.

The TL;DR is that everything is on the Gits

---------- more ----------

Building keyboards from scratch, using Cherry MX switches, diodes, and laser-cut plates is well-tread territory. That's basically what I'm doing here; the switches are the PCB and silicone keyboard, the microcontroller is a Teensy LC (because that's what I had sitting around), and there are no diodes because I don't give a fuck about NKRO. There are three basic components of this build:


As stated in the previous log,  there's nothing really special about making silicone touch pads. Yes, everything should be plated in ENIG, but other than that as long as the traces and spaces are reasonable (I'm using 10mil) everything is going to work. The issue is just laying out the matrix. I'm using five rows with 16 columns, arranged thusly: BE WARNED IF YOU COPY THIS SHIT THERE'S GOING TO BE AN OFF-BY-ONE ERROR IN THE DOCUMENTATION

This was wired up to the Teensy LC thusly:

And the completed Gerber:

Not a big deal. Eagle file and Gerbers are in the Github.

The Firmware

There are dozens of different firmwares out there for configurable keyboards, all infinitely powerful and capable. This is just a test that isn't going into the final badge, so I just need something quick, dirty, and sloppy. I found a Teensy LC and wrote a little bit of code. The relevant part is below, the entire thing is on the Github.

const byte ROWS = 5; //eight rows
const byte COLS = 16; //sixteen columns

//Don't fucking ask me what this macro is doing here
//I'm just copying and pasting LiKe A sOfTwArE eNgInEeR

#ifdef M
#undef M

#define M(n) ((n) & KEYCODE_MASK)

char keys[ROWS][COLS] = {
byte rowPins[ROWS] = {19,20,21,22,23}; 
byte colPins[COLS] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; 

 A quick test with a dupont cable while the Teensy is plugged in told me it was good enough to order the board.

The Bezel

Oh shit here's where it gets fun. This is the section that will also be heavily edited.

A silicone keypad isn't enough -- you also need a way to hold it down to the PCB so it won't slide away. Part of that is done with the bosses on the underside of the silicone switch and a few well-placed holes on the PCB. The rest of it has to deal with containing the key tops. I'm doing this with a piece of plastic that goes over the PCB and silicone keyboard:

This model was sent off to Shapeways, and a little bit later the prototype keyboards arrived from China:

The prototype worked the first time. A few design details of note: there is a 0.3mm setback between the silicone button and the holes of the keyboard; this is what silicone design guides recommend, and it seems to work well. The USB works well, and it looks like this works. Great. That's one prototype down, and now I have to build the whole thing.