# Tronbyt 3mm-pitch case (Pi Zero 2 W + Adafruit Bonnet)

A 3D-printable enclosure purpose-built for the **3mm-pitch** DIY Tronbyt in the
[lumos build guide](https://lumos.madebyjames.app/guide) — the exact stack that
no off-the-shelf case fits:

- **64×32 RGB LED matrix, 3mm pitch** — Adafruit [#2279](https://www.adafruit.com/product/2279) (CAD: 191.8 × 95.8 × ~15 mm; the product page rounds to 191 × 96)
- **Raspberry Pi Zero 2 W (with header)** — Adafruit [#6008](https://www.adafruit.com/product/6008)
- **Adafruit RGB Matrix Bonnet** — Adafruit [#3211](https://www.adafruit.com/product/3211)

**Single-body design:** one open-front body the panel drops into, secured by screws
that enter hidden from the **back** through internal pathways landing on the panel's
own mounting holes. The exterior is a **continuous rounded rectangle — no bezel, no
external screw bulges, no front lip** (so zero covered pixels). The bottom edge flows
down into two integral **feet** (so it sits flat) and back up between them. A separate
**removable wedge** slots in between the feet for a ~12° back-lean (screen tips up
toward you), or comes off to sit flat — like the original Tidbyt's optional angle piece.

**Power routing:** the Pi+Bonnet mounts **landscape**, so the Bonnet's barrel jack
faces a **side wall** with room to spare. A short **5.5×2.1 mm pigtail** carries power
from that jack to a **panel-mount DC jack** bolted into the **lower-back wall**, where
your wall adapter plugs in from behind. The cord exits straight out the back and the
case sits dead flat — no plug poking into the desk. (Earlier revisions pointed the jack
*down* and needed a bottom recess; that never left enough room for the cable to make
its bend, so it's gone.)

![assembly](renders/v7_preview.png)

## What you print (2 parts)

| File | What it is | Print orientation | Supports |
|------|-----------|-------------------|----------|
| `stl/body.stl` | The whole enclosure (one piece) | Back wall **down** on the bed, open front **up** | none |
| `stl/wedge.stl` | Optional ~12° stand — slots between the feet, locating pegs | Flat (desk) face **down** | none |

The four internal panel-screw columns are **braced into the side walls** and their
rear counterbores are **self-supporting** (45° cone up to the clearance hole), so the
body still prints with **no supports** — and the columns no longer snap off mid-print
the way bare standoffs did.

`.3mf` versions are in `stl/` too — prefer them in Bambu Studio / OrcaSlicer. Source
of truth is **`case_007.scad`** (fully parametric — see "Re-tuning"). Panel hole
positions come from Adafruit's #2279 CAD drawing (`ref/2279_CAD.png`).

## Print settings (starting point — Bambu, PLA)

- Layer height **0.2 mm**, **3 walls**, **15 % infill**, PLA, **no supports**.
- Brim or a small chamfer on the wedge bottom / body back edge helps if you see
  elephant's-foot (edges are left square for slicer flexibility).
- Tolerances tuned for a calibrated Bambu + PLA: **0.3 mm/side** panel fit, **0.2 mm**
  hole clearance.

## Hardware

| Qty | Item | Where |
|-----|------|-------|
| 4 | **M3 × 40 mm** screws | rear → through the internal bosses → into the panel's mounting standoffs |
| 4 | **M2.5 heat-set inserts** | Pi standoff bosses |
| 4 | **M2.5 × 6 mm** screws | securing the Pi |
| 1 | **DC-022B panel-mount jack** (5.5×2.1 mm) | bolts into the lower-back wall (Ø12 mm hole) |
| 1 | **5.5×2.1 mm DC pigtail** (male plug → bare/female lead) | Bonnet jack → the panel-mount jack |

The wedge needs **no hardware** (pegs + gravity). The 4 long screws are a consequence
of back-access on a ~46 mm-deep case — confirm the exact length against your panel's
standoff depth. The pigtail's male end is **5.5×2.1 mm** to match the Bonnet; the
panel jack's female is **5.5×2.1 mm** to match your wall adapter's plug.

## Assembly

1. **Heat-set** the 4× M2.5 inserts into the Pi bosses (reach in through the open
   front).
2. **Mount the Pi+Bonnet** (M2.5 screws) in **landscape**, Bonnet facing the open
   front, the **barrel jack facing a side wall**.
3. **Fit the back-wall jack** — bolt the DC-022B panel-mount jack into the Ø12 mm hole
   in the lower-back wall (nut on the inside); the flat keeps it from spinning.
4. **Wire it** — push the pigtail's male plug onto the Bonnet jack and run the lead to
   the panel-mount jack; route the HUB75 ribbon + the panel's power pigtail in the open
   cavity.
5. **Drop the panel** into the front opening, display facing out; align its 4 mounting
   holes with the internal bosses.
6. **Screw from the back** — 4× M3×40 through the rear counterbores, through the
   bosses, into the panel's standoffs. Heads recess flush; the panel is clamped and
   the exterior stays clean.
7. **Sit flat** on the two feet, or **add the wedge** — slot it between the feet
   (pegs locate it) for the ~12° back-lean; pull it off to sit flat again. Your wall
   adapter plugs into the jack out the back.

## ⚠️ Verify before the full print

Datasheet/CAD-derived — **test-print the lower-rear corner first** (barrel slot + one
boss) and dry-fit:

1. **Panel screw thread + length.** Screws self-tap into the panel's plastic
   standoffs (~M3). Confirm the thread bites and pick the right length (~40 mm).
2. **Panel depth / seat.** The bosses now land at a **13.5 mm** screw frame
   (`panel_screw_depth`) — a test print showed the panel's real standoff is ~3.5 mm
   deeper than the #2279 CAD side view implied (10 mm), which had left the panel
   sitting ~2 mm **proud**. It now seats back to the `panel_inset` recess. Confirm the
   rear connectors clear the Pi, and dry-fit the panel face against the front edge.
   *(Panel pocket uses the CAD 191.8 × 95.8 with a sharp/rectangular interior + 0.4 mm
   clearance per side — a first test print at 191 × 96 with rounded corners was too
   tight on width.)*
3. **Back-wall jack hole.** Sized **Ø12 mm + a 1 mm anti-rotation flat** for a
   DC-022B-style jack (`pmjack_hole_d` / `pmjack_flat_dep`). Confirm against the jack
   you actually buy and adjust if needed. The local boss thickens the wall to 5 mm for
   thread grip.
4. **Pigtail reach + clearance.** Dry-fit the pigtail's male plug onto the side-facing
   Bonnet jack and confirm the lead reaches the back-wall jack with the Pi in
   landscape; confirm the jack body's ~12–15 mm inward reach clears the Pi (it sits
   below the board by design).

## Re-tuning (e.g. for the 4mm panel)

Every dimension is a named variable at the top of `case_007.scad`. For the **4mm
panel (#2278)** set `panel_w`/`panel_h` and the `panel_hole_x/y` from that panel's
CAD. Other handy knobs: `lean`, `foot_h`, `pmjack_x`/`pmjack_y` (back-jack position),
`pmjack_hole_d`. Preview / export:

```bash
openscad -D 'part="all"' -D 'stance=true' case_007.scad   # assembled preview
openscad -o stl/body.stl -D 'part="body"' case_007.scad   # export a part
```

`part` = `body` | `wedge` | `all` (plus `column`, a glue-in repair standoff).
`cut=true` + `cut_x=<mm>` gives a cross-section; `show_ghost=true` overlays a
translucent panel + Pi + Bonnet + the back-wall jack body.

## How it was designed

CAD-as-code in OpenSCAD with a render-and-self-correct loop — every change rendered to
multi-angle PNGs (`renders/`) and checked for failed booleans, thin walls, and
clearances before export. The two-piece (bezel + rear-shell) iterations are in
`case_001.scad` … `case_005.scad`; `case_006` is the single-body redesign; **`case_007`
is current** (back-lean wedge, full-width vents, feet, landscape Pi + back-wall
panel-mount power jack). Specs:
`docs/superpowers/specs/2026-06-19-tronbyt-3mm-case-design.md` and
`docs/superpowers/specs/2026-06-25-back-wall-power-jack-design.md`.
