# Hillsidecam Outdoor Enclosure — v3

Wall-mounted outdoor enclosure for the hillside time-lapse rig. Pi + camera + lens all sealed inside a 165 × 125 × 110 mm box, with a recessed lens behind a removable acrylic window and a 30 mm fan on top for anti-condensation. Lens points straight out of the box, perpendicular to the wall.

## How everything attaches (no nuts, no inserts — just M2.5/M3 screws self-tapping into printed plastic)

| Component | How it attaches | Screws |
|---|---|---|
| **Pi 3B+** | 4 standoffs on the back-wall interior, 58 × 49 mm pattern. Screws self-tap into the printed plastic. | 4 × M2.5 × 8 mm |
| **Arducam HQ camera board** | 4 standoffs on the back-wall interior, 30 × 30 mm pattern. Same self-tapping concept. | 4 × M2.5 × 8 mm |
| **Lid** | 4 internal posts at the box corners, sized for M3 self-tap | 4 × M3 × 12 mm |
| **Hood** | 4 holes around the lens cutout on the front face — drilled by hand after the body prints, using the hood flange as a template | 4 × M3 × 10 mm |
| **Fan (30 × 30 × 7 mm)** | 4 holes in the **lid** around the central 28 mm cutout, 24 mm spacing. Self-tap. Fan attaches from outside on top, blowing UP/out. Eave above protects from rain; convection helps the fan move air rather than fighting it. | 4 × M2.5 × 8 mm |
| **Box → wall** | Two integral mount tabs (top and bottom of back face). Screws go through the tab into wall studs. | 4 × #8 × 1.5" wood |

**About self-tapping:** the first time you drive an M2.5 screw into a printed standoff, it cuts threads into the plastic — feels snug, that's normal. Subsequent installs use the existing threads, easier. PETG and ASA both hold threads well at 4-perimeter wall settings.

## What to print, in order

### Step 1a — Ultra-thin tests FIRST (~10 min total)

These are 1mm-thick "paper template" plates that verify **2D hole spacing and cutout position only**. The fastest possible sanity check before any deeper print.

| File | Size | What it validates | Print time |
|---|---|---|---|
| `test_front_ultrathin.stl` | 69 KB | Lens cutout position + diameter (55 mm). Drop the lens through it. | ~3 min |
| `test_back_ultrathin.stl` | 571 KB | Pi mount pattern (58×49 mm) + camera mount pattern (30×30 mm). Drop boards on it or push M2.5 screws through, confirm alignment. | ~5 min |

**Check after printing:**
- Lens body slides through the front-plate cutout cleanly (snug is fine, tight is not)
- Pi board's 4 mount holes line up with the 4 left-side holes on the back plate
- Arducam HQ board's 4 mount holes line up with the 4 upper-middle holes on the back plate

If any spacing's off, edit the corresponding parameter at the top of the `.scad` (lens_cutout_d, pi_mount_dx/dy, cam_mount_dx/dy), re-render only that ultra-thin test, retry. Catches dimension errors for ~15 min of total time, before any thick prints.

### Step 1b — Regular tests (optional, ~1 hour total)

Once ultra-thin tests pass, the 2D layout is confirmed. The regular tests below add 3D validation — actual standoff fit, M2.5 self-tap into the plastic, and wedge fit. **Worth doing if you're being cautious about the body print. Skippable if the ultra-thin tests look good and you want to commit.**

| File | Size | What it validates beyond the ultra-thin | Print time |
|---|---|---|---|
| `test_front.stl` | 118 KB | Square window seat recess (76 × 76 mm × 1.5 mm deep) for the 1/8" (3.2 mm) acrylic square | ~15 min |
| `test_back.stl` | 1.4 MB | Standoff height (6 mm), M2.5 self-tap into the standoff plastic, wedge sandwich works | ~45 min |

### Step 2 — The real parts (~7 hours total)

