Skip to content

Output Stage Hardware

The output stage sits between the ESP32-S3 microcontroller and the organ’s analog circuits. It converts digital commands into the voltages and switch closures the organ expects.

graph LR
    MIDI["MIDI-In<br/>(USB · BLE · DIN-5)"] --> MCU{ESP32-S3}

    MCU -->|SPI| DAC["DAC ICs<br/>(MCP4728 ×2)"]
    MCU -->|GPIO| DRV["Relay Drivers<br/>(ULN2803)"]

    DAC --> AMP["Op-Amp<br/>Gain Stages"]
    AMP --> CV["Organ CV Nodes<br/>VCO · Filter · LFO"]

    DRV --> RLY["Relay Modules"]
    RLY --> SW["Organ Switches<br/>Tabs · Effects"]
    RLY --> LSL["Leslie Reed Coils<br/>(Off / Slow / Fast)"]

    style MIDI fill:#065f46,color:#d1fae5,stroke:#10b981
    style MCU fill:#78350f,color:#fef3c7,stroke:#d97706
    style CV fill:#92400e,color:#fef3c7,stroke:#d97706
    style SW fill:#92400e,color:#fef3c7,stroke:#d97706
    style LSL fill:#92400e,color:#fef3c7,stroke:#d97706

The DAC subsystem generates analog voltages for the organ’s continuous-control circuits (VCO pitch, filter cutoff, LFO parameters, expression). Channel count is derived from the Output Inventory continuous targets table.

Primary choice: MCP4728 (4-channel, 12-bit, I2C)

FeatureSpecification
Channels4 per chip (2 chips = 8 channels)
Resolution12-bit (4096 steps)
InterfaceI2C (2-wire, addressable)
Output range0–2.048V (internal VREF) or 0–VDD
Update rate400 kHz I2C → ~50 kHz per channel
EEPROMStores power-on default values

Two MCP4728s on the I2C bus provide 8 DAC channels — enough for all identified continuous targets with room for expansion. Each chip has a unique I2C address (factory-set, changeable via special command).

Alternative: MCP4922 (2-channel, 12-bit, SPI)

Faster update rate than I2C (SPI clock up to 20 MHz), but requires more chips (3–4 for 6–8 channels) and more GPIO for chip-select lines. Better suited if update rate proves critical for pitch tracking.

Each DAC output feeds a non-inverting op-amp gain stage that scales 0–3.3V to the organ’s operating voltage:

Target VoltageGainR1 (kΩ)R2 (kΩ)Op-Amp Supply
0–5V1.52105.1+12V
0–10V3.031020+12V or +15V
0–12V3.641027+15V

Op-amp selection: TL074 (quad JFET op-amp) — one chip handles four channels. Low offset voltage, rail-to-rail not required since the supply rails exceed the output range. Two TL074s cover all 8 DAC channels.

The exact gain for each channel will be set after bench measurement of the target CV node voltage ranges (see Output Inventory investigation queue).

Binary targets (Leslie speed, tab stops, tremolo/vibrato, rhythm) require switch closures. The ESP32’s 3.3V GPIO drives relay coils through Darlington transistor arrays.

FeatureSpecification
Channels8 per chip
Input3.3V–5V logic compatible
OutputOpen-collector, 500 mA per channel
ProtectionInternal flyback diodes for relay coils

The ULN2803 is the standard interface between microcontrollers and relay coils. Each input pin connects directly to an ESP32 GPIO; each output pin drives a relay coil. The internal flyback diodes suppress the inductive voltage spike when a relay de-energizes — no external protection diodes needed.

From the Output Inventory binary targets:

GroupRelaysNotes
Leslie (Off/Slow/Fast)2Two relays encode three states
Orbit III voice tabs10One relay per tab stop
Tremolo1On/off
Vibrato1On/off
Rhythm select2–4Depends on switch matrix investigation
Total16–18

Two ULN2803 chips (16 channels) cover the minimum count. A third chip provides headroom for rhythm selection and future expansion.

Preferred: SRD-05VDC-SL-C (Songle 5V SPDT relay) — ubiquitous, cheap, available on pre-built relay modules with screw terminals for prototyping. Switching capacity: 10A @ 250VAC, far exceeding the organ’s tab stop and signal switching requirements.

