Skip to content

thirteen37/HHKB-Lite-2-Teensy

Repository files navigation

Teensy 2.0 replacement controller board for HHKB Lite 2

This is a QMK-compatible replacement controller for the HHKB Lite 2, identified by model numbers PD-KB200W/U or PD-KB200B/U.

This Lite version of the HHKB is a membrane keyboard and not exactly popular compared to more expensive Professional versions that use Topre switches. But the wiring is simple and is a good first project for modding commercial keyboards.

This replacement uses a Teensy 2.0, which is cheap, has plenty of pins, and works well with the QMK firmware. The entire controller board is replaced, so you will lose the built-in USB hub. You will gain all the benefits of the powerful QMK and similar Teensy-supported firmware.

Steps

  1. Acquire/fabricate the PCB.
  2. Get the parts
  3. Disassemble the keyboard.
  4. Modify the USB cable you will be using and insert it into the Teensy.
  5. Solder the components on to the board. Take care to leave enough room for the USB cable when soldering the Teensy.
  6. Reconnect the flex cables and insulate the backplate.
  7. Flash your firmware and test your keyboard.
  8. Reassemble the shell.

PCB fabrication

The fabrication-ready files are in plots/. Just send them to your preferred fab. It is a pretty standard 1.6mm PCB with conservative via and track parameters that just about any shop can handle.

You can also order the PCBs through PCBway. With their new user discount, you would only have to pay shipping.

Parts

  • 1 Teensy 2.0
  • 1 Molex Easy-On 14-pin 1.25mm pitch FFC connector 39-53-2145
  • 1 Molex Easy-On 8-pin 1.25mm pitch FFC connector 39-53-2085
  • 1/10" pitch thru-hole headers for Teensy
  • (White?) Mini-USB cable for Teensy

The USB cable you get should have plastic plugs, because you will have to shave them down later.

Disassembly

The keyboard is held together by a few screws. Don't forget the screw hiding under the label. When the shell is open, there are also further one screw holding down the metal backplate and one screw each for the PCBa.

Screw locations

The USB cable can be removed from the shell but does not need to be detached from the PCB. We will be using another USB cable instead.

The flex cables can be eased out gently. There is no latching mechanism.

Modify the USB cable

The Mini-USB plug that goes to the Teensy needs to be shaved down to save about 1mm of thickness.

Shaved USB

Soldering the board

My recommended order is:

  1. Headers for Teensy on to the board
  2. Molex connectors
  3. Teensy

The Molex connectors are oriented in opposite directions, with pin 1 (the edge with a little notch) of each connector facing each other. This is important because the flex cables and connectors are single sided.

Note that the Teensy should be mounted upside down, on the same side as the connectors. This is to save a couple of millimeters of space from the stacked height of the connectors. You may have to trim down the header pins after you've soldered on the Teensy. The USB cable should still be able to fit.

Teensy upside down

Teensy clearance

Connect flex cables and insulate the backplate

Connect the flex cables to the PCB. Note the orientation.

The metal backplate should be insulated, at least around the area of the PCB, to minimize the risk of it shorting the board. I use a few strips of electrical insulation tape here.

Insulated backplate

Flash the firmware and test

Plug in the USB cable to your computer and flash the firmware. There's a copy of the firmware with the default layout at firmware/hhkblite2.hex.

Programming is done using Teensy Loader. Since the Teensy is mounted upside down and the reset button no longer exposed, you can short the RST and GND pins instead.

After a successful initial flash, you can use the reset key to enter flashing mode instead of having to open the keyboard. On my default configuration, the reset key is Fn + Esc.

After flashing, you should be able to type something. It's easiest to just put the silicone membrane over the traces and try typing something.

Reassembly

The PCB here only uses one of the original PCB mounting screws. Route the USB cable around the internal strain relief. Don't forget the screw for the backplate.

You're done!

PCB details

This is a KiCad project, but you can find the generated fabrication files in plots/. Just send them to your preferred PCB factory.

The schematics are fairly straightforward, with 8 row pins and 14 column pins:

Schematic

The PCB layout is likewise simple:

PCB

Firmware

The configuration in firmware/ can be uploaded to Keyboard Firmware Builder to generate firmware for the standard US QWERTY layout.

QWERTY keymap

There will be a warning "Not every key has a unique position in the wiring matrix". This can be ignored and it is due to both Fn keys being wired exactly the same. You should take note of this when designing your own layouts: it is not possible to assign different keycodes to each Fn key as they are electrically indistinguishable.

The wiring matrix is a bit of a mess, as is typical of membrane keyboards that do not have diodes to prevent ghosting: the matrix is designed to minimize ghosting from common key combinations but will never completely eliminate it.

Wiring matrix

The pin assignments are:

Matrix Pin
Rows
0 F5
1 F4
2 F1
3 F0
4 B0
5 B1
6 B2
7 B3
Columns
0 F6
1 F7
2 B6
3 B5
4 B4
5 D7
6 D6
7 D4
8 D5
9 C7
10 C6
11 D3
12 D2
13 D1

About

Teensy 2 controller board replacement for HHKB Lite 2

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published