Article: Andy Collinson
Drawing the schematic
All the information
presented here is my own work and not from Linear Technology. This advice does not replace the information given by Linear
Technology, the LTWiki
Yahoo LTspice User group
. Please also read my sites
Start LTspice and select New Schematic from the File Menu. Components can be selected in two ways. Either from the
edit menu, or by pressing F2. The F2 key will give access to all the components in LTspice, frequently used parts
like the resistor,capacitor, inductor and ground symbol can be selected from the top menu line.
Also shown on the edit menu are general navigation keys. For example, key F3 draws a wire, F4 allows you to label
a net, F5 will delete a wire or symbol, F6 copies a component and F7 allows you to move a component. To perform
the same action on a group of components, first select the action e.g. F5 for delete, then hold down the left mouse button
and drag a rectangle around the components to be edited. Once mouse button is released, the action will be performed.
If you make a mistake, F9 will undo previous action.
After selecting a component, you have the option to place another of the same type press Escape to cancel this.
Components can be moved around by pressing F7. Wires are drawn by pressing F3 or from the edit menu.
Other components are found in the main component menu, by pressing F2, or the icon on the menu bar as shown above.
Use the scroll bar and then click on voltage generator as shown above. The triangle symbol is the ground symbol or 0 Volt line in the circuit. Every schematic needs a ground as a reference
and it is always labelled as node 0.
Edit Component Values
After re-arranging components, press F7 and move the component, F5 deletes a wire or component and F3 draws a wire.
the simple series circuit is drawn, as above. To edit the value of a component right click its symbol and enter a new resistance value.
The designation can also be changed with a right click, e.g. right click over R1 to change the designation.
Operating Point Analysis
An operating point analysis (.op) will provide a DC analysis of the circuit and results will appear in a dialog box.
There are three ways to add the .op analysis to your circuit; from the simulation menu or by pressing "s" or "t" on the
keyboard. If you press "t", then change the radio button to SPICE directive and add the text .op as shown below. Note
that pressing "s" automatically selects a spice directive:
Running the Simulation
To run the simulation click on the running man icon
or press the appropriate hotkey
if you remapped this function.
The DC operating point is calculated with all capacitances open circuited and all inductances short circuited. The
results will appear in a dialog box, as shown below:
You may be surprised to see that the current from the power supply has a negative value. This is because LTspice assumes
conventional current flows from positive to negative terminal; but actual electron flow is from negative to positive terminal.
This is why the minus "-" sign is used.
Every circuit contains a netlist. The netlist is an ASCII text file describing the circuit. The first line is always the title, and the other lines
will contain node numbers and circuit descriptors for each component. The netlist can be displayed from the View Menu, SPICE netlist.
The netlist for the simple dc circuit is shown below:
R1 N002 0 15k
R2 N001 N002 5k
V1 N001 0 20V
The title line includes the PATH to where the circuit was loaded from, ending with the file name, basic_dc.asc
Lines 2 and 3 contain resistor statements and line 4 is the voltage source V1. The ground terminal is always node 0 in any circuit.
The next line contains the simulation command, followed by some options, the final line is an .end statement. More about spice
netlists can be found in the Spice Primer article.
Displaying Node Numbers in the Status Bar
After an .op simulation has been run, when you move your mouse cursor over a wire, the voltage at that node will appear on the status
bar. This is shown on the screenshot below. If you move your mouse pointer over a component the current and power dissipated in that
component will also be displayed. For example, hovering over R1 will show the current is 1mA and power dissipation in R2 is 15mW.
Spice error Log
After each simulation, or if something went wrong a spice error log is created. This is available from the view
menu or by shortcut keys Ctrl+L.
Operating Point Data Labels
Each connection in a circuit is given a node number. Sometimes it is useful to display the numeric dc value of a node.
To label a node, after the simulation has run, double click the desired wire segment as shown below, the operating
point voltage of the node will be displayed:
Voltage and Current Labeling
By default the voltage of a node will be displayed. However you can display current through the node or use a numeric
expression. Right click over the current label and you will see a screen like below:
The default expression is the dollar character, "$" which will display voltage at that node. However, the expression may be edited
to any equation, including currents, powers or even the voltage of a specific node. Once placed, these data labels may be moved or
copied to other nodes in the circuit.
To display, say current through R1, delete the $ and click on the I(R1) as shown above. Click on OK and current through R1 will
be displayed. You can even double click the vertical wire segment, which will show voltage of the node. The screenshot below
shows the modified circuit, now displaying both voltage and current at node 2.
Values between Nodes and Decimal Values
So far, the examples have been easy and all answers were integers. Now consider the circuit below:
When run you will have a table of results, click the close button and the results will be
displayed on the schematic, see below:
As before clicking on wire segments allow you to enter an expression. For the node Vout this is simply
$. Now look at the junction called VR2. Right click to edit the expression. A dialogue box
similar to below will be displayed:
To display the voltage across resistor R2, it is simply the difference between the node
voltages. Hovering the mouse cursor near a wire the node will be displayed on the bottom
left of the main LTspice window. As the topmost terminal is displayed as n002, and the lower
connection is Vout then entering the expression: V(n002) - V(vout) as shown above will
compute the voltage across R2.
An alternative method is to use comma separated node values as shown above. This is just V,
for voltage then the node numbers separated by a comma and encased in parenthesis. Whichever
method it is helpful to create a text marker, press "t" and enter "VR2" to remind you what is
a fraction, then you could enter an expression
to limit the amount of digits. For example:
round($*1k)/1k ; display no more than 3 digits
(typically automatically expressed in engineering format).
round(I(R1)*1k)/1k ; same display format as above, but
expression is of the current through R1.
round(V(1,2)*1k)/1k ; same format, but expression is of
the voltage difference between nodes 1 & 2.
voltage sweep with diode
This and other useful information about LTspice is available at
the LTwiki web site: http://www.ltwiki.org
Operating Point Data