rushabhcodes/wireless-split-keyboard

Wireless Split Keyboard — custom routed nRF52840 split PCBs with a printable enclosure

Version
0.4.5
License
unset
Stars
0

Use with the tscircuit CLI

tsci is the tscircuit CLI. Install it with npm install -g tscircuit.

tsci clone rushabhcodes/wireless-split-keyboard  # download the package files into ./wireless-split-keyboard
tsci add rushabhcodes/wireless-split-keyboard    # add it to your project as @tsci/rushabhcodes.wireless-split-keyboard

In a cloned or new (tsci init) project: tsci dev starts a local preview, tsci build outputs Circuit JSON, and tsci push publishes to tscircuit.com.

docs/socket-alignment.md

# Bottom-side Choc socket alignment

The previous revision had a real footprint/model mismatch. The imported CPG135001S30 footprint was incorrectly declared `originalLayer="bottom"`. That suppressed the native bottom-side footprint mirror while the CAD model still received it. Every socket's locating posts missed the two 3 mm drills by about 2.200 mm, and its solder legs missed their lands. The older contact-hole contract repeated that same mistaken frame and did not verify the actual model.

The import now keeps its original top-authored frame. Native bottom placement mirrors its pads, drills, courtyards and CAD consistently. `KeyCell.tsx` compensates the socket-origin offset so all 58 switch stems, the key plate apertures, the PCB outlines and all fourteen mounting centers remain fixed. Courtyards are authored on top and become bottom courtyards with the component. The left battery connector moves 2 mm down to clear the corrected SW7 body.

At SW6/SW12/SW18/SW24 on each half, the outboard land is 2.3 × 2.6 mm instead of 2.6 × 2.6 mm. This keeps the fixed outer PCB edge clear while covering the entire supplier-model metal leg with at least 0.15 mm of copper margin. The inward land remains unchanged. The stepped courtyard follows the reduced land. These prototype land adaptations still require the final footprint/stencil review already listed in the manufacturing blockers.

![Actual 3D socket alignment before and after](../outputs/socket-alignment-comparison.png)

The comparison uses actual exported GLB geometry and native PCB textures. The bottom and oblique views expose the locating holes and both solder legs. Both whole-board GLBs and the per-half checks are retained under `outputs/left` and `outputs/right`.

`scripts/check-socket-models.py` reads every socket mesh from the exported GLB, fits the two cylindrical locating-post tips, and compares their centers with the native drills. It also checks every outer solder-leg mesh vertex against the actual native copper pads, requiring more than 0.1 mm of land margin. All 29 sockets on each half are checked, including non-cardinal thumb rotations. Circuit JSON and GLB hashes bind each report to the checked output. `check-routed.ts`, contract tests and `validate.ts` require fresh passing reports; a successful electrical netlist check alone is insufficient.

Primary references:

- [Kailh CPG135001S30 drawing](https://www.kailhswitch.com/Content/upload/pdf/202115927/CPG135001S30-data-sheet.pdf), dimensions and recommended socket land pattern.
- [Kailh CPG135001D02 drawing](https://m.kailhswitch.com/Content/upload/pdf/201915927/CPG135001D02_-_Brown_Tactile_Choc-%281%29.pdf?rnd=400), top switch body, locating pins and electrical leads.
- The JLCPCB C5333465 supplier OBJ/STEP already referenced by the individual imported component, used as independent geometry rather than replacing it with a box or a mirrored approximation.
- [Rishabh Gupta's Corne keyboard](https://github.com/imrishabh18/corne-keyboard/tree/3d497352c1b16e3c2110e8dbfccf01f98890e9f3), researched as requested. Its `ChocKey.tsx` separates the bottom hot-swap socket from the top switch body. No assembled board, PCB routing or enclosure from that project is reused.

This is CAD and routing verification. It does not replace a physical socket, switch and PCB fit test.


The top Choc switch is now a separate mechanical assembly using the C400230
supplier mesh imported with `tsci import`. It adds no duplicated electrical
contacts. The switch body, keycap envelope and locked stem share the same
origin and thumb rotation. The key plate top is now at Z 3.0 mm, at the actual
model flange underside. Native exported meshes are checked by `check-assembly-models.py`;
keycaps and the raw-panel model remain mechanical envelopes.