Author Topic: How does one connect the halves of a split DIY keyboard?  (Read 6965 times)

0 Members and 1 Guest are viewing this topic.

Offline Rose

  • Thread Starter
  • Posts: 62
  • Location: Raleigh, NC
How does one connect the halves of a split DIY keyboard?
« on: Mon, 02 March 2015, 09:37:54 »
Hello everyone!  This is my first post on GH.

I am getting ready to design and build my first ever mechanical keyboard.  I think I understand how the matrix wiring works.  I am just confused about how to connect the two halves of a split design.  Ergodox uses that one cable.  It seems like there would need to be a wire for each column and row.  If it is going to be an absolute nightmare to do a split design I will connect the two into one.  I just want to understand how this connection works and if I can do it without a PCB.

Thanks!

Offline foodz

  • Posts: 10
  • I make hardware frankensteins.
Re: How does one connect the halves of a split DIY keyboard?
« Reply #1 on: Mon, 02 March 2015, 10:18:41 »
The ergodox uses an MCP23018 I/O expander on the left side to send the left side input over a 3.5mm TRRS connector. This takes the 8x5 key matrix on the left side down to 2 wires and allows the MCP23018 I/O expander to talk to the main board over I2C. like this.

There are multiple ways to do it without an I/O expander. If you wanted to keep the split wire to a minimum, I have in the past used an arduino to expand the I/O and had it talk to the Teensy++ 2.0 over I2C.
Or, you can use a 13 wire ribbon cable, HDMI cable, etc to get the 8x5 key matrix to the main board.
« Last Edit: Mon, 02 March 2015, 10:26:56 by foodz »
Degadega.

Offline jacobolus

  • Posts: 3661
  • Location: San Francisco, CA
Re: How does one connect the halves of a split DIY keyboard?
« Reply #2 on: Mon, 02 March 2015, 10:32:58 »
Easiest way to do it is just send a ribbon cable across. But while that works pretty well at a desk, it might not be sturdy enough if you want something to carry with you on the go. If you need to send a cable with just a handful of wires in it (like RJ11, USB, TRRS or whatever) then you’ll need a chip on the second half to serialize the signal. As foodz said, the ergodox uses an I/O expander, but you could also use a more powerful microcontroller like a Teensy or something.
« Last Edit: Mon, 02 March 2015, 10:35:58 by jacobolus »

Offline Rose

  • Thread Starter
  • Posts: 62
  • Location: Raleigh, NC
Re: How does one connect the halves of a split DIY keyboard?
« Reply #3 on: Mon, 02 March 2015, 14:28:41 »
Okay thanks.  This I/O expander was the missing piece of my puzzle.

I am thinking I should use the same I/O expander as in the Ergodox because I will have less modifying of firmware to do-  another area in which I do not yet have experience.

Offline jacobolus

  • Posts: 3661
  • Location: San Francisco, CA
Re: How does one connect the halves of a split DIY keyboard?
« Reply #4 on: Mon, 02 March 2015, 15:10:43 »
Do you have a sketch of your planned layout?

Offline Findecanor

  • Posts: 5036
  • Location: Koriko
Re: How does one connect the halves of a split DIY keyboard?
« Reply #5 on: Mon, 02 March 2015, 15:31:23 »
Because matrix scanning strobes only one set (column or row) of switches at once, one option would be to use a decoder/multiplexer (such as the 74hc138) to reduce the strobe lines from up to 8 lines down to 3. So instead of outputtng one bit set and the rest zeroes (or the opposite), you would output a number.

Otherwise, if you design your logical matrix so that each hand's matrix is as close as possible to a square, then you would minimize the number of lines you would need.

BTW. The ErgoDox has a matrix that is 7 columns by 6 rows per hand, strobing each column in turn. Still 13 lines though. ;)
« Last Edit: Mon, 02 March 2015, 19:06:01 by Findecanor »

Offline vvp

  • Posts: 887
