I have successfully built a couple of handwired keyboards, among others the excellent Atomic keyboard.
Now I have started looking at building a split keyboard, with my own design. I am unsure how to go about solving the communication between the two parts.
My first, naïve plan was this: take a look at the Ergodox specs, and see if I could understand enough to use the Ergodox solution for split halves without the pcb, i.e. with hand wiring the electronics. I like the way the Ergodox halves can be connected/disconnected with a detachable cable, and I was thinking that the solution should be usable even with a slightly different layout.
I have a few questions, however. First, the Ergodox site (ergodox.org) seems to be down, and I don't know how to get hold of the pcb specifications.
Second: do you guys think this is a good approach? Are there well-working simpler solutions to connecting two keyboard halves? And would the approach I'm thinking of - to use the electronics from ergodox but hand-wiring the connections - work?
Need some advice on building a split keyboard
-
- Main keyboard: Filco MINILA
- Main mouse: Logitech MX Anywhere
- Favorite switch: MX Blues
- DT Pro Member: -
-
- Location: Stockholm, Sweden
- DT Pro Member: 0011
Sure it could work.
The I/O expander that the ErgoDox uses has 16 I/O lines on two 8-bit ports. The ErgoDox configures it to use one port for strobing and one port for sensing, thus a maximum of a 8×8 matrix but you don't have to do it that way. Each line is individually configurable either as an input or output so you could configure it a bit differently but then you would have to alter the firmware a bit more.
Here's a circuit diagram that I had found, but I forget who had made it. I don't think it is official... I don't see the capacitor on the I/O expander-side. You could also:
* Use two separate keyboards, each with its own USB cable. It usually works but there are some situations where it doesn't, involving hubs or on MacOS.
* Use a thick or wide cable in-between halves wired directly to the matrix. The first-generation Goldtouch is like this.
In general, the closer the logical matrix is to a square, the less number of signal lines will be needed for the same number of keys.
The I/O expander that the ErgoDox uses has 16 I/O lines on two 8-bit ports. The ErgoDox configures it to use one port for strobing and one port for sensing, thus a maximum of a 8×8 matrix but you don't have to do it that way. Each line is individually configurable either as an input or output so you could configure it a bit differently but then you would have to alter the firmware a bit more.
Here's a circuit diagram that I had found, but I forget who had made it. I don't think it is official... I don't see the capacitor on the I/O expander-side. You could also:
* Use two separate keyboards, each with its own USB cable. It usually works but there are some situations where it doesn't, involving hubs or on MacOS.
* Use a thick or wide cable in-between halves wired directly to the matrix. The first-generation Goldtouch is like this.
In general, the closer the logical matrix is to a square, the less number of signal lines will be needed for the same number of keys.
-
- Main keyboard: Filco MINILA
- Main mouse: Logitech MX Anywhere
- Favorite switch: MX Blues
- DT Pro Member: -
Thank you so much, that was exactly what I needed.
And what do I do with that capacitor? I have seen it described as optional, but other sites say that it's a good idea to include it. I am not entirely sure I have understood where it should be placed. And is there something else required other than connecting it in the right place? In the assembly instructions for the Massdrop ergodox, there is a connection between to pins on the expander that the instructions say should be shorted if the capacitor is used. Is that always the case?
And what do I do with that capacitor? I have seen it described as optional, but other sites say that it's a good idea to include it. I am not entirely sure I have understood where it should be placed. And is there something else required other than connecting it in the right place? In the assembly instructions for the Massdrop ergodox, there is a connection between to pins on the expander that the instructions say should be shorted if the capacitor is used. Is that always the case?
-
- DT Pro Member: -
A decoupling capacitor between the power and ground suppresses noise.
Some keyboards use a capacitor to debounce switches.
Other keyboards use firmware to debounce switches.
If the keyboard half has 24 keys or less, use shift registers.
If the keyboard half has more then 24 keys or has LEDs, use an I/O expander.
Here are some tutorials on connecting split keyboards:
https://github.com/wolfv6/keybrd/blob/m ... yboards.md
https://github.com/wolfv6/keybrd/blob/m ... gisters.md
https://github.com/wolfv6/keybrd/blob/m ... ith_IOE.md
Some keyboards use a capacitor to debounce switches.
Other keyboards use firmware to debounce switches.
If the keyboard half has 24 keys or less, use shift registers.
If the keyboard half has more then 24 keys or has LEDs, use an I/O expander.
Here are some tutorials on connecting split keyboards:
https://github.com/wolfv6/keybrd/blob/m ... yboards.md
https://github.com/wolfv6/keybrd/blob/m ... gisters.md
https://github.com/wolfv6/keybrd/blob/m ... ith_IOE.md
- mecano
- Location: Paris
- Main keyboard: Tipro KMX128
- Main mouse: Kensington Orbit Trackball with scroll ring
- Favorite switch: Beam Spring
- DT Pro Member: -
wolfv talking about speed do you think there is a benefit in using i/o expander instead of charlieplexing each sides (not talking about others side effects as number of wires and so on)?
-
- Location: Stockholm, Sweden
- DT Pro Member: 0011
If you do charlieplexing, I think you will lose rollover.
- mecano
- Location: Paris
- Main keyboard: Tipro KMX128
- Main mouse: Kensington Orbit Trackball with scroll ring
- Favorite switch: Beam Spring
- DT Pro Member: -
Yes indeed, forgot that, any benefit in using the MCP23017 instead of the MCP23S17?
I have no idea how fast the I2C interface is on the teensy but if running at proc speed that'll be a 6MHz boost.
I have no idea how fast the I2C interface is on the teensy but if running at proc speed that'll be a 6MHz boost.
-
- Location: Stockholm, Sweden
- DT Pro Member: 0011
The MCP23S17 has SPI interface instead of I2C. SPI would need two more signal lines in the interconnect cable.
The AVR should support both.
The AVR should support both.
- mecano
- Location: Paris
- Main keyboard: Tipro KMX128
- Main mouse: Kensington Orbit Trackball with scroll ring
- Favorite switch: Beam Spring
- DT Pro Member: -
Yup wolfv is using this one in his tutorial while the MCP23017 looks more interresting.
edit: didn't read the chip on your schematic, the MCP23018 looks to be basically the same with a 5v tolerant pin, so it's even better, thanks for sharing
edit: didn't read the chip on your schematic, the MCP23018 looks to be basically the same with a 5v tolerant pin, so it's even better, thanks for sharing
-
- DT Pro Member: -
MCP23017 and MCP23S17 are push-pull.
MCP23018 and MCP23S18 are open drain.
MCP23017 and MCP23018 are I2C.
MCP23S17 and MCP23S18 are SPI.
I2C is fast enough for scanning up to 5 rows.
The keybrd_DH (DodoHand) sketch polls 5 rows over I2C at 7.5ms per keyboard scan.
I2C speed is limited by the I/O expander and length of wire (not the controller's speed).
SPI is much faster, but requires 2 additional wires.
I would use SPI if the I/O expander scans more then 5 rows.
MCP23018 and MCP23S18 are open drain.
MCP23017 and MCP23018 are I2C.
MCP23S17 and MCP23S18 are SPI.
I2C is fast enough for scanning up to 5 rows.
The keybrd_DH (DodoHand) sketch polls 5 rows over I2C at 7.5ms per keyboard scan.
I2C speed is limited by the I/O expander and length of wire (not the controller's speed).
SPI is much faster, but requires 2 additional wires.
I would use SPI if the I/O expander scans more then 5 rows.
-
- Location: US
- Main keyboard: Planck /Atomic
- Main mouse: G602
- Favorite switch: blue
- DT Pro Member: -
QMK now has support for the Let's Split which uses a pro micro in each hand. It is the easiest to hand wire by far.