agentee

Preamp

A through-hole op-amp preamp

A 9 V audio preamp on a dual LM358: x11 gain and a 1 kHz Sallen-Key low-pass, run through every circuit analysis from the operating point to clipping.

The preamp layout: a 3.5 mm jack on each side, the LM358 in the middle and the battery header along the top.

A 3.5 mm jack in, a 3.5 mm jack out and a 9 V battery. U1A gains the signal by 11 with its DC gain held at 1, so the output sits at the mid-rail bias with no trimming. U1B is a unity-gain Sallen-Key low-pass at 1.07 kHz with a Q of 0.74, close to Butterworth. A 1N4148 blocks a battery clip put on backwards.

Every sim models U1 and D1 from their datasheets, and each one has checks: preamp-ac for the bias, gain and noise, preamp-clip for where the output hits the rails, preamp-power for the thump at switch-on as the bias settles, and preamp-reverse for the leakage with the battery reversed.

Its DESIGN.md lists what the sims found wrong with it, the turn-on thump and an input that clips below line level, and keeps them as known problems rather than hiding them.

Open it

git clone https://github.com/v0l/agentee
cd agentee/examples/preamp
agentee check
agentee view

Browse the files on GitHub

  • The preamp schematic: the reverse battery diode, the mid-rail bias, the gain stage and the Sallen-Key filter.
    The preamp schematic: the reverse battery diode, the mid-rail bias, the gain stage and the Sallen-Key filter.
  • Gain, phase and noise of the preamp from the AC and noise analyses.
    Gain, phase and noise of the preamp from the AC and noise analyses.
  • A 400 mV sine driving the preamp into clipping, with the spectrum of each net.
    A 400 mV sine driving the preamp into clipping, with the spectrum of each net.
  • The preamp switched on: the gain stage clips while the bias settles and the output swells, then returns to 0 V.
    The preamp switched on: the gain stage clips while the bias settles and the output swells, then returns to 0 V.