Skip to the content
2 layers100 × 100 mmOpamp, the printed circuit board in 3D

The op-amp of Learning the Art of Electronics (Hayes and Horowitz, 2016), Lab 5L, built from six 2N3904 / 2N3906 transistors on a 100 x 100 mm board whose silkscreen is the schematic.

Size
100 × 100 mm
Copper layers
2
Thickness
1.6 mm
Parts
65
Nets
26
Pads
131
Tracks, vias
188, 24
Pours
1
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
24 Oct 2026
Updated
30 Oct 2026

Overview

Opamp is an open-source printed circuit board by gallicchio, from the gallicchio/op-amp-pcb repository on GitHub. It is a 2-layer board of 100 × 100 mm with 65 parts on 26 nets, routed with 188 tracks and 24 vias.

It is built around the MMBT3904, RH-5019 and BNC-KYWE-295-W4-N, with the CC0805KRX7R9BB104, CL21A106KAYNNNE and 1N4148W among its other parts. Its parts include 15 resistors, 7 connectors, 6 diodes, 6 transistors and 5 capacitors.

Main components

12

README

README.md

Discrete Transistor Op-Amp

The op-amp of Learning the Art of Electronics (Hayes and Horowitz, 2016), Lab 5L, built from six 2N3904 / 2N3906 transistors on a 100 x 100 mm board whose silkscreen is the schematic. For a first electronics lab: every node has a loop to hang a scope probe on, three DIP switches select the variants the book walks through, and the inputs, output and power come in on BNCs and screw terminals.

"I want you to build a relatively inexpensive educational Op-Amp PCB out of discrete transistors that I'll order from JLCPCB using only components that they have available and in stock ... The silkscreen should look exactly like the schematic ... The primary goal is clarity, simplicity, educational value, and ease of use for students in their first electronics lab class after having done most of chapter 4 in Learning the Art of Electronics."

The board

Only prompts. The whole project came from a conversation with Claude: the schematic, the board, the simulation, the fab files and these documents are all written by the Python under scripts/ and sim/, and nothing was drawn by hand.

Front, flat

What it is

The book's three-stage op-amp, with the book's values:

  • Difference amplifier, Q1 and Q2, 1.5 k collector load, gain about 11.
  • Tail: Q6 as a current sink (62 k / 10 k / 1 k), or the plain 10 k resistor the book starts with, on switch TAIL.
  • Gain stage: Q3, a PNP common-emitter stage, 330 ohm / 12 k, gain about 30, with the 100 pF Miller compensation capacitor on switch COMPENSATION.
  • Push-pull emitter follower, Q4 and Q5, into the book's 10 k / 1 k divider whose tap X is the feedback point for a gain of 11.
  • Switch FEEDBACK closes the loop as the x11 amplifier (X to IN-) or as a follower (OUT to IN-), or leaves it open so you wire your own feedback through the screw terminals.

What the board adds, so a class of first-year students can use it:

  • An OFFSET NULL trimmer between the two emitters (50 ohm, wiper to the tail).
  • A 1 k in series with the 100 pF, which cancels the Miller zero and makes the follower stable; COMPENSATION 2 shorts it so the book's bare 100 pF can be heard ringing.
  • Input protection: 1 k in series with each input and anti-parallel 1N4148s between the bases, so no base-emitter junction ever sees its 6 V reverse breakdown.
  • Output protection in one part: R17, 330 ohm from the push-pull to OUT, inside the loop, so a shorted output draws about 46 mA and Q4 and Q5 stay cool. It also keeps a cable on OUT from making the follower ring.
  • Reverse-supply protection (a Schottky in each rail) and a green LED per rail.
  • 18 probe loops, four of them ground (one per scope channel), placed on every node the book asks you to look at. Dashed boxes name each stage on the silkscreen, and every transistor sits inside its own symbol with B, C and E marked.

Parts cost about $7.79 in parts per board at JLCPCB; the fixed assembly fees make the first board about $70 and each further one about $9, so about $15 each for 10 assembled boards. See docs/MANUFACTURING.md.

Schematic

Using it

