Files
seedbox/docs/hardware/wiring.md
Gee 2196633ed5
Some checks failed
check / check (push) Has been cancelled
Seedbox v0.1 + firmware, generic kit/synth, ROOT/SCALE pages
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>
2026-10-11 20:39:36 +03:00

240 lines
12 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Wiring
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 strip letter + hole number. For example V4 is strip V, hole 4, counted from the left with the parts facing you. Strips run left to right: A at the top (the USB edge), then Z, AA, AB at the bottom.
The interactive version, with the same drawings, is `tools/wiring.html`. Generated from [`hardware/layout.js`](../../hardware/layout.js).
## Wire map: panel to board
Every panel wire and the board hole it lands in: strip letter, then hole number counted from the opto end.
![Wire map](svg/wire-map.svg)
| Part | Lug | Wire | Board hole |
|---|---|---|---|
| Buttons | Row 1 · KICK, KICK 2, SNARE | yellow | **D2** |
| | Row 2 · HAT, HAT 16, PERC, GHOST | yellow | **E2** |
| | Row 3 · BASS, MEL A, MEL B, PAD | yellow | **G2** |
| | Col 1 · KICK, HAT, BASS (diode band side) | green | **I2** |
| | Col 2 · KICK 2, HAT 16, MEL A | green | **J2** |
| | Col 3 · SNARE, PERC, MEL B | green | **K2** |
| | Col 4 · GHOST, PAD | green | **L2** |
| SEED | one lug | yellow | **Q2** |
| RUN toggle | middle lug (it sits in the button grid, row 1 / col 4) | yellow | **S2** |
| SEED + RUN | ground: SEED other lug, RUN one outer lug | black | **AA6** |
| Encoder | VCC (3.3 V, never 5 V) | red | **AB4** |
| | GND | black | **AA4** |
| | SW | green | **P2** |
| | SIB | green | **O2** |
| | SIA | green | **N2** |
| ENERGY pot | middle lug | blue | **J27** |
| DRIFT pot | middle lug | blue | **I27** |
| Pots | right lugs, both (3.3 V) | red | **AB25** |
| | left lugs, both (AGND) | black | **H27** |
| LCD | 1 · VCC (3.3 V) | red | **AB23** |
| | 2 · GND | black | **AA23** |
| | 3 · SCE | blue | **S27** |
| | 4 · RST | blue | **N27** |
| | 5 · D/C | blue | **O27** |
| | 6 · DN (MOSI) | blue | **P27** |
| | 7 · SCLK | blue | **Q27** |
| | 8 · LED, through a 330 Ω resistor (if dark, move to any AA hole) | red | **AB22** |
| MIDI IN jack | tip | blue | **W1** |
| | ring | blue | **Y1** |
| OUT KIT jack | tip | blue | **X26** |
| | ring | red | **V22** |
| | sleeve | black | **AA22** |
| OUT SYNTH jack | tip | blue | **U31** |
| | ring | red | **V31** |
| | sleeve | black | **AA31** |
## Wire colours
| Colour | Role |
|---|---|
| Red | 3.3 V and the MIDI OUT ring lugs |
| Black | ground |
| Yellow | button rows, SEED, RUN |
| Green | button columns, encoder |
| Blue | screen, pots, MIDI signals |
| Grey | short links on the board |
If your spools are other colours, keep the roles and rename them. Red and black for power and ground matter most.
## Board · parts side
![Stripboard, parts side](svg/stripboard-parts-side.svg)
- **Size**: 34 holes × 28 strips, about 86 × 71 mm.
- **Pico**: sits in two 20-pin female headers with pins 1 and 40 on strip A. Its USB end is flush with the top edge of the board, and the micro-USB socket reaches just past it.
- **Mounting**: lay the board on the box floor with that edge against the back wall, behind the USB slot. The socket is about 41 mm from the board's left edge.
- **Pads**: the numbered dots P1 … P35 are where off-board wires solder.
## Board · copper side, for cutting
![Stripboard, copper side](svg/stripboard-copper-side.svg)
This view is flipped: hole 1 is on the right.
How to cut:
- Use a 3–4 mm drill bit turned by hand, or a spot-face cutter.
- Check each cut with the meter's continuity beeper.
- Hole 6 on strips U to Y (5 cuts)
- Hole 14 on strips U to X (4 cuts)
- Hole 16 on strips A to T (20 cuts)
- Hole 23 on strip X (1 cut)
- Hole 25 on strips U to W (3 cuts)
### Power strips along the bottom
- **Z**: 5 V from the Pico's VBUS. Only the opto uses it.
- **AA**: ground.
- **AB**: 3.3 V from the Pico's 3V3 pin.
Every red wire to the panel starts on AB. Every black wire starts on AA, except the pots, which use the AGND strip.
## Board parts and links
| Part | Value | Holes | Note |
|---|---|---|---|
| Pico 2W | 2 × 20-pin female header | A13–T13 and A20–T20 (pins 1–20 down the left, 40–21 down the right) | USB end flush with the top edge of the board, past strip A |
| U1 | 6N137 | U5–X5, U8–X8 | 6N137 in a DIP-8 socket. Notch toward strip U, pin 1 at hole U5. Pin 7 (enable) is tied to pin 8 by the U10–V10 link. |
| R1 | 220 Ω | V2 – Y2 | MIDI IN current limit. 3-hole span: stand it upright, or use a small ⅛ W part flat. If learning ever misses notes, use 150 Ω. |
| D1 | 1N4148 | V4 – W4 | Band (cathode) on V4, the opto LED anode side. Stands upright (1-hole span). |
| R2 | 1 kΩ | W10 – AB10 | Opto output pull-up to 3.3 V |
| C1 | 100 nF | U11 – X11 | 6N137 supply bypass, right beside the chip: U11 is its 5 V (pin 8) strip, X11 its GND (pin 5) strip. Required. Fit it after the beep test. |
| R4 | 10 Ω | X21 – X25 | MIDI OUT KIT, TX line (RC). Lies flat along strip X, across the cut at X23 (4-hole span, ¼ W fits). SEED hangs right above it. |
| R5 | 33 Ω ½ W | V19 – AB19 | MIDI OUT KIT, 3.3 V line (RA). ½ W: a mono plug in the jack shorts it to ground. |
| R6 | 10 Ω | U28 – Y28 | MIDI OUT SYNTH, TX line (RC) |
| R7 | 33 Ω ½ W | V30 – AB30 | MIDI OUT SYNTH, 3.3 V line (RA). ½ W, same reason as R5. |
| Link | wire | A34 – Z34 | 5 V (VBUS) to the 5 V strip |
| Link | wire | E32 – AB32 | 3V3 to the 3V3 strip |
| Link | wire | R33 – AA33 | GND to the GND strip |
| Link | wire | U13 – Z13 | opto VCC to 5 V |
| Link | wire | U10 – V10 | opto enable (pin 7) to VCC (pin 8): the 6N137 output only works with pin 7 high |
| Link | wire | X12 – AA12 | opto GND to GND |
| Link | wire | W9 – B9 | opto out to GP1 (MIDI RX), strip B |
| Link | wire | A15 – X15 | GP0 (TX KIT) to strip X (R4), straight down under the Pico between its headers |
| Link | wire | F14 – Y14 | GP4 (TX SYNTH) to strip Y (R6), straight down under the Pico between its headers |
## Off-board wires
| Pad | Board hole | Colour | Pico pin / signal | Goes to |
|---|---|---|---|---|
| P1 | Y1 | blue | via R1 to opto | MIDI IN jack · ring (pin 4) |
| P2 | W1 | blue | opto cathode | MIDI IN jack · tip (pin 5) |
| P3 | X26 | blue | via R4 (10 Ω) from GP0 | OUT KIT jack · tip (pin 5) |
| P4 | V22 | red | via R5 (33 Ω) from 3V3 | OUT KIT jack · ring (pin 4) |
| P5 | AA22 | black | GND strip | OUT KIT jack · sleeve (pin 2) |
| P6 | U31 | blue | via R6 (10 Ω) from GP4 | OUT SYNTH jack · tip (pin 5) |
| P7 | V31 | red | via R7 (33 Ω) from 3V3 | OUT SYNTH jack · ring (pin 4) |
| P8 | AA31 | black | GND strip | OUT SYNTH jack · sleeve (pin 2) |
| P9 | N27 | blue | GP21 | LCD · RST (pin 4) |
| P10 | S27 | blue | GP17 | LCD · SCE (pin 3) |
| P11 | O27 | blue | GP20 | LCD · D/C (pin 5) |
| P12 | P27 | blue | GP19 | LCD · DN/MOSI (pin 6) |
| P13 | Q27 | blue | GP18 | LCD · SCLK (pin 7) |
| P14 | AB23 | red | 3V3 strip | LCD · VCC (pin 1) |
| P15 | AA23 | black | GND strip | LCD · GND (pin 2) |
| P16 | AB22 | red | 3V3 strip | LCD · LED (pin 8) through 330 Ω |
| P17 | N2 | green | GP10 | Encoder · SIA |
| P18 | O2 | green | GP11 | Encoder · SIB |
| P19 | P2 | green | GP12 | Encoder · SW |
| P20 | AB4 | red | 3V3 strip | Encoder · VCC |
| P21 | AA4 | black | GND strip | Encoder · GND |
| P22 | J27 | blue | GP26 | ENERGY pot · middle lug |
| P23 | I27 | blue | GP27 | DRIFT pot · middle lug |
| P24 | AB25 | red | 3V3 strip | Pots · right lugs (chain both) |
| P25 | H27 | black | AGND | Pots · left lugs (chain both) |
| P26 | Q2 | yellow | GP13 | SEED · one lug |
| P27 | S2 | yellow | GP14 | RUN toggle · middle lug |
| P28 | AA6 | black | GND strip | Panel ground bus · SEED other lug, RUN one outer lug |
| P29 | D2 | yellow | GP2 | Matrix row 1 (KICK, KICK 2, SNARE) |
| P30 | E2 | yellow | GP3 | Matrix row 2 (HAT, HAT 16, PERC, GHOST) |
| P31 | G2 | yellow | GP5 | Matrix row 3 (BASS, MEL A, MEL B, PAD) |
| P32 | I2 | green | GP6 | Matrix column 1 (KICK, HAT, BASS) |
| P33 | J2 | green | GP7 | Matrix column 2 (KICK 2, HAT 16, MEL A) |
| P34 | K2 | green | GP8 | Matrix column 3 (SNARE, PERC, MEL B) |
| P35 | L2 | green | GP9 | Matrix column 4 (GHOST, PAD) |
## Panel wiring
### Button matrix, seen from the back
![Button matrix](svg/button-matrix.svg)
Each button:
- One lug goes to its row wire (yellow), daisy-chained along the row.
- The other lug goes through a diode to its column 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. 1N4148, 1N4448 or any small-signal diode works.
11 track buttons, each with its own diode, plus D1 on the board: 12 diodes. GHOST is wired at row 2 / column 4. The RUN toggle sits in the grid's row 1 / column 4 spot but isn't part of the matrix, so row 1's wire stops at SNARE and column 4 starts at GHOST.
Drawn from behind the panel, the side you solder on: KICK is top-right, RUN top-left.
### MIDI jacks: 3.5 mm TRS, Type A
![TRS jacks](svg/midi-jacks-trs.svg)
| Jack | Tip (pin 5) | Ring (pin 4) | Sleeve (pin 2) |
|---|---|---|---|
| MIDI IN | P2 | P1 | stays empty |
| OUT KIT | P3 | P4 | P5 |
| OUT SYNTH | P6 | P7 | P8 |
- **Jack type**: use stereo (TRS) jacks; mono ones have no ring.
- **Lug order**: it differs between jack models. Find the tip, ring and sleeve lugs with the meter and a plug inserted.
- **Cables**: Type A is the MIDI standard, so 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 **Type A**. A Type B one swaps tip and ring and gives silence; nothing breaks.
### Nokia 5110 module
![LCD pins](svg/lcd-pins.svg)
- 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.
- **LED** (backlight): wire it through a 330 Ω resistor to AB22 (3.3 V), with the resistor inline at the module end, sleeved. If it stays dark, move that wire to any free hole on strip AA (ground). GP22 (L27) stays free; it's only needed for dimming later, through a transistor.
- **SCE** can go straight to ground instead of S27 if it's the only thing on the SPI bus. That frees GP17.
### Encoder module
![Encoder pins](svg/encoder-pins.svg)
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 clockwise steps the wrong way, swap SIA and SIB (or flip it in firmware).
### Pots, SEED, RUN
![Pots, SEED and RUN](svg/pots-seed-run.svg)
- **Pots**, lugs facing down, shaft toward you:
- left lug to AGND (P25)
- middle lug to its pin
- right lug to 3.3 V (P24)
- Chain the left lugs together and the right lugs together.
- If the readings jitter, solder a 100 nF capacitor at each pot, from wiper to left lug.
- **SEED**: one lug to P26, the other to the ground bus (P28).
- **RUN**: middle lug to P27, one outer lug to the ground bus. If RUN and STOP come out swapped, use the other outer lug.
## Build order and checks
### Board
1. 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, stopping 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.
2. Solder the two Pico headers and the DIP-8 socket (notch toward strip U). Then the resistors and the diode (band on V4).
- Keep everything low, because the SEED button hangs right above R4. R4 lies flat along strip X, across the cut at X23.
- R1's 3-hole span is tight for a ¼ W body, so stand R1 upright or use a small ⅛ W part.
- Leave C1 for step 4.
3. Solder the grey links with insulated wire. The two long ones (GP0 and GP4) run straight down under the Pico, between its two headers, so fit them before the Pico goes in.
4. Before fitting C1, with the Pico and the 6N137 out, check that AB to AA does not beep and Z to AA does not beep. Then fit C1. It can chirp briefly on the beeper once it's in.
### First power
1. Plug in the Pico only and power it from USB. Measure AB to AA: about 3.3 V. Z to AA: about 5 V.
2. Unplug, then insert the 6N137 (notch toward strip U, pin 1 at hole U5).
3. Wire the panel. Before closing the box, check that no bare lugs touch each other.
4. Flash the firmware. Set GP0 and GP4 to 8–12 mA drive (see [pinout](pinout.md)).