söndag 12 juli 2020

An Isogherkin (or a long Gherkin or a narrow Planck) Build Log/Write-Up

"-Hey dude, why did you build a 3x12 Isogherkin when you just could have tried it out on the three lower rows of a 4x12 Planck?"

Well, I actually did just that, but the early keymap tries on the Planck indicated that a protoype 3x12 keyboard was motivated and I wanted to build a keyboard of my own, for the kicks of it and for practice. As you can see below, the build of this prototype didn't exactly reach tip-top quality in all phases, showing that the practice was sorely needed.

Background


Many years ago now, I had a colleague whom used a private HHKB in the office, which fascinated me and prompted me to go for a mechanical keyboard of my own, a 60% Vortex Pok3r. It was fun to program it, but the programming had its limitations and by now I had got wind of qmk and that led me to get a 60% GH Satan kit that I soldered together and had lots of fun programming and flashing with QMK. By now, I had discovered the mechkeys online scene and had seen lots of really cool keyboards, like the 3x10 Gherkin mini-keyboard from 40procentclub that I on the one hand felt an urge to own but didn't acquire as I realised that it wouldn't work for me. Instead I got my first Jack Humbert's excellent 4x12 Planck - rev 4 off Massdrop. Once I had developed a keymap ("Nordic off-by-one iso") that worked really well for me, I got myself a rev 6 Plank directly from olkb.com and a Datamancer wooden case from Massdrop, so I could have one at home and one at the office (lots of colleagues forgot whatever errand brought them to my desk and instead discussed my Planck and keyboards with me).

For a while, this worked great - pressing space together with a modifier on a full-size keyboard out of Planck habit is a pretty harmless error. Then I got interested in the qmk combos feature and realised that I only used a subset of the bottom row keys on my Planks.

Converting Escape, Backspace, Tab and Enter from space-involved layer 1 keys to layer zero combos worked excellently and as I wanted to try out a split keyboard, too, I quickly put my haircross on Foostan's CRKBD, which looks a lot like a potential end-game for me. I got a kit for it from KeyHive but have yet to get around building it.

Instead, I launched into this Isogherkin experiment.

Keymap


These are the goals with the Isogherkin keymap:
  • it should maximise the use of the muscle memory of full-size Iso (Nordic) keyboard users
  • i.e., everything should be close to where it logically would be on a full-size Iso (Nordic) keyboard
  • as much as possible should be crammed into the default layer
Just like with my "Nordic (Swedish) Off-by-one Iso Planck" keymap, this is the basic inspiration:


The central alphas on a Iso keyboard are 12 keys wide - a great fit for a 4x12 Planck or a 3x12 Isogherkin. Also, the num row keys between Escape and Backspace are 12, too, just like the number of Function keys.

Now, here's how to use that fact to reach our above listed goals:


  • All the Isogherkin keys primarily map to the same keys that are outlined in red on the above picture of my laptop keyboard.
  • But KC_NUBS is left-Shift when held and KC_NUBS when tapped (LSFT_T(KC_NUBS))
  • Then the edge modifiers are two key combos where one logically would expect them to be: Escape in the top-left corner (Q and W), Backspace in the top-right corner (KC_LBRC and KC_RBRC), Tab top-left second row (A and S), Enter in the top-right second row (KC_QUOT and KC_NUHS). Although do note that since an Iso enter is a vertically long key, we could have made it KC_RBRC and KC_NUHS or KC_NUHS and KC_RSFT instead)
  • I really rarely use Caps Lock, so I am fine stowing it away on some other layer
  • The bottom row by necessity get combo heavy, since the Isogherkin are lacking the Planck's fourth row
  • The most important combo is B and N as space when tapped and layer 1 when held. It didn't work with TT(1, KC_SPC) even with Sevanteri's qmk fork so here some code is due (I also should implement repeating spaces after an initial tap)
  • V and B and N and M enters layer 2/numbers row and layer 3/function keys, respectively. Here I should add some code to make them emulate TT(<layer>) rather than MO(<layer>)
  • C and V and M and KC_COMM are LAlt and Ralt, respectively
  • Z and X and KC_DOT and KC_SLSH are LGui and RGui, respectively
  • KC_SLSH and KC_RSFT makes RCtl, as expected, but for LCtl, we needed Sevanteri's qmk fork in order to be able to use LSFT_T(KC_NUBS) and Z as the combo, without having to write code of our own to implement the "LSFT_T:iness"
  • Another thing Sevanteri's qmk fork is needed for is to make it possible to combine several combos, like to write a @ - the layer 2 combo V+B and the AltGR combo M+KC_COMM and shift and W.

