Homemade split keyboard

nepotrib

12 Apr 2013, 01:57

Hi there! I'm a new member and here is my small project. I hope it would be interesting for community.

I wondered why traditional keyboard layouts don't allow thumb finger press more keys than just a Spacebar. Ctrl/Alt keys often are parts of useful shortcuts especially in different IDEs/advanced editors/terminal emulators etc.
And that's why I always wanted to find some way of pressing Ctrl/Alt key with thumbs. First decision was to use Apple keyboard (wired, without numpad block), it has short Spacebar and both command keys are accessible with thumbs. I set up remapping and it worked for me at first but then I decided to go further. And that's how I started making my prototype.

Main requirements were:
  • Split design
  • Symmetrical parts. Same positions have opposite roles (like del vs backspace)
  • No stagger (just wanted to try that out and that looked easier for my project)
  • Minimum differences from standard layout
  • Pinky should press less keys
  • Thumbs and index fingers press more
I touch type so there was no need in labels, blank keys looks cooler and I could always remap them to something else without re-labeling.
There was a spare Arduino board so I decided to use it as a controller.
I ordered blank key caps set (and few additional keys), cherry MX blue switches from WASD.

Constraints were:
  • keycaps of regular sizes (WASD has only standard keys and each row has its own profile, so for example I could not order 1.25x for 3rd row)
  • 64 keys (due to shift registers used)
  • No fancy key placement, just keys organized in rows
  • Homemade PCB
Actually I have been highly impressed by Key64 and Humble Hacker designs so there are many ideas from those keyboards.

What I added is: [ and ] keys on different sides (not just right), += key in place of CapsLock (pretty frequent key as for programmer). Four keys for each thumb. And Since Cherry MX stems are plus signs I turned those four keys upside down for comfortable pressing.

I tried different designs but finally came up with this one (this is main layer):
layout.PNG
layout.PNG (22.7 KiB) Viewed 17961 times
FN key turns second layer on. Main features here are:
  • arrow keys instead of jkl and i.
  • F1-F10 instead of 1-0
This is how it currently looks:
IMG_20130319_005834.jpg
IMG_20130319_005834.jpg (357.51 KiB) Viewed 17961 times
IMG_20130319_005120.jpg
IMG_20130319_005120.jpg (450.29 KiB) Viewed 17961 times
Keys are PCB-mounted only, without plate, I put a diode in each so there are 4 leads per switch and they keep switches firmly.

Since there are 64 keys I used 8x8 scanning matrix, that would require 16 free pins on Arduino.
I used two shift registers, 74HC164 and 74HC165, one for input (rows) another for setting a columns which is currently being scanned.
Arduino is driving them and outputs keypresses via USB to host (reprogrammed USB chip acts as USB keyboard)

Each half contains 4 rows by 8 columns so there are 12 wires attached to each board. Breadboard in the middle contains shift registers. and then only 7 wires go to arduino (3 for one register, 2 for another and vcc/gnd).

No problems with multiple pressed keys, 6KRO, Firmware actually remembers more than 6 presses but due to USB protocol limitation sends only last 6 pressed keys.

Next step is to make some case for it, just have to figure out how to do it better.
It would be nice to hear some ideas/suggestions.

PS. I'm using this keyboard right now :)

User avatar
bearcat

12 Apr 2013, 07:40

Looks great! I've been working from nearly the exact same requirements you have and yet our designs ended up pretty different :)

Do you have any pictures of the wiring on the bottom? Did you etch a board, or wire it by hand?

As for the rest of the case, my only advice would be to figure out what form factor the electronics need to have; esp. if you're keeping the arduino-based firmware. Other than that, when designing a box, just figure out how the corners will come together & you're done ;)

nepotrib

12 Apr 2013, 12:53

I used etching. Here is PCB design (prepared in ExpressPCB). It is single side with few jumper wires (shown as green):
pcb.png
pcb.png (107.47 KiB) Viewed 17909 times
Since this is a prototype, I used some old material, hence soldering is quite dirty
Also I have added some non-functional patterns to minimize etching solution usage.

