diff --git a/.gitignore b/.gitignore index 9309c9a..1f6eac6 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /~ambium.kicad_sch.lck /.history /.DS_Store +/ambium.sublime-workspace diff --git a/README.md b/README.md index 421ec21..7b5f3b1 100644 --- a/README.md +++ b/README.md @@ -32,17 +32,20 @@ Q1 2N3904 → U1A LM358 ×1000 → U1B LM358 −6dB/oct → Q2 2N3904 → U2B Legend for the diagrams: ``` - [Rxx val] resistor ──┤├── capacitor ● junction (connected) - │\ × no-connect - ────┤−\ op-amp: IN− top, IN+ bottom, ► net continues (same label) - │ >── OUT right. Powered from +12V/GND - ────┤+ / via LM358 pins 8/4 (see Power). + [Rxx val] resistor ──┤├── film / non-polar cap ● junction (connected) + ──+┤├── polarised cap × no-connect + │\ (the + marks the + terminal) ► net continues (label) + ────┤−\ op-amp: IN− top, IN+ bottom, OUT right. + │ >── Powered from +12V / GND via LM358 pins 8 / 4 (see Power). + ────┤+ / │/ - (C) - │ - (B)┤< NPN 2N3904 (C=collector, B=base, E=emitter) - │ - (E) + E transistor box — E / B / C labels sit OUTSIDE the box: + │ + ┌──┴──┐ + B ───┤ Qx │ NPN 2N3904 + └──┬──┘ + │ + C ``` --- @@ -55,8 +58,9 @@ Legend for the diagrams: [R2 10k] │ ●───────────────┬────────► VREF (6 V) - │ │ - [R3 10k] ──┤├── Cref 10µF + │ + Cref 10µF (+ terminal → VREF) + [R3 10k] ──┤├── + │ − │ │ GND GND ``` @@ -71,43 +75,59 @@ Reverse-biased base–emitter junction of `Q1` driven into avalanche = broadband noise. `R1` limits current; `C1` couples the noise out. ``` - +12V - │ - [R1 100k] - │ - ●──────┤├──────► NOISE - │ C1 10µF - (C) × (collector: no connect) - │ - (B)─┤< Q1 2N3904 - │ - (E) - │ - GND ← base to GND; avalanche appears across B-E, out at the R1/collector node + +12V + │ + [R1 100k] + │ + ●──+┤├──────────► NOISE (stage-1 output → Stage 2) + │ C1 10µF + │ (+ terminal → emitter side; − → NOISE) + E + ┌──┴──┐ + GND─B─┤ Q1 │ 2N3904 + └──┬──┘ + │ + C + × collector: no connect + +The ● node (R1 / Q1 emitter) is the raw noise on a DC pedestal — internal, don't +label it NOISE. `C1` strips the DC; **NOISE = the AC-coupled output after C1.** ``` > Avalanche quality varies part-to-part. Try one 2N3904; if quiet, swap for another. > Needs the full +12 V (9 V is often too low to avalanche). --- -## Stage 2 — Amplifier ×1000 (U1A, Rin1, Rf1) +## Stage 2 — Amplifier ×1000 (U1 unit B, Rin1, Rf1) Inverting amp, gain ≈ −Rf1/Rin1 = **×1000**. Output centred on VREF. ``` - ┌──────[Rf1 1M]──────┐ - │ │ - NOISE ──[Rin1 1k]──● │ - │ │\ │ - └───┤−\ │ - │ >──●───────┴────► AMP - VREF ───────┤+ / U1A - │/ (LM358, unit A) + ┌───[Rf1 1M]────┐ + ├───[Cf1 22pF]──┤ Cf1 ∥ Rf1 — kills oscillation, limits BW + │ │ + NOISE ─[Rin1 1k]───● │ + pin 6 │ │\ │ + (IN−) ───────┴───┤−\ │ + │ >──● pin 7 (OUT) ──► AMP + (IN+) ───────────┤+ / + pin 5 VREF │/ U1 = LM358 (unit B) + + Power + decoupling (whole LM358 U1 — wired ONCE, not per unit): + + pin 8 (V+) ── +12V pin 4 (V−) ── GND + + +12V ──+┤├── GND 47µF +12V ──┤├── GND 10nF (or 0.1µF) + (bulk electro, (HF ceramic, + + to +12V, near U1) right at pin 8) ``` +> This stage uses **unit B** (pins 5/6/7) — as built. The integrator (Stage 3) uses +> the **other half, unit A** (pins 1/2/3). Power (8/4) + decoupling are shared by both +> halves — wire them once. To use unit A here instead: IN− = **2**, IN+ = **3**, OUT = **1**. --- -## Stage 3 — Integrator → brown (U1B, Rin2, Cint, Rf2) +## Stage 3 — Integrator → brown (U1 unit A, Rin2, Cint, Rf2) Leaky integrator = **−6 dB/octave** → turns white into brown. `Rf2` bounds DC so the output can't rail. Corner ≈ 1/(2π·Rf2·Cint) ≈ 1.6 Hz. @@ -117,12 +137,12 @@ output can't rail. Corner ≈ 1/(2π·Rf2·Cint) ≈ 1.6 Hz. │ │ ├───────┤├───────────┤ Cint 100nF (Rf2 ∥ Cint) │ │ - AMP ──[Rin2 10k]──● │ - │ │\ │ - └───┤−\ │ - │ >──●───────┴────► BROWN - VREF ───────┤+ / U1B - │/ (LM358, unit B) + AMP ─[Rin2 10k]───● │ + pin 2 │ │\ │ + (IN−) ───────┴───┤−\ │ + │ >──● pin 1 (OUT) ──► BROWN + (IN+) ───────────┤+ / + pin 3 VREF │/ U1 = LM358 (unit A) ``` Darker/deeper: ↑ Cint or Rf2. Lighter (toward pink): ↓ Cint. @@ -161,29 +181,67 @@ voltage is the ramp on `Ct` (net `LFO_CV`) — it drives the VCA in Stage 5. amplitude swells and fades. `U2B` buffers; `Cout` blocks DC; `Rvol` sets level. ``` - (C) - │ - BROWN ──[Rs 47k]──●───────┤< Q2 2N3904 - │ │ - VCA (E) - │ │ - │ VREF - │ - LFO_CV ──[Rb2 100k]──(B) ← control voltage into Q2 base - │ - │ │\ - └───┤+\ - │ >──●──────┤├──────●──[Rvol 10k]──► AUDIO_OUT - ┌───┤−/ U2B Cout (wiper) - │ │/ (LM358 10µF │ - │ unit B) GND - └──────────● (buffer: OUT tied back to IN−) + VCA + │ + C + ┌──┴──┐ + LFO_CV ─[Rb2 100k]─B─┤ Q2 │ 2N3904 + └──┬──┘ + │ + E + │ + VREF + + BROWN ──[Rs 47k]────────► VCA (Rs feeds VCA; Q2 shunts VCA to VREF) + + VCA ───┤+\ + │ >──●──+┤├──●──[Rvol 10k]──► AUDIO_OUT + ┌─────┤−/ │ Cout │ (wiper) + │ │/ U2B 10µF GND + │ LM358 + │ unit B + └─────────● (OUT → IN− = unity buffer; Cout + → buffer out) ``` When `LFO_CV` is low → Q2 off → signal passes (loud). High → Q2 conducts → shunts to VREF (quiet). ~20 s swell. Soften the swell: 1 µF from `LFO_CV` to VREF. --- +## Output driver — LM386 (U3), for the 4Ω speaker + +`AUDIO_OUT` is **line level** — the LM358 **cannot** drive a speaker. Add an **LM386** +power amp for a 4 Ω / 8 Ω speaker. (For bring-up you can feed it from `AMP` or `BROWN` +instead of `AUDIO_OUT`.) + +``` + +12V + │ + ●──────┤ pin 6 (V+) + ──+┤├── ──┤├── + 47µF 0.1µF (→ GND, at the chip) + │ │ + GND GND + + AUDIO_OUT ─+┤├─[VOL 10k]────► pin 3 (+IN) pin 5 (OUT) ─+┤├──► SPKR ─ GND + Cc 1µF (wiper) 470µF 4Ω + pin 5 ─[10Ω]─┤├─ GND (Zobel) + pin 2 (−IN) ── GND 10nF + pin 4 ── GND + pin 7 (BYPASS) ─+┤├─ GND (10µF) + pins 1 & 8 ── OPEN (gain ×20) +``` +LM386 pinout: `1` gain · `2` IN− · `3` IN+ · `4` GND · `5` OUT · `6` V+ · `7` bypass · `8` gain. + +**Notes** +- **Output cap must be big (~470µF, ≥16V).** Into 4 Ω, 47µF high-passes at ~850 Hz → + kills the bass (brown noise is all lows). Fat electrolytic, **+ → pin 5**. +- **Gain ×20** (pins 1 & 8 open). Back off with VOL to avoid clipping. A 10µF between + pins 1 & 8 gives ×200 — usually not needed. +- **On +12 V the LM386 runs warm into 4 Ω** (LM386N-1 max = 12 V). OK for testing; + for cooler running feed it from ~9 V. + +--- + ## LM358 power + decoupling Each LM358 (U1, U2) is powered once via its package pins — **not** per op-amp unit: @@ -220,13 +278,20 @@ LM358 unit A = pins 1(OUT) 2(IN−) 3(IN+); unit B = 7(OUT) 6(IN−) 5(IN+); pow | Rvol | 10k | potentiometer | output level | | C1 | 10µF | electrolytic | noise coupling | | Cref | 10µF | electrolytic | VREF bypass | +| Cf1 | 22–100pF | ceramic | amp feedback — **stops oscillation**, limits BW | | Cint | 100nF | film | integrator (brown shaping) | | Cout | 10µF | electrolytic | output coupling | | Ct | 10µF | **non-polar** | LFO timing (bipolar swing) | -| — | 0.1µF ×2 | ceramic | chip decoupling | -| — | 47µF | electrolytic | +12V bulk | +| U3 | — | **LM386** | speaker power amp (drives 4Ω/8Ω) | +| Cc | 1µF | film/electro | LM386 input coupling | +| Cout2 | **470µF** ≥16V | electrolytic | speaker output coupling — **big, for bass** | +| — | 10Ω + 10nF | — | LM386 Zobel network (stability) | +| — | 10µF | electro | LM386 pin 7 bypass | +| — | 0.1µF ×3 | ceramic | chip decoupling (one per LM358 + one at LM386 pin 6) | +| — | 47µF ×2 | electrolytic | +12V bulk (main rail + at LM386) | -**Chip count: 2× LM358 + 2× 2N3904.** Single +12 V supply. +**Chip count: 2× LM358 + 1× LM386 + 2× 2N3904.** Single +12 V supply +(feed the LM386 from ~9 V if it runs hot into 4 Ω). --- @@ -236,7 +301,8 @@ LM358 unit A = pins 1(OUT) 2(IN−) 3(IN+); unit B = 7(OUT) 6(IN−) 5(IN+); pow +12V : R1.1, R2.1, U1.8, U2.8, (47µF+) GND : R3.2, Q1.base, Cref.−, U1.4, U2.4, Rvol.3, (47µF−), (0.1µF ×2) VREF : R2.2, R3.1, Cref.+, U1A.IN+(3), U1B.IN+(5), Ct(VREF end), Ra.1, Q2.emitter -NOISE : R1.2 / Q1.emitter-node, C1.+ (C1.− → Rin1.1) +(src) : R1.2, Q1.emitter, C1.+ (internal raw-noise node, DC pedestal) +NOISE : C1.−, Rin1.1 (stage-1 output, AC-coupled — after C1) AMP : U1A.OUT(1), Rf1, Rin2.1 (Rin1.2, Rf1, U1A.IN−(2) = summing node) BROWN : U1B.OUT(7), Cint, Rf2, Rs.1 (Rin2.2, Cint, Rf2, U1B.IN−(6) = summing) LFO : U2A.OUT(1), Rt, Rh diff --git a/ambium.sublime-project b/ambium.sublime-project new file mode 100644 index 0000000..24db303 --- /dev/null +++ b/ambium.sublime-project @@ -0,0 +1,8 @@ +{ + "folders": + [ + { + "path": "." + } + ] +}