Once both tests pass, print these in this order:

| File | Material | Walls | Infill | Supports | Approx time |
|---|---|---|---|---|---|
| `body.stl` (2.6 MB) — OR split version below | ASA (or PETG) | 4 | 30% | Tree on, for inside-back-wall standoffs | 5–7 hr |
| `lid.stl` (281 KB) | same | 4 | 30% | none | ~1 hr |
| `hood_short.stl` (608 KB) **OR** `hood_long.stl` (606 KB) **OR** `hood_visor.stl` (524 KB) | same | 4 | 30% | none | ~45 min |

### Optional: split body for easier printing

If `body.stl` is too tall/complex to print cleanly in one shot (the inside-front camera standoffs need tree supports), print these two pieces and glue:

| File | What | Approx time |
|---|---|---|
| `body_main.stl` (2.5 MB) | Body MINUS the front wall — prints with an open face, no tree supports needed | 4-5 hr |
| `body_front.stl` (155 KB) | Just the front wall (3 mm plate with lens cutout + window seat). Prints flat on the bed. | ~30 min |

**Gluing:** the mating surface is the 165 × 125 mm rim where the front wall meets the body's side/top/bottom walls (3 mm wide all around). Apply a continuous bead of 2-part epoxy (or Gorilla Glue clear), align the front plate against the body's open front, clamp for cure time. The joint should be both structural and watertight.

**Which hood?** Both clear the wide-angle FOV without vignetting at full 2.8mm zoom:
- **`hood_short.stl`** — 12 mm long, 120° opening, front rim ~70 mm. Minimal sun shading but fits anywhere, looks subtle.
- **`hood_long.stl`** — 25 mm long, 110° opening, front rim ~109 mm. Real sun protection but looks like a small megaphone. Worth it for the late-afternoon glare moments.

Print both if you're not sure, swap them at install based on what the live stream feed shows. They use the same 4-screw mount on the front face.

**Material:** ASA is best for 2-year UV stability; needs the X1C enclosure heating on. PETG is easier to print and acceptable (some yellowing over 2 years). Do not use PLA — it will sag in SoCal summer heat.

## Shopping list

| Item | Where | Approx cost |
|---|---|---|
| 12"×12" × 1/8" (3.2 mm) clear acrylic sheets, 2-pack — cut down to 3"×3" squares with a jigsaw | [CALPALMY, Amazon B081R3VCLL](https://www.amazon.com/Clear-Acrylic-Sheet-Plexiglass-2-Pack/dp/B081R3VCLL) | ~$15 |
| 30 × 30 × 7 mm 5V brushless fan (already have one: model FD3007SL5) | — | — |
| M2.5 screw assortment (need 8 mm and 16 mm lengths) | Amazon: "M2.5 screw assortment" | $10 |
| M3 × 12 mm screws (lid + hood) | same kit | (incl.) |
| #8 × 1.5" stainless wood screws (wall mount) | hardware store | $5 |
| 1 mm EPDM foam tape (window + lid gasketing) | hardware store | $5 |
| Clear silicone sealant | hardware store | $5 |
| Stainless or brass insect mesh (fine) | Amazon: "stainless insect mesh 1mm" | $10 |
| Rubber grommet for 14 × 9 mm cable slot | hardware store rubber-grommet section | $3 |

## Assembly order

