Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .agents/rules/project-context.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ The board topologically sits behind the LED matrix, interfacing via a 2x8 HUB75

### Hardware (Case)
The current enclosure is modeled in Blender. `hardware/case/` is organized by printer bed size, for the v3.0 board:
1. `bed_330mm/`: one-piece snap-fit body (oneshot_v3_part1/2.stl) — H2S-class beds, the main design.
2. `bed_256mm/`: divided snap-fit, 5 parts (divided_v3_part1..5.stl) — P1S-class beds; print & assembly tested (#169), separate LED-panel mounting part adapts to varying panel bolt-hole positions.
1. `bed_330mm/encloser.stl`: one-piece snap-fit body, one STL — H2S-class beds, the main design.
2. `bed_256mm/encloser.stl`: the standard 256mm print — body frame, back panels, and LED-panel mount in one STL; print & assembly verified. `for_other_panels/divided_v3_part1..5.stl` is the adjustable-mount variant for non-standard panels (#169).
3. `knobs/knobs_15mm.stl` / `knobs/knobs_20mm.stl`: Black PLA knobs, shared by all body options.
4. `legacy_v2/`: every v2.x-board case (standard plates, oneshot_v2, divided_v2.1) — NOT compatible with the v3.0 board.

Expand All @@ -58,7 +58,7 @@ The project maintains a strict dual-license approach to accommodate the differin
For full details, reference `BUILD_GUIDE.md` §10. Summary:
1. **Cold boot reliability:** fixed in v2.0 with a 10k GPIO0 pullup.
2. **SMD silkscreen ambiguity:** fixed in v2.0.
3. **LED matrix alignment bumps:** still open; current workaround is trimming during assembly.
3. **LED matrix alignment bumps:** resolved by the v3 snap-fit enclosures (built-in recesses); trimming only applies to the legacy v2 glued plates.
4. **Encoder direction:** handled in firmware.
5. **Encoder shaft length:** 15mm and 20mm EC11 shafts are functionally identical — purely preference. The BOM reference part (Bourns PEC11R-4220F-S0024) is 20mm; both knob STLs are kept.

Expand Down
65 changes: 9 additions & 56 deletions BUILD_GUIDE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Patternflow v3.0.0 -- Build Guide

> **Building a v2.x board?** Use the [v2 build guide](BUILD_GUIDE_v2.md) instead — v2 and v3 parts are **not** interchangeable.
>
> 📷 A couple of photos (Sections 7 and 9) were shot on the v2.1-cut twin build (red board). The v3 procedure is identical; they'll be re-shot on a v3 unit soon.

This guide walks you through building a Patternflow v3.0.0 from scratch. It assumes basic familiarity with through-hole soldering and 3D printing.

Expand Down Expand Up @@ -83,7 +81,7 @@ The v3.0 board has **two power inputs on one board**. Pick one before ordering p
| Power cable | Any USB cable, stripped, wires screwed in | Standard USB-C cable |
| Difficulty | Easy — the classic Patternflow method | ⚠️ **Hard.** The Type-C THT signal pins are tightly pitched; a solder bridge here has shorted and **burned a board** ([#114](https://github.com/engmung/Patternflow/issues/114)). Flux, fine tip, magnification, patience. |

**If in doubt, take Path A.** The result is electrically identical. You can also populate both — the reference build in this guide does (see the finished-board photos in Section 5).
**If in doubt, take Path A.** The result is electrically identical. You can also populate both — the reference build in this guide does.

## 3. Order the PCB

Expand All @@ -102,7 +100,7 @@ Case folders are named by **printer bed size** — see [`hardware/case/`](hardwa
| Your printer bed | Print | Notes |
|---|---|---|
| **256 mm** (P1S / X1C / A1 class) | `bed_256mm/encloser.stl` | Body frame, back panels, and LED-panel mount in one STL. **White PLA.** ~10 h total. |
| **~330 mm+** (H2S class) | `bed_330mm/oneshot_v3_part1/2.stl` | One-piece snap-fitfewer parts. **White PLA.** |
| **~330 mm+** (H2S class) | `bed_330mm/encloser.stl` | The one-piece originalbody, closing part, and LED-panel mount in one STL, **no bonding at all**. **White PLA.** |
| **Everyone** | `knobs/knobs_20mm.stl` | **Required for every build** — all four knobs in one plate, as its own separate print job. **Black PLA.** (15 mm-shaft encoders → `knobs_15mm.stl`.) |

Two colors, on purpose: **body in white, knobs in black** — that contrast is the Patternflow look. Printing the knob plate as a separate job keeps it simple (no color changes mid-print).
Expand Down Expand Up @@ -135,25 +133,7 @@ The whole PCB assembly is covered in **one YouTube video** — soldering order i

**[▶ Watch on YouTube — Patternflow v3.0 PCB soldering walkthrough](https://youtu.be/NZCjMBCsDAc)**

<img src="docs/build-guide/images/v3/05_solder_layout.jpg" width="70%">

*Everything laid out before soldering. (This photo predates the R1/R2 5.1kΩ resistors — add those two to the lineup if you're on Path B.)*

Two things to keep next to the video:

**Path B (USB-C) only — read the warning in Section 2 first**, then compare your joints against these two:

| ❌ Like this, and it can short | ✅ Aim for this |
|---|---|
| <img src="docs/build-guide/images/v3/06_usbc_bad.jpg" width="100%"> | <img src="docs/build-guide/images/v3/07_usbc_good.jpg" width="100%"> |

And before first power, go over the joints with a multimeter:

<img src="docs/build-guide/images/v3/08_short_check.jpg" width="60%">

Done right, it looks like this (this build populated both power paths):

<img src="docs/build-guide/images/v3/09_board_front.jpg" width="49%"> <img src="docs/build-guide/images/v3/10_board_back.jpg" width="49%">
All parts are through-hole, and the video covers the complete order — including the USB-C connector, where the **first attempt (11:00) shows exactly what goes wrong** when you push too hard, and the second attempt (12:40) shows the fix. **Path B builders: read the warning in Section 2 first**, and go over the finished joints with a multimeter before first power.

Don't plug the ESP32 DevKit in until after the first power check (Section 7).

Expand Down Expand Up @@ -201,48 +181,25 @@ Sections 6, 7, and 9 are covered in **one YouTube video** — the full assembly,

**[▶ Watch on YouTube — Patternflow v3.0 assembly & first power-on](https://youtu.be/J9C9bZgkNKs)**

By now the enclosure halves you bonded in Section 4 have cured and the board is soldered — time to bring them together:

<img src="docs/build-guide/images/v3/11_ready_to_mate.jpg" width="70%">

*The ESP32, the PCB, and the cables, ready to go in.*

> Printed the **330 mm one-piece body**? Everything in this section is identical — the only thing you skipped is the bonding step in Section 4. <!-- TODO: dedicated 330 mm photos once a unit is built. -->
By now the enclosure halves you bonded in Section 4 have cured and the board is soldered — time to bring them together. The video above walks every step; in writing:

1. **Seat the LED panel in the enclosure with its `HUB-75E IN` connector toward the top** — that's the side the ribbon reaches `J1` from:
> Printed the **330 mm one-piece body**? Everything in this section is identical — the only thing you skipped is the bonding step in Section 4.

<img src="docs/build-guide/images/v3/12_hub_in_up.jpg" width="60%">

⚠️ The panel insertion is very tight — near-zero clearance. Work it in slowly.
1. **Seat the LED panel in the enclosure with its `HUB-75E IN` connector toward the top** — that's the side the ribbon reaches `J1` from. ⚠️ The panel insertion is very tight — near-zero clearance. Work it in slowly.

2. **Fit the LED-panel mounting part and tighten the screws.** The mounting part is a separate piece precisely because panel bolt-hole positions vary between suppliers — match it to your panel first.

<img src="docs/build-guide/images/v3/13_mount_screws.jpg" width="60%">

3. **Set the board into its bay and secure the encoders from the front**: attach each encoder's nut and tighten with a wrench or pliers — this locks the board against the front face.

<img src="docs/build-guide/images/encoder_nut.jpg" width="33%">

*Photo from the v2 build — same encoders, same step.*

### Finishing touches

- The power bank slides into the internal compartment behind the board bay.
- The four black knobs press-fit onto the encoder shafts — save them for **last**, after the Section 9 checks pass:

<img src="docs/build-guide/images/knobs.jpg" width="33%">

*Photo from the v2 build — same press-fit.*
- The four black knobs press-fit onto the encoder shafts — save them for **last**, after the Section 9 checks pass.

## 7. Wiring & First Power-Up

1. Connect the HUB75 ribbon from `J1` to the panel's `IN` connector.
2. Wire `J3` to the panel's power cable (+5V / GND — double-check polarity).

<img src="docs/build-guide/images/v3/14_wiring.jpg" width="70%">

*📷 Shot on the v2.1 twin build (red board) — the v3 wiring is identical. Photo will be refreshed.*

2. Wire `J3` to the panel's power cable (+5V / GND — double-check polarity). The wiring run is shown at **06:57** in the [assembly video](https://youtu.be/J9C9bZgkNKs).
3. Power: Path A — stripped USB cable into `J4` (red = +5V, black = GND); Path B — USB-C cable into `USB1`.
4. **Before inserting the ESP32:** with power disconnected, continuity-check +5V↔GND at the `J3` terminals (open = good, like the Section 5 check). Then power up once and confirm ~5V across `J3`.
5. Power off, seat the ESP32 DevKit in its sockets (orientation per silkscreen), power on.
Expand Down Expand Up @@ -287,11 +244,7 @@ The stock flasher image ships with **OSC disabled at compile time** — live con
4. Press-click each encoder once; long-press **K4** (~1s) to enter pattern select, rotate to browse, long-press again to exit.
5. Long-press **K1** for the global brightness mode; **K2** long-press shows the OSC info screen.
6. Power-cycle once and confirm it boots cleanly with no RESET press needed (see the GPIO0 note in Section 5 if it doesn't).
7. All good? **Close the back panel**: hook the right edge in first, then press along the snap-fit until it clicks shut. Press the knobs onto the shafts last.

<img src="docs/build-guide/images/v3/15_close_back.jpg" width="70%">

*📷 Shot on the v2.1 twin build — identical procedure on v3. Photo will be refreshed.*
7. All good? **Close the back panel**: hook the right edge in first, then press along the snap-fit until it clicks shut (shown at **09:11** in the [assembly video](https://youtu.be/J9C9bZgkNKs)). Press the knobs onto the shafts last.

## 10. Known Issues & Design Notes

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ All notable changes to Patternflow will be documented in this file.
### Added
- **v3.0 board promoted to the recommended revision** (`hardware/pcb/gerber/patternflow_v3.0_gerber.zip`). Fabricated, assembled, and verified ([#114](https://github.com/engmung/Patternflow/issues/114)): hybrid power input — USB-C (`USB1` + 5.1k CC pull-downs) or a back-side 2-pin screw terminal (`J4`) as the beginner bypass — all-through-hole, no SMD passives. **Not size-compatible with v2.x cases (and vice versa).**
- **Machine-readable BOM** (`hardware/bom/bom_v3.0.csv`): every part by manufacturer part number, per-unit quantities, assembly-critical notes. The LED panel remains an AliExpress link (its mounting-screw positions match the case).
- **Firmware preset library + PFMem.** Curated patterns now live in `firmware/patternflow/presets/` — thirteen new presets (the June–July daily batch) join the library, and the three custom slots ship with fresh patterns. New `src/core_mem.h` (**PFMem**) allocates framebuffer-sized pattern state PSRAM-first, so a fully loaded preset image can no longer boot-loop the device on DRAM pressure. The browser-flasher image carries all of it and self-reports 3.0.0.
- **v3 build guide** — now the main `BUILD_GUIDE.md`: [PCB soldering](https://youtu.be/NZCjMBCsDAc) and [assembly-to-first-power-on](https://youtu.be/J9C9bZgkNKs) each covered by a full video walkthrough, photo-documented print/case/wiring steps, netlist-derived pin reference. The v2 guide moved to `BUILD_GUIDE_v2.md` for existing v2.x builds.

### Changed
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
- 📦 **Get one ready-made** — Patternflow is in **[pre-launch on Crowd Supply](https://www.crowdsupply.com/engmung/patternflow)**. Subscribe to be notified the moment the campaign goes live.
- 🎛️ **Try it right now** — the **[Live Editor](https://patternflow.work/pattern)** runs a virtual Patternflow in your browser. Same knobs, same patterns, no hardware.

> **Moving fast.** The repo improves almost daily — [v2.1.0](https://github.com/engmung/Patternflow/releases/tag/v2.1.0) consolidated the v2.x line (its release page bundles everything a v2 builder needs), and the **v3.0 board is verified and now the recommended build**: USB-C power with a beginner-friendly screw-terminal bypass, zero SMD passives, snap-fit enclosure. The [build guide](BUILD_GUIDE.md) now covers v3.0 (video-assisted soldering included). Follow the [changelog](CHANGELOG.md) and the [journal](https://patternflow.work/journal) for what's current.
> **Moving fast.** [**v3.0.0 is out**](https://github.com/engmung/Patternflow/releases/tag/v3.0.0) — hybrid USB-C / screw-terminal power, zero SMD passives, a snap-fit enclosure with no more panel trimming, and a [video-first build guide](BUILD_GUIDE.md). On v2.x hardware? Everything you need stays bundled at [v2.1.0](https://github.com/engmung/Patternflow/releases/tag/v2.1.0). Follow the [changelog](CHANGELOG.md) and the [journal](https://patternflow.work/journal) for what's current.

## Quick facts

Expand Down
5 changes: 3 additions & 2 deletions docs/assembly/enclosure/3d-print.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ This path uses the current PLA enclosure files in `hardware/case/`, organized by

| File | Contents |
| --- | --- |
| `hardware/case/bed_330mm/oneshot_v3_part1/2.stl` | One-piece snap-fit body — H2S-class (330 mm+) beds |
| `hardware/case/bed_256mm/divided_v3_part1..5.stl` | Divided snap-fit, 5 parts — P1S-class (256 mm) beds, print/assembly tested ([#169](https://github.com/engmung/Patternflow/issues/169)) |
| `hardware/case/bed_330mm/encloser.stl` | One-piece snap-fit body — H2S-class (330 mm+) beds, one STL |
| `hardware/case/bed_256mm/encloser.stl` | The standard 256 mm print — P1S-class beds, print & assembly verified |
| `hardware/case/bed_256mm/for_other_panels/divided_v3_part1..5.stl` | Adjustable-mount variant for non-standard LED panels ([#169](https://github.com/engmung/Patternflow/issues/169)) |
| `hardware/case/knobs/knobs_15mm.stl` | Knobs for 15mm encoder shafts |
| `hardware/case/knobs/knobs_20mm.stl` | Knobs for 20mm encoder shafts (the BOM reference part is 20mm) |

Expand Down
9 changes: 1 addition & 8 deletions docs/releases/v3.0.0-launch.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,7 @@ Everything for the v3.0.0 release is **pre-loaded**. When the final gate below p

## Gate 1 — swap the two v2.1-twin photos

While the v3 unit is open, re-shoot and overwrite (same filenames, same orientation):

- [ ] `docs/build-guide/images/v3/14_wiring.jpg` (wiring, §7)
- [ ] `docs/build-guide/images/v3/15_close_back.jpg` (closing the back, §9)

Then delete the three "shot on the v2.1 twin" notices in `BUILD_GUIDE.md`: the 📷 line in the top banner, and the two italic captions under those photos (§7 and §9).

If any new photos need resizing: `python -c "from PIL import Image; im=Image.open(r'PATH'); im=im.resize((1600,int(im.height*1600/im.width))) if im.width>1600 else im; im.save(r'PATH','JPEG',quality=82,optimize=True)"`
- [x] **Resolved differently (2026-07-19):** the stale v2.1-twin photos were removed from the guide entirely — the [assembly video](https://youtu.be/J9C9bZgkNKs) covers those steps. No re-shoot needed.

## Gate 2 — last-minute text

Expand Down
1 change: 1 addition & 0 deletions docs/releases/v3.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ The biggest hardware revision since launch. The v3.0 board and enclosure were re

### Firmware
- **One image for every board generation** — v2.x and v3.0 share an identical pin map, so the [browser flasher](https://patternflow.work) just works on both. No board selection to get wrong.
- **Bigger preset library, sturdier engine** — thirteen new presets from the June–July daily batch, three fresh custom-slot patterns, and a new PSRAM-first allocator (`PFMem`) so a fully loaded pattern image can't starve the Wi-Fi/DMA DRAM budget.

## Breaking changes

Expand Down
3 changes: 3 additions & 0 deletions firmware/patternflow/_TEMPLATE.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
// #include "src/core_color.h" // PFColor:: hsvToRgb, buildPowLUT, ColorStop, sampleRamp
// #include "src/core_noise.h" // PFNoise:: cellHash, valueNoise2D, perlin2D, fractal2D
// #include "src/core_tables.h" // PFTables:: init, rT[]/thetaT[] — per-pixel radius/angle from center
// #include "src/core_mem.h" // PFMem:: allocFloats — REQUIRED for framebuffer-sized buffers: never
// // declare them as static arrays (they lock internal DRAM from boot);
// // allocate once in setup(): if (!buf) buf = PFMem::allocFloats(N);

namespace TemplatePattern {
const char* NAME = "Template";
Expand Down
Loading
Loading