A split, curved, ortholinear and 3D printed keyboard

macroxue

19 Dec 2016, 04:20

The Layout
Like many others, I started looking into better keyboards when my fingers and wrists got tingling and stiff after a full day of programming. I learned about RSI and bought ergonomic keyboards like Microsoft Sculpt and Kinesis Freestyle. The keyboards do help but they still have some issues. One day at work, I experienced a pain in the base joint of my left index finger so I paid attention to its movement. The next time when I felt the pain, the finger was bending left to reach the R key while other fingers were resting on the home row. It was a poor typing technique but I didn’t need to do that if the R key was positioned straight above. Then I knew what I needed was the so-called ortholinear layout.

After sketching some radical layouts on paper/screen, I decided not to deviate too much from what I’m used to. The layout below is basically ortholinearized Freestyle, with two columns of shortcut keys removed from the left split. The shortcut keys can be convenient sometimes but more often they are in the way of my left-handed mousing.
Keyboard layout
Keyboard layout
keyboard-layout.jpg (63.02 KiB) Viewed 2338 times
Curved Frames
Initially I wasn’t sure that I would like a curved keyboard, so I built a prototype with Bananagrams. Each Bananagram tile happens to be 19x19mm2, perfectly matching the 19mm key distance. The tiles are glued to a piece of paper at the back. When flipped over, the right split becomes the left split and it can be bent in many ways.
Bananagram
Bananagram
IMG_20161218_135604.jpg (1.44 MiB) Viewed 2338 times

I tried a thumb cluster and didn’t like the feel of it, because my thumbs are not as flexible as other fingers. One thumb can handle at most three keys in my test. Besides, a thumb cluster complicates the design when the keys need to be rotated for better reach.

Eventually I settled on a simple design: no curved columns. The keycaps I got are sculpted so they will provide some curved feel for columns. Curved rows are divided into three sections: two columns for the thumb and index finger, one column for middle finger, and four columns for the ring and pinky fingers. (The extra two columns of the right split are for all fingers after a major elbow movement.) The angular difference between neighboring sections is 10 degrees.
3D model of the left split
3D model of the left split
left-hand-3d.png (49.07 KiB) Viewed 2338 times
3D model of the right split
3D model of the right split
right-hand-3d.png (49.42 KiB) Viewed 2338 times
The frames are 12mm thick and the wiring holes are 6mm in diameter, permitting up to six 22AWG wires to go through. In the actual build, I ended up needing just four wires through some holes in the bottom row of the right split, after some effort of distributing wires to other rows.

3D printers cannot print hangover structures without supports, so I cut each split into three pieces and printed them separately. The left split took seven hours and the right split nearly nine hours, roughly one hour per column. The three pieces are connected by two thin pieces, which are inserted into wiring holes and super-glued to the top and bottom sides of the frame, as shown below.
Connector piece
Connector piece
IMG_20161218_004713.jpg (203.58 KiB) Viewed 2338 times
My 3D printer came with two spools of filament of random colors, red and white. I originally planned to have red for the left split and white for the right. Later I found out that the middle pieces of the splits were interchangeable, so I swapped them to make each split a little more inviting to the eyes.

There are holes for stabilizers beside 2x1 and 1x2 keys but I ended up leaving them empty. The keys are already very easy to press without stabilizers and I don’t want to make wiring harder with stabilizers in the way.

On my first prototype, I found that keys would get stuck on each other because 19mm of key distance is not enough to clear raised keycaps on a curved frame. The picture below shows the failure. Since then I’ve added keycaps in 3D modeling and made sure that they were sufficiently spaced out.
Stuck keycaps
Stuck keycaps
IMG_20161218_135959.jpg (958.96 KiB) Viewed 2338 times

Controller and Firmware
For the controller, I highly recommend Teensy 3.2. PJRC has done a great job of integrating Teensy into Arduino IDE, i.e. Teensyduino. Writing and testing code for Teensy 3.2 was a breeze in Teensyduino. On my commute, I learned serial, keyboard and mouse programming from tutorials on the PJRC website and examples that come with Teensyduino. Then in a weekend, I developed my own firmware and tested it on a 2x2 keyboard. The firmware may not be as feature-rich as TMK, but it works for me and it’s a lot of fun to write.

Below is a picture of the initial test setup. Nothing was soldered. I dreamt of building a full keyboard without soldering at all. However, since then, I have given up on the idea, for even the 2x2 was too unreliable. It would be no fun typing on a keyboard that kept dropping keystrokes.
2x2 prototype
2x2 prototype
IMG_20161130_225624.jpg (1.19 MiB) Viewed 2338 times
Here is a snippet of the firmware defining the left split. It is straightforward to support a full keyboard or a different layout.

Code: Select all

constexpr int R = 6, C = 7;
const int row_pins[R] = { 1, 0, 2, 7, 9, 22 };
const int col_pins[C] = { 3, 8, 19, 23, 18, 20, 21 };
Layer<R,C> layers[] = {
  { "qwerty", l0, l1,
    {
      { cap, prt,  f1,  f2,  f3,  f4,  f5 },
      {'\\', '`', '1', '2', '3', '4', '5' },
      { esc,'\'', 'q', 'w', 'e', 'r', 't' },
      { tab,   0, 'a', 's', 'd', 'f', 'g' },
      { lsh,   0, 'z', 'x', 'c', 'v', 'b' },
      { lgu,  fn, lct,   0, lal, bks,   0 },
    }
  },
  { "qwerty-fn", l1, l1,
    {
      {  l0,  l2,  f1,  f2,  f3,  f4,  f5 },
      {'\\', '`', '1', '2', '3', '4', '5' },
      { esc,'\'', 'q', 'w', 'e', 'r', 't' },
      { tab,   0, 'a', 's', 'd', 'f', 'g' },
      { lsh,   0, 'z', 'x', 'c', 'v', 'b' },
      { lgu,  fn, lct,   0, lal, bks,   0 },
    }
  },
};
Below are some stats from Arduino IDE when the firmware was compiled.
Sketch uses 21,996 bytes (8%) of program storage space. Maximum is 262,144 bytes.
Global variables use 6,576 bytes (10%) of dynamic memory, leaving 58,960 bytes for local variables. Maximum is 65,536 bytes.
According to the stats, it seems possible to run the firmware on Teensy LC since it has 62KB of flash and 8KB of RAM. Maybe I will try LC to reduce the cost of my next build.