Re: How does one connect the halves of a split DIY keyboard?
« Reply #6 on: Mon, 02 March 2015, 18:29:08 »
You can go I2C to a port expander between the sides (that is 4 wires: Vcc, Gnd, SDA, SLC).
To speed the communication with the port expander up about 10 times, you can use SPI rather than I2C (that is 6 wires: Vcc, Gnd, SS, MOSI, MISO, SCLK).
Or you can go any of the special ways to scan the keyboard matrix. These will be even quicker. And for that, this is a nice overview of your options: http://www.openmusiclabs.com/learning/digital/input-matrix-scanning/
I went with parallel-in & parallel-out shift registers (needs 6 wires: Vcc, Gnd, iData, iClk, oLoad, oClk).

Offline technomancy

  • Posts: 134
Re: How does one connect the halves of a split DIY keyboard?
« Reply #7 on: Tue, 03 March 2015, 01:13:15 »
Okay thanks.  This I/O expander was the missing piece of my puzzle.

Another option is to simply build two one-handed keyboards. This is what PJE does with his OneHand design: http://deskthority.net/workshop-f7/onehand-20-keyboard-t6617.html

This is a dramatically simpler design, plus each can be used individually. The downside is that on Mac OS X, modifiers pressed on one keyboard cannot affect keypresses from the other keyboard. So depending on your OS, this might not be such a great idea.

Offline Rose

  • Thread Starter
  • Posts: 62
  • Location: Raleigh, NC
Re: How does one connect the halves of a split DIY keyboard?
« Reply #8 on: Tue, 03 March 2015, 16:21:12 »
Here is the current version of the layout I'm looking at.  I used keyboard-layout-editor.com to make it.  I think it's pretty similar to that key64 design.  I REALLY like the Atreus keyboard.  Especially the look of the one in the acrylic case.  There are plans available for so many awesome keyboards.  I'd probably make one those but I'm doing this to learn everything I can about 3D drafting, soldering, ergonomic design, micro controllers/programming firmware etc.  The goal is to learn AND acquire an awesome keyboard.

At this point I am considering combining the two halves into a one piece like the Atreus or the Truly Ergonomic.  It is going to be my first ever mechanical keyboard and I'm imagining that I'll want to take it to school most days when I'm doing research.

Suggestions?

Offline 0100010

  • Posts: 1127
  • Location: DFW, TX, US
  • Not Sure
Re: How does one connect the halves of a split DIY keyboard?
« Reply #9 on: Thu, 05 March 2015, 07:48:39 »
It always seemed counterintuitive to me to make a split design keyboard and then combine the halves in a single case.  If it was me, I would use a 16 port "IDE" style ribbon cable between the two halves (with the individual wires in the ribbon shredded and sleeved).  This way you only need one controller and there is no need for extra chips / coding and there is no delay between the halves.  (Poor) example :

  Quoting me causes a posting error that you need to ignore.

Offline Rose

  • Thread Starter
  • Posts: 62
  • Location: Raleigh, NC
Re: How does one connect the halves of a split DIY keyboard?
« Reply #10 on: Thu, 05 March 2015, 08:05:00 »
If I do use a single case I'll wire it normally like a non-split keyboard.  Just the layout will be split and angled for wrist comfort.

Offline dustpuppy

  • Posts: 19
Re: How does one connect the halves of a split DIY keyboard?
« Reply #11 on: Sun, 26 February 2017, 06:08:35 »
When designing two independent keyboards, under Windows, is it possible to do layer shifting on one keyboard and have that take effect on the other half ?

Offline Findecanor

  • Posts: 5036
  • Location: Koriko
Re: How does one connect the halves of a split DIY keyboard?
« Reply #12 on: Sun, 26 February 2017, 08:23:58 »
Not if you used a regular keyboard protocol such as USB HID or PS/2. Layers are internal to the keyboards.
You can do Shift and Control keys on one keyboard - because attaching those keys to other keys is done in Windows.

Maybe it would be possible if you used your own firmware and driver. That would be a bit of an undertaking, though.