From d103b2732c1c9913c9c8a405f263dde9954ee570 Mon Sep 17 00:00:00 2001 From: Florian Berthold Date: Fri, 23 Jan 2026 02:49:30 +0100 Subject: [PATCH] Add BOM and design documentation - BOM with LCSC part numbers for PCBWay assembly - Hand-solder module sources (RP2040-Zero, OLED) - Design doc with block diagram, specs, GPIO pinout - Panel layout concept for 6 HP --- docs/DESIGN.md | 135 ++++++++++++++++++++++++++++++++++++++++++++++++ hardware/BOM.md | 67 ++++++++++++++++++++++++ 2 files changed, 202 insertions(+) create mode 100644 docs/DESIGN.md create mode 100644 hardware/BOM.md diff --git a/docs/DESIGN.md b/docs/DESIGN.md new file mode 100644 index 0000000..9393ad6 --- /dev/null +++ b/docs/DESIGN.md @@ -0,0 +1,135 @@ +# SN-L00 Design Document + +## Overview + +The SN-L00 is a 6 HP Eurorack module that measures round-trip latency in audio/CV signal chains. + +## Block Diagram + +``` ++12V ──┬── LDO ──── 3.3V ──── RP2040-Zero ──── OLED Display + │ │ │ + │ │ └── I2C (SDA/SCL) + │ │ +GND ───┴──────────────────────────┤ + │ + ┌───────────────────┼───────────────────┐ + │ │ │ + TRIG OUT RETURN IN BUTTON + │ │ │ + 74LVC1G17 MCP6001 Tactile + (buffer) (buffer) switch + │ │ + ▼ ▼ + 3.5mm Jack 3.5mm Jack +``` + +## Signal Flow + +### Trigger Output +1. RP2040 GPIO generates 5ms pulse (configurable) +2. 74LVC1G17 Schmitt buffer cleans edge, provides drive strength +3. Output: 0-3.3V trigger compatible with Eurorack gate inputs + +### Return Input +1. Eurorack signal (0-5V typical, can be ±5V audio) +2. Protection diodes clamp to 3.3V rail +3. MCP6001 op-amp buffers signal +4. Voltage divider if needed for >3.3V signals +5. RP2040 GPIO reads with internal Schmitt trigger + +### Measurement +1. RP2040 starts timer on trigger output rising edge +2. Timer stops on return input rising edge +3. Latency = timer count × timer resolution +4. Display updates with result in ms + +## Specifications + +| Parameter | Value | +|-----------|-------| +| Width | 6 HP (30.00mm) | +| Depth | <25mm (skiff-friendly) | +| Power +12V | ~20mA | +| Power -12V | 0mA (not used) | +| Trigger output | 0-3.3V, 5ms default | +| Input threshold | ~1.5V (adjustable in firmware) | +| Resolution | <10μs (RP2040 @ 125MHz) | +| Range | 0.01ms - 999ms | +| Display | 128x32 OLED, I2C | + +## Operating Modes + +### Mode 1: Single Shot +- Press button to trigger measurement +- Display shows result until next measurement +- LED blinks on trigger + +### Mode 2: Continuous +- Hold button 2s to enter continuous mode +- Triggers every 500ms, displays live reading +- Shows min/max/average +- Press button to exit + +### Mode 3: Statistics +- After measurements, short press cycles through: + - Last reading + - Minimum + - Maximum + - Average (last 10) + +## Panel Layout (6 HP) + +``` +┌─────────────────────┐ +│ SN-L00 │ +│ │ +│ ┌───────────┐ │ +│ │ OLED │ │ +│ │ 12.4 ms │ │ +│ └───────────┘ │ +│ │ +│ [BTN] │ +│ │ +│ ○ OUT ○ IN │ +│ TRIG RETURN │ +│ │ +│ ● PWR │ +└─────────────────────┘ +``` + +## Firmware Architecture + +``` +main.c +├── init_gpio() # Configure pins +├── init_i2c() # OLED communication +├── init_timer() # High-resolution timer +│ +├── trigger_pulse() # Generate output pulse +├── wait_for_return() # Monitor input with timeout +├── calculate_latency() # Timer math +│ +├── display_update() # OLED rendering +├── button_handler() # Mode switching +└── main_loop() # State machine +``` + +## GPIO Assignments (RP2040-Zero) + +| GPIO | Function | Notes | +|------|----------|-------| +| GP0 | I2C SDA | OLED | +| GP1 | I2C SCL | OLED | +| GP2 | Trigger Out | Via 74LVC1G17 | +| GP3 | Return In | Via MCP6001 | +| GP4 | Button | Internal pullup | +| GP5 | Power LED | Optional | + +## Future Expansion Ideas + +- CV output proportional to latency +- MIDI output (latency as CC) +- USB logging to computer +- Multiple trigger patterns (burst, random) +- Frequency response mode (sweep test) diff --git a/hardware/BOM.md b/hardware/BOM.md new file mode 100644 index 0000000..fb29930 --- /dev/null +++ b/hardware/BOM.md @@ -0,0 +1,67 @@ +# SN-L00 Bill of Materials + +## PCBWay Assembly (LCSC parts) + +| Ref | Description | Value | Package | LCSC # | Qty | +|-----|-------------|-------|---------|--------|-----| +| C1,C2 | Capacitor, ceramic | 100nF | 0603 | C14663 | 2 | +| C3,C4 | Capacitor, ceramic | 10uF | 0805 | C15850 | 2 | +| C5 | Capacitor, electrolytic | 47uF/25V | SMD 6.3x5.4 | C134767 | 1 | +| R1-R4 | Resistor | 10K | 0603 | C25804 | 4 | +| R5,R6 | Resistor | 1K | 0603 | C21190 | 2 | +| R7 | Resistor | 100K | 0603 | C25803 | 1 | +| D1 | Schottky diode (reverse polarity) | SS14 | SMA | C2480 | 1 | +| D2 | LED, green (power) | Green | 0603 | C72043 | 1 | +| U1 | LDO regulator 3.3V | AMS1117-3.3 | SOT-223 | C6186 | 1 | +| U2 | Schmitt trigger buffer | 74LVC1G17 | SOT-23-5 | C388628 | 1 | +| U3 | Op-amp (input buffer) | MCP6001 | SOT-23-5 | C93025 | 1 | +| J1 | Eurorack power header | 2x5 shrouded | 2.54mm | C429954 | 1 | +| J2,J3 | Thonkiconn jack | PJ398SM | - | C2935955 | 2 | +| SW1 | Tactile switch | 6x6mm | SMD | C127509 | 1 | + +## Hand-Solder Modules + +| Ref | Description | Source | Part # | Approx Price | Qty | +|-----|-------------|--------|--------|--------------|-----| +| MOD1 | RP2040-Zero | AliExpress / Waveshare | RP2040-Zero | ~€2-3 | 1 | +| MOD2 | OLED 128x32 I2C | AliExpress | SSD1306 0.91" | ~€2-3 | 1 | + +### Alternative sources for modules + +**RP2040-Zero:** +- Waveshare official: https://www.waveshare.com/rp2040-zero.htm (~$4) +- AliExpress: Search "RP2040-Zero" (~€2-3) +- Amazon: Search "RP2040-Zero" (~€5-8) + +**OLED 128x32 I2C:** +- AliExpress: Search "0.91 inch OLED I2C SSD1306" (~€2) +- Amazon: Search "0.91 OLED Arduino" (~€5-7) +- Adafruit: Product 4440 ($13) - quality option + +## Eurorack Jacks (Alternative Sources) + +Thonkiconn PJ398SM may have limited LCSC stock. Alternatives: +- Thonk.co.uk: https://www.thonk.co.uk/shop/thonkiconn/ (€0.40/ea, bulk) +- Exploding Shed: https://www.exploding-shed.com/ +- Modular Addict: https://modularaddict.com/ + +## Notes + +- All SMD passives are 0603 for easy assembly +- AMS1117-3.3 handles 12V→3.3V efficiently for low-power MCU +- 74LVC1G17 provides clean trigger output with Schmitt hysteresis +- MCP6001 buffers input signal, rail-to-rail on 3.3V +- Reverse polarity protection via D1 + +## Estimated Costs + +| Category | Cost | +|----------|------| +| PCB (5pcs, PCBWay) | ~€5-10 | +| SMD Assembly | ~€15-25 | +| LCSC components | ~€3-5 | +| Hand-solder modules | ~€5-8 | +| Jacks (if separate) | ~€1-2 | +| **Total per unit** | **~€25-40** | + +*Prices approximate, bulk reduces significantly*