■ FIGURE 8. LM7805
process secrets). We all benefit
directly from this effort. Wikipedia
has a nice write-up for further
reading ( http://tinyurl.com/5z2jvv
Can I Make My
■ FIGURE 7. LM78L05 macromodel schematic.
that lead me to do a little reverse engineering. For the exercises here, use my
NV78L05 and NV7805 components
which you can add to your LTspice
model library (see the sidebar again.)
More About Sub-Circuits And Models
Now that we have a macromodel diagram, why can’t we
build that circuit on a breadboard? Perhaps we can, and it
may even work! I hedge my bets
because the breadboard is quite
different from a silicon wafer.
Device model simulation is the
only practical way to predict how silicon will work, and building the silicon
is the only practical way to prove it.
Both are costly and complicated.
Before we move on, take a look at
Figure 9 — a generic voltage regulator
block diagram. Using this as a
template, can you identify circuitry
blocks in the macromodels? (Look at
Figures 7 and 8 again.)
We can drop that simple three
terminal symbol on to our SPICE
schematic, just as we can drop the
three terminal parts onto the
breadboard. In either case, we don’t
have to wrangle with the internal
circuit diagram or even give it much
thought. The symbol placed in our
LTspice diagram is a SPICE sub-circuit,
representing the more complex circuit.
It removes a lot of clutter from our
schematic, and when we run the simulation LTspice “unpacks” all sub-circuits
and runs the whole thing.
The internal diagrams
found in datasheets are
often called a macromodel.
The important point is that
for our needs, the macromodel is equivalent to the
real device. This leap of faith
is a little confusing but we
would see why it’s done if
we could look over the
shoulder of the IC design
engineer that created these
and other IC parts.
Firstly, the IC designer
56 January 2009
works with a different set of
models (to our macromodels) that
exist at the silicon transistor level.
These device-level models are based
upon the IC fabrication process used to
build physical parts. Much of this is proprietary information and not of much
value to us or anyone else designing at
the component or board level. To
make reliable ICs that meet or exceed
the published datasheet specs requires
thorough testing under all extremes of
the IC fabrication process — often known
as “process corners.” Again, this is
proprietary and IC process-dependant. I
bring it into the discussion to illustrate
that as hobbyists we use or create
component level diagrams that, in turn,
use ICs which are represented by their
macromodels. The original IC design was
done (often with different simulation
tools) at the device level. A lot of work
goes into creating good macromodels
(which also avoid giving away factory
Netlist Vs. GUI —
Looking At Source Codes
LTspice is very easy to use
(compared to earlier SPICE software)
because it has a GUI Graphical User
Interface that works with the Microsoft
Windows Operating System. If you are
interested in reading LTspice project
files, all you need is a text editor such
as WordPad (bundled with Windows).
Within LTspice, there is also a netlist
viewer that displays the traditional
SPICE netlist, and a tool to
export it as a net file.
Load the file
NV_SPICE_ 21.as c, then
select SPICE Netlist from
the View pull-down menu
which will look like Figure
10. The coded lines should
be familiar — it’s text
instructions that mimic what
we did with the schematic
editor to create the circuit.
Using WordPad, other project files can be opened for
■ FIGURE 9. Voltage
regulator block diagram.