
Racer
StuckAtPrototype/Racer
These are structured into their own files. I could have used submodules, but decided against it.

ESP32-S3 USB/BLE keyboard adapter for the TI-99/4A home computer
Ti99-kb adapter is an open-source printed circuit board by JonVogel, from the JonVogel/ti-99-keyboard repository on GitHub, published under the MIT licence. It is a 2-layer board of 73.5 × 90.3 mm with 59 parts on 58 nets, routed with 284 tracks and 17 vias.
It is built around the BSS138. Its parts include 32 resistors, 16 transistors, 6 connectors and 1 IC. It belongs with the interfaces and adapters and keyboards and input boards and the ESP32 boards of this library.
An ESP32-S3 based adapter that lets you use a modern Bluetooth (or USB) keyboard with a Texas Instruments TI-99/4A home computer.
The adapter installs inside the TI in place of the original keyboard connector and emulates the original 6×8 key matrix, translating HID reports from a BLE/USB keyboard into key presses the console's keyboard scan sees as if they came from the original keyboard. The original keyboard can optionally run in parallel.
? _ [ ] { } ' " \ | ~ ` : < >)EspUsbHost),
usable alongside or instead of BLEThe adapter comes in two editions that are electrically identical and run the same firmware; they differ only in how the 16 level-shifter channels are built:
| Part | Purpose |
|---|---|
| Hosyond ESP32-S3 N16R8 dev board (USB-C, WROOM-1, 16MB flash, 8MB PSRAM) — sold in 3-packs on Amazon | MCU with USB host and BLE |
| 2× 1×22 female socket strips, 2.54mm | Sockets the ESP32 dev board (never solder the module directly) |
2× 1×15 male pin headers, 2.54mm (snap from 1×40 breakaway strips — e.g. Adam Tech PH1-40-UA, DigiKey ~$0.48/strip) | J10 (to the TI) and J20 (optional original keyboard) |
| 1×2 + 1×1 male header pins (from the same breakaway strips) | J9 bench power header, J15 spare-channel pad |
TI PSU daisy-chain header — Molex KK-396 4-pin, 09-65-2048 (DigiKey WM18825-ND; alt 26-60-4040 / WM4622-ND) | Passes the TI's power through the board; the TI mainboard's existing female plug mates here (J14) |
PSU-side mating plug — Molex 09-50-3041 housing (DigiKey WM2102-ND) + 4× 08-50-0106 crimp terminals (DigiKey WM2300-ND) + ~30cm of 22 AWG stranded wire | Cable from the J13 solder pads to the TI power supply's header |
| 15-pin female-to-female keyboard ribbon (DIY from bulk Dupont parts, ~$1.5–3.5/cable, no crimping — see note below; or ready-made aftermarket TI ribbon, ~$8) | Connects the adapter's male header to the TI's male keyboard header |
No voltage regulator is needed — the board runs on regulated +5V taken straight from the TI PSU via the power daisy-chain. Crimp tool for the KK terminals: IWISS SN-48B (~$20), or fold-and-solder the terminal barrels.
| Part | Purpose |
|---|---|
PCB fabbed from pcb/gerbers/ti99-kb-adapter_r6.zip (2-layer, 1.6mm, HASL — ~$1/board at JLCPCB) | The carrier board, all through-hole |
| 4× BOB-12009 BSS138 level-shifter breakouts (SparkFun ~$3.50 ea, or AliExpress clones) | The 16 shifter channels (4 per module) |
| 8× 1×6 female socket strips, 2.54mm + male header pins on each BOB | Sockets the four BOB modules |
Solder generously on the BOB headers — under-heated joints there were the
single most common build fault. Test every finished board with
test-matrix-loopback/ (onboard LED: green = good, red = bad).
| Item | Details |
|---|---|
JLCPCB order with PCB Assembly (Economic, Top side) using the three files in pcb/gerbers/: ti99-kb-adapter_r7.zip + ti99-kb-adapter_BOM.csv + ti99-kb-adapter_CPL.csv | Boards arrive with all 48 shifter parts (16× BSS138 C78284, 32× 10kΩ C17414) machine-soldered — ~$3/board + shipping in qty 10 |
Then add the common parts above. Still hand-soldered: the ESP32 module's
header pins, the two 1×22 board sockets, and all connectors (~120 joints) —
what assembly removes is the shifter fabric and the DIY tier's BOB/socket
work. Run test-matrix-loopback/ after the ESP32 goes in — LED green means the
whole path (module, sockets, traces, every shifter channel) is proven in
one shot.
The adapter is intended for permanent installation inside a TI-99/4A with the original keyboard removed (or run in parallel) and a 3D-printed cover over the keyboard opening.
Sourcing the keyboard ribbon (cheap DIY): the cable is a straight 15-way female-to-female run — both the adapter and the TI motherboard expose 1×15 male headers. Instead of a ready-made aftermarket TI ribbon (arcadeshopper, ~$8), build it from bulk commodity Dupont parts for ~$1.5–3.5/cable with no crimping and no shells to strip:
- 15× female-to-female no-shell pre-crimped 2.54mm leads per cable — AliExpress (search: "Dupont 2.54mm female-to-female no-shell pre-crimped jumper wire 40P").
- 2× 1×15 single-row Dupont female housings per cable — AliExpress (search: "Dupont 2.54mm 1x15P housing female single row").
Slide 15 bare pins into each housing — that's the whole assembly. A genuine Molex 1×15 housing (
50-57-9315, DigiKey ~$1) also fits, but only accepts Molex crimp terminals — commodity Dupont pins won't lock in it, so stay all-Dupont. AliExpress links rot; the search terms are the durable fallback. Orientation gotcha is noted under the pinout below (red stripe = pin 15).
Note: an earlier revision used TXS0108E auto-direction level shifters. They do not work for a keyboard matrix — the auto-direction detector can't handle open-drain / resistive loads and channels latch or oscillate. The design uses BSS138 discrete MOSFET shifters, which are bidirectional by physics and handle open-drain cleanly. Do not substitute TXS0108E.
The TI's internal keyboard connector is a 1×15 single-row 0.1" header. The console drives six column lines low one at a time (via a 74LS156, pulled up with 1kΩ) and reads eight row lines back (into the TMS9901, pulled up with 10kΩ). The adapter reads the columns (inputs) and drives the rows (open-drain outputs).
GPIOs below are the v5 (straight-ribbon) mapping: the flat ribbon lands
adapter connector (J10) pin p on TI pin 16−p, and the firmware pin map
mirrors to match. (Rev-3 boards used a 180°-twisted ribbon and a different
GPIO map — see the v3 git tag.)
| TI pin | Signal | Matrix | ESP32 GPIO | Direction |
|---|---|---|---|---|
| 1 | INT5 | row 2 | 13 | ESP32 → TI (drive) |
| 2 | INT6 | row 3 | 12 | ESP32 → TI (drive) |
| 3 | INT8 | row 5 | 11 | ESP32 → TI (drive) |
| 4 | INT4 | row 1 | 10 | ESP32 → TI (drive) |
| 5 | INT3 | row 0 | 9 | ESP32 → TI (drive) |
| 6 | P5 | Alpha Lock | 3 | wired, never driven (software alpha lock) |
| 7 | INT7 | row 7 | 8 | ESP32 → TI (drive) |
| 8 | 1Y1 | col 0 | 18 | TI → ESP32 (read) |
| 9 | 1Y0 | col 4 | 17 | TI → ESP32 (read) |
| 10 | INT9 | row 6 | 16 | ESP32 → TI (drive) |
| 11 | INT10 | row 4 | 15 | ESP32 → TI (drive) |
| 12 | 2Y0 | col 5 | 7 | TI → ESP32 (read) |
| 13 | 2Y1 | col 1 | 6 | TI → ESP32 (read) |
| 14 | 2Y2 | col 2 | 5 | TI → ESP32 (read) |
| 15 | 2Y3 | col 3 | 4 | TI → ESP32 (read) |
A 16th level-shifter channel (GPIO14 → J15 "SPARE" solder pad) is wired as a
repair path: if any matrix GPIO or shifter channel dies, jumper J15 to the dead
line's pad and remap that line's #define to GPIO14 — no board respin needed.
Ribbon orientation gotcha: aftermarket TI keyboard ribbons mark pin 15 with the red stripe, not pin 1. Verify against the silkscreen before plugging in.
A hardware timer samples all six column inputs at ~200 kHz. Each column is debounced asymmetrically — it becomes active on the first LOW sample (so the row is driven before the ROM reads it) and only releases after two consecutive HIGH samples (so ribbon coupling can't glitch a held key). The rows driven are the OR of the pressed keys in every currently-active column, so an ordinary one-column scan drives exactly that column, while the console's deliberately-overlapping QUIT and CLEAR scans (which strobe two columns at once) are presented correctly. Rows are open-drain, so the original keyboard can coexist on the same lines.
The dedicated Alpha Lock line (TI pin 6) is intentionally never driven — see below.
The BLE library BleHidHost/ lives in-tree and is picked up automatically; the
only external dependency to install is NimBLE-Arduino.
Builds with arduino-cli via the included build.bat (Windows). FQBN:
esp32:esp32:esp32s3:PartitionScheme=no_ota,FlashSize=16M,PSRAM=opibuild.bat compile — compile onlybuild.bat — compile + upload (default COM port)build.bat upload COM7 — upload to a specific portbuild.bat monitor COM7 — serial monitor at 115200 baudBleHidHost/ folder (or copy it
into ~/Documents/Arduino/libraries/)At the top of ti-99-keyboard.ino:
// #define INPUT_USB // USB keyboard via USB-OTG port (currently disabled)
#define INPUT_BLE // Bluetooth LE HID keyboardPress F12 on the currently connected keyboard. It disconnects, the ESP32 opens a 30-second pairing window (LED pulses blue), and any HID keyboard put in pairing mode during that window is adopted as the new peer.
| Color | Meaning |
|---|---|
| Pulsing blue | Startup or pairing mode |
| Pulsing purple | Scanning for keyboard |
| Steady dim green | Keyboard connected, idle |
| Bright green flash | Key pressed |
| Red blink | Error |
Modifiers pass straight through; the host Alt key acts as TI FCTN.
| Modern key | TI-99/4A |
|---|---|
| Alt | FCTN |
| Ctrl | CTRL |
| Shift | SHIFT |
| Caps Lock | Alpha Lock (software-emulated; see below) |
Punctuation and symbols (unshifted / shifted):
| Key | Unshifted | Shifted |
|---|---|---|
- | - | _ (FCTN+U) |
= | = | + |
/ | / | ? (FCTN+I) |
; | ; | : |
, | , | < |
. | . | > |
' | ' (FCTN+O) | " (FCTN+P) |
[ | [ (FCTN+R) | { (FCTN+F) |
] | ] (FCTN+T) | } (FCTN+G) |
\ | \ (FCTN+Z) | | (FCTN+A) |
` | ` (FCTN+C) | ~ (FCTN+W) |
Editing / function keys:
| Modern key | TI-99/4A |
|---|---|
| Esc | FCTN+9 (BACK) |
| Backspace | FCTN+S |
| Tab | FCTN+7 |
| Delete | FCTN+1 |
| Arrows | FCTN+E / S / D / X (up / left / right / down) |
| F1–F10 | FCTN+1…0 (DEL, INS, ERASE, CLEAR, BEGIN, PROC'D, AID, REDO, BACK, …) |
| F11 | Toggle type-ahead buffer on/off |
| F12 | Enter BLE pairing mode (not forwarded to the TI) |
The F-key shortcuts let you press the standard TI FCTN+digit combos with a single key. Two system combos worth calling out, both verified on real hardware:
The original TI-99/4A has a notorious hardware bug: the Alpha Lock key shares an electrical signal with joystick UP, so any game played with Alpha Lock engaged sees a permanent UP input. The classic fix was to physically pop the Alpha Lock key out of its socket before playing.
This adapter sidesteps the bug entirely by implementing Alpha Lock in software. When Caps Lock is on, the adapter injects SHIFT into letter keypresses (producing capital letters via the normal keyboard-scan path) and never drives the dedicated Alpha Lock line (TI pin 6). Joysticks therefore work correctly regardless of Caps Lock state, and numbers/punctuation are unaffected by Caps Lock — matching the original Alpha Lock semantics.
EspUsbHost); runs alongside BLE.MIT — see LICENSE.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 32 | 10k | Resistor_SMD:R_0805_2012Metric | R1, R2, R10, R11, R12, R13, R14, R15, R16, R17, R18, R19, R20, R21, R22, R23 +16 |
| 16 | BSS138 | Package_TO_SOT_SMD:SOT-23 | Q1, Q2, Q3, Q4, Q5, Q6, Q7, Q8, Q9, Q10, Q11, Q12, Q13, Q14, Q15, Q16 |
| 4 | MountingHole_2.2mm_M2 | MountingHole:MountingHole_2.2mm_M2 | H1, H2, H3, H4 |
| 1 | ESP32-S3-N16R8 | ti99-parts:ESP32-S3-N16R8 | U1 |
| 1 | PWR_5V_IN | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J9 |
| 1 | PWR_TI_IN_CABLE | ti99-parts:J13-CableHeader-1x04 | J13 |
| 1 | PWR_TI_OUT_MB | Connector_Molex:Molex_KK-396_5273-04A_1x04_P3.96mm_Vertical | J14 |
| 1 | SPARE_PAD | Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_Vertical | J15 |
| 1 | TI_KBD | Connector_PinHeader_2.54mm:PinHeader_1x15_P2.54mm_Vertical | J10 |
| 1 | TI_KBD_PARALLEL | Connector_PinHeader_2.54mm:PinHeader_1x15_P2.54mm_Vertical | J20 |

StuckAtPrototype/Racer
These are structured into their own files. I could have used submodules, but decided against it.

willem-pennings/balancing-cube
A cube that balances itself in a corner or edge using reaction wheels

abhishek-kakkar/BeagleLogic
A Software Suite that implements a logic analyzer with the PRU on the BeagleBone / BeagleBone Black.


lachlanA/eagle-to-kicad
Eagle SCH/LIB to KiCad SCH/LIB ULP conversion script

No0ne/ps2x2pico
USB keyboard/mouse to PS/2 interface converter using a Raspberry Pi Pico

StuckAtPrototype/AirCube
Works standalone out of the box. Pairs with Home Assistant in minutes. Other platforms are supported through community-contributed extensions.

It measures 73.5 × 90.3 mm and has 2 copper layers, 1.6 mm thick.
59 parts, built around the BSS138. 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 JonVogel/ti-99-keyboard repository on GitHub, at the commit this page was made from: the board is pcb/ti99-kb-adapter.kicad_pcb and its schematic pcb/ti99-kb-adapter.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).