Keyboard Builders' Digest
Holy cow! 30% off at Kemove! Code: KBDNEWS
Keyboard Builders' Digest / Projects

Hello Word Smart Keyboard

Peng Zhihui designed a feature-packed modular keyboard with a motor-controlled haptic knob – and a lot more.

KBD.news
Published July 31, 2022
Creators! Feel free to tip me off about your keyboard related projects to bring them to 100K readers.

Based in Shanghai, Peng Zhihui is a prolific engineer working at Huawei Research and publishing projects ranging from autonomous bicycles to robotic arms.

Recently dipping his toes into custom keyboard design, he kicked the door open with a quite unique keyboard packed with lots of features, one he calls HanWen or "Hello Word Smart Keyboard" in English.

Being tired of the mk keyboard scene focusing on design and aesthetics, he decided to ensure the maximum degrees of freedom for development by designing the hardware and firmware from scratch.

Features

  • Shift registers to implement key scan
  • ultra-low latency custom firmware
  • replaceable interactivity module
  • e-ink display
  • OLED display
  • motorized knob with configurable feedback
  • capacitive touch bar

PCB & matrix

To reconstruct the scan circuit from its basics, he came up with using shift registers. The keyboard still scans the keys the same way as common boards with matrices do. However, instead of using an m x n matrix Zhihui adopted a 1 x n matrix which utilizes the parallel to serial function of the shift registers.

Pic:

As mentioned in the video, every key is one bit of the register so we can read every key's status every time a clock sequence is loaded.

This solution saves a lot of IO pins: no matter how many keys we have, only three GPIO pins are used – one data wire, one clock wire, and one latch wire.

As of my understanding, we need a relatively cheap and easily available shift register for every 8 keys – or whatever component we have.

Pic:

The second advantage is extreme speed: The maximum speed of 74HC165 series circuits exceeds 50MHz (48-56MHz).

Another benefit of this approach is the simple circuit layout which eliminates all diodes.

Custom firmware

Zhihui also tried to address the shortcomings of existing firmware projects which in his opinion are too complex, not optimized enough – as a result of being compatible with many keyboard types.

So based on an ARM MCU (STM32F103CBTx (LQFP48)) he developed a suite of keyboard firmware which basically "releases the performance of full-speed HID devices to the limit".

In the firmware he implemented HD device enumeration resulting in 1ms latency and extreme per-key RGB refresh rate with NKRO support. What's more interesting though: also per-key debounce algorithm for all keys.

The firmware's source will be released later.

Hardware

The base keyboard layout is not too intuitive, it's pretty convenient and modeled after one called S98 by XiKii. However, it is modular and consists of three parts.

Apart from the main keyboard, there's a USB-Hub deck with some power boost capabilities, and also a replaceable interaction module.

Interaction module

The interaction module can run various apps.

Obviously, it has an e-ink screen which can display a wallpaper, weather forecast, computer status, or quite anything you'd like. The author provides some easy-to-use apps for this keyboard, e.g. you can simply drag and drop images you want to see on the screen.

Pic:

The keyboard also features a smaller OLED screen and a motorized knob with haptic feedback.

In a previous video the Zhihui demonstrated how to simulate a physical knob with a brushless motor and FOC control.

The knob can simulate force feedback effects from frictionless rotation to acting as a multilevel switch, spring, etc. – all this with configurable parameters.

Pic:

Combined with the small OLED screen there are a lot of different ways to use this feature, and don't forget that it's a motor so you can also use it as a pointer along with a scale displayed on the screen.

Some problems had to be solved for this to work, e.g. the power limitations of the USB, but the author managed to borrow an idea from the electromagnetic catapult of aircraft carriers…

Capacitive touch bar

In addition, the author put a capacitive touch bar below the spacebar with user-defined functions: switching desktops, tabs, music – it can be used even for copy/pasting.

Pic:

Resources

Both the hardware and firmware will be open sourced later: https://github.com/peng-zhihui Until then, try to process all the info above. :D

Aaand it's out: https://github.com/peng-zhihui/HelloWord-Keyboard

Do you like this post? Share, donate, subscribe, tip me off!

Published on Sun 31st Jul 2022. Featured in KBD #89 (source).


Related

Cityscape48

@tsukasa_metam's Cityscape48 is a pretty unique split keyboard with a multi-layer PCB construction to achieve a faux-keywell effect.

Single-handed ergo keyboard/layout

A great one-handed keyboard project by key-yack with lots of ideas and links to related resources.

Through-hole ortho with a thumb cluster

BTY-80 - A through-hole ortholinear TKL keyboard with a thumb cluster by ajkldsz.

Sclera - a gasket-mount case for the Iris

The Sclera by hectoring is a gasket-mount case for the Iris (pics).

FGHTR SWTCH

FGHTR SWTCH is a unique artisan keycap housing by mecxlabs.

Joystick mouse

A joystick mouse attached to a keyboard – committed by u/commonCodeMonkey.

×
top