Main Content

jank

just another keypad 21 mechanical keys configured as a numerical keypad plus 4 programmable macro keys.

Another write-up can be found at clews.pro.

The main features of this keypad include:

- HID compliant USB peripheral using an ATmega32U4 microcontroller with connectivity via a USB type-c connector configured as a USB 2 device. Power is also derived from the USB port.
- 21 mechanical keys (gateron blues which are pin-compatible clones of Cherry MX switches) with variable brightness white LED backlight on each key.
- In addition to the 17 standard keys of a numerical keypad, there is also a row of four keys across the top of the device which are programmable macros. (Well, all keys can be programmable macros, but this is how I have configured jank.)

The schematic and PCB layout were designed in KiCAD. The schematic can be divided into five main areas/components:

- The key matrix - 21 gateron mechanical keyswitches connected in a matrix of 4 columns and 6 rows. The key switches each include a 3mm LED.
- ATmega32u4 AVR microcontroller - Selected because it has enough GPIO and hardware USB. I’m also familiar with the device from previous projects and have a few on-hand. Includes an external 16MHz crystal.
- MP3202 LED driver - I’ve not (successfully) used a boost LED driver before, so this was a neat learning experience. It drives all 21 keyswitch LEDs and is enabled by a PWM signal from the AVR which allows variable LED brightness.
- USB type-C Receptacle - Configured to be detected by a host as a USB 2.0 device. I went with a simple 16-pin through-hole connector that is (barely) hand-solderable.
- 6-Pin AVR ISP connector - A standard In-System Programming port.”

Link to article