docs/HANDBOOK.md is the student and instructor guide: how to power it, what every switch and loop does, the quiescent voltage at every loop, the bring-up order for a new board, and a set of exercises that follow Lab 5L stage by stage. The back of the board carries the short version.

Building the files

Needs KiCad 10 (an AppImage is enough), Python 3 with Pillow, pdftoppm (poppler-utils) for the images and, optionally, libngspice for the simulation.

bash
git clone https://github.com/gallicchio/op-amp-pcb.git
cd op-amp-pcb
export KICAD_APPIMAGE=$HOME/.local/bin/kicad-10.0.7-x86_64.AppImage   # or kicad-cli on PATH
./make.py              # footprints, models, simulation, schematic, board, checks, fab files, docs
./make.py --clean      # delete everything it generates

The build stops on any ERC or DRC violation, on any of the 110 circuit assertions that read the exported netlist back against the book's circuit, on a schematic text overlap, on a fab-package problem (an order code whose JLCPCB description no longer matches, a QR code that does not decode from the board file) and on any number in these documents that no longer matches the build.

Layout

text
make.py                one command builds and checks everything
scripts/parts.py       every part: value, footprint, LCSC code, stock, JLCPCB rotation
scripts/layout.py      the board: placements, the silkscreen wires, texts and boxes
scripts/gen_sch.py     writes hardware/opamp.kicad_sch
scripts/gen_pcb.py     writes hardware/opamp.kicad_pcb (copper follows the silk wires)
scripts/check_*.py     the netlist, the schematic sheet and the fab package
sim/opamp_sim.py       ngspice: operating point, loop gain, step response, swing, null
out/opamp/             gerbers, BOM, CPL (native and JLCPCB), prints, PLACEMENT_CHECKS
docs/                  MANUFACTURING, HANDBOOK, DESIGN_NOTES, images

More

Circuit: Hayes and Horowitz. Board: Jason Gallicchio and Claude. Hardware under CERN-OHL-P-2.0, scripts under MIT; see LICENSE.

Parts

65
QtyValueFootprintReferences
510kResistor_SMD:R_0805_2012MetricR4, R6, R10, R12, R13
42N3904Package_TO_SOT_SMD:SOT-23Q1, Q2, Q4, Q6
4GNDopamp:TestPoint_Loop_RH-5019TP100, TP101, TP102, TP103
4MountingHoleMountingHole:MountingHole_3.2mm_M3MH1, MH2, MH3, MH4
31kResistor_SMD:R_1206_3216MetricR1, R2, R7
3BNCopamp:BNC_KYWE_RightAngleJ1, J2, J3
2100nFCapacitor_SMD:C_0805_2012MetricC3, C5
210uFCapacitor_SMD:C_0805_2012MetricC2, C4
21N4148WDiode_SMD:D_SOD-123D1, D2
21kResistor_SMD:R_0805_2012MetricR11, R14
22N3906Package_TO_SOT_SMD:SOT-23Q3, Q5
2330RResistor_SMD:R_2512_6332MetricR8, R17
2B5819WDiode_SMD:D_SOD-123D3, D4
2GREENLED_SMD:LED_0805_2012MetricLED1, LED2
1+15 / GND / -15opamp:TerminalBlock_KF301_1x03_P5.00mmJ6
1+15Vopamp:TestPoint_Loop_RH-5019TP11
1-15Vopamp:TestPoint_Loop_RH-5019TP12
11.5kResistor_SMD:R_0805_2012MetricR3
1100pFCapacitor_SMD:C_0805_2012MetricC1
112kResistor_SMD:R_0805_2012MetricR9
150Ropamp:Potentiometer_Bourns_3362P_VerticalRV1
162kResistor_SMD:R_0805_2012MetricR5
1COMPENSATIONopamp:SW_DIP_SPSTx02_KingTek_DSIC02_P2.54mmSW2
1FEEDBACKopamp:SW_DIP_SPSTx02_KingTek_DSIC02_P2.54mmSW3
1IN+opamp:TestPoint_Loop_RH-5019TP2
1IN+ / GNDopamp:TerminalBlock_KF301_1x02_P5.00mmJ5
1IN-opamp:TestPoint_Loop_RH-5019TP1
1IN- / GNDopamp:TerminalBlock_KF301_1x02_P5.00mmJ4
1OUTopamp:TestPoint_Loop_RH-5019TP9
1OUT / GNDopamp:TerminalBlock_KF301_1x02_P5.00mmJ7
1Q1 Eopamp:TestPoint_Loop_RH-5019TP13
1Q2 Copamp:TestPoint_Loop_RH-5019TP6
1Q2 Eopamp:TestPoint_Loop_RH-5019TP14
1Q3 Copamp:TestPoint_Loop_RH-5019TP8
1Q3 Eopamp:TestPoint_Loop_RH-5019TP7
1Q6 Bopamp:TestPoint_Loop_RH-5019TP5
1Q6 Eopamp:TestPoint_Loop_RH-5019TP4
1TAILopamp:SW_DIP_SPSTx02_KingTek_DSIC02_P2.54mmSW1
1TAILopamp:TestPoint_Loop_RH-5019TP3
1Xopamp:TestPoint_Loop_RH-5019TP10

