An Introduction to LTSpice

7 January, 2009 (20:25) | Tutorials | By: Chris

LTSpice

LTSpice (download from Linear Technology here) is our primary SPICE tool.  It’s the best free spice tool I’ve ever used, so I wanted to introduce it to any of you who haven’t used it and who aren’t familiar with SPICE in general.  I’m going to use the inverting amplifier as an example since I’ll be writing about it in another post.  For the same reason I made video tutorials for EAGLE, I recommend watching the video for this tutorial as it is much easier to follow as you learn to use LTSpice.

Getting Started

After installing LTSpice, run it and open a new schematic.  A description of most of the toolbar buttons is below.

New Schematic – Open Schematic – Save – Control Panel – Run Simulation – Halt Simulation

LTSpice Toolbar 2

Wire – Ground (Common) – Label Net – Resistor – Capacitor – Inductor – Diode – Place Component

Move – Drag – Undo – Redo – Rotate – Mirror – Text Label – Spice Directive

Placing Components

Placing components such as resistors, capacitors, inductors, diodes and ground nodes is very easy.  Click the appropriate symbol along the top toolbar, then place it on the schematic.  To rotate or mirror the component, click the corresponding button on the toolbar or press Ctrl+R to rotate or Ctrl+E to mirror.  To place anything besides those components on the toolbar, press the component button on the toolbar.  This will open the components dialog.  From here you can select voltage sources, specialty diodes, transistors and opamps among other things.

The inverting amplifier consists of two resistors and an opamp.  To be able to test it, we’ll also need to include a voltage source (and grounds of course).  To place the opamp, click on the component button on the toolbar, then double click on the Opamps folder.  Scroll all the way to the right and select “opamp” from the list.  In the description it will tell you that this is an ideal opamp and that you must invoke the spice directive .lib opamp.sub in order to use this opamp.  Double-click on the ideal opamp and place it on the schematic.  Then click on the spice directive button, enter in .lib opamp.sub, press OK and place it on the schematic.

To place the voltage supply, click on the component button again, click the the folder-up button, then go to the right and double-click “voltage” and place the supply on the schematic.  To set the voltage source to something besides a DC value, click advanced and you’ll see other ways to define your voltage source.  I’ll cover these in a future post, but you can probably figure them out yourself between the voltage source dialog and the LTSpice help.  For now, enter 1 in DC Value and click OK.

Place a resistor between the positive side of the voltage source and the inverting input of the opamp.  Place another resistor between the inverting input and the output of the opamp.  To change the resistor values, right-click the resistor symbol or the R (not R1 or R2) and change the value.  I made them 100k and 1MEG to have a gain of 10 (you must enter MEG, as m or M is interpreted as milli-).  Place a ground on the noninverting input and on the negative side of the voltage source.

To connect all of the components, use the wire tool.  Click on the Label Net button and label the output net as out.  Your schematic should look similar to the one below.

Simulating

With the schematic complete, the next step is to si

Comments

Comment from Pamantha
Time March 18, 2009 at 1:48 pm

Is there a way to become a content writer for the site?

Comment from Joshua
Time March 21, 2009 at 3:14 pm

Yes there is. Just write an e-mail to admin@ece101.com with your request, making sure to state your area of interest, and we can discuss it.

Comment from Sima
Time November 16, 2011 at 4:59 am

Thanks for the tutorial. Do you know any references that I can find a comparison (Advantages / disadvantages) between different Spice simulation models? I am working on reliability of a circuit, so I want to add some stuff to the model about the temperature dependency of my components to temp and see the performance of the circuit. My models are not always fit to the linear and quaratic in PSPICE also. That’s the reason I thought that I can take a look at the other simulation software.
Thanks for your help
Sima

Write a comment