Actual look of the back side of PCB (shame on me):
pcb_photo.png
pcb_photo.png (762.14 KiB) Viewed 17909 times

User avatar
Icarium

12 Apr 2013, 14:43

Oohh, third index finger row, have you gotten used to typing on it, yet? :)

User avatar
Muirium
µ

12 Apr 2013, 18:19

Great design. Of all the customs that I've seen, this makes the most sense. I'd want Ctrl+Option+Command all in a row for chording (so used to that for adding my own shortcuts in apps on the Mac). But I lift my hands out of home row too much, I know.

Very sound principles on show here. The migration from pinkie to index finger begins.

nepotrib

12 Apr 2013, 18:36

Icarium wrote:Oohh, third index finger row, have you gotten used to typing on it, yet? :)
All keys are easily accessible by index fingers, even "|\", it's like pressing "6" with right hand on traditional keyboard.
Plus I find it extremely handy to have "Return" "Backspace" under index fingers.

User avatar
philpirj

16 Apr 2013, 12:38

Looks extremely nice!
I've made a case from bent 1.5mm laser cut acrylic plate, but i feel that plywood would be better, since it's less brittle. The bad thing here is that you would need to desolder the switches, mount them to the top case plate and then solder again. I went through this.
Probably it would be better just to add some cover to the bottom and some tenting system (if you planned to do so), so you don't need to resolder the switches over again.
Meanwhile you can order teensy and think on how are you going to put all this to the case/ bottom cover.
Thanks for the idea of shift registers, i was going to use I2C mux/demux like PCF8574AP. Your option seems to be simpler. Pity that tmk_keyboard doesn't support port expanders of any kind.

User avatar
InSanCen

17 Apr 2013, 21:23

Fancy sharing the code and the non-keyboard part of the Schematic? I have an Arduino nano sitting here looking for a purpose.

nepotrib

18 Apr 2013, 23:19

Schematic (I hope it is readable :) ):
IMG_20130418_235322.jpg
IMG_20130418_235322.jpg (236.51 KiB) Viewed 17722 times
Sources can be found here: https://bitbucket.org/chyvonomys/kbem/src/

At the beginning it was a two part solution: firmware sent evens about row/column presses. And there was a program on host computer listening serial port and translating it into OS keyboard events.
For this solution look into arduino/kb0 for firmware, and windows/linux folders for host programs.

Currently it works as USB keyboard so there is no need in host program. All scanning and layer/keycode logic has been moved to firmware: arduino/kb1. However for this to work you have to put alternative firmware to secondary chip on your Arduino UNO (8u2 chip).

Basically you have to put your device into DFU programming mode by short circuiting some pins. And put special USB HID firmware on it. After that it will no longer act as Serial Port so to put another "main" firmware you'll need to put back Serial firmware in DFU mode.

More info about USB HID firmware here: http://hunt.net.nz/users/darran/weblog/ ... art_2.html
On windows I used "Atmel Flip" programmer to put alternative firmware.

nepotrib

18 Apr 2013, 23:24

InSanCen wrote:I have an Arduino nano sitting here looking for a purpose.
My approach with putting USB HID firmware is incompatible with your Arduino Nano. There is another kind of Serial communication chip (FTDI) than in UNO.

I hope shift registers schematic would be helpful though. I learned a lot regarding matrix scanning from this site: http://www.openmusiclabs.com/learning/d ... -scanning/

februus

04 May 2013, 06:23

Would it be possible for you to provide the files you used for the PCB boards?

nepotrib

17 May 2013, 19:23

februus wrote:Would it be possible for you to provide the files you used for the PCB boards?
Sure, here is file for ExpressPCB: https://www.dropbox.com/s/xjmtycs97wmzec5/kb-v3.pcb

User avatar
rominronin

19 Apr 2016, 11:14

Just found this project while researching for my own split keyboard implementation. I'm impressed by your keylayout, @nepotrib, and may adopt some of its features...

User avatar
cookie

19 Apr 2016, 12:36

Ouh man, the PCB, I love these raw looking things.
Great project :)

Post Reply

Return to “Workshop”