1. Pi 3B+ → 4 M2.5 × 8 mm screws into the back-wall Pi standoffs
2. Arducam HQ board → 4 M2.5 × 8 mm screws into the back-wall camera standoffs (no wedge — board mounts directly). The 8 mm standoffs give 3 mm clearance behind the board for the CSI ribbon connector.
3. Connect the camera ribbon to the Pi (cable routes through the 14 mm gap between the camera and Pi, down to the Pi's CSI port)
4. Screw the lens onto the Arducam board's CS mount (remove the CS-to-C adapter ring if it's still attached)
5. Press the 76 × 76 mm acrylic square into the front face window recess. Lay 1 mm EPDM tape around the recess edge first.
6. Thin silicone bead around the window from the outside.
7. Mount the fan on the top wall with M2.5 self-tap screws. Wire red lead to Pi pin 4 (5V), black lead to Pi pin 6 (GND).
8. Glue a square of insect mesh over the intake slot on the bottom (inside the box).
9. Push the power cable through the grommet, plug into the Pi micro-USB.
10. Lid on with 4 M3 × 12 mm screws. EPDM gasket around the lid mating face.
11. Hood onto the front face with 4 M3 × 10 mm screws around the lens cutout. (Hood-attach screw holes aren't pre-drilled — mark from the hood flange and drill by hand.)

## Install

Position the box under the eave between the two upstairs windows. Mark wall holes through the top and bottom tabs. Drive #8 wood screws into the studs.

**Before final tighten:** start the live preview with `python3 ~/stream.py` (or call the `hillside-timelapse` skill), open `http://hillsidecam.local:8000` on your laptop, watch the framing. Lens points straight out (perpendicular to the wall), so framing is determined by where on the wall you mount the box.

If the framing's a hair off and you want to tilt the whole box up or down, shim with washers between the mount tabs and the wall (1 mm shim at the top = a small downward tilt; 1 mm at the bottom = a small upward tilt). For larger tilts, see the "future wall-mount wedges" note below.

When the framing is right, snug the wall screws and walk away for 2 years.

## About camera aim — why internal wedges were dropped

An earlier version of v3 had internal wedges that sandwiched between the camera board and the back-wall standoffs to tilt the camera up or down. They were removed because tilting the camera also translates the lens body at the front-wall cutout — even a 5° tilt would move the lens body ~7 mm at the cutout, crashing into the cutout edge (only 1.5 mm radial clearance). The fix is to tilt the entire box at the wall, which keeps the lens centered through its tight cutout.

**Future (only if needed):** if shimming with washers isn't enough, add a `wall_wedge()` module to the `.scad` — a printed wedge that sits between the box's back face and the wall, tilting the whole box. Skipped for now since the simplest install (box perpendicular to wall) is likely good enough.

## Re-rendering after edits

If you change any parameter at the top of `hillsidecam-enclosure.scad`:

```bash
cd ~/Documents/hillsidecam-enclosure/v3
openscad -o body.stl       -D 'PART_TO_PRINT="body"'       hillsidecam-enclosure.scad
openscad -o lid.stl        -D 'PART_TO_PRINT="lid"'        hillsidecam-enclosure.scad
openscad -o hood_short.stl -D 'PART_TO_PRINT="hood_short"' hillsidecam-enclosure.scad
openscad -o hood_long.stl  -D 'PART_TO_PRINT="hood_long"'  hillsidecam-enclosure.scad
openscad -o test_front.stl -D 'PART_TO_PRINT="test_front"' hillsidecam-enclosure.scad
openscad -o test_back.stl  -D 'PART_TO_PRINT="test_back"'  hillsidecam-enclosure.scad
```

You usually only need to re-render the part that changed.

## Known limitations / future v4 candidates

- Hood-attachment screw holes on the body front face aren't modeled — drill by hand using the hood flange as a template.
- Lid gasket relies on EPDM tape, no O-ring groove. Acceptable for SoCal; would not be for the PNW.
- Fan filter: dust mostly caught at the mesh intake (since fan blows out). If dust still accumulates, add a coarse filter over the fan cutout in v4.
- No internal cable retention clips. Pi camera ribbon dangles. Tolerable; v4 could add a small printed clip.

## Reference

- Productionization plan (the indoor pipeline this enclosure serves): `~/.claude/plans/i-want-you-to-swift-corbato.md`
- Operations skill: `~/.claude/skills/hillside-timelapse/`
- Older versions: `../v1/`, `../v2/` (do not print)
