The virtual breadboard
In the last rung you learned a hard truth: on a real board the layout itself is a circuit element, and a perfect schematic can still fail. But there is a step before the board — a place where copying a design costs nothing and a mistake costs only a few seconds. SPICE is a program that takes your circuit and computes, by solving its equations, what every voltage and current would actually be. Think of it as a virtual breadboard: you wire up the parts, press run, and instead of smelling smoke you read the answer off a graph.
The name is an old acronym — Simulation Program with Integrated Circuit Emphasis — born at UC Berkeley in the 1970s to help chip designers, who obviously could not breadboard a transistor buried inside silicon. Every serious analog simulator today is a descendant of that original engine. The famous free one is LTspice (from Analog Devices); the open-source engine many tools wrap is ngspice; and most EDA suites (the schematic-and-PCB packages you met last rung, like KiCad or Altium) bundle a SPICE simulator right beside the editor, so you can simulate before you ever lay out copper.
The netlist and the reference node 0
Underneath every prettily-drawn schematic, SPICE actually works from a netlist — the circuit's source code, a plain-text list of components and the points they connect to. When you draw a schematic and press run, the tool quietly compiles your drawing into exactly this list. Each connection point — every junction of wires — is a node, and every component line says, in effect, "a 1.6 k resistor sits between node in and node out."
One node is special. Every voltage is a difference — a reading only means something relative to some agreed zero — so SPICE demands a reference, and it is always named node 0: the ground node. This is the simulator's stake in the ground, the level all other node voltages are measured against. Forget to connect node 0 and the simulator has no anchor and refuses to run; it is the single most common beginner error, and guide 2 is devoted to nodes and ground.
* RC low-pass filter -- a SPICE netlist V1 in 0 AC 1 SIN(0 1 1k) ; source from node 'in' to ground (0) R1 in out 1.6k ; resistor between 'in' and 'out' C1 out 0 100n ; capacitor from 'out' to ground (0) .op ; DC operating point .ac dec 50 10 1Meg ; AC sweep: 10 Hz .. 1 MHz (Bode) .tran 0 5m ; transient: 0 .. 5 ms (the movie) .end
How does SPICE turn that list into numbers? With nodal analysis — the very method you learned by hand. It writes Kirchhoff's current law at every node (currents in equal currents out), stacks those equations into a matrix, and solves for all the node voltages at once. When parts are nonlinear (a diode, a transistor) or time is involved, it cannot solve in one shot, so it iterates: guess, check, correct, repeat until the numbers stop moving. That loop, and what happens when it refuses to settle, is the story of convergence later in this rung.
The core analyses at a glance
A simulator does not have one button; it has a small family of analyses, each asking the circuit a different question. The first is the DC operating point (`.op`): freeze every source at its steady value and ask, "where does everything settle?" This is how you find a transistor's quiescent currents and voltages — its bias, its Q-point — the resting state every other analysis builds on. If the operating point is wrong, nothing downstream can be right.
From there the family fans out. A DC sweep steps one source across a range and plots the result — the natural way to trace a diode's I-V curve or an amplifier's transfer characteristic. An AC analysis shakes the circuit with a tiny signal at many frequencies and reports gain and phase against frequency — that is exactly a Bode plot, drawn for you in seconds. And a transient analysis runs time forward like a movie, so you watch a filter ring, a 555 oscillate, or a supply rail recover after a load step.
Three more are worth knowing by name even at this orientation level. Noise analysis adds up the random hiss every resistor and device contributes and tells you the circuit's noise floor. Monte-Carlo runs the circuit hundreds of times with each part randomly jiggled inside its tolerance, so you see how a real production batch — not one idealized copy — would spread. And a parameter sweep re-runs any analysis while marching one value (say a resistor) through a list, so you can watch a design trend rather than guess. You will use these constantly; they each get proper treatment in guide 3 and beyond.
A sim is only as good as its models
Here is the most important sentence in this rung: a simulation is only as good as its models. A resistor is easy — SPICE knows Ohm's law exactly. But a diode, a transistor, an op-amp? Behind each is a device model: a bundle of equations and numbers that approximate how the real part behaves. The simulator does not know your part; it knows the model you handed it, and it will faithfully compute the consequences of that model — flaws and all.
This is why reputable manufacturers publish a SPICE model — often a `subcircuit` (a little pre-wired block of internal parts) — for each serious chip, right beside its datasheet. Drop in the real vendor model for that exact op-amp and the sim inherits its true offset, bandwidth, and slew limits. Use a generic ideal model instead and you may get a beautiful result a real part can never deliver. The cardinal sin is trusting a number that came out of a model nobody validated.
What SPICE cannot see
Sooner or later a simulation will refuse to finish — "convergence failed" or "time step too small." This is rarely a broken circuit; usually you have asked the solver to do something physically awkward, like balance an ideal source against an ideal switch with no resistance anywhere to absorb the contradiction. Coaxing a stubborn sim is a skill, not a panic. The full toolkit is guide 5, but here is the spirit of it.
- Read the actual error. SPICE almost always names the node or the time where it choked — start there, not at the top.
- Add a tiny dose of reality where the netlist is too ideal: a small series resistance on a perfect source, or a small capacitance across a node, gives the solver something physical to grip.
- Help it find the starting point: set initial conditions, or let SPICE use gentler source/gmin stepping to walk into the operating point instead of leaping.
- For a fast transient, cap the maximum time step so the solver cannot stride over a sharp edge and lose the plot.
- Loosen tolerances only as a last resort, and re-tighten them once it runs — a sim that converges to the wrong answer is worse than one that honestly fails.
And now the deepest honesty of all, the reason this rung exists. SPICE solves the schematic you typed — and the schematic is a fiction in which every wire is perfect. It cannot see your layout: the stray capacitance between two close traces, the inductance of a long ground return, the resistance of a thin track. Those parasitics are invisible to a default simulation yet decisive on a real board, which is exactly why a circuit that purrs in SPICE can squeal on the bench. Simulation catches blunders cheaply; it does not replace building and measuring — it earns you the right to build with confidence.