Lesson plan

SPICE simulation lesson plan

What a circuit simulator really does, on the SPICE engine Mokxi runs underneath: netlists, the operating point, transient and AC analysis, sweeps, models from datasheets, and a preamp verified before it is built.

7 chapters, 7 lessons, about 6 hours, no board. Every lesson runs in the browser, with nothing to install.

The unit

Objectives and materials

By the end, students can

  • A circuit as text: nodes, ground and one line per part.
  • Every node at DC, and where power-on differs from .op.
  • The circuit in time, read in multiples of tau.
  • A Bode plot proved point by point.
  • 60 mV a decade and a Zener's knee.
  • hFE, Vce(sat), GBW and the .model card.
  • Predict, verify and change a preamp before you build it.

Materials for the whole unit

  • Capacitor
  • DC voltage source x 3
  • Function generator
  • Multimeter x 3
  • Op-amp
  • Oscilloscope
  • Resistor x 6
  • Transistor (NPN or PNP) x 2
  • Zener diode

Every part is already on the simulator’s bench, so there is nothing to buy or hand out. The counts are the most any one lesson uses, if you build it on real breadboards too.

Chapter 1. About 1 h

Netlists

A circuit as text: nodes, ground and one line per part.

LessonTimeWhat students do
Netlists: a circuit as textRead and write the text every SPICE engine runs: nodes, ground as node 0, one line per part, SPICE's 0 V ammeter, and the same divider as a canvas and as a deck.60 min
  1. Run it: the canvas is a deck
  2. Edit a line
  3. Add a line, add a part
  4. Solve the new deck
  5. SPICE's ammeter
  6. Run the deck itself

Materials

  • DC voltage source
  • Multimeter x 2
  • Resistor x 3

Check for understanding

Each student finishes "Netlists: a circuit as text" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Run the deck itself".

Chapter 2. About 50 min

Operating point

Every node at DC, and where power-on differs from .op.

LessonTimeWhat students do
The operating pointWhat .op solves: every node voltage of a transistor stage at once, how a bias change moves it, Mokxi's Shift+O readout, and the one place power-on and SPICE's .op disagree.50 min
  1. Run it: the base node
  2. The emitter node
  3. The collector node
  4. Move the point
  5. Where power-on and .op differ

Materials

  • Capacitor
  • DC voltage source x 2
  • Multimeter x 3
  • Resistor x 5
  • Transistor (NPN or PNP)

Check for understanding

Each student finishes "The operating point" on their own, without opening the hints. The simulator checks 5 of its 5 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Where power-on and .op differ".

Chapter 3. About 1 h

Transient

The circuit in time, read in multiples of tau.

LessonTimeWhat students do
Transient analysisThe circuit stepped through time: an RC fed a square wave, the time constant against the half period, what one tau, two and five look like, and the same run written as a .tran deck.60 min
  1. Run it: too fast to charge
  2. One tau per half cycle
  3. Five tau: all the way
  4. Change R instead
  5. Change C
  6. Write the .tran

Materials

  • Capacitor
  • Function generator
  • Oscilloscope
  • Resistor

Check for understanding

Each student finishes "Transient analysis" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Write the .tran".

Chapter 4. About 50 min

AC sweep

A Bode plot proved point by point.

LessonTimeWhat students do
AC sweepWhat an .ac analysis computes and how a scope proves it point by point: an RC low-pass a decade above its corner, at the corner, below it, a moved corner, and the Bode plot in the Analysis sheet.50 min
  1. Run it: a decade above the corner
  2. At the corner
  3. In the passband
  4. Move the corner
  5. The whole plot at once

Materials

  • Capacitor
  • Function generator
  • Oscilloscope
  • Resistor

Check for understanding

Each student finishes "AC sweep" on their own, without opening the hints. The simulator checks 5 of its 5 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "The whole plot at once".

Chapter 5. About 50 min

Parameter sweeps

60 mV a decade and a Zener's knee.

LessonTimeWhat students do
Parameter sweepsStep one value and watch another: a transistor's current against its base voltage, 60 mV per decade, a Zener found by sweeping its supply, and the Analysis sheet's DC and parameter sweep.50 min
  1. Run it: the first point
  2. Sixty millivolts
  3. Another decade
  4. Sweep a supply: below the knee
  5. Above the knee

Materials

  • DC voltage source x 3
  • Multimeter
  • Resistor x 2
  • Transistor (NPN or PNP)
  • Zener diode

Check for understanding

Each student finishes "Parameter sweeps" on their own, without opening the hints. The simulator checks 5 of its 5 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Above the knee".

Chapter 6. About 50 min

Models from datasheets

hFE, Vce(sat), GBW and the .model card.

LessonTimeWhat students do
Models from datasheetsTurn datasheet numbers into model parameters: hFE into beta, Vce(sat) at its test condition, an op-amp's gain-bandwidth product checked at its own bandwidth, and the .model card behind it all.50 min
  1. Run it: the card as shipped
  2. hFE from the datasheet
  3. Vce(sat) at its test point
  4. Gain-bandwidth product
  5. The .model card

Materials

  • DC voltage source x 2
  • Function generator
  • Multimeter
  • Op-amp
  • Oscilloscope
  • Resistor x 6
  • Transistor (NPN or PNP) x 2

Check for understanding

Each student finishes "Models from datasheets" on their own, without opening the hints. The simulator checks 5 of its 5 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "The .model card".

Chapter 7. About 50 min

Boss build

Predict, verify and change a preamp before you build it.

LessonTimeWhat students do
Boss: verify before you buildDesign a microphone preamp on paper, predict its operating point and gain, verify every number in the simulator, then change the design to a new spec and verify again before a single part is bought.50 min
  1. Predict on paper
  2. Verify the operating point
  3. Verify the follower
  4. Verify the gain
  5. New spec: twice the gain

Materials

  • Capacitor
  • DC voltage source
  • Function generator
  • Multimeter x 2
  • Op-amp
  • Oscilloscope
  • Resistor x 5
  • Transistor (NPN or PNP)

Check for understanding

Each student finishes "Boss: verify before you build" on their own, without opening the hints. The simulator checks 5 of its 5 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "New spec: twice the gain".

Your class

Teach this unit as a class

Start a class from this course and its 7 lessons are assigned in one go, in order. Students join with a six-character code or printed login cards, and each one’s work comes back to you.

The class tools are free for 30 days for one class of up to 20 students, with no card. The lessons themselves are free either way.