For the Leslie motor control (confirmed reed switch coil drive), use a relay rated for the reed switch coil current — see remaining investigation for the bench measurement.

The ESP32-S3 operates at 3.3V logic. The organ’s circuits use 5V and 12V signals.

DirectionVoltageMethod
ESP32 → ULN28033.3V → relay coilULN2803 handles directly (3.3V input threshold met)
ESP32 → DAC (I2C)3.3VNo shifting needed (MCP4728 operates at 3.3V)
DAC → organ CV0–3.3V → 0–12VOp-amp gain stage (see above)
ESP32 GPIO → Leslie coils3.3V → relay coilULN2803 handles directly (same relay subsystem)

The ULN2803’s internal Darlington pairs have a low enough input threshold (~2.5V) to trigger reliably from 3.3V GPIO. No separate level shifter is needed for the relay subsystem.

The Leslie investigation identified the 555’s Leslie as a CBS/Electro Music unit (Part No. 660890) with a TRIAC-based speed controller and magnetically actuated reed switches. The console’s Off/Slow/Fast switch energizes reed switch coils that configure the TRIAC for the corresponding motor speed.

Scenario A: Reed Switch Coil Drive Confirmed

Section titled “Scenario A: Reed Switch Coil Drive ”

No dedicated motor driver is needed. The ESP32 drives two GPIO pins through the existing ULN2803 Darlington array, each energizing a small relay across a reed switch coil. Two relays encode three states:

GPIO StateLeslie StateMIDI CC#80 Value
Both offOff0–42
Channel 1 onSlow (chorale, ~40 RPM)43–95
Channel 2 onFast (tremolo, ~340 RPM)96–127

The CC#80 mapping follows the Hammond-Suzuki convention used by the Leslie 2101mk2 and other MIDI Leslie controllers. The relays must be rated for the reed switch coil drive current — one bench measurement remains to confirm the coil voltage and current spec.

The spin-up and spin-down transitions are entirely mechanical. The MIDI interface just flips the relay; the motor accelerates or decelerates through its own inertia. The musical character of the Leslie transition is preserved exactly because the same TRIAC circuit drives the same motor.

Scenario C: ESP32 Micro-VFD Future Upgrade

Section titled “Scenario C: ESP32 Micro-VFD ”

The ESP32-S3’s MCPWM peripheral can generate variable-frequency SPWM to drive the motor at any speed from ~10 Hz (60 RPM) to 60 Hz (360 RPM) through a full H-bridge, with about $10 of additional components. This unlocks continuous speed control via MIDI CC#1 (mod wheel) and programmable ramp profiles shaped in firmware. See Leslie Motor Simulations for SPICE waveform data comparing VFD and TRIAC drive. Build after Scenario A is proven.

The output stage needs to power DACs, op-amps, relays, and potentially a motor driver. Rather than adding an external supply, the design taps the organ’s existing power rails:

RailSourceUsed By
+5VOrgan’s 5V regulator or ESP32 USBRelay coils, ULN2803 VCC
+12V (or +15V)Organ’s Orbit III power supplyOp-amp supply rails
+3.3VESP32 onboard regulatorDAC ICs, ESP32 GPIO
GNDCommon groundAll subsystems

Phase 1 uses off-the-shelf breakout boards and modules wired to an ESP32-S3 dev board. No custom PCB is needed until the circuit is proven.

ComponentModuleInterfaceApproximate Cost
ESP32-S3ESP32-S3-DevKitC-1$10
DAC (8 ch)MCP4728 breakout × 2I2C$8 × 2
Relay (16 ch)16-channel relay moduleGPIO via ULN2803$12
Op-ampsTL074 on breadboardDAC outputs$2
ResistorsAssorted 1% metal filmGain setting$5
Total~$45

The prototyping phase validates each output channel independently:

  1. DAC → op-amp → voltmeter

    Confirm voltage scaling for each target range

  2. GPIO → relay → continuity test

    Confirm relay switching for each tab stop

  3. Connect one channel to the organ

    Start with the Leslie — two relay channels driving the confirmed reed switch coils, most dramatic result, easiest to verify by ear

  4. Add channels incrementally

    Expression volume, then Orbit III CV, then remaining targets

This incremental approach minimizes risk to the organ’s circuits — each new connection is validated in isolation before moving to the next.