Difference between revisions of "Custom bluetooth keyboard"
(→Parts) |
m |
||
(39 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{Archived}} | ||
+ | |||
Bluetooth conversion of a [http://en.wikipedia.org/wiki/Kinesis_(keyboard) Kinesis contour keyboard] to a bluetooth keyboard. | Bluetooth conversion of a [http://en.wikipedia.org/wiki/Kinesis_(keyboard) Kinesis contour keyboard] to a bluetooth keyboard. | ||
Line 46: | Line 48: | ||
** Use keyboard as audio extender - include a headphone port in keyboard | ** Use keyboard as audio extender - include a headphone port in keyboard | ||
** Kinesis has a key recognition click speaker built in which can be hard to hear when listening to music, but might still annoy others | ** Kinesis has a key recognition click speaker built in which can be hard to hear when listening to music, but might still annoy others | ||
+ | ** WT12 will do low-fi audio such as a typical BT headset, but does not support analog A2DP (use WT32 instead) | ||
*** Overlay key click sound over bluetooth audio signal | *** Overlay key click sound over bluetooth audio signal | ||
* USB interface for charging | * USB interface for charging | ||
Line 62: | Line 65: | ||
** Needs to connect to the controller directly for most functions, so really only feasible with the custom controller | ** Needs to connect to the controller directly for most functions, so really only feasible with the custom controller | ||
** Need to verify keyboard's bluetooth controller can connect to two devices at once (PC and pedal(s)) | ** Need to verify keyboard's bluetooth controller can connect to two devices at once (PC and pedal(s)) | ||
+ | * Battery status report via bluetooth | ||
+ | ** Might be able to do this with just the ADC on the micro, but might need something like [http://www.sparkfun.com/products/10617 this] for detection | ||
+ | ** WT12 does not directly read battery level (use WT32 instead), though reading with MCU and reporting over SPP link would work | ||
= Prototype = | = Prototype = | ||
Line 67: | Line 73: | ||
PS/2 communication (according to the [http://www.pjrc.com/teensy/td_libs_PS2Keyboard.html Arduino PS/2 library]) only requires an interrupt pin and a generic IO pin. The WT12 requires a serial channel. These requirements are pretty basic, so any microcontroller should work fine. Additional IO might be desirable for a BT pairing button, but this feature could also be embedded into a special key combination on the keyboard itself. | PS/2 communication (according to the [http://www.pjrc.com/teensy/td_libs_PS2Keyboard.html Arduino PS/2 library]) only requires an interrupt pin and a generic IO pin. The WT12 requires a serial channel. These requirements are pretty basic, so any microcontroller should work fine. Additional IO might be desirable for a BT pairing button, but this feature could also be embedded into a special key combination on the keyboard itself. | ||
+ | |||
+ | == To-Do list == | ||
+ | * Order prototype parts | ||
+ | * Assemble prototype | ||
+ | * Test PS/2 data aquisition | ||
+ | * Test bluetooth HID output | ||
+ | * Determine power consumption (will probably be somewhat high as the keyboard is likely going to not have any kind of power saving mode) | ||
+ | * Find an appropriate battery | ||
+ | * Design custom PCB for a final version | ||
+ | * Order final version parts | ||
+ | * Assemble final version | ||
== Parts == | == Parts == | ||
− | * Bluegiga WT12 Bluetooth module ([http://www.inmojo.com/store/jeff-rowberg/item/wt12-uart-bluetooth-breakout-board/ serial only breakout board] - $40, [http://www.inmojo.com/store/jeff-rowberg/item/wt12-bluetooth-breakout-board/ full breakout board] - $50) | + | * Bluegiga WT12 Bluetooth module ([http://www.inmojo.com/store/jeff-rowberg/item/wt12-uart-bluetooth-breakout-board/ serial only breakout board] - $40, [http://www.inmojo.com/store/jeff-rowberg/item/wt12-bluetooth-breakout-board/ full breakout board] - $50, [http://ca.mouser.com/ProductDetail/Bluegiga-Technologies/WT12-A-AI4/?qs=sGAEpiMZZMu3sxpa5v1qrtmBpKx54T3%2FJoc62K8RZWc%3D just the module] - $28) |
* Microcontroller development board | * Microcontroller development board | ||
** Arduino (easy to use, PS/2 libraries) - $10-$50 | ** Arduino (easy to use, PS/2 libraries) - $10-$50 | ||
Line 76: | Line 93: | ||
* [http://www.solarbotics.com/products/50550/ Logic level converter] (PS/2 device requires 5v and WT12 requires 3.3v; microcontroller could use either) - $2 | * [http://www.solarbotics.com/products/50550/ Logic level converter] (PS/2 device requires 5v and WT12 requires 3.3v; microcontroller could use either) - $2 | ||
* Power supply (for testing could use bench supply but USB charged Lithium Ion would be good to prototype too) | * Power supply (for testing could use bench supply but USB charged Lithium Ion would be good to prototype too) | ||
− | * Right angle | + | ** [http://www.sparkfun.com/products/10300 USB LiPo charger with built-in boost converter] - $20 |
− | + | * 3v3 voltage regulator - $2 | |
+ | * [http://ca.mouser.com/ProductDetail/E-Switch/EG1206A/?qs=sGAEpiMZZMtHXLepoqNyVeddQslW3BFOwgoxRUo4V%252bU%3d Right angle SPDT slide switch] with 3mm spacing between pins - for enabling memory lockout feature of the Kinesis pro on other versions of the keyboard - $0.50 | ||
+ | |||
+ | == Schematic == | ||
+ | Block diagram: | ||
+ | <tt> | ||
+ | VCC1 = 5V VCC2 = 3V3 | ||
+ | ------------------------ | ||
+ | VCC1 VCC1 VCC1 VCC2 VCC2 VCC1 VCC2 | ||
+ | _____________ ^ _____________ ^ ^ _____________ ^ ^ ____________ ^ ^ | ||
+ | | |-' | |-' '-| |-' '-| | | | | ||
+ | | | | | RTS | | RTS | | | ___________ | | ||
+ | | | | |---------| |---------| | | | | | | ||
+ | | | CLOCK | | CTS | LOGIC | CTS | | |----| Voltage |----| | ||
+ | | KINESIS |-------| ARDUINO |---------| LEVEL |---------| BLUEGIGA | | | Regulator | | | ||
+ | | | DATA | | TXD | CONVERTER | RXD | WT12 | === |___________| === | ||
+ | | |-------| |---------| |---------| | | | | | ||
+ | | | | | RXD | | TXD | | '----------+----------' | ||
+ | | | | |---------| |---------| | | | ||
+ | |_____________|-, |_____________|-, ,-|_____________|-, ,-|____________| | | ||
+ | v v v v v v | ||
+ | GND GND GND GND GND GND | ||
+ | </tt> | ||
+ | |||
+ | == Key Matrix == | ||
+ | The creator of the HumbleHacker keyboard replaced the controller in his keyboard and kindly [http://humblehacker.com/blog/20100720/hacking-the-kinesis-contoured-keyboard/ posted] his reverse-engineered key matrix. I have copied them below, with some basic modifications. | ||
+ | |||
+ | (Keywell pin numbers start at 1 closest to the thumb switches and end at 13 towards the function keys) | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |+ Left Keywell | ||
+ | |- | ||
+ | ! Pin | ||
+ | ! width="60" | 6 | ||
+ | ! width="60" | 7 | ||
+ | ! width="60" | 8 | ||
+ | ! width="60" | 10 | ||
+ | ! width="60" | 11 | ||
+ | ! width="60" | 12 | ||
+ | |- | ||
+ | ! scope="row" | 1 | ||
+ | | || \ || IN || LT || || RT | ||
+ | |- | ||
+ | ! scope="row" | 2 | ||
+ | | LS || Z || X || C || V || B | ||
+ | |- | ||
+ | ! scope="row" | 3 | ||
+ | | CP || A || S || D || F || G | ||
+ | |- | ||
+ | ! scope="row" | 5 | ||
+ | | TB || Q || W || E || R || T | ||
+ | |- | ||
+ | ! scope="row" | 13 | ||
+ | | = || 1 || 2 || 3 || 4 || 5 | ||
+ | |} | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |+ Right Keywell | ||
+ | |- | ||
+ | ! Pin | ||
+ | ! width="60" | 1 | ||
+ | ! width="60" | 2 | ||
+ | ! width="60" | 3 | ||
+ | ! width="60" | 6 | ||
+ | ! width="60" | 12 | ||
+ | ! width="60" | 13 | ||
+ | |- | ||
+ | !scope="row" | 4 | ||
+ | | UP || DN || || || [ || ] | ||
+ | |- | ||
+ | !scope="row" | 7 | ||
+ | | N || , || M || RS || . || / | ||
+ | |- | ||
+ | !scope="row" | 8 | ||
+ | | H || K || J || ' || L || ; | ||
+ | |- | ||
+ | !scope="row" | 9 | ||
+ | | Y || I || U || \ || O || P | ||
+ | |- | ||
+ | !scope="row" | 10 | ||
+ | || 6 || 8 || 7 || - || 9 || 0 | ||
+ | |} | ||
+ | |||
+ | (Thumbswitch pin numbers start at 1 closest to the center of the keyboard and end at 10 towards the keywells) | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |+ Left Thumbswitches | ||
+ | |- | ||
+ | ! Pin | ||
+ | ! width="60" | 1 | ||
+ | ! width="60" | 2 | ||
+ | ! width="60" | 3 | ||
+ | ! width="60" | 8 | ||
+ | |- | ||
+ | !scope="row" | 4 | ||
+ | | SL3 || || SL6 || SL4 | ||
+ | |- | ||
+ | !scope="row" | 5 | ||
+ | | || SL1 || SL5 || SL2 | ||
+ | |} | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |+ Right Thumbswitches | ||
+ | |- | ||
+ | ! Pin | ||
+ | ! width="60" | 3 | ||
+ | ! width="60" | 4 | ||
+ | ! width="60" | 5 | ||
+ | ! width="60" | 6 | ||
+ | |- | ||
+ | !scope="row" | 7 | ||
+ | | SR1 || || SR2 || SR5 | ||
+ | |- | ||
+ | !scope="row" | 8 | ||
+ | | SR4 || SR3 || SR6 || | ||
+ | |} | ||
+ | |||
+ | (Function key pins start with 1 near the USB/PS2 cable and 13 near the keywells) | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |+ Left Function Keys | ||
+ | |- | ||
+ | ! Pin | ||
+ | ! width="60" | 2 | ||
+ | ! width="60" | 3 | ||
+ | ! width="60" | 4 | ||
+ | ! width="60" | 6 | ||
+ | ! width="60" | 7 | ||
+ | ! width="60" | 10 | ||
+ | ! width="60" | 11 | ||
+ | |- | ||
+ | !scope="row" | 1 | ||
+ | | ESC || || || || || F1 || F2 | ||
+ | |- | ||
+ | !scope="row" | 5 | ||
+ | | F6 || F7 || F8 || || || || | ||
+ | |- | ||
+ | !scope="row" | 8 | ||
+ | | F3 || || || F4 || F5 || || | ||
+ | |} | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |+ Left Function Keys (Condensed) | ||
+ | |- | ||
+ | ! Pin | ||
+ | ! width="60" | 2 | ||
+ | ! width="60" | 3,6,10 | ||
+ | ! width="60" | 4,7,11 | ||
+ | |- | ||
+ | !scope="row" | 1 | ||
+ | | ESC || F1 || F2 | ||
+ | |- | ||
+ | !scope="row" | 8 | ||
+ | | F3 || F4 || F5 | ||
+ | |- | ||
+ | !scope="row" | 5 | ||
+ | | F6 || F7 || F8 | ||
+ | |} | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |+ Right Function Keys | ||
+ | |- | ||
+ | ! Pin | ||
+ | ! width="60" | 1 | ||
+ | ! width="60" | 2 | ||
+ | ! width="60" | 5 | ||
+ | ! width="60" | 8 | ||
+ | ! width="60" | 7 | ||
+ | ! width="60" | 10 | ||
+ | ! width="60" | 11 | ||
+ | |- | ||
+ | !scope="row" | 3 | ||
+ | | PG || KY || || || || || | ||
+ | |- | ||
+ | !scope="row" | 4 | ||
+ | | || || PB || || || || | ||
+ | |- | ||
+ | !scope="row" | 6 | ||
+ | | || || F9 || F10 || F11 || || | ||
+ | |- | ||
+ | !scope="row" | 9 | ||
+ | | || || F12 || || || SL || PS | ||
+ | |} | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |+ Right Function Keys (Condensed) | ||
+ | |- | ||
+ | ! Pin | ||
+ | ! width="60" | 5 | ||
+ | ! width="60" | 8/1/11 | ||
+ | ! width="60" | 7/2/10 | ||
+ | |- | ||
+ | !scope="row" | 3/4 | ||
+ | | PB || PG || KY | ||
+ | |- | ||
+ | !scope="row" | 6 | ||
+ | | F9 || F10 || F11 | ||
+ | |- | ||
+ | !scope="row" | 9 | ||
+ | | F12 || PS || SL | ||
+ | |} | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |+ Full Matrix | ||
+ | |- | ||
+ | ! Pin | ||
+ | ! width="60" | A | ||
+ | ! width="60" | B | ||
+ | ! width="60" | C | ||
+ | ! width="60" | D | ||
+ | ! width="60" | E | ||
+ | ! width="60" | F | ||
+ | ! width="60" | G | ||
+ | ! width="60" | H | ||
+ | ! width="60" | I | ||
+ | ! width="60" | J | ||
+ | ! width="60" | K | ||
+ | ! width="60" | L | ||
+ | ! width="60" | M | ||
+ | ! width="60" | N | ||
+ | ! width="60" | O | ||
+ | |- | ||
+ | !scope="row" | 1 | ||
+ | |= || 1 || 2 || 3 || 4 || 5 || || || || || || || F6 || F7 || F8 | ||
+ | |- | ||
+ | !scope="row" | 2 | ||
+ | |TB || Q || W || E || R || T || || || || || || || F3 || F4 || F5 | ||
+ | |- | ||
+ | !scope="row" | 3 | ||
+ | |CP || A || S || D || F || G || || || || || || || ESC || F1 || F2 | ||
+ | |- | ||
+ | !scope="row" | 4 | ||
+ | |LS || Z || X || C || V || B || UP || || DN || [ || ] || X1 || F9 || F10 || F11 | ||
+ | |- | ||
+ | !scope="row" | 5 | ||
+ | |X2 || ` || IN || LT || || RT || 6 || 7 || 8 || 9 || 0 || - || F12 || PS || SL | ||
+ | |- | ||
+ | !scope="row" | 6 | ||
+ | | || SL1 || || SL2 || || SL5 || Y || U || I || O || P || || PB || PG || KY | ||
+ | |- | ||
+ | !scope="row" | 7 | ||
+ | |SR4 || SR3 || SR6 || SL4 || SL3 || SL6 || H || J || K || L || ; || ‘ || || || | ||
+ | |- | ||
+ | !scope="row" | 8 | ||
+ | |SR1 || || SR2 || || SR5 || || N || M || , || . || / || RS || || || | ||
+ | |} | ||
+ | |||
+ | The Humble Hacker keyboard uses a condensed version of the above matrix, but I wanted to condense it further, retain 8 rows for ease of scanning, and I wanted to be able to split the matrix into left and right handed sections in case I ever decide to split my keyboard physically into two sections. By combining the single-element columns in each thumb cluster, I was able achieve this, with room for an extra 2x3 (less 1) matrix in each half, perfect for mouse buttons and modifiers. | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |+ Condensed Kinesis matrix (original qwerty labelling) | ||
+ | |- | ||
+ | ! Pin | ||
+ | ! width="60" | 0 | ||
+ | ! width="60" | 1 | ||
+ | ! width="60" | 2 | ||
+ | ! width="60" | 3 | ||
+ | ! width="60" | 4 | ||
+ | ! width="60" | 5 | ||
+ | ! width="60" | 6 | ||
+ | ! width="60" | 7 | ||
+ | ! width="60" | 8 | ||
+ | ! width="60" | 9 | ||
+ | ! width="60" | 10 | ||
+ | ! width="60" | 11 | ||
+ | |- | ||
+ | !scope="row" | 0 | ||
+ | | = || 1 || 2 || 3 || 4 || 5 || 6 || 7 || 8 || 9 || 0 || - | ||
+ | |- | ||
+ | !scope="row" | 1 | ||
+ | | TB || Q || W || E || R || T || Y || U || I || O || P || \ | ||
+ | |- | ||
+ | !scope="row" | 2 | ||
+ | | CP || A || S || D || F || G || H || J || K || L || ; || ‘ | ||
+ | |- | ||
+ | !scope="row" | 3 | ||
+ | | LS || Z || X || C || V || B || N || M || , || . || / || RS | ||
+ | |- | ||
+ | !scope="row" | 4 | ||
+ | | || ` || IN || LT || || RT || UP || || DN || [ || ] || | ||
+ | |- | ||
+ | !scope="row" | 5 | ||
+ | | || F6 || F7 || F8 || || || || || F9 || F10 || F11 || | ||
+ | |- | ||
+ | !scope="row" | 6 | ||
+ | | BKSP || F3 || F4 || F5 || DEL || LALT || SPACE || ENTER || F12 || PS || SL || RCTRL | ||
+ | |- | ||
+ | !scope="row" | 7 | ||
+ | | HOME || ESC || F1 || F2 || END || LCTRL || PGDN || RALT || PB || PG || KY || PGUP | ||
+ | |} | ||
= Reference = | = Reference = | ||
* [http://www.keyglove.net/2011/03/24/bluegiga-wt12-bluetooth-module-connection/ Development example using Bluegiga WT12] | * [http://www.keyglove.net/2011/03/24/bluegiga-wt12-bluetooth-module-connection/ Development example using Bluegiga WT12] | ||
− | * [http://www.keyglove.net/2011/06/25/wt12-custom-breakout-board-take-2/ WT12 breakout boards] - | + | * [http://www.keyglove.net/2011/06/25/wt12-custom-breakout-board-take-2/ WT12 breakout boards] - OSHW breakouts |
+ | ** Eagle schematic and PCB files available on InMojo WT12 [http://www.inmojo.com/store/jeff-rowberg/item/wt12-bluetooth-breakout-board/ full]/[http://www.inmojo.com/store/jeff-rowberg/item/wt12-uart-bluetooth-breakout-board/ UART] product pages | ||
* [http://ca.mouser.com/ProductDetail/Bluegiga-Technologies/WT12-A-AI4/?qs=sGAEpiMZZMu3sxpa5v1qrtmBpKx54T3%2FJoc62K8RZWc%3D WT12 module] | * [http://ca.mouser.com/ProductDetail/Bluegiga-Technologies/WT12-A-AI4/?qs=sGAEpiMZZMu3sxpa5v1qrtmBpKx54T3%2FJoc62K8RZWc%3D WT12 module] | ||
* [http://geekhack.org/showwiki.php?title=Island:10371 Custom bluetooth IBM Model M] using a salvaged bluetooth module from a mini keyboard - salvaged PCB | * [http://geekhack.org/showwiki.php?title=Island:10371 Custom bluetooth IBM Model M] using a salvaged bluetooth module from a mini keyboard - salvaged PCB | ||
* [http://geekhack.org/showwiki.php?title=Island:19104 Custom bluetooth IBM Model M] using a salvaged bluetooth module from a mini keyboard - custom PCB | * [http://geekhack.org/showwiki.php?title=Island:19104 Custom bluetooth IBM Model M] using a salvaged bluetooth module from a mini keyboard - custom PCB | ||
* [http://geekhack.org/showwiki.php?title=Island:20851 Custom bluetooth HHKB] using the WT12 | * [http://geekhack.org/showwiki.php?title=Island:20851 Custom bluetooth HHKB] using the WT12 | ||
+ | * [http://humblehacker.com/blog/20100720/hacking-the-kinesis-contoured-keyboard/ HumbleHacker Kinesis] | ||
* [http://geekhack.org/showwiki.php?title=Island:8110 Major Kinesis mod project] - includes a collection of other Kinesis mods | * [http://geekhack.org/showwiki.php?title=Island:8110 Major Kinesis mod project] - includes a collection of other Kinesis mods | ||
* [http://geekhack.org/showwiki.php?title=Island:16112 Split Kinesis mod] - includes PCB scans from one version of the Kinesis | * [http://geekhack.org/showwiki.php?title=Island:16112 Split Kinesis mod] - includes PCB scans from one version of the Kinesis | ||
+ | * [http://www.pjrc.com/teensy/td_libs_PS2Keyboard.html Arduino PS/2 keyboard library] | ||
+ | * [http://www.arduino.cc/playground/Main/PS2KeyboardExt2 Modified version of the Arduino PS/2 keyboard library] - supposedly more complete | ||
[[Category:Projects]] | [[Category:Projects]] |
Latest revision as of 14:37, 4 October 2017
Bluetooth conversion of a Kinesis contour keyboard to a bluetooth keyboard.
Contents
Brainstorming
Available approaches
Options | Pros | Cons |
---|---|---|
USB HID to bluetooth adapter |
|
|
PS/2 to bluetooth adapter |
|
|
Custom replacement keyboard controller with integrated bluetooth |
|
|
Features
- Bluetooth module might have audio capabilities in addition to the required HID function
- Use keyboard as audio extender - include a headphone port in keyboard
- Kinesis has a key recognition click speaker built in which can be hard to hear when listening to music, but might still annoy others
- WT12 will do low-fi audio such as a typical BT headset, but does not support analog A2DP (use WT32 instead)
- Overlay key click sound over bluetooth audio signal
- USB interface for charging
- disable bluetooth while charging and instead use the USB connection
- Saving, editing, and uploading custom keyboard layouts to the keyboard from the computer
- Cross platform application
- Keyboard layers could be saved, exported, and uploaded individually
- Example:
- Standard keyboards have "qwerty" on the base layer and the shift key brings them to the next layer containing "QWERTY" (assuming qwerty keyboard)
- The Kinesis firmware has a keypad layer, so when you press the keypad button, the keys under the right hand become a numpad and the shift key moves between the layers of the numpad (numbers or arrows)
- Separate keys and their shifted values for more finely tuned layouts (can be done in xmodmap in Linux, but this isn't portable/cross platform)
- May not act as expected in some programs as normally it is the computer that determines the shift's effect on the key, not the keyboard
- Probably need to take special consideration into key sequences (eg pressing shift then x as opposed to x then shift)
- Example:
- Integrated pointing device
- Bluetooth pedal
- Needs to connect to the controller directly for most functions, so really only feasible with the custom controller
- Need to verify keyboard's bluetooth controller can connect to two devices at once (PC and pedal(s))
- Battery status report via bluetooth
- Might be able to do this with just the ADC on the micro, but might need something like this for detection
- WT12 does not directly read battery level (use WT32 instead), though reading with MCU and reporting over SPP link would work
Prototype
The Kinesis Advantages was found to natively support PS/2 output. This was tested using the PS/2 cable from a Kinesis Essential 132 (the 132 was also found to be capable of outputting USB using the Kinesis Advantages USB cable/board). The USB Kinesis Advantage is the first board that is going under the knife. Because of the relative simplicity of reading PS/2 data, this is the method that will be used.
PS/2 communication (according to the Arduino PS/2 library) only requires an interrupt pin and a generic IO pin. The WT12 requires a serial channel. These requirements are pretty basic, so any microcontroller should work fine. Additional IO might be desirable for a BT pairing button, but this feature could also be embedded into a special key combination on the keyboard itself.
To-Do list
- Order prototype parts
- Assemble prototype
- Test PS/2 data aquisition
- Test bluetooth HID output
- Determine power consumption (will probably be somewhat high as the keyboard is likely going to not have any kind of power saving mode)
- Find an appropriate battery
- Design custom PCB for a final version
- Order final version parts
- Assemble final version
Parts
- Bluegiga WT12 Bluetooth module (serial only breakout board - $40, full breakout board - $50, just the module - $28)
- Microcontroller development board
- Arduino (easy to use, PS/2 libraries) - $10-$50
- ATmega32u4 based dev board (native USB HID output which can be used while plugged in and charging for improved reliability and charging speed) - $15-$40
- MSP430 (specialize in low power, great for battery operation) - $5+
- Logic level converter (PS/2 device requires 5v and WT12 requires 3.3v; microcontroller could use either) - $2
- Power supply (for testing could use bench supply but USB charged Lithium Ion would be good to prototype too)
- 3v3 voltage regulator - $2
- Right angle SPDT slide switch with 3mm spacing between pins - for enabling memory lockout feature of the Kinesis pro on other versions of the keyboard - $0.50
Schematic
Block diagram:
VCC1 = 5V VCC2 = 3V3 ------------------------ VCC1 VCC1 VCC1 VCC2 VCC2 VCC1 VCC2 _____________ ^ _____________ ^ ^ _____________ ^ ^ ____________ ^ ^ | |-' | |-' '-| |-' '-| | | | | | | | RTS | | RTS | | | ___________ | | | | |---------| |---------| | | | | | | | CLOCK | | CTS | LOGIC | CTS | | |----| Voltage |----| | KINESIS |-------| ARDUINO |---------| LEVEL |---------| BLUEGIGA | | | Regulator | | | | DATA | | TXD | CONVERTER | RXD | WT12 | === |___________| === | |-------| |---------| |---------| | | | | | | | | RXD | | TXD | | '----------+----------' | | | |---------| |---------| | | |_____________|-, |_____________|-, ,-|_____________|-, ,-|____________| | v v v v v v GND GND GND GND GND GND
Key Matrix
The creator of the HumbleHacker keyboard replaced the controller in his keyboard and kindly posted his reverse-engineered key matrix. I have copied them below, with some basic modifications.
(Keywell pin numbers start at 1 closest to the thumb switches and end at 13 towards the function keys)
Pin | 6 | 7 | 8 | 10 | 11 | 12 |
---|---|---|---|---|---|---|
1 | \ | IN | LT | RT | ||
2 | LS | Z | X | C | V | B |
3 | CP | A | S | D | F | G |
5 | TB | Q | W | E | R | T |
13 | = | 1 | 2 | 3 | 4 | 5 |
Pin | 1 | 2 | 3 | 6 | 12 | 13 |
---|---|---|---|---|---|---|
4 | UP | DN | [ | ] | ||
7 | N | , | M | RS | . | / |
8 | H | K | J | ' | L | ; |
9 | Y | I | U | \ | O | P |
10 | 6 | 8 | 7 | - | 9 | 0 |
(Thumbswitch pin numbers start at 1 closest to the center of the keyboard and end at 10 towards the keywells)
Pin | 1 | 2 | 3 | 8 |
---|---|---|---|---|
4 | SL3 | SL6 | SL4 | |
5 | SL1 | SL5 | SL2 |
Pin | 3 | 4 | 5 | 6 |
---|---|---|---|---|
7 | SR1 | SR2 | SR5 | |
8 | SR4 | SR3 | SR6 |
(Function key pins start with 1 near the USB/PS2 cable and 13 near the keywells)
Pin | 2 | 3 | 4 | 6 | 7 | 10 | 11 |
---|---|---|---|---|---|---|---|
1 | ESC | F1 | F2 | ||||
5 | F6 | F7 | F8 | ||||
8 | F3 | F4 | F5 |
Pin | 2 | 3,6,10 | 4,7,11 |
---|---|---|---|
1 | ESC | F1 | F2 |
8 | F3 | F4 | F5 |
5 | F6 | F7 | F8 |
Pin | 1 | 2 | 5 | 8 | 7 | 10 | 11 |
---|---|---|---|---|---|---|---|
3 | PG | KY | |||||
4 | PB | ||||||
6 | F9 | F10 | F11 | ||||
9 | F12 | SL | PS |
Pin | 5 | 8/1/11 | 7/2/10 |
---|---|---|---|
3/4 | PB | PG | KY |
6 | F9 | F10 | F11 |
9 | F12 | PS | SL |
Pin | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | = | 1 | 2 | 3 | 4 | 5 | F6 | F7 | F8 | ||||||
2 | TB | Q | W | E | R | T | F3 | F4 | F5 | ||||||
3 | CP | A | S | D | F | G | ESC | F1 | F2 | ||||||
4 | LS | Z | X | C | V | B | UP | DN | [ | ] | X1 | F9 | F10 | F11 | |
5 | X2 | ` | IN | LT | RT | 6 | 7 | 8 | 9 | 0 | - | F12 | PS | SL | |
6 | SL1 | SL2 | SL5 | Y | U | I | O | P | PB | PG | KY | ||||
7 | SR4 | SR3 | SR6 | SL4 | SL3 | SL6 | H | J | K | L | ; | ‘ | |||
8 | SR1 | SR2 | SR5 | N | M | , | . | / | RS |
The Humble Hacker keyboard uses a condensed version of the above matrix, but I wanted to condense it further, retain 8 rows for ease of scanning, and I wanted to be able to split the matrix into left and right handed sections in case I ever decide to split my keyboard physically into two sections. By combining the single-element columns in each thumb cluster, I was able achieve this, with room for an extra 2x3 (less 1) matrix in each half, perfect for mouse buttons and modifiers.
Pin | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | = | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - |
1 | TB | Q | W | E | R | T | Y | U | I | O | P | \ |
2 | CP | A | S | D | F | G | H | J | K | L | ; | ‘ |
3 | LS | Z | X | C | V | B | N | M | , | . | / | RS |
4 | ` | IN | LT | RT | UP | DN | [ | ] | ||||
5 | F6 | F7 | F8 | F9 | F10 | F11 | ||||||
6 | BKSP | F3 | F4 | F5 | DEL | LALT | SPACE | ENTER | F12 | PS | SL | RCTRL |
7 | HOME | ESC | F1 | F2 | END | LCTRL | PGDN | RALT | PB | PG | KY | PGUP |
Reference
- Development example using Bluegiga WT12
- WT12 breakout boards - OSHW breakouts
- WT12 module
- Custom bluetooth IBM Model M using a salvaged bluetooth module from a mini keyboard - salvaged PCB
- Custom bluetooth IBM Model M using a salvaged bluetooth module from a mini keyboard - custom PCB
- Custom bluetooth HHKB using the WT12
- HumbleHacker Kinesis
- Major Kinesis mod project - includes a collection of other Kinesis mods
- Split Kinesis mod - includes PCB scans from one version of the Kinesis
- Arduino PS/2 keyboard library
- Modified version of the Arduino PS/2 keyboard library - supposedly more complete