■ FIGURE 11. LM741 macromodel schematic.
■ FIGURE 10. LTspice netlist
for NV_SPICE_ 21.as c.
viewing and editing (with a bit of caution). These files are vaguely familiar as
we can recognize LTspice code. Hint:
Any line starting with an asterisk is a
comment ignored by LTspice, and lines
starting with a dot are instructions to
the simulator. The other lines represent
nets that connect the nodes together,
for example, “R5 Vload 0 100”
indicates that resistor R5 is connected
from node “Vload” to node “0” (
common) and has a value of 100 ohms.
Other elements in an LTspice project
are also created with text listings — for
example, the macromodel graphic
symbol ( NV78L05.asy) and the sub-circuit ( NV78L05.lib) so take a look at
these with WordPad. For advanced users
of LTspice, it’s possible to create, edit,
or just hack existing files as needed.
Many LTspice device models
supplied by LTC are proprietary binary
files that can’t be viewed or edited,
but do have enhanced features to run
LTspice much faster and with more
accurate simulation than open-source
SPICE macromodels.
for LTspice. Install the
LM741 op-amp model to
your LTspice library by
follow the steps in the
sidebar. In Figure 11, we
see the macromodel circuit that was
lifted from the datasheet (included in
this article’s download.)
Once again, we’ll rig up the actual
IC part on the solderless breadboard and
compare results to LTspice. With only a
9V battery and some resistors, an op-amp won’t do very much unless you
also have access to an audio sinewave
generator and a ‘scope. We are limited
to just making DC measurements on
the breadboard with a DMM. The
breadboard schematic is shown in
Figure 13; the LTspice circuit in Figure
14; and our results in Figure 15.
■ FIGURE 12. Op-amp breadboard
schematic.
depending upon where we inject the
input signal. The output may have a DC
component (by design or by limitation
of the op-amp’s internal circuit). Oddly,
op-amps don’t have a ground or
common terminal, and that point is
important when understanding the
circuit in Figures 12 and 13. A
comforting fact is that an op-amp’s
circuit gain is determined by the ratio
of just two resistors:
Op-Amp Refresher
Inverting Gain Av = Rf/Rin
Non-Inverting Gain Av = 1 + (Rf/Rin)
Quick! Name A Famous
Op-Amp IC
Before we dive into the circuit
shown in Figures 12 and 13, here’s a
very quick op-amp theory refresher.
Recall that an op-amp behaves in a
circuit as defined by external
components (notably the feedback
path resistors) up to the point where
the op amp runs out of voltage gain
(amplification) which happens to all
op-amps sooner or later. If the op-amp
is not biased correctly, the supplies are
too small or too big; if the load is too
heavy at the op-amp’s output, the
signal will distort or not appear at all.
Popular configurations with an op-amp
are either inverting or non-inverting,
Can you predict the op-amp’s
output voltage from the circuit? Hints:
Rf = R5 + R6, and Rin = R7, the bias
string (R1, R2, R3, R4) generates a two
volt (and an unused seven volt) DC
input “signal,” but are dependant
upon the health of the battery and
actual resistor tolerances. Compare
your work with the data in Figure 15.
Given your age and exposure to
electronics you may guess differently,
but for a couple of decades the only
answer was an LM741 (or its relatives).
It has stood the test of time and we’re
going to use the LM741 here as it fits
our needs well; it’s robust and cheap,
and we have a good macromodel of it
Sweeping SPICE
Changes
The solderless breadboard circuit
(Figure 12 again) is recreated in LTspice’s
schematic editor (or by downloading
the file NV_SPICE_ 22.as c); see Figure
January 2009 57