Pomma DIY enclosure, version 3 (prototype)
===============================================

Status: prototype design. Checked in CAD for fit; not yet test-printed at the time of release.
Print the two fit coupons first and check them before printing the case.

Licence
-------
Copyright (c) 2026 Ed Dowding. Except where separately identified, the enclosure STL/STEP
files, build.py and this guide are licensed under CC BY-NC-SA 4.0 (full text in
CC-BY-NC-SA-4.0.txt). Build and remix for yourself; don't sell boxes or kits made from them.
Commercial permissions need a separate agreement. The Pomma name is not licensed.
Pomma connects through WhatsApp's linked-device feature. WhatsApp is a trademark of
WhatsApp LLC. Pomma isn't affiliated with or endorsed by Meta.

Files
-----
base.stl / lid.stl              the case (lid.stl is already flipped to print face-down)
pi-shim-0.5mm / 1mm / 2mm.stl   shims under the Pi posts; stack them to set the screen height
cable-stop.stl                  snaps onto the power cable inside the rear wall for strain relief
fit-coupon-talk.stl             test holes of 24.0 / 24.4 / 24.8 mm for the TALK button
fit-coupon-dial-pilots.stl      encoder hole and screw pilot holes
*.step                          the same parts, editable; assembly.step shows everything together
build.py                        the CadQuery script that generates all of the above

Print
-----
0.2 mm layers, 4 walls, about 20% infill, PETG (preferred, the Pi runs warm) or PLA.
1. fit-coupon-talk: use the smallest hole the button's M24 thread passes through freely.
2. fit-coupon-dial-pilots.
3. Shims (three of each) and the cable stop.
4. Base, upright. No supports needed.
5. Lid, face-down as supplied.

Parts
-----
Raspberry Pi 3A+ and a microSD card; Freenove GPIO terminal board FNK0080; a riser of about
8 mm on its centre header; Pimoroni Pirate Audio: Speaker (PIM485); Adafruit rotary encoder
(ADA377) with a 25 mm knob, 6 mm bore; 24 mm mini LED arcade button, translucent red
(The Pi Hut 104403); mini USB microphone; 5 V 2.5 A micro-USB power supply; four M2.5 x 12
screws with standoffs; four M3 x 10 screws; 24 AWG silicone wire; a small cable tie.

Wiring (to the Freenove terminals, by their printed labels)
-------
Encoder A to GPIO4, B to GPIO17, press to GPIO22, common to GND.
TALK switch to GPIO23 and GND.
TALK light, simplest: LED+ to 5V, LED- to GND (always on).
Wire everything before fitting the Pirate Audio, which covers one terminal row.
Never put 5 V on a GPIO pin.

Set the screen height
---------------------
Assemble the stack (Pi, Freenove, riser, Pirate Audio) and measure from the underside of
the Pi board to the top of the screen glass. Shim height = 2.0 + (38.0 - your measurement) mm.
Over 40 mm and shims can't absorb it: change LID_GAP in build.py and rebuild.

Close up
--------
Screw the Pi to its posts from underneath (M2.5 x 12) through the shims. Fit TALK and the
encoder to the lid with their nuts, then the knob. Lower the lid straight down over the base
lip and fit four M3 x 10 screws up the corner tubes from underneath (2.5 mm hex key).
The screen is upside down relative to the child: rotate it in software.
