Skip to the content
2 layers170 × 120 mmMotor pid, the printed circuit board in 3D

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.

Size
170 × 120 mm
Copper layers
2
Thickness
1.6 mm
Parts
110
Nets
46
Pads
283
Tracks, vias
379, 75
Pours
3
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
25 Oct 2026
Updated
2 Nov 2026

Overview

Motor pid is an open-source printed circuit board by gallicchio, from the gallicchio/motor-pid repository on GitHub. It is a 2-layer board of 170 × 120 mm with 110 parts on 46 nets, routed with 379 tracks and 75 vias.

It is built around the LM321, CC0805KRX7R9BB104 and SS34, with the 0805W8F1003T5E (SMT业务专用), CL21A106KAYNNNE and RH-5019 among its other parts. Its parts include 28 capacitors, 26 resistors, 10 diodes, 7 ICs and 6 connectors. It belongs with the robots and motor control boards of this library.

Main components

12

README

README.md

PID Motor Control Loop — Lab 10L on one board

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. A motorized slide fader (the lab's Bourns PSM01-082A-103B2, or any 100 mm fader with a 10k track and a 6–11 V motor) wires to two screw terminals; the board holds the fader's wiper at the position a knob or a signal generator asks for, with proportional, derivative and integral terms the student switches in and turns up one at a time, exactly as the lab does.

the board

Every node the lab asks you to look at has a probe loop (17 probe loops, four of them ground). Every stage sits in a dashed box named as the book names it. The three gain trimmers are labelled P GAIN, D GAIN and I GAIN, each with an arc over it saying what clockwise does (more resistance: more P, more D, less I); the switches say in words what each position does.

What is on it

blockthe bookhere
TARGETa 10k pot between ±15 V through 6.8ka knob with a centre detent (0 V, clockwise positive), or a BNC jack for a slow square wave; a switch picks
pseudo op-ampunity difference amplifier, inverter, summing amplifierU1, U2, U3 (LM321) with 100k and 10k as drawn; the summing amplifier's gain is the P GAIN trimmer
derivativeC and 1k into an op-amp with 1M feedback, 470 pF across itU4; a switch picks 22 nF (right for this fader) or the book's 100 nF; D IN / OFF switch
integral1k + 1M into an op-amp with a capacitor across itU5 with a 1 µF polypropylene film (its value holds at any voltage); I IN / OFF, where OFF shorts the capacitor so the integrator starts from zero
motor driverop-amp driving a push-pull pair, 10k feedback from the motor side, 0.33 µF from the op-amp's own output, 270 Ω into the bases, 10 Ω + 0.1 µF snubberU6 with MJB44H11 / MJB45H11 in D2PAK, each in a 2 oz copper pour that is its heatsink, clamp diodes to the rails, a 0.35 A resettable fuse between the push-pull and DRIVE, with red lamps across it: the feedback, the DRIVE loop, DRIVE OUT and the motor are behind it; two more Schottkys clamp a rail left open
the plantthe fader's motor and 10k track with 4.7k end resistors (±7.7 V)two 3-way screw terminals, MOTOR and POT, a POSITION probe loop and a buffered POSITION OUT jack
LOOP switchthe book's "break the loop here"open (POSITION replaced by ground) or closed

The design departs from the book where the parts or the pedagogy asked for it; each departure is in docs/DESIGN_NOTES.md.

Using it

docs/HANDBOOK.md: bring-up without the fader, wiring the fader and checking its polarity, the expected voltage at every loop, and the lab's exercises in the lab's order (P alone and the residual error, raising the gain until it oscillates, adding D, then I, then driving it with a square wave). The back of the board carries the short version.

Ordering it

docs/MANUFACTURING.md is generated by the build: the files to upload, JLCPCB's order form field by field, the cost, and what to look at in their placement preview. There are about $12.21 in parts per board. Order 2 oz outer copper, not the default 1 oz: the copper round the two power transistors is their heatsink.

Building it

text
./make.py

runs, from scripts/parts.py outward: the footprints and 3D stand-ins, the ngspice simulation of the loop (from the exported netlist, with a model of the fader), the schematic (scripts/gen_sch.py) and its ERC, 258 circuit assertions on the netlist (scripts/check_circuit.py), the board (scripts/layout.py placed and wired by scripts/gen_pcb.py, where every drawn wire is laid as copper) and its DRC with schematic parity, the fab package and its checks (scripts/check_outputs.py), and the documents, whose every quoted number is checked against the build. KiCad 10 is needed; the build finds its AppImage.

Files

  • hardware/ — the KiCad project (generated; do not edit by hand)
  • scripts/ — the generators and checkers
  • sim/ — the simulation and its results
  • out/motorpid/ — gerbers, BOM, CPL, prints, assembly notes
  • docs/ — handbook, design notes, manufacturing, images
  • CLAUDE_CODE_CHAT.md — how this was designed, prompt by prompt

Licence

Hardware under CERN-OHL-P v2 (LICENSE-HARDWARE.txt), scripts under MIT (LICENSE). The circuit is Hayes & Horowitz's; the board is Jason Gallicchio and Claude, 2026.

Parts

110
QtyValueFootprintReferences
18100nFCapacitor_SMD:C_0805_2012MetricC10, C13, C14, C20, C21, C22, C23, C24, C25, C26, C27, C28, C29, C30, C31, C32 +2
910kResistor_SMD:R_0805_2012MetricR9, R10, R11, R12, R13, R14, R18, R26, R27
7LM321Package_TO_SOT_SMD:SOT-23-5U1, U2, U3, U4, U5, U6, U7
6SS34Diode_SMD:D_SMAD1, D2, D3, D4, D5, D6
4100kResistor_SMD:R_0805_2012MetricR5, R6, R7, R8
410uFCapacitor_SMD:C_0805_2012MetricC1, C2, C3, C4
4GNDmotorpid:TestPoint_Loop_RH-5019TP100, TP101, TP102, TP103
4MountingHoleMountingHole:MountingHole_3.2mm_M3MH1, MH2, MH3, MH4
31Mmotorpid:Potentiometer_Bourns_3362P_VerticalRV2, RV3, RV4
31kResistor_SMD:R_0805_2012MetricR15, R17, R23
3BNCmotorpid:BNC_KYWE_RightAngleJ1, J2, J3
2100uFCapacitor_SMD:CP_Elec_6.3x5.4C11, C12
21RResistor_SMD:R_2512_6332MetricR21, R22
21kResistor_SMD:R_1206_3216MetricR24, R25
24.7kResistor_SMD:R_0805_2012MetricR3, R4
26.8kResistor_SMD:R_0805_2012MetricR1, R2
2GREENLED_SMD:LED_0805_2012MetricLED1, LED2
2REDLED_SMD:LED_0805_2012MetricLED3, LED4
1+15 / GND / -15motorpid:TerminalBlock_KF301_1x03_P5.00mmJ6
1+15Vmotorpid:TestPoint_Loop_RH-5019TP9
1-15Vmotorpid:TestPoint_Loop_RH-5019TP10
10.35AFuse:Fuse_1812_4532MetricF1
110RResistor_SMD:R_0805_2012MetricR20
110kPotentiometer_THT:Potentiometer_Alps_RK09K_Single_VerticalRV1
11uFmotorpid:C_Film_Panasonic_ECWF_L18.1mm_W9.3mm_P15.00mmC8
122nFCapacitor_SMD:C_0805_2012MetricC5
1270RResistor_SMD:R_0805_2012MetricR19
1330nFCapacitor_SMD:C_0805_2012MetricC9
1470pFCapacitor_SMD:C_0805_2012MetricC7
1BASESmotorpid:TestPoint_Loop_RH-5019TP11
1Dmotorpid:TestPoint_Loop_RH-5019TP4
1D CAPACITORmotorpid:SW_SPDT_Shouhan_MSK12C02SW5
1D IN / OFFmotorpid:SW_SPDT_Shouhan_MSK12C02SW3
1DRIVEmotorpid:TestPoint_Loop_RH-5019TP7
1ERRORmotorpid:TestPoint_Loop_RH-5019TP2
1Imotorpid:TestPoint_Loop_RH-5019TP5
1I IN / OFFmotorpid:SW_SPDT_Shouhan_MSK12C02SW4
1LOOPmotorpid:SW_SPDT_Shouhan_MSK12C02SW2
1MJB44H11Package_TO_SOT_SMD:TO-263-2Q1
1MJB45H11Package_TO_SOT_SMD:TO-263-2Q2
1MOTOR + - shieldmotorpid:TerminalBlock_KF301_1x03_P5.00mmJ4
1Pmotorpid:TestPoint_Loop_RH-5019TP3
1POSITIONmotorpid:TestPoint_Loop_RH-5019TP8
1POT 1 (+) 2 (wiper) 3 (-)motorpid:TerminalBlock_KF301_1x03_P5.00mmJ5
1SUMmotorpid:TestPoint_Loop_RH-5019TP6
1TARGETmotorpid:TestPoint_Loop_RH-5019TP1
1TARGET SOURCEmotorpid:SW_SPDT_Shouhan_MSK12C02SW1
1U6 OUTmotorpid:TestPoint_Loop_RH-5019TP12
1U7 OUTmotorpid:TestPoint_Loop_RH-5019TP13

Similar boards

  • 2 layers100 × 100 mmOpamp, the printed circuit board in 3D

    Opamp

    gallicchio/op-amp-pcb

    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.

    65 parts
  • 4 layers100 × 100 mmAmod b, the printed circuit board in 3D

    Amod b

    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…

    147 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 layers41.2 × 49.9 mmEdu V2.2, the printed circuit board in 3D

    Edu V2.2

    LivioScherrer/MinTurtle

    75 parts
  • 4 layers54 × 106 mmFull pcb, the printed circuit board in 3D

    Full pcb

    TMANTsmith/daisy-esp32-guitar-pedal

    esp23 + daisy guitar pedal

    56 parts1
  • 2 layers117.2 × 65 mmAB V2, the printed circuit board in 3D

    AB V2

    zOnlyKroks/pcb-consortium

    45 partsCC0-1.0
  • 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
  • 4 layers70 × 70 mmAi camera, the printed circuit board in 3D

    Ai camera

    maxlab-io/tokay-lite-pcb

    Tokay AI Camera - ESP32 camera development board

    161 parts130CERN-OHL-P-2.0

Questions

How big is the Motor pid PCB?

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

What parts does the Motor pid use?

110 parts, built around the LM321, CC0805KRX7R9BB104, SS34 and 0805W8F1003T5E (SMT业务专用). 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 Motor pid KiCad files?

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

Can I use the Motor pid design in my own project?

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