PES96: No Case

If you ask the people I work with, I have a bit of a problem when it comes to keyboards. At least one of my coworkers has threatened an intervention. I got bored one weekend and made keyboard pixel art because that seemed like a reasonable thing to do.

I generally just call it a hobby. Like collecting stamps, rebuilding cars for fun, or making music non-professionally.

Anyway, having slowly descended into "keyboard madness", I, completely reasonably, decided one day that I should learn how to build a keyboard from scratch. I should warn you, as of the writing of this post, I haven't actually finished the build... because I am of several minds on what to do about a case, but that is information for later.

I had a lot of help from guides written by the community, especially this guide by cribbit on GeekHack. THANKS.

To start my build process, I used the so abbreviated KLE, which is a web-software-tool-thing for building keyboard layouts that you can edit. The layout I ended up making, more or less, can be found here, but it looks like this:

The PES96 on KLE, visually

Neat.

After that, we mosyed (mosied? can that word BE past tense?) on over to the incredibly useful Plate & Case Builder tool with our layout that we made back in the previous paragraph. Futzing a bit with the options, we can create a fancy looking plate that looks like this:

The CAD File from swillkb's Plate & Case Builder

If you were me, you would now be quietly laughing at how easy this is, because you are frequently wrong about many things. Especially that "people totally cackle in public all the time, this isn't strange in any way". No one does that.

But, again, neat.

Fortunately[1], the builder has a convenient[2] link to LASERGIST, which is a very friendly and easy to use water cutting service for the steel plate you just CAD'd up. It's basically a nearly-Amazonian 1-click service to go from "I think I might like a steel plate" to "I now own a steel plate cut to my specifications". I honestly really appreciate what they do and how fast and convenient it is that they do this thing, but...

My plate shipped to me from Greece.

Steel plate from Lasergist... and Greece.

Still, neat. Took a few extra days in customs and there are like 2 dozen places locally I could have used, had I realized it was shipping from Greece, but, hey, it got here.

Long before this build began, I decided that I "needed" to purchase some slightly fancy switches because they were on sale, which is how I ended up with more than 100 78g Zealios, from ZealPC. They're a very smooth, tactile switch, described as being like a "slightly lighter Chery MX Clear, ... snappy tactile bump". In my opionion, they have some of the best tactile feel, and are a general joy to type on. I reallllly like the Zealios.

Once I decided to start the build, and had the plate ordered, I also went shopping for the bits and bobs you need to build a keyboard from scratch:

  • 1 Teensy++ 2.0 microcontroller[3]
  • Enough 1N4148 diodes for the project (1 per switch)
  • 100 78g R9 Zealios, previously mentioned
  • 5 2u[4] Cherry stabilizers, plate mount
  • 1 6.25u Cherry stabilizer, plate mount
  • Some shielded solid core wire
  • Some solder
  • A spare 40pin IDE cable

Once the plate came in, I brought it to lunch one day to put the stabilizers and switches into the board. Since my layout doesn't use a full-sized right shift, I didn't need a seventh 2u stabilizer.

Switches in the plate

Switches in the plate, from the bottom

Once I figured out how stabilizers get put together, and all the switches were mounted on the plate, I moved the build over to my desk, where the soldering iron and all of my actual parts were.

The next step in building a handwired keyboard is to get a diode wired to each switch, so that you can press more than one key in a column or row at a time.

Speaking of columns and rows, I'm going to get ahead of myself.

There are several firmware systems available in the wild for keyboards, but the two most commonly seen ones, in my experience, are TMK and QMK, which is basically TMK but with more stuff. Both firmwares require you to arrange your keyboard in a grid-based pattern. Generally, you end up with a grid that sets the right-most contact for the row and the left-most for the column. More on the grid later.

Anyway, diodes. Wrap them around the switch contact on the right/row side, because that's the standard, and solder diode to contact. Rinse and repeat like 99 more times, for all of the switches on the board.

Diodes

Having accomplished the enormous feat of soldering a bunch of diodes, we move to wiring up the rows. For this, a VISE GRIP is super helpful, as you can use it to spread holes into the wire at specific points, letting you solder diode to wire and have some protection against bare-wire shorts. You want to make sure that you've actually connected the diode to the wire and not just dumped some solder near to where the wire and diode touch, because, duh.

Row wire glamour shot

Once you get the row wires finished, get to work on the columns. These will be directly soldered to the contacts, so you'll probably want to wrap the wire around each contact as you go, soldering down the wire. Definitely consider soldering as you wrap, it makes life easier. I decided to get fancy and use different colors for my rows, because I accidentally bought spools of differently colored insulated wire.

Column glamour shot

This is more or less when my build stopped being pretty, because I kind of gave up when I was routing the wires to connect to the controller. Speaking of doing that, you want to have a set of wires that connects to each row and another set that makes connections to each column... and make note of which row connects to which spot on your controller because that is kind of obviously super important. Not know what goes where will lead to you having no idea how to set the firmware up, and possibly lead to a hilarious situation where you hit one key and it registers as a completely different key. (Briefly, before I fixed it, X was registering as one of the numpad keys. Not optimal.

Anyway, here's how I managed to wire thing up to my controller. This is where I used the 40pin IDE cable, initially for organization, and later because I didnt want to change what I was using. Be warned, I got tired of trying about half way through routing that stuff.

hurf

hurf2 now with more hurf

Moving on.

Now, you want to flash the controller with some firmware so you can figure out how badly you've screwed up... but first you need to make some firmware. There are several resources out there for this, but the best two I can recommend are either reading the docs and figuring it out for yourself through the QMK repo and resources for handwired stuff or by making use of kbfirmware.com. Honestly, I'd try both and see what works best, or if both work or whatever. I used kbfirmware to help plan my wiring out, but wrote most of my layout, configs, and rules by hand, with a little help from QMK's handwired docs.

pes96's keymap.c

The files specific to the PES96 can be found in this repo.

Well, that's about where I am now. I tossed some caps on to make sure things worked, debugged a bunch of hilarious issues where my soldering was mediocre, and resolved the problem where the keyboard thought it was mirrored. I still need to figure out what sort of case it will use, but I'm leaning toward doing some woodworking to make something horrific and awful.

IMG_20180313_204303

IMG_20180314_152610

IMG_20180314_152627


  1. HAHAHAHAHAHAHA Right. Fortunate. ↩︎

  2. Actually yes, this was convenient. Kind of. ↩︎

  3. I had to use the Teensy++ 2.0 instead of the normal Teensy 2.0 because of how large my grid was. More on that later. ↩︎

  4. 2u = 2 unit. A unit is the space a standard keycap takes up, usually 19.05mm. ↩︎