existing symbol and save
it under a new name in
your sym/private folder;
remember to change some
of its data first.
For the LM741 op-amp,
use the LT1013 symbol as
Launch LTspice and
resize the frame to about
1/4 the screen size by using
the mouse and grabbing
the frame's borders. Next,
do the same for Windows
Explorer, so that both are
visible on your screen.
Search the directory tree to find the
LT1013.asy file in the sym/opamps
folder, and finally drag it to the
LTspice window, where it will open
in the LTspice symbol editor (see
Maximize the LTspice window and
use Ctrl-A (or navigate from the Edit
drop-down menu) to invoke the
■ FIGURE B
The required model is called
LM741.mod, and it should be saved to
your sub/private folder and renamed
Nat.lib. If you collect other model sub-circuits from National Semiconductor,
append them to the same file using a
text editor such as Wordpad, creating
a single file for one vendor. In the sub
folder, you will find several LTC*.lib
(where is a digit) files, containing all
the sub-circuits for Linear Technology.
Open one with Wordpad to see how
the individual devices are presented.
Hint: Look for the tags:
end in a non-functioning component
Most (if not all) semiconductor
houses provide SPICE macromodels
of their products which can be run in
various flavors of SPICE (Pspice and
Hspice are popular).
Most of the time there won't be a
graphical symbol for the desired
device, so we must make one by
either drawing it from
scratch or modifying an
existing symbol. The Copy
and Paste method is preferred for obvious reasons!
If given a choice, use the
Pspice version of the
macromodel, as LTspice is
based on Pspice. There are
third-party companies that
so you may find legal
disclaimers or owner's data
as text comments in the
files that you download.
Before You Begin
SUBCKT (devicename) 1 2 3 4 5 6
( 4) Close And Re-Open LTspice
I spent quite a bit of time trying to
make my new components play in
LTspice before I discovered that the
LTspice program must be closed and
reopened to activate these edits!
■ FIGURE C
■ FIGURE D
Close LTspice and open
Windows Explorer and navigate to the
Programs directory on the hard drive.
Drill down to LTC, then to SwCADIII,
and finally to lib; compare your file
structure to Figure A.
(1) Create Private Folders
Add a new folder (sometimes
called a sub-dir) in the existing sub
folder and call it Private; create a new
folder in the existing sym folder and
also call it Private to contain your
private collection of components.
By doing it this way, your installation
of LTspice will follow the practice of
other users, which will help when
you share your work with them.
Symbol Attribute Editor (Figure C).
Select the SpiceModel data and
retype "Private\ Nat.lib"; select Value
and retype "LM741/ns", again for
Value2; and finally edit the Description
to "Operational Amplifier" (Figure D).
Hit OK and from File, select "Save As"
and change to your sym/private
folder. Save the new symbol as
" LM741.asy". You now have a new
( 5) Check Your Work
Start a new schematic
in LTspice and place your
new component. For a very
quick sanity check, also
place a ground symbol and
connect all the new
component pins together
and to ground (Figure E).
Add the ".op" spice
directive and run the
simulation. If all is well,
LTspice will run the circuit
without any error
messages (the output data
window will be meaningless). On first use, this
process will seem frustratingly complex. However,
after doing a few you will quickly
learn the steps and be able to add
new components effortlessly. If you
are simulating the examples used in
this series, you will need to install the
components from the Nuts & Volts
website download for these articles.
(2) Create A Symbol
The easiest method is to open an
( 3) Obtain A Macromodel (From
The Manufacturer Or Third Party)
Using a search engine, locate
the SPICE model of the part you
need. In this example, I found the
file on the National Semiconductor
site ( http://tinyurl.com/5g2jb9).
■ FIGURE E
January 2009 59