Model 2, Part 5 - Building Back Better

Last Updated: 2024-07-15 00:00:00 -0500

While I’ve been tinkering with the idea of design changes or rework for the Model II more or less since I “completed” it last year, I didn’t really feel strongly compelled to pursue it. The beat-up Dell OEM keyboard I’d been using as a daily driver worked more reliably, wasn’t a “bad” keyboard, per se, and wasn’t sorely missed from the computer where it was supposed to be - the salvageware multimedia/light-gaming PC hooked up to the TV in the livingroom. It wasn’t until my birthday began to approach in June, and I realized that nobody, including myself, had really planned anything, that I felt the need to deal with it.

To begin with, I knew that the overwhelming majority of the problems more or less boiled down to two areas of concern:

  1. The faulty wiring harness, particularly with respect to my absolutely insane “diode ladder” concept, and;
  2. Key alignment and mechanical crowding issues caused by the poor design of the case and plate.

The bad wiring would be really cheap to fix: 20 AWG is priced out at dimes per metre, and was all that was really called for here. The case, on the other hand, was something of a different story.

Fun with Ponoko

I’m not sure if I’d revealed it earlier, but I worked with Ponoko as a laser-cutting vendor, since they had a reputation I understood, and nobody closer to me dealt with custom laser cutting on a one-off basis. I want to be clear that I’m not in any way affiliated with or sponsored by them; this is just an endorsement from an approving customer. The parts I ordered arrived on time and to spec.

There were two main issues with the case design I originally went with, and they were directly related to each other:

  1. The “plate” component, originally made of acrylic, was too thick for the keys to seat in properly, or to accept plate-mount stabilizers for the longer keys (especially problematic when dealing with the space bar). It turns out that the thickness of that plate is actually a critical dimension, which was glossed over in earlier tutorials I read preparing for this project.
  2. The plate being so thick also caused issues in terms of available space for the wiring, especially in the area around the MCU, where everything had to come together and get connected. In the original design, just attaching the back panel to close the case would cause the teensy that controlled the keyboard to more or less dwell permanently in reset/program mode.

This problem had an easy, but somewhat spendy fix. I simply recut the back panel, sides, and switch-plate. I kept the 1.5mm acrylic spec for the back plate, upped the side pieces to something like 3.5mm each, and had the new switch plate made out of 1.5mm sheet stainless steel.

The stainless steel was an instant improvement over the old acrylic. After I desoldered the old wiring harness and removed the keys, they snapped into the steel plate with a very satisfying and positive connection. Now they’re all aligned nicely and don’t try to escape the board as soon as I turn the keyboard over to work on it, which has been delightful for typing on.

Fixing the Diode Ladder Problem

In the original build of the Model II, I attempted to save effort and money by “laddering” the diodes together to form the keyboard rows. Instead of bonding them to some kind of wire, I soldered each leg to the leg of the key next in line. Electronically this is perfectly valid. Mechanically? Horrible idea. Getting the legs to bond to one another in the first place was non-trivial, so the solder joints involved were not mechanically stable. Every couple of days of use, one or more would fail and require open-keyboard surgery with a soldering iron and my dwindling supply of chipquik to fix.

In the original round of brainstorming how to fix this, I considered creating a PCB. This would have been very expensive and left me with some spares I’d have had to offload, so in the end, that project never really got past a few preliminary CAD sketches and the start of the schematic taking shape in KiCAD.

Instead, after finding this article, I decided to try my hand at hand-wiring again. Here, Ben Chapman provides the insight that it’s worthwhile mechanically to tie the diodes to a heavier-guage wire rather than each other, which is exactly what I did. I have to be honest, I haven’t had a single problem with the diode since.

Other Improvements and Repairs

I made absolutely no effort to preserve the internal wiring and layout of the original Model II workup when wiring in the controller and switches for a second time. As I talked about previously, there were all sorts of issues in how that was done the first time around.

This time, in spite of adding functionality in the long run, I’ve actually somehow managed to use fewer pins on the teensy overall. I did this by making some changes to the internal layout of keys for efficiency. The two “mouse” buttons, and now the pushbuttons of the rotary encoders, are all in one column instead of effectively each on their own.

The encoders themselves are an improvement, as I never connected them to the original device, in part because of the crowding. They’re now hooked up, and wired in in such a way that they could theoretically all be worked simultaneously, and their inputs would still be interperable. As a nice bonus, I had unwittingly ordered encoders that are also momentary pushbuttons, so I’ve added those pushbuttons to the keyboard layout as though they were keys to add extra functions.

In addition to posing as mouse axes under certain conditions, I’ve set up the encoders for some extra functionality:

  • The uppermost can adjust system volume by sending volume up, down, and mute keystrokes;
  • The middle encoder can currently adjust screen briteness, but this is functionally useless with desktop displays, so I’ll probably change that. Clicking the encoder sends SUPER + L, which on almost every computer I’ve ever used, locks the desktop;
  • The lowest encoder gets used the most. It sends LCTRL + NUMPAD_PAGEDOWN or NUMPAD_PAGEUP, which through some tricky tooling changes on my work computer, and by straight default on my linux-based personal computer, switches between virtual desktops. VDs are something I’ve used aggressively as part of my workflow for years, and an encoder to move between them was one of my earliest HID ideas. Clicking the encoder in this position sends SUPER + TAB, which on linux breaks me out an overview of all open windows, and on windows brings up the virtual desktops manager; roughly equivalent functions, then.

All in all, apart from wanting to make some changes to how a few keys are configured and possibly add more function-chord combinations, the keyboard is more or less functionally complete.

What’s Left?

There is a single problem with the keyboard for which I would need to find a solution: the F9 row bug.

Several keys are all sharing one column line with the F9 key; -, [, and '. With the exception of F9, and mostly just the last two, these keys will trigger at random while I’m typing. The bug is intermittent - it comes and goes - but it’s also proven extremely difficult to put to bed. So far, I’ve done all of the following to try and prevent it, and I’m now running out of ideas:

  • coated the original column line for the F9 column in clear nail polish;
  • coated the bases of all the wires that connect to the teensy (suspecting spurious shorts);
  • outright replaced the column line and the connection line for the F9 column with fresh wire.
  • desoldered and replaced the [ and ' keyswitches themselves, suspecting mechanical issues (which was true for one of them).

This really leaves me with only two other approaches I can think to take: replacing the diodes for the three worst-offending keys, or dousing the whole works back down in nail polish again. I have checked and the nail polish I’m using is thoroughly non-conductive, but it’s a frustrating bug. Each attempt to solve it entails the tricky business of removing the back panel, which is always overly fussy, given the small size of the fasteners involved, and the poor overall design of the case.


If you wanted to show your support financially for Arcana Labs projects like PETI, but don’t need a virtual pet development kit, your best avenue is through the pathways detailed on our support page.

Comments

Using your Fediverse account, you can respond to this article's Mastodon Post. Embracing the spirit of decentralization inherent to the Fediverse, you can use your account on any compatible platform to post. Clicking the "load comments" button below will make your browser request all of the non-private comments and display them below.

This was built based on this reference implementation.