Similar boards

  • 2 layers170 × 120 mmMotor pid, the printed circuit board in 3D

    Motor pid

    gallicchio/motor-pid

    The motor-position feedback loop of Learning the Art of Electronics (Hayes & Horowitz), Lab 10L, as a 170 x 120 mm printed circuit board whose silkscreen is the schematic.

    110 parts
  • 2 layers100 × 100 mmAmod p, the printed circuit board in 3D

    Amod p

    gallicchio/AMOD-and-RFMOD

    The tutorial's 2x12 adapter (/mudd/133electronics/icepi-zero-dac-adc/adapterboard/) with a 2 x 6 right-angle Pmod socket on a 15 mm extension of its right-hand end, so an Icepi Zero can drive AMOD-A's and RF-MOD's Pmod…

    151 parts
  • 2 layers135 × 92 mmCurve tracer, the printed circuit board in 3D

    Curve tracer

    leedanie2/curve-tracer

    Programmable semiconductor curve tracer: STM32 firmware, two-layer KiCad PCB, SPICE Monte Carlo analysis, and a host-side SPICE-parameter extraction pipeline. Hardware in bring-up.

    88 parts
  • 2 layers110 × 85 mmBASE IO before cleanup, the printed circuit board in 3D

    BASE IO before cleanup

    RSXLX/sunny-the-growing-sunflower-lamp

    SUNNY — The Growing Sunflower Lamp | A personal lamp with customizable exteriors, traceable fabrication, and a local creative workspace.

    52 parts
  • 2 layers100 × 100 mmLorenz, the printed circuit board in 3D

    Lorenz

    gallicchio/ai_unleashes_chaos

    Lorenz Attractor Circuit by Paul Horowitz in KiCAD

    90 parts1MIT
  • 4 layers180 × 100 mmClass board V0.2, the printed circuit board in 3D

    Class board V0.2

    TIGP-Experimental-Methods/class-board-2026

    TIGP class instrument 2026: one board, five blocks - KiCad hardware, ESP32-S3 firmware, phone PWA, Python API, workbook

    342 parts
  • 2 layers88 × 130 mmWindowmaster controller v2, the printed circuit board in 3D

    Windowmaster controller v2

    Simplycissmus/windowmaster-s3-controller

    Open hardware and ESP32-S3 firmware for a local 24 V window actuator controller with MQTT and Home Assistant integration.

    68 parts1

Questions

How big is the Opamp PCB?

It measures 100 × 100 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Opamp use?

65 parts, built around the MMBT3904, RH-5019, BNC-KYWE-295-W4-N and CC0805KRX7R9BB104. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Opamp KiCad files?

From the gallicchio/op-amp-pcb repository on GitHub, at the commit this page was made from: the board is hardware/opamp.kicad_pcb and its schematic hardware/opamp.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Opamp design in my own project?

Its repository states no licence, so its author keeps all rights: ask gallicchio before reusing the design.