Challenges

  • That the arrow keys ends up on layer 1 is no biggie, nor CapsLock as I so rarely use it, but that Delete have to do it as well is a bit sad. Also, real afterthought has to be put into where to place Page Up, Page Down, Home and End - preferably logically grouped with the arrow keys
  • KC_GRV, of course, also ends up on layer 1, on the top-leftmost key (Q) - but I never use it. Do you? 
  • My sense of order is a bit upset by the homing keys, F and J, not being on the same distance of the keyboard centreline. Instead, J is directly to the right of the centre while F is three columns to the left of it. I do appreciate that they are far from the centre of full-size keyboards, too, especially the ones with numpads, but it still irks me...
  • I hope Sevanteri's qmk fork might solve it, but otherwise, there seems to be some challenges with combining multiple combos, like LAlt and Tab to cycle through Windows or Ctrl-Alt-Delete
  • At some point, I will implement a mouse layer as well, as that is something I really like about qmk.
  • A left hand-only ctrl-z is impossible when Z is a part of the LCtl combo... (EDIT 2021-01-26: Actually, if you strike a combo, you can keep it activated by keeping one key pressed and then tap the other, so it turns out I can do a left hand-only ctrl-z after all!)

Build

Now, how to build a Isogherkin prototype? Handwiring one with a real top-plate? Naa, let's go for 40procentclub super-cool Tetrominoes:


I should emphasis that KB of 40PercentClub does point out that the Tetrominoes would only work well with a solid plate to support the switches. If I ever deem the Isogherkin usable enough to warrant a real keyboard, I will need a solid plate - but for this prototype, let's go for the Tetrominoes without support.


Taping them together carefully.


And soldering the Tetrominoes together. It seems I didn't tape them together hard enough or that I should somehow soldered them from the other side as well, because it ended up with a slight banana-bend in the resulting PCB...


Then the through the hole diods are due. They should be directed towards the square hole - but do note that that means different directions on different Tetrominoes!


I'm saving the legs of the diods to use to socket the Promicro with.


As can be seen, I didn't keep all the diods pressed down through the holes well enough... This is good practice for future projects or keyboard kits, though.


To connect the rows, I use 0 Ohm resistors, as recommended by 40PercentClub. As can be seen on the fourth one from the camera on the left side, not all of them got professionally soldered either...


Now let's get started on the switches! Red Cherry MX:es from AliExpress (all tested to be working with a Multimeter).

AND, YES, OF COURSE THEY SHOULD HAVE GONE ON THE SAME SIDE AS THE DIODS AND RESISTORS! 

By doing this stupid mistake, the prototype keyboard will be using the diods and resistors as feet to rest on. Far from ideal...


All done! But another reason to use a solid top plate is that the holes are big enough for the switches to turn just a little and some of them turned a little in each others directions... I hope they won't be too close so that the key-caps will touch...

I also tested all switches on the PCB with the multimeter and found one column end terminal to be a dud - but the one directly under, on the other side of the Tetrominoe, worked, so either I solder the wires on the opposite side of the column or on the bottom rather than the top of that column terminal.


The Promicro flashed OK and this is already a usable Isogherkin, even if it is a tad bit harder to use the jumper to connect the right column pin with the right row pin - and don't get me started on combos - but it sufficed to map out and verify all pins.


Time for another practical lesson - let's practise on socketing a Promicro.


So far, so good.


I really could have cut the pins closer to the solder - but I wanted to have the GND and RST pins a little longer to simplify resetting the Promicro.


I should probably been more patient and got myself some more suitable cables, but I had already got so far, so I wanted to get the prototype Isogherkin working as soon as possible. Hence, I am working with prototype board cables. At least they're in multiple colours.


Things got messy quickly... It was a good idea to socket the Promicro, but the question is whether or not the socket took so much beating that the Promicro would be impossible to pry out of it... Once, I had to use a knife to cut through the short-circuit I had soldered between to pins. I also by mistake messed up the order of the cables and had to fix that in code by reordering the column pins...


One pin on the socket got so totally destroyed along with the terminal of the matching cable that I had to trim the end of the cable and solder it directly to the Promicro. So now we do know - at least for this cable, the socketing of the Promicro is not working...


It's a wonder that they don't short-circuit each others! But despite all the despair, it was quite a fun and educational challenge!


This prototype, with it's pointy cables, isn't exactly case-friendly. Nevertheless, it's just intended as a live prototype to put the concept to the test.


Dressed with keycaps. You can see how the absence of a top plate and my naivety when soldering the switches have made quite a few keys a little funnily oriented... But I have a fully functional Isogherkin prototype!

First time I tried it out, I discovered that while the intuitive order of pins in MATRIX_ROW_PINS worked, I had to reverse the order of the pins in MATRIX_COL_PINS as the keyboard initially had left to right ordered columns. How lucky that I just had to reverse the MATRIX_COL_PINS and reflash.

First Impressions

  • The prototype is really fragile. It would be quite easy to break it in half (but it is only a prototype)
  • It's easy to write text on
  • It's a bit harder to use for coding (V-B+M-COMM+U for a left curly bracket)
  • It will take a while to either get the TAPPING_TERM and COMBO_TERM just right - or learn to live with/adjust to them
  • The bottom row combos are easiest to strike with one's thumbs but a lot harder with one's other fingers - especially the pinkies
  • I don't like the fact that I seem to have to add code for any combinations of combos that might be needed (if nothing else, too much code will not fit the memory of the Promicro)
  • Regardless of whether I will ever deem the Isogherkin really usable or not, this experiment has been a really rewarding project, to equally amounts entertaining and educational