245% Tiny Keyboard

by VirgileC in Circuits > Arduino

111 Views, 1 Favorites, 0 Comments

245% Tiny Keyboard

Capture.PNG
IMG20240602170422.jpg
IMG20240602170454.jpg

We are mid 2024 at the time of writing this instructables. One keyboard trend is to go smaller, this gives a nice minimalist look of ones setup and is great for speedwriting as your finger dont have to travel as much, but how many keys can you actually remove before you cannot actually write anymore ? 

In this instructables, I am proposing a solution that tries to get the best of both worlds, a tinny tiny keyboard with a big number of keys.

 

The design path taken is simply to realize that in a standard keyboard, there are some keys that you push in one at a time and others for which you push multiple keys. This instructables presents the concept pushed to the extrem, as all characters here are a combination of keys, and with an 8 switch keyboard, you can get quite a bit of characters, actually 2^8=256 caracters ! (In reality 2^8-1=255 as 00000000 should produce not keyboard output)

 

The Design of this keyboard is kept as simple as possible, it is a prototype so the case is quite large but I had fun trying to design the keycaps in a somewhat ergonomical shape 😊

Supplies

o  Materials

§ 8 keyboard switches (I am using Gazzew U4Tx)

§ 33nf capacitor

§ CD74HC4067 multiplexer

§ Arduino Pro Micro + USB cable

§ Wire (AWG #24 or #26)

o  Tools

§ Resin 3d printer

§ Soldering iron

§ glue

Hardware

case.png
circuit.png
keys.png
keys.png
IMG20240602170319.jpg
IMG20240602172050.jpg

o  Electrical

The demultiplexer is used to “extend” the number of inputs/outputs of the Arduino, the demultiplexer links one of its input pins (labels C0, C1…C16) to the  â€œSIG” pin. Using the ports S0->S3, the Arduino checks periodically C0->C7 to its input on arduino’s pin 2. This is necessary because the Arduino does not have a lot of hardware interrupt pin (see section “software” for explanation of an hardware interrupt) furthermore, using the demultiplexer costs the Arduino four pins (pin2 for the  switches input and pin7, 8 and 9 to control the demultiplexer) which is better than using 8 pins on the Arduino. In, a nutshell, the Arduino is therefore able to check the 8 switches states with only its pin 2.

The wiring is depicted on the schematic, on thing to keep in mind is that the wires should be long enough to make it easy to solder but short enough that it does not take unnecessary space in the final case

o  Mechanical

There are a few mechanical parts:

¡      The key caps is two parts, the part with the letter and the stem, the 2 are printed in 2 different colors to get more readable keycaps (even though the letter on the keycap is only decorative and not related to the output key sent to the computer). The stems are glued in place in the keycaps

¡      The case is 3 parts: the plate (on which the switches are inserted), the case (in which the plate is pressed) and the bottom cap, everything is press fitted together, no need for glue or screws

Software

example.png
state_machinepng.png

The software is developed in Arduino and is quite strait forward (see picture of the state machine), the Arduino maps all the switches sequentially but very fast (compared to a human key input speed) to the hardware interrupt (pin2) of the Arduino. When one key is pressed, and as long as it is kept pressed, the Arduino polls all the switched states. When all the keys are released, the Arduino looks at what key where being pressed, translates that to a character and finally send the character through USB to the computer. (This code uses 2 arduino libraries, TimerOne and Keyboard)

You will find the code here: https://github.com/Virgile-Colrat/8-keys-keyboard.git

Remarks

One thing to notice is that with this keyboard, you never have to move your hands! each finger has its  dedicated key. In addition, the mapping of each combination of keys is following the ASCII but you could definitely imagine a way to have your most recurrent characters mapped with a single key.

This keyboard was a very fun experiment even if it is quite hard to type with it, I think I might just use this keyboard as a macro keyboard