The Wiring
Wiring turned out to be the most labor-intensive part of the build. I started with the right split, which is bigger with six rows and nine columns. It took me about twelve hours to finish in a span of four nights. Soldering is not exactly my forte, and working in a tight 14x14mm2 space with shaky hands certainly made it worse. Often the iron touched the plastic walls and burned black spots on them. Soldering points kept coming loose due to wires being pulled or bent as well.

Eventually I got better at it. The left split, which has six rows and seven columns, took me six hours in a weekend to complete. Below are the pictures of the left split before and after wiring.
Before wiring
Before wiring
IMG_20161217_120814.jpg (1.05 MiB) Viewed 2338 times
After wiring
After wiring
IMG_20161218_012007.jpg (1.47 MiB) Viewed 2338 times
The grid forces the wires to be cleanly laid out but it makes wiring harder too. Maybe I will make it more open for the next design.

It turns out to be quite hard to connect the two splits into a single logical piece. I thought about running 13 wires from the left split to the right, but that would look ugly. Besides, I don’t really have much space to work with under a split. I had to settle with two Teensys. That way, each split can be programmed and used independently. The downside to this is that the Fn key only works within a split. I think my next design will have an empty row at the top of the frame for housing Teensy and running wires to it.

Look and Feel
The keyboard
The keyboard
IMG_20161218_010452.jpg (1.53 MiB) Viewed 2338 times
The keyboard is not yet finished but it’s fully functional. As a matter of fact, this article was produced on the new keyboard entirely. The splits are currently supported by Lego pieces so weight doesn’t fall on the Teensys. Later I will print a housing for the Teensy, which also supports the keyboard. To prevent the splits from moving around while I’m typing, I applied the best high-tech solution I had access to, rubber bands. I assume this can be easily fixed by gluing a few rubber feet to the bottom of the frame.

The left split is still missing a few 2x1 keycaps so it looks a bit weird. I need to be careful not to jam my pinky in the wide gaps. The right split looks decent and feels right to type on. I will probably just buy another set of blank keycaps and mirror the same keycaps from the right to the left.

Gateron Red switches are really easy on my fingers so I’m extremely happy with my choice. The ortholinear layout takes some time getting used to. At the beginning, I kept messing up on ‘m’ and ‘n’ but now I’m as good as on any other keyboard. I really like having backspace on my left thumb because it’s much easier to correct mistakes. The split and the tent keep my wrists straight and in natural positions, so in the long run, I hope this keyboard will help relieve my RSI symptoms.

Cost Rundown
Here is a rundown of things that I purchased during the course.
  • FlashForge Creator Pro: $900
  • 3D print removal tool: $10
  • 2 Teensy 3.2: $50
  • 100 Diodes: $5
  • 100 Gateron Red switches: $43
  • 120 PBT blank keycaps: $40
  • 6-color 22AWG hookup wires: $20
Of course the cost of 3D printer will be amortized over many keyboards and other projects. I also have at least three quarters of the hookup wires left. So far I estimate the cost of all the materials to be $150. If I can figure out how to use only one Teensy LC, the next build will be close to $110.

After all, one-of-a-kind keyboard just for me: priceless!

Acknowledgment
I have learned a great deal from others who ventured into the fun world of custom keyboards before me. Frequently I found myself going back to these sites when I was stuck. Thanks for sharing! Bearing the same spirit, I have put my 3D models and firmware on GitHub. Hopefully they will be useful to you on some day.

User avatar
vvp

19 Dec 2016, 14:00

Interesting way to curve a keyboard. Maybe you can consider to curve the bottom keyboard row up instead. You would still keep a simple shape. I tnink that the bottom row curved up is the most important part of any curving on keyboards like kinesis or maltron. It allows you to hit the bottom row keys easily with fingers. And it is good to have separate thumb clusters too.
Of course, if you intend to press the bottom row keys only with thumbs then you should not curve it up :)
Adding some column stagger helps too.

macroxue

24 Dec 2016, 01:07

I curved the keyboard this way to help my index fingers, which are shorter than my middle fingers and ring fingers. I assume staggered columns can help too and I may give them a try in my next build.

I actually started 3D modeling with a bowl shape, i.e. curved rows and curved columns. During my test with Bananagram tiles, I found out that thumb keys need to be moved out of the bowl so they are comfortable to press. Since this was my first build, I decided not to get too far away from what I'm used to, which is a Kinesis Freestyle at work and a Microsoft Sculpt at home.

A thumb cluster seems to be a good idea but I also read about people complaining about the thumb reaching too far. I don't have big hands. In my own test, my thumb can cover up to three keys: Alt, Space and an additional key below Space. Maybe I will borrow a Kinesis Advantage and see how well a thumb cluster suits me.

Post Reply

Return to “Keyboards”