Seedbox v0.1 + firmware, generic kit/synth, ROOT/SCALE pages
Some checks failed
check / check (push) Has been cancelled

First commit of the repo. Contents beyond the v0.1 simulator and layout:

- Full Pico 2 W firmware (firmware/app, drivers, engine port, host test).
- BANK page and 404 mode A/B removed; learned pads play exactly what was learned.
- 404/MiniFreak renamed to KIT/SYNTH throughout (jacks, code, sim, docs,
  layout labels; wiring rebuilt).
- ROLL returns to page select after a re-roll; a freshly learned track turns on.
- LCD contrast 66.
- ROOT and SCALE pages: 21 scales, AUTO = the seed picks; global and sticky.

Intended music change: the scale table grew from 8 to 21 and AUTO picks from
all of them, so every seed's scale changed. Vectors regenerated with
npm run vectors, plus new key-override cases. Flash record is now version 2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-11 20:39:36 +03:00
commit 2196633ed5
77 changed files with 52207 additions and 0 deletions

111
tools/wiring-src/body.html Normal file
View File

@@ -0,0 +1,111 @@
<div class="wrap">
<header>
<h1>Seedbox wiring · v0.1</h1>
<p class="sub">One stripboard carries the Pico and the MIDI circuits. Everything on the panel (screen, encoder, pots, buttons, jacks) connects to it with hookup wire. Board positions are given as strip letter + hole number, e.g. <code>X2</code> is strip X, hole 2, counted from the left with the parts facing you.</p>
</header>
<section>
<h2>Wire map · panel to board</h2>
<p class="sub">Every panel wire, where it lands. Big blue text is the board hole: strip letter, then hole number counted from the opto end (the end away from the Pico's USB).</p>
<div class="draw"><svg id="wmap" role="img" aria-label="Board with every panel wire labelled at its hole"></svg></div>
<div class="tbl"><table class="check"><thead><tr><th>Done</th><th>Part</th><th>Lug</th><th>Wire</th><th>Board hole</th></tr></thead><tbody id="wcheck"></tbody></table></div>
<p class="note">Ticks are saved in this browser. Lug drawings for each part are under Panel wiring further down.</p>
</section>
<section>
<h2>Wire colours</h2>
<div class="card">
<div class="legend">
<span><i style="background:var(--w-red)"></i>Red · 3.3 V and the MIDI OUT supply pins</span>
<span><i style="background:var(--w-black)"></i>Black · ground</span>
<span><i style="background:var(--w-yellow)"></i>Yellow · button rows, SEED, RUN</span>
<span><i style="background:var(--w-green)"></i>Green · button columns, encoder</span>
<span><i style="background:var(--w-blue)"></i>Blue · screen, pots, MIDI signals</span>
<span><i style="background:var(--link)"></i>Grey · short links on the board</span>
</div>
<p class="note">If your five spools are other colours, keep the roles and rename them. Red and black for power and ground matter most; the rest just keep bundles readable.</p>
</div>
</section>
<section>
<h2>Board · parts side</h2>
<div class="draw"><svg id="top" role="img" aria-label="Stripboard seen from the parts side"></svg></div>
<p class="note">Copper strips run left to right underneath (shown faintly). Board size 34 holes × 28 strips (about 86 × 71 mm). The Pico sits in two 20-pin female headers with pins 1 and 40 on strip A, so its USB end is flush with the top edge of the board and the micro-USB plug reaches out past it: line that edge up with a slot in the box wall. Numbered dots <b>P1</b>… (pads) are where off-board wires solder; the wire map at the top says where each one goes.</p>
</section>
<section>
<h2>Board · copper side, for cutting</h2>
<div class="draw"><svg id="bottom" role="img" aria-label="Stripboard seen from the copper side with cuts marked"></svg></div>
<div class="cols">
<div class="card"><h3>Track cuts</h3><ul id="cutlist"></ul>
<p class="note">This view is flipped: hole 1 is on the <b>right</b>. Cut with a 3–4 mm drill bit twisted by hand or a spot-face cutter, then check each cut with the meter's continuity beeper.</p></div>
<div class="card"><h3>Power strips along the bottom</h3>
<ul><li><b>Z</b> · 5 V from the Pico's VBUS (only the opto uses it)</li><li><b>AA</b> · ground</li><li><b>AB</b> · 3.3 V from the Pico's 3V3 pin</li></ul>
<p class="note">Every red wire to the panel starts on AB, every black wire on AA (or on the AGND strip for the pots).</p></div>
</div>
</section>
<section>
<h2>Board parts and links</h2>
<div class="tbl"><table><thead><tr><th>Part</th><th>Value</th><th>Holes</th><th>Note</th></tr></thead><tbody id="partlist"></tbody></table></div>
</section>
<section>
<h2>Off-board wires</h2>
<div class="tbl"><table><thead><tr><th>#</th><th>Board hole</th><th>Colour</th><th>Pico pin / signal</th><th>Goes to</th></tr></thead><tbody id="wirelist"></tbody></table></div>
</section>
<section>
<h2>Panel wiring</h2>
<div class="cols">
<div class="card" style="grid-column:1/-1"><h3>Button matrix · seen from the back</h3>
<div class="draw" style="padding:6px"><svg id="matrix" role="img" aria-label="Button matrix wiring"></svg></div>
<p class="note">Each button: one lug to its <b>row</b> wire (yellow, daisy-chained along the row), the other lug through a diode to its <b>column</b> wire (green, daisy-chained down the column). The diode's band points to the column. Solder the diodes straight onto the button lugs and sleeve them. 11 track buttons, each with its own diode, plus D1 on the board: 12 diodes. GHOST is wired at row 2 / column 4 (where FILL used to be). The RUN toggle sits in the grid's row 1 / column 4 spot but is not part of the matrix: row 1's wire stops at SNARE. <span class="warn">The drawing is from behind the panel, the side you solder on: KICK is top-right, RUN top-left.</span></p></div>
<div class="card"><h3>MIDI jacks · 3.5 mm TRS, Type A</h3>
<svg id="din" viewBox="0 0 300 150" role="img" aria-label="TRS jack lugs seen from inside the box"></svg>
<ul>
<li><b>MIDI IN</b>: ring → Y1, tip → W1. Sleeve stays empty.</li>
<li><b>OUT KIT</b>: tip → X26, ring → V22, sleeve → AA22.</li>
<li><b>OUT SYNTH</b>: tip → U31, ring → V31, sleeve → AA31.</li>
</ul>
<p class="note">Use stereo (TRS) jacks; mono ones have no ring. Lug order differs between jack models, so find the tip, ring and sleeve lugs with the meter and a plug inserted. Type A is the MIDI standard: a plain stereo 3.5 mm cable goes straight to another Type A device (e.g. SP-404MKII). A DIN device (e.g. MiniFreak) needs a TRS-to-DIN adapter that says <b>Type A</b>; a Type B one swaps tip and ring and gives silence (nothing breaks).</p></div>
<div class="card"><h3>Nokia 5110 module</h3>
<svg id="lcd" viewBox="0 0 300 92" role="img" aria-label="LCD header pins"></svg>
<ul>
<li>Pin order as printed on your module: 1 VCC, 2 GND, 3 SCE, 4 RST, 5 D/C, 6 DN (MOSI), 7 SCLK, 8 LED.</li>
<li><b>LED</b> (backlight): wire it through a 330 Ω resistor to AB22 (3.3 V); put the resistor inline at the module end and sleeve it. On boards with this pin order that lights it. If it stays dark, move that wire to any free hole on strip AA (ground). GP22 (L27) is left free: it's only needed if you ever want dimming, through a transistor.</li>
<li><b>SCE</b> can go straight to ground instead of S27 if it's the only thing on the SPI bus; that frees GP17.</li>
</ul></div>
<div class="card"><h3>Encoder module</h3>
<svg id="enc" viewBox="0 0 300 80" role="img" aria-label="Encoder module pins"></svg>
<p class="note">Pin order as printed on your module: VCC, GND, SW, SIB, SIA. Power it from 3.3 V (AB4), never 5 V: its pull-up resistors would put 5 V on the Pico's pins. If turning it clockwise steps the wrong way, swap SIA and SIB (or flip it in firmware).</p></div>
<div class="card"><h3>Pots, SEED, RUN</h3>
<svg id="misc" viewBox="0 0 300 150" role="img" aria-label="Pots, SEED and RUN wiring"></svg>
<ul>
<li>Pots, lugs facing down, shaft toward you: left lug to AGND (H27), middle to its pin, right lug to 3.3 V (AB25). Chain the left lugs together and the right lugs together.</li>
<li>SEED: one lug to Q2, the other to the ground bus (AA6).</li>
<li>RUN: middle lug to S2, one outer lug to the ground bus. If RUN and STOP come out swapped, use the other outer lug.</li>
</ul></div>
</div>
</section>
<section>
<h2>Build order and checks</h2>
<div class="cols">
<div class="card"><h3>Board</h3>
<ol>
<li>Cut the board to 34 × 28 holes. For the top edge, cut through the row of holes above strip A, then sand it back to about 1.3 mm from the strip A holes (stop before the strip A copper). That puts the Pico's edge flush with the board; unsanded, the Pico sits about 1 mm back, which still works if the wall slot lets the plug's moulding through. Make the track cuts and beep each one out.</li>
<li>Solder the two Pico headers, the DIP-8 socket (notch toward strip U), then the resistors and the diode (band on V4). Leave C1 for step 4.</li>
<li>Solder the grey links with insulated wire. The two long ones (GP0 and GP4) run straight down <b>under the Pico, between its two headers</b>: fit them before the Pico goes in.</li>
<li>Before fitting C1, with the Pico and the 6N137 out: AB to AA must <b>not</b> beep, Z to AA must not beep. Then fit C1 (it can chirp briefly on the beeper once it is in).</li>
</ol></div>
<div class="card"><h3>First power</h3>
<ol>
<li>Plug in the Pico only, power from USB. Measure AB to AA: about 3.3 V. Z to AA: about 5 V.</li>
<li>Unplug, insert the 6N137 (notch toward strip U, pin 1 at hole U5).</li>
<li>Wire the panel. Before closing the box, check that no bare lugs touch each other.</li>
<li>The box needs the Pico firmware (the C port of this simulator) before it does anything. That's the next step. Firmware note: GP0 and GP4 drive the MIDI loops directly (about 6–8 mA), above the RP2350's default 4 mA drive, so set them to 8–12 mA with <code>gpio_set_drive_strength()</code>.</li>
</ol></div>
</div>
</section>
</div>