Skip to the content
2 layers36 × 29.5 mmKha term, the printed circuit board in 3D

Kha term

kiu/kha5

Overengineered Modular RS-485 Multi-Master 19" Subrack Home Automation / Control

Size
36 × 29.5 mm
Copper layers
2
Thickness
1.6 mm
Parts
16
Nets
10
Pads
44
Tracks, vias
56, 8
Pours
2
Routed
Yes
KiCad
KiCad 7 (file 20221018)
Created
16 Apr 2023
Updated
1 Nov 2026

Overview

Kha term is an open-source printed circuit board by kiu, from the kiu/kha repository on GitHub. It is a 2-layer board of 36 × 29.5 mm with 16 parts on 10 nets, routed with 56 tracks and 8 vias.

It is built around the AP63205WU. Its parts include 5 capacitors, 4 resistors, 2 connectors, 1 IC and 1 inductor. It belongs with the interfaces and adapters boards of this library.

Main components

1

README

README.md

kha

Overengineered Modular RS-485 Multi-Master 19" Subrack Home Control

Repository

Hint: "bgt" is German for Baugruppenträger translating to subrack assembly

Protocol

RS-485 at 500 kbaud (8N1), half duplex, every node may send. Commands, addresses and registers are listed in kha-protocol.ods.

Frame

text
0x42 0x99 <len> <from> <to> <cmd> <payload ...> <crc>
  • 0x42 0x99 starts a frame. Inside a frame every 0x42 is followed by an extra 0x66, so 0x42 0x99 is always a start. The escape bytes are not counted and not part of the CRC.
  • len counts len, from, to, cmd, payload and crc: 5 + payload, payload up to 67 bytes.
  • CRC-8 (polynomial 0x31, init 0xFF, no final XOR) over all bytes from len to the last byte before the CRC.

Bus access

  • The stack counts 100 µs ticks on TCB2, which is reserved for the stack. Every falling edge on RX resets the count.
  • A node sends once the bus has been quiet for 10 + its own address ticks (1 ms + address × 100 µs). Addresses are unique, so no two nodes wait for the same slot.
  • After sending, a node waits once for the longest slot (10 + 0xF0 ticks), so the others get their turn first.
  • The bootloader commands F9–FC skip the slot wait to keep flashing fast: send TX off (F0) to the other nodes before flashing.

Firmware

  • Flash: bootloader at 0x0000–0x3FFF, app at 0x4000–0xFFFF. At every boot a node computes a CRC-32 over 0x4000–0xFFFF (without the final XOR) and reports it with the boot and app versions in its UP (E2) and ident (E1).
  • Bootloader: after a reset it waits 4 s for bootloader commands (FD keeps it there), then starts the app. Brown-out detection at 2.85 V. No lock bits, so UPDI can read and write a node.
  • Flashing over the bus: kha_fw.py; via UPDI: kha_updi.py.

Bus health page

kha-web shows the state of every node on a static web page: missing nodes, error counters, days since the last reboot, and whether nodes of the same board type run the same firmware. A collector follows the gateway's log passively, keeps the state in SQLite and exports a JSON file for the page. Screenshot with mock data:

Videos

Two hour deep dive lecture style video on youtube: https://youtu.be/BUSnTUGKZzc

kha on youtube

Photos

Misc

  • All PCBs use eAVR as connector for AVR flashing
  • It all started simple with lightdesk

Todo

  • Node: LED marquee node
  • Node: IrDA bridge (bridging the bus through a window)
  • Stack: Combine queued TX commands into single burst?
  • Stack: Merge similiar queued TX commands into single command?
  • Stack: Process TX commands as incoming RX commands?

Regrets

  • Terrible collision detection / avoidance
  • Buck converter capacitor generates audible noise

License

This project is licensed under the Creative Commons Attribution-NonCommercial 3.0 Unported (CC BY-NC 3.0) license.

Parts

16
QtyValueFootprintReferences
2100nFCapacitor_SMD:C_0805_2012MetricC1, C4
2680R DNPResistor_SMD:R_0805_2012MetricR1, R3
2MountingHoleMountingHole:MountingHole_3.7mmH1, H2
110nFCapacitor_SMD:C_0805_2012MetricC5
110uFCapacitor_SMD:C_0805_2012MetricC2
1120RResistor_SMD:R_0805_2012MetricR2
11MResistor_SMD:R_0805_2012MetricR4
11x02_JumperConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ2
14.7uHInductor_SMD:L_1210_3225MetricL1
147uFCapacitor_SMD:C_1210_3225MetricC3
1AP63205WUPackage_TO_SOT_SMD:TSOT-23-6U1
1PolyfuseFuse:Fuse_0805_2012MetricF1
1RJ45_Shieldedkiu:GDLX-S-88KJ1

More from kiu/kha

12
  • 2 layers240 × 100 mmKha bgt extend, the printed circuit board in 3D

    Kha bgt extend

    kiu/kha

    Overengineered Modular RS-485 Multi-Master 19" Subrack Home Automation / Control

    69 parts5
  • 2 layers425.5 × 128.3 mmKha bgt backplane, the printed circuit board in 3D

    Kha bgt backplane

    kiu/kha

    Overengineered Modular RS-485 Multi-Master 19" Subrack Home Automation / Control

    67 parts5
  • 2 layers426.7 × 128.3 mmKha bgt backplane, the printed circuit board in 3D

    Kha bgt backplane

    kiu/kha

    Overengineered Modular RS-485 Multi-Master 19" Subrack Home Automation / Control

    67 parts5
  • 2 layers70 × 58 mmKha led ikea node, the printed circuit board in 3D

    Kha led ikea node

    kiu/kha

    Overengineered Modular RS-485 Multi-Master 19" Subrack Home Automation / Control

    33 parts5
  • 2 layers320 × 11 mmKha led ikea kallax, the printed circuit board in 3D

    Kha led ikea kallax

    kiu/kha

    Overengineered Modular RS-485 Multi-Master 19" Subrack Home Automation / Control

    32 parts5
  • 2 layers48 × 50 mmKha led ikea node, the printed circuit board in 3D

    Kha led ikea node

    kiu/kha

    Overengineered Modular RS-485 Multi-Master 19" Subrack Home Automation / Control

    31 parts5
  • 2 layers160 × 100 mmKha bgt generic base, the printed circuit board in 3D

    Kha bgt generic base

    kiu/kha

    Overengineered Modular RS-485 Multi-Master 19" Subrack Home Automation / Control

    30 parts5
  • 2 layers350 × 33 mmKha led ikea oxberg40, the printed circuit board in 3D

    Kha led ikea oxberg40

    kiu/kha

    Overengineered Modular RS-485 Multi-Master 19" Subrack Home Automation / Control

    30 parts5
  • 2 layers50 × 50 mmKha led ikea node, the printed circuit board in 3D

    Kha led ikea node

    kiu/kha

    Overengineered Modular RS-485 Multi-Master 19" Subrack Home Automation / Control

    30 parts5
  • 2 layers50 × 53 mmKha remote, the printed circuit board in 3D

    Kha remote

    kiu/kha

    Overengineered Modular RS-485 Multi-Master 19" Subrack Home Automation / Control

    29 parts5
  • 2 layers48 × 50 mmKha led ikea node, the printed circuit board in 3D

    Kha led ikea node

    kiu/kha

    Overengineered Modular RS-485 Multi-Master 19" Subrack Home Automation / Control

    28 parts5
  • 2 layers200 × 10.2 mmKha led ikea rx4, the printed circuit board in 3D

    Kha led ikea rx4

    kiu/kha

    Overengineered Modular RS-485 Multi-Master 19" Subrack Home Automation / Control

    28 parts5

Similar boards

  • 2 layers28.3 × 14.3 mmTap Photosensor PCB, the printed circuit board in 3D

    Tap Photosensor PCB

    VoronDesign/Voron-Tap

    Tap is a nozzle-based z-probe for the V2 and Trident printer designs. The entire toolhead moves to trigger an optical switch. Tap offers many advantages:

    18 parts716GPL-3.0
  • 6 layers84 × 98 mmFujiNet-5200-Rev0, the printed circuit board in 3D

    FujiNet-5200-Rev0

    FujiNetWIFI/fujinet-hardware

    Schematics and design files for FujiNet hardware

    145 parts142
  • 2 layers65 × 70 mmOpenradfan, the printed circuit board in 3D

    Openradfan

    andrekuehne/openradfan

    An ESPHome-driven controller for radiator fans to improve heat output

    49 parts29MIT
  • 4 layers96 × 172 mmServo cpu, the printed circuit board in 3D

    Servo cpu

    wiciu15/servo2

    Servo inverter for 3-phase AC motor with/out encoder feedback

    167 parts29
  • 4 layers355 × 160 mmLiBCM, the printed circuit board in 3D

    LiBCM

    doppelhub/Honda_Insight_LiBCM

    Replacement BCM for G1 Honda Insight Lithium Conversion

    717 parts25CC-BY-SA-4.0
  • 2 layers82.5 × 140 mmQCamPCR, the printed circuit board in 3D

    QCamPCR

    GaudiLabs/qPocketPCR

    Quantitative PCR machine detecting fluorescence using a camera

    113 parts22GPL-3.0
  • 2 layers28.8 × 14.3 mmTap Photosensor PCB, the printed circuit board in 3D

    Tap Photosensor PCB

    Qballjos/Voron-2.4-Otopus-pro-SB2209-U2C-CAN

    Voron 2.4 R2 with ,Stealthburner, Voron Tap, Bambu lab Hotend. Octopus pro with TMC2209 UART, EBB SB2209 v1.0 and U2C v2.1 running klipper

    12 parts21
  • 2 layers130 × 53 mmTougherPowerMeter FeatherWing, the printed circuit board in 3D

    TougherPowerMeter FeatherWing

    ahillbom/TougherPowerMonitor-HW

    Triple-channel power monitor based on INA3221 and TPS1HB08A with some filtering for tougher conditions. Compatible with Arduino Nano and Feathers.

    85 parts19MIT

Questions

How big is the Kha term PCB?

It measures 36 × 29.5 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Kha term use?

16 parts, built around the AP63205WU. 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.

Where can I download the Kha term KiCad files?

From the kiu/kha repository on GitHub, at the commit this page was made from: the board is kha-nodes/kha-term/kicad/kha-term.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the Kha term design in my own project?

Its repository states no licence, so its author keeps all rights: ask kiu before reusing the design.