
OSO BOOK C1
joeycastillo/The-Open-Book
For details on how to build, test and use Open Book, I've made documentation available here.

Tiny I2C T9 phone keypad module for ESP32 and other microcontrollers
T9kb is an open-source printed circuit board by acidvegas, from the acidvegas/t9kb repository on GitHub, published under the ISC licence. It is a 2-layer board of 48 × 68 mm with 38 parts on 18 nets, routed with 385 tracks and 32 vias.
Its parts include 24 switches, 4 resistors, 2 capacitors, 2 connectors and 1 IC. It belongs with the keyboards and input boards of this library.
A tiny phone-style keypad for DIY projects that talks I2C. Plug it into an ESP32 (or anything with Qwiic / I2C) and you get the full key layout of an old desk phone handset: 3 soft keys, a 5-way d-pad, call / end / speaker / mute, and the 3x4 number pad.
There are virtually no good small modules on the market for basic I2C text input. The M5Stack CardKB is about the only one, and it is a tiny QWERTY board. Nothing like it exists for T9, so I made this one for T9 phone-style input on my own projects, starting with a DIY VoIP phone.
The layout follows the Grandstream WP826 handset. Keys are metal snap domes on gold pads, the same way real phones do it, and 3D printed PLA keycaps go on top. A single TI TCA8418 scans the keys, so the board has no firmware to flash. The text side (multi-tap, T9, key repeat) lives in an Arduino library on the host.
Status: v0.3 hardware is designed and ready to order, not built or tested yet. The Arduino library compiles and its logic is tested on a PC, not yet on real hardware. The keycaps and case are printed and fit.
The 3D model for case and keycap design is hardware/t9kb.step.
The library is in library/ (Arduino, compiles for the ESP32 core). Install it by copying or symlinking library/ into your Arduino libraries folder as T9KB.
#include <Wire.h>
#include <T9KB.h>
T9KB keypad;
void setup() {
Wire.begin();
keypad.begin(); // or keypad.begin(Wire, INT_GPIO, RST_GPIO) with the INT / RST pads wired
}
void loop() {
keypad.update();
while (keypad.available()) {
T9Event ev = keypad.read(); // ev.key, ev.type (press / release / long / repeat), ev.code (raw key number)
}
uint8_t c;
while ((c = keypad.getChar())) {
// typed text, CardKB style
}
}Text entry through getChar():
| Key | Tap in Abc / abc / ABC | Long press | 123 mode |
|---|---|---|---|
| 2 to 9 | Letters, then the digit (abc2, def3, ... wxyz9) | The digit | Digit |
| 1 | 1 . , ' ? ! " - | 1 | 1 |
| 0 | Space | 0 | 0, long press + |
* | Symbols (below) | * | |
# | # | Next mode | #, long press mode |
| Right soft key | Backspace (auto-repeats) | Backspace | |
| Arrows | CardKB arrow codes (auto-repeat) | Arrow codes |
The * symbols, in order: . , ' ? ! " - ( ) @ / : _ ; + % * = < > $ [ ] { } \ ~ ^ # | ` &
pending() is true while the last letter can still change, so you can underline it, and tapSet() returns the characters on that key ("abc2" on 2) so you can show the choices. It returns nullptr when nothing is pending. The letter is final after 800 ms or when another key is pressed.# cycles Abc, abc, ABC, 123. It starts in Abc, which capitalizes the first letter and any letter after . , ! or ? . setMode() changes the mode from code.0x08, left 0xB4, up 0xB5, down 0xB6, right 0xB7, the same values the M5Stack CardKB sends. getChar() returns 0 when nothing is waiting.available() / read(), or set a callback with onKey(). isPressed() works for every key, so combos like a soft key plus a digit work.setTapTimeout() (800 ms), setLongPress() (600 ms) and setRepeat() (500 ms delay, 80 ms rate).| Example | What it shows |
|---|---|
Text | Line editor on the serial monitor with live preview and mode display |
Events | Prints every key event with its raw key number |
Dialer | 123 mode phone dialer using the onKey() callback, Call and End |
DeepSleep | ESP32 deep sleep, woken by a keypress on the INT wire |
T9 word prediction is planned for later.
One rigid PLA keycap per key, with no web or membrane. Each cap has a 0.75 mm flange underneath that the case plate holds in, and a small rigid plunger that rests on its dome. Only the dome pushes back, so every key takes the dome's own force and keeps its click. Caps are green with black digits, letters and icons in the top 0.2 mm. Each cap leaves 0.10 mm around it in its plate hole (GROW), and the 2.56 mm plate makes deep holes that guide the caps, so pressing a wide key near one end barely tips it.
| File | What |
|---|---|
keys/t9kb_keys_caps.stl | All 24 caps, face down for printing |
keys/t9kb_keys_legends.stl | Black legends, lined up with the caps |
keys/t9kb_keys.scad | OpenSCAD source with all dimensions as parameters |
Legends: digits and letters on the number keys, an envelope (voicemail) on 1, speaker, muted microphone, call and hang up icons on the side keys, a line on each soft key, and arrows on the d-pad. The center select key is blank. Every stroke and every gap is at least 0.36 mm, so a 0.4 mm nozzle prints them all.
Printing (Bambu A1 mini, PLA, textured plate): build/slice.py slices every part with OrcaSlicer into ready-to-print .gcode.3mf files in build/out/:
| File | What |
|---|---|
keys_2color_MANUAL.gcode.3mf | Green caps, black legends: load black first, the printer pauses once in the first layer for green |
case_top.gcode.3mf | Case top only |
case.gcode.3mf | Case top and lid |
The caps print face down at 0.12 mm layers after a 0.2 mm first layer, so the legends are exactly the first layer. No supports.
| Part | Size |
|---|---|
| Caps | Key sizes from the layout, 4.36 mm tall, stick out of the plate 1.0 mm |
| Flange | 0.75 mm wide, 0.8 mm thick, stops under the plate |
| Plungers | 1.2 mm on 5 mm domes, 1.0 mm on 4 mm domes (Snaptron: at most 25% of the dome) |
| Tip | 0.40 mm above the board, resting on the dome |
| D-pad | 8 mm center key and 4 arrows, each with its own stop on the plate |
TIP in t9kb_keys.scad is where the plunger meets the dome. ButtonWorx publishes no dome height; 5 mm round domes run 0.24 to 0.38 mm and the peel-and-stick film adds about 0.05 mm, so 0.40 leaves at most about 0.1 mm of free play. If the keys feel pre-pressed or don't click, raise it to 0.52. Keep TOP - TIP a multiple of the 0.12 mm layers after the 0.2 mm first one, then re-export and re-slice:
build/export.sh # keycap and case STLs
python3 build/slice.py # every .gcode.3mfslice.py runs the OrcaSlicer 2.4.2 AppImage extracted to ~/.local/share/orca (--appimage-extract, needs libwebkit2gtk-4.1-0 and xvfb) with its stock Bambu A1 mini, Bambu PLA Basic and 0.12 mm Fine / 0.20 mm Standard profiles.
The keycap and case images in preview/ are rendered from build/preview.scad (-D 'VIEW="keys"', under, case, exploded or section).
A 3D printed two-part case: a top shell with a hole for every key and a back lid. The keycaps and board drop into the top shell face down, then 4 M1.4 self-tapping screws go through the lid and the board's corner holes (H1-H4) into the face plate and clamp the stack together.
| File | What |
|---|---|
case/t9kb_case_top.stl | Top shell, already flipped plate down for printing |
case/t9kb_case_lid.stl | Back lid, floor down |
case/t9kb_case.scad | OpenSCAD source with all dimensions as parameters |
| Part | Size |
|---|---|
| Outside | 52.6 x 72.6 x 8.8 mm |
| Walls | 2.0 mm |
| Top plate | 2.56 mm, deep key holes that keep the keys from tipping; keys stick out 1.0 mm |
| Spacer | 1.6 mm under the plate, a pocket for every keycap flange; rests on a 1.0 mm rim at the board edge, the rest stays 0.3 mm off the board clear of the dome adhesive |
| Key holes | 0.25 mm around the key outline, 0.10 mm around each cap; a 1.4 mm ring and spokes split the d-pad |
| Lid | 1.2 mm floor, 1.2 mm skirt that holds the board against the spacer, a 3.4 mm boss under each board corner |
| Screws | 4 x M1.4 x 8 mm self-tapping pan head (PH00): 1.7 mm holes in the lid, 1.5 mm holes in the board, 1.2 mm pilots that stop 0.56 mm under the face |
| Openings | Qwiic slot on the top edge and a window in the lid for the jack, wire hole on the bottom edge for the J2 pads |
| Inside | 1.8 mm under the board for the parts (tallest is U1, 0.8 mm; the 2.96 mm Qwiic jack sits in the lid window, flush with the back) |
Print both parts in PLA or PETG. 0.2 mm layers, 3 walls, no supports needed. The top shell prints plate down, so the face comes out flat.
Assembly:
| Item | Value |
|---|---|
| Board size | 48 x 68 mm, 1.6 mm thick, 2 layers, 2 mm corner radius |
| Keys | 24 metal dome pads (Snaptron patterns: 17 for 5 / 5.3 mm domes, 7 for 4 mm domes) |
| Controller | TI TCA8418 keypad scanner, no firmware |
| I2C address | 0x34 (fixed) |
| Power | 3.3 V only (1.65 to 3.6 V) |
| Connector | Qwiic / STEMMA QT (JST SH 4-pin), top edge, parts side |
| Key face | Flat: gold dome pads and legends only (KiCad bottom layer) |
| Parts side | All parts (8 total, KiCad top layer) |
All sizes in mm, measured on the key face. The key area is 43 x 63, centered on the board with a 2.5 border on every side.
| Keys | Count | Size | Dome |
|---|---|---|---|
| Soft keys | 3 | 13 x 5 | 4 mm |
| D-pad ring | 18 circle | ||
| D-pad center | 1 | 10.5 circle | 5 mm |
| D-pad arrows | 4 | In the ring around the center | 4 mm |
| Side keys | 4 | 10.5 x 7, two on each side | 5 mm |
| Number keys | 12 | 13 x 7 | 5 mm |
| Gap | Size |
|---|---|
| Between soft keys, between number keys | 2 |
| Soft keys to d-pad | 3 |
| Soft keys to side keys | 3.5 |
| Between the 2 stacked side keys | 3 |
| D-pad to number keys | 3 |
| Side keys to number keys | 3.5 |
The outer edges of the soft keys, side keys and number keys all line up.
Qwiic connector (J1):
| Pin | Signal |
|---|---|
| 1 | GND |
| 2 | 3.3V |
| 3 | SDA |
| 4 | SCL |
Breakout pads on the bottom edge of the parts side (J2, 2.54 mm pitch, solder wires or an SMD header):
| Pad | Signal | Notes |
|---|---|---|
| 1 | GND | |
| 2 | 3V3 | |
| 3 | SDA | |
| 4 | SCL | |
| 5 | INT | Goes low when a key event is waiting (10k pull-up on board) |
| 6 | RST | Pull low to reset the TCA8418 (10k pull-up on board) |
Qwiic has no spare wire for INT. Over Qwiic alone the host polls the keypad; solder a wire from J2's INT pad to a GPIO for interrupt-driven reads and wake-on-keypress.
The board has 4.7k I2C pull-ups through the 3-pad solder jumper JP1. It comes bridged. If you chain it with other boards that already have pull-ups, cut both copper bars on JP1.
The TCA8418 reports a key number from 1 to 80 (row * 10 + column + 1). Bit 7 of the event byte is 1 for press, 0 for release.
| Key | Row | Col | Key number |
|---|---|---|---|
| 1 | 0 | 0 | 1 |
| 2 | 0 | 1 | 2 |
| 3 | 0 | 2 | 3 |
| Soft left | 0 | 3 | 4 |
| Soft middle | 0 | 4 | 5 |
| Soft right | 0 | 5 | 6 |
| 4 | 1 | 0 | 11 |
| 5 | 1 | 1 | 12 |
| 6 | 1 | 2 | 13 |
| Speaker | 1 | 3 | 14 |
| Up | 1 | 4 | 15 |
| Mute | 1 | 5 | 16 |
| 7 | 2 | 0 | 21 |
| 8 | 2 | 1 | 22 |
| 9 | 2 | 2 | 23 |
| Left | 2 | 3 | 24 |
| OK | 2 | 4 | 25 |
| Right | 2 | 5 | 26 |
| * | 3 | 0 | 31 |
| 0 | 3 | 1 | 32 |
| # | 3 | 2 | 33 |
| Call | 3 | 3 | 34 |
| Down | 3 | 4 | 35 |
| End | 3 | 5 | 36 |
Minimum setup over I2C:
| Register | Name | Write | Why |
|---|---|---|---|
| 0x1D | KP_GPIO1 | 0x0F | Rows 0 to 3 are keypad rows |
| 0x1E | KP_GPIO2 | 0x3F | Columns 0 to 5 are keypad columns |
| 0x01 | CFG | 0x01 | Interrupt on key events |
Then read KEY_LCK_EC (0x03) for the event count, read KEY_EVENT_A (0x04) once per event, and write 0x01 to INT_STAT (0x02) to clear the interrupt.
The board has no diodes, so single keys and 2-key combos are reliable. Pressing 3 keys that form an L in the matrix can show a fake 4th key.
Assembled by JLCPCB (all on the parts side):
| Ref | Part | Package | LCSC | JLC type |
|---|---|---|---|---|
| U1 | TCA8418RTWR | WQFN-24 4x4 mm | C138713 | Extended |
| J1 | JST SM04B-SRSS-TB (Qwiic) | SMD right angle | C160404 | Extended |
| C1 | 100 nF | 0603 | C14663 | Basic |
| C2 | 10 uF | 0603 | C19702 | Basic |
| R1, R2 | 4.7k (I2C pull-ups) | 0603 | C23162 | Basic |
| R3, R4 | 10k (RST, INT pull-ups) | 0603 | C25804 | Basic |
Bought separately and added by hand:
| Qty | Part | Where | Notes |
|---|---|---|---|
| 20 | 5 to 5.3 mm metal domes (see Dome sources) | Varies | 17 needed, rest are spares |
| 10 | 4 mm metal domes (see Dome sources) | Varies | 7 needed, rest are spares |
| 1 | Kapton (polyimide) tape | Anywhere | Only for loose domes |
The pads follow Snaptron's published single-sided contact patterns: 17 pads for 5 / 5.3 mm domes and 7 pads for 4 mm domes (soft keys and d-pad arrows). Prices and stock were checked on 2026-10-07.
From ButtonWorx (Maine, US, $4 minimum order, no force listed):
| Pads | Part | Price | Mounting |
|---|---|---|---|
| 5 mm | Snap Dome Chopped Circle 5.2mm Peel & Stick | $0.50 each | Built-in 7 mm square sticker |
| 4 mm | Snap Dome Round 4mm Dimple, loose | $0.40 each | Loose: tape it down |
The adhesive squares around neighboring d-pad domes may overlap; trim them if they do. A 4.5 mm dome does not fit the 4 mm pads.
Upload hardware/fab/t9kb_gerbers.zip and use these settings:
| Setting | Value |
|---|---|
| Layers | 2 |
| Dimensions | 48 x 68 mm (auto-detected) |
| Material | FR-4 |
| PCB thickness | 1.6 mm (Economic PCBA only offers ENIG at 1.6 mm) |
| Surface finish | ENIG (required, the dome contacts need gold) |
| Gold thickness | 2U" (1U" also works) |
| PCB assembly | Yes, Economic |
| Assembly side | Top side |
| BOM / CPL | hardware/fab/BOM.csv and hardware/fab/CPL.csv |
On the placement preview page, check these before paying:
If either is turned wrong, rotate it right there in the preview. Resistors and capacitors do not care.
A dome that sits crooked can be peeled off and placed again. Nothing on the key face is soldered.
The board is generated by script (KiCad 9). There is no schematic; the netlist lives in gen_pcb.py.
cd hardware
./autoroute.sh # place parts, autoroute with freerouting, pour ground, run DRC
python3 fab.py # gerbers, drill files, BOM, CPLautoroute.sh expects freerouting.jar in tools/. Download it from the freerouting v2.0.1 release (needs Java 21).
ref/tca8418.pdf: TI TCA8418 datasheetref/snaptron_guide.pdf: Snaptron metal dome design guide (contact pad patterns, plating, venting)| Qty | Value | Footprint | References |
|---|---|---|---|
| 4 | M1.4 | MountingHole_1.5mm_M1.4 | H1, H2, H3, H4 |
| 2 | 10k | R_0603_1608Metric | R3, R4 |
| 2 | 4.7k | R_0603_1608Metric | R1, R2 |
| 1 | 100nF | C_0603_1608Metric | C1 |
| 1 | 10uF | C_0603_1608Metric | C2 |
| 1 | Breakout | Pads_1x06_P2.54mm_SMD | J2 |
| 1 | CALL | MetalDome_5mm | SW10 |
| 1 | CONTACT | MetalDome_5mm | SW6 |
| 1 | DOWN | MetalDome_4mm | SW11 |
| 1 | END | MetalDome_5mm | SW12 |
| 1 | I2C_PU | SolderJumper-3_P1.3mm_Bridged2Bar123_RoundedPad1.0x1.5mm | JP1 |
| 1 | K0 | MetalDome_5mm | SW23 |
| 1 | K1 | MetalDome_5mm | SW13 |
| 1 | K2 | MetalDome_5mm | SW14 |
| 1 | K3 | MetalDome_5mm | SW15 |
| 1 | K4 | MetalDome_5mm | SW16 |
| 1 | K5 | MetalDome_5mm | SW17 |
| 1 | K6 | MetalDome_5mm | SW18 |
| 1 | K7 | MetalDome_5mm | SW19 |
| 1 | K8 | MetalDome_5mm | SW20 |
| 1 | K9 | MetalDome_5mm | SW21 |
| 1 | KHASH | MetalDome_5mm | SW24 |
| 1 | KSTAR | MetalDome_5mm | SW22 |
| 1 | LEFT | MetalDome_4mm | SW7 |
| 1 | OK | MetalDome_5mm | SW8 |
| 1 | Qwiic | JST_SH_SM04B-SRSS-TB_1x04-1MP_P1.00mm_Horizontal | J1 |
| 1 | RIGHT | MetalDome_4mm | SW9 |
| 1 | SOFT_L | MetalDome_4mm | SW1 |
| 1 | SOFT_M | MetalDome_4mm | SW2 |
| 1 | SOFT_R | MetalDome_4mm | SW3 |
| 1 | SPK | MetalDome_5mm | SW4 |
| 1 | TCA8418RTWR | WQFN-24-1EP_4x4mm_P0.5mm_EP2.45mm_TI_RTW0024B | U1 |
| 1 | UP | MetalDome_4mm | SW5 |

joeycastillo/The-Open-Book
For details on how to build, test and use Open Book, I've made documentation available here.


hackclub/OnBoard
💡 Join 1,000 teenagers and make your first PCB with a $100 grant!


Ardumower/ardumower
Develop an open source robotic lawn mower (HW+SW reference platform)

CRImier/MyKiCad
My KiCad boards. Can't be bothered uploading individually anymore, so here you go.


It measures 48 × 68 mm and has 2 copper layers, 1.6 mm thick.
38 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the acidvegas/t9kb repository on GitHub, at the commit this page was made from: the board is hardware/t9kb.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.
Its repository publishes it under the ISC licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).