LTspice
LTspice is a SPICE-based analog electronic circuit simulator computer software, produced by semiconductor manufacturer Analog Devices. It is the most widely distributed and used SPICE software in the industry. Though it is freeware, LTspice is not artificially restricted to limit its capabilities.
Overview
LTspice provides schematic capture to enter an electronic schematic for an electronic circuit, an enhanced SPICE type analog electronic circuit simulator, and a waveform viewer to show the results of the simulation. Circuit simulation analysis based on transient, noise, AC, DC, DC transfer function, DC operating point can be performed and plotted as well as fourier analysis. Heat dissipation of components can be calculated and efficiency reports can also be generated. It has enhancements and specialized models to speed the simulation of switched-mode power supplies in DC-to-DC converters.LTspice does not generate printed circuit board layouts, but netlists can be exported to PCB layout software. While LTspice does support simple logic gate simulation, it is not designed specifically for simulating logic circuits.
It is used by many users in fields including radio frequency electronics, power electronics, audio electronics, digital electronics, and other disciplines.
LTspice/SwitcherCAD III
In 1999, LTspice III was released, the first public release. It is designed to run on Windows 95, 98, 98SE, ME, NT4.0, 2K, XP. This version is no longer available for download from Analog Devices. Initially, LTspice III was internally released to Linear Technology's Field Application Engineers in October 1999, who then gave it away during customer visits via CDROM media. In June 2001, it was released for public downloading from the Linear Technology website. Originally, LTspice/SwitcherCAD ran only on Microsoft Windows platforms, but since 2003 it is able to run under the Wine Windows compatibility layer on Linux.LTspice IV
In 2008, LTspice IV was released. It is designed to run on Windows 2K, XP, Vista, 7 with a processor that contains a minimum instruction set similar to a Pentium 4 processor. Though IV is still available for download, it is no longer maintained. LTspice was originally called SwitcherCAD, but that name was removed when IV was released. A native Apple macOS 10.7+ application was introduced in 2013.LTspice XVII
In 2016, LTspice XVII was released, and is currently the latest version. It is designed to run on 32-bit or 64-bit editions of Windows 7, 8, 8.1, 10, and macOS 10.9+.Summary of major changes from LTspice IV to LTspice XVII are:
- Add 64-bit executables.
- Add Unicode characters in schematics, netlists, plot.
- Add device equations for IGBT, diode soft recovery, arbitrary state machine.
- Add user-defined symbol and library directory search path settings to the LTspice control panel.
- Add schematic thumbnail and preview support on Microsoft Windows.
- Add editors for most SPICE commands.
- Add multi-monitor support.
Updates
Every month, minor updates are released by Analog Devices for software fixes, updates for existing device models, and new device models. A user can manually update their installed copy by doing a "Sync Release" from the pulldown menu. LTspice has a "Show Change Log" screen that lists every change to the software and models since LTspice XVII was released. LTspice does not show any subversion numbers as many software programs do, though the software "build date" could be treated as such. For example, on 64-bit Windows, the "about" screen shows "LTspice XVII" then a build date and time.
Device models
LTspice ships with thousands of third-party models, as well as macro models for Analog Devices and Linear Technology parts. In the device library, Analog Devices part numbers start with "AD", and Linear Technology parts start with "LT".LTspice allows a user to choose from device models that ship with LTspice, as well as allows the user to define their own device model, or use 3rd party models from numerous electronic component manufacturers, or use a model from a 3rd party device library. Starting with LTspice XVII, control panel settings were added to allow the user to specify search directories for 3rd party device symbols and libraries. See option setting at LTspice -> Tools -> Control Panel ->
Sym. & Lib. Search Paths
.The text that describes intrinsic SPICE models can be placed directly on an LTspice schematic by using the spice directive
.op
button. The advantage of this method is the 3rd party model is self-contained as part of the schematic when you distribute the schematic file. The same .model
can also be copied to an ASCII text file on your computer too, but it won't "travel" with a schematic when you copy it to another computer. For example, the following diode part numbers aren't included in the current LTspice device library:Number conventions
In LTspice, numeric values can be expressed in four different ways: integer, real, scientific e-notation, scale factor notation.If the first character after a number is not the letter "
e
" for scientific e-notation or a scale factor suffix, then trailing characters are ignored. For example, 5 is treated the same as 5V / 5Volt / 5Volts / 5 Hz / 5Hertz.Scale factors
Integer and real numbers supports a scale factor suffix. These are based mostly on metric conventions.The suffix can be upper / lower / mixed case, known as case insensitive. For example, 1MEG / 1meg / 1Meg represents 1000000; 1k / 1K represents 1000.
Any appended text after the suffix is ignored. For example, 2MegHz / 2MegaOhm represents 2000000; 3mV / 3mOhm represents 0.003; 4uF / 4uHenry represents 0.000004.
In LTspice, any suffix can replace the decimal point of a real number, a common format for printed schematics. For example, 4K7 represents 4700, 1u8 represents 0.0000018.
SPICE Suffix | Metric Name | English Name | Power of 10 | Numeric Value | Notes and Common Mistakes |
T | tera | Trillion | 1012 | 1000000000000 | |
G | giga | Billion | 109 | 1000000000 | |
MEG | mega | Million | 106 | 1000000 | Wrong use of m / meg / mil are common mistakes in all SPICE programs |
K | kilo | Thousand | 103 | 1000 | |
m | milli | Thousandth | 10−3 | 0.001 | "1m" & "1M" doesn't mean "1 megaohm, instead "1MEG" is correct |
u or µ | micro | Millionth | 10−6 | 0.000001 | Older SPICE software does not support the µ character |
n | nano | Billionth | 10−9 | 0.000000001 | |
p | pico | Trillionth | 10−12 | 0.000000000001 | |
f | femto | Quadrillionth | 10−15 | 0.000000000000001 | "1f" & "1F" doesn't mean "1 farad, instead "1" is correct |
mil | thou | 25.4 x 10−6 | 0.0000254 | mil is a thousandth of an inch which is 25.4 μm |
Compatibility
Although LTspice was originally based upon Berkeley SPICE 3f5 source code, it no longer is, thus some of its features may create non-portable files. Competitor SPICE programs have non-portable features too.LTspice features that may not be supported by some SPICE programs:
- Unicode characters in schematics, netlists, plot. This is a new feature in LTspice XVII, thus older versions of LTspice don't support Unicode.
- Unicode
µ
micro character as an alternate symbol for ASCIIu
letter, which used as the micro scale factor. See option setting at LTspice -> Tools -> Control Panel -> Netlist Options ->Convert 'µ' to 'u'
. - Unicode
−
minus character as an alternate symbol for ASCII−
minus/dash/hyphen character. - Suffix replacing decimal point. See option setting at LTspice -> Tools -> Control Panel -> SPICE ->
Accept 3K4 as 3.4K
.
- LTspice does not support scale factors of "atto" 10−18, "peta" 1015, or "exa" 1018.
- HSPICE supports
'a'
for "atto" 10−18, which must be replaced with'e-18'
to be compatible with LTspice and other SPICE software. - HSPICE supports
'X'
as a synonym for "meg" 106, which must be replaced with'e6'
or'MEG'
to be compatible with LTspice and other SPICE software.Node name conventions
Label Net
tool button or F4
key. The "Label Net" wizard has three choices for a label, two predefined graphical symbols, or a user-defined node/net name.The two graphical symbols represent:
-
GND
- The ground symbol assigns a node with a special global net name of "0". -
COM
- The COM symbol assigns a node with a net name of "COM", which doesn't have any special significance.
A user-defined name supports two optional features that can be prepended to the text name:
-
_
- An underscore causes an overbar to be placed above the entire name, which commonly means an active low signal. For example, "_RESET" is shown on the schematic as "". -
$G_
- This means a node is global, no matter where the name occurs in the circuit hierarchy. For example, "$G_ENABLE" / "$G_ERROR". The ground symbol is treated in a similar way, but it does not have "$G_" prepended to it.
-
None
- Bare text. This is the default. -
Global
- "Rectangle" around the text. This is automatically shown for a global net name that starts with "$G_". -
Input
- "Rectangle with triangle end" around the text. This is chosen by the "Port Type" field in the "Label Net" wizard. -
Output
- "Rectangle with triangle on other end" around the text. This is chosen by the "Port Type" field in the "Label Net" wizard. -
Bidirectional
- "Rectangle with triangle on two ends" around the text. This is chosen by the "Port Type" field in the "Label Net" wizard.File format
LTspice filename extensions:
-
asc
- schematic. It consists of a netlist based on SPICE text-based commands. -
asy
- electronic symbol shown in a schematic. -
cir
- external netlist input. -
fft
- FFT binary output. -
lib
- model library subcircuits. -
plt
- waveform viewer plot settings. -
raw
- binary output, optional ASCII output. -
sub
- subcircuit. -
lib
/sub
/mod
/model
- device model. While any file extension is allowed, users tend to gravitate towards common ones.Example
- LTspice_RC.asc
- LTspice_RC.plt
Schematic file
asc
".The following example shows the contents from a small LTspice schematic file for a simple RC circuit with four schematic symbols: V1 is 10 volt DC voltage source, R1 is 1K ohm resistor, C1 is 1 uF capacitor, ground. The bottom three TEXT lines are: 1) a transient simulation directive with a stop time parameter of 10 ms a SPICE directive to set the initial condition of RC "out" net to zero volts, and 3) a text comment.
Version 4
SHEET 1 880 680
WIRE 224 96 128 96
WIRE 128 160 128 96
WIRE 224 192 224 176
WIRE 288 192 224 192
WIRE 224 208 224 192
WIRE 128 288 128 240
WIRE 224 288 224 272
WIRE 224 288 128 288
WIRE 224 304 224 288
FLAG 224 304 0
FLAG 288 192 OUT
IOPIN 288 192 Out
SYMBOL res 208 80 R0
SYMATTR InstName R1
SYMATTR Value 1K
SYMBOL cap 208 208 R0
SYMATTR InstName C1
SYMATTR Value 1uF
SYMATTR SpiceLine V=50
SYMBOL voltage 128 144 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
WINDOW 0 7 10 Left 2
WINDOW 3 -20 57 Left 2
SYMATTR InstName V1
SYMATTR Value 10V
TEXT 120 344 Left 2 !.tran 10mS
TEXT 120 376 Left 2 !.ic v=0V
TEXT 8 72 Left 2 ;RC Circuit - LTspice - Wikipedia
Plot file
LTspice waveform viewer plot settings are stored as an ASCII text file with a filename extension of "plt
". If this optional plot file is present, then all plot planes will automatically be displayed after the "Run" button is pressed, otherwise the user will need to click on each net to see the waveform. To create a plot file on Windows, after a plot graph is displayed, right-click on it and choose "File", then choose "Save Plot Settings".The following example for the above schematic shows settings for a "transient analysis" simulation with two waveforms on one plot plane consisting of the RC voltage at "out" net and current through resistor R1, which are labeled V and I at the top of the plot graph.