■ FIGURE 2. Schematic for
NV_SPICE_ 11.as c.
thought to be 9V, but it
sags under load because it
has internal resistance. A
9V battery model in SPICE
would be created from
two elements: a perfect
voltage source and a
series resistor. Together
these simulate the real
world 9V battery for our
purposes. If the real world
battery was in continuous
use, the initial voltage
would fall until the battery is exhausted. Perhaps that is chosen to be
around 7V. Later, we can simulate this
in SPICE by running the program twice
(once at 9V and again at 7V) to judge
what a nearly dead battery does in
our circuit. In summary, our SPICE
program must model these secondary
characteristics of the real world battery
to be useful and believable as a tool.
For advanced SPICE users, most of the
time is spent on refining models and
worrying about minute but important
behavior of real world components!
The old computer adage is “Garbage
In, Garbage Out,” and that holds true
for SPICE.
battery, and some resistors (1W 1%
10Ω, 1/4W 1% 100Ω, 1/4W 1% 1K,
and 1/4W 1% 10K — a few of each).
For this exercise, a small solderless
protoboard is very handy (Figure 3).
Start by measuring and recording
the battery voltage. It should be 9.0V,
right? Don’t be surprised if a fresh
battery reads a little higher. I now get
9.160V, but the first time through the
exercise I got 9.477V! Now load the
battery with a 1K resistor. The battery
is still as before, but our meter reads a
little less (I get 9.120V). Change the
resistor to 100Ω, read it again, and it
drops more (I get 8.924V). Now try
10Ω, and make it a one watt size as a
fresh 9V battery can toast a single
1/4W resistor! Hmm, the battery
voltage is dropping quite a bit (I get
7.605V and declining). Disconnect the
battery! Our real world battery was
Ohm’s Law
■ FIGURE 3. Breadboard set-up.
We know that the
relationship between voltage and
current in a DC circuit is governed by
Ohm’s Law. Lowering the
resistance increases the
current and vice versa.
Intuitively, we also know
that two equal value series
connected resistors will
divide the voltage equally.
The total circuit current
drops to one half that of
using just one resistor.
Likewise, placing two
resistors of equal value in
parallel will double the
circuit current. If your DMM
—- Operating Point —-
and battery are still handy, try some of
these intuitive experiments (resistors of
the same value placed in series and
parallel). Use 10K resistors to minimize
the effect of internal battery resistance
and to save that battery for future
experiments. Next, we’ll build the
same circuits using their SPICE equivalents, run the simulation, and extract
the results. Because these are simple
DC circuits, we ask LTspice to
calculate the initial conditions (using
the SPICE directive “.op”), and the
simulation takes no time at all to
finish. With NV_SPICE_ 11.as c, start
the simulation by hitting Run. A new
window will pop up (see Figure 4)
with our results. What does this tell
us? The item called n001 is a circuit
Net (a connection of two or more
components), and any connection
point on a Net is called a Node. It is
the connection from the battery to the
resistor. In the real world, we’d read it
by touching the meter probe with the
other meter lead going to common
(sometimes called ground). This is an
important point; all SPICE schematics
must have one common connection.
For ease of drawing, we can use the
common symbol multiple times to
mean all are connected to the same
Net. Because there’s a V in the
description, we are measuring voltage
and it’s just under 9V. The other two
lines are currents (I symbol) and are
the current in the resistor (R1) and the
battery (V1). As simple as this seems,
it tells us a great deal. Firstly, we have
eight digits after the decimal, indicating we know the value down to tens
of nano-amps. SPICE has this level of
precision math which is needed in
advanced topics, but makes our simple
circuit results a bit confusing to read.
Next, we see that the battery current
is negative. We didn’t put the battery
in backwards; what does this mean?
Conventional Current is said to
flow from positive to negative, but
electron flow is from negative to
positive. SPICE tells us that the
electron current is
flowing from the
V(n001):
I(R1):
I(V1):
8.88889
0.00888889
-0.00888889
voltage
device_current
device_current
■ FIGURE 4.
Results table for
NV_SPICE_ 11.as c.
54
December 2008