An LTSpice Tutorial

by gaussmarkov

Learning how a circuit works or designing a new one requires experimentation. Besides actually building a circuit, many people use a circuit simulation program. LTspice/SwitcherCAD III is a free program (download link) that many forumites use. Here is a brief introduction to using LTspice, illustrating a calculation with Ohm’s law. This tutorial first appeared on February 27, 2007 on the pre-WordPress version of this site.

When you first open the LTspice window, you will see something like this image. To create a schematic, either

  1. click on the new schematic tool bar button beneath the menus on the far left or
  2. choose the File > New Schematic menu item.

LTSpice new schematic button

The window will change to a background that shows the grid for laying out the schematic. Also the toolbars beneath the menus become active.

LTSpice new component button

For example, you can see the symbols for ground, a resistor, and a capacitor are available elections. In the picture above, the Component button is highlighted. To the left is a diode symbol and to the right is the image of a hand. After clicking on the Component button, we will select a voltage source for our schematic.

Below is the dialog window that opens after clicking on the Components button. After scrolling through the alphabetical list on the bottom, we have selected the voltage source symbol. Clicking on the OK button returns us to the schematic where we can place this symbol by clicking in a desired location.

LTSpice voltage component

In the next picture, you can see where we have placed the voltage source. The Resistor button is highlighted because we are about to add a resistor to our schematic. We will place all of the components that we need first. Then we will place connections and finally we will assign values to the components.

LTSpice new resistor component

After placing the resistor, we are about to add a Ground symbol to our schematic.

LTSpice ground component

The ground symbol is now in place and we are about to place wires to connect the components of our simple circuit. To run the connections, press F3 or click the Wire button (a pencil to the left of the Ground button) or choose Wire from the Edit menu. Click to start a wire and to make a corner. Double click to end a wire.

LTSpice ground component

Here is the completed circuit for illustrating Ohm’s law. Component values can be assigned by placing the mouse over a component and right-clicking. If you make the the mouse a pair of crosshairs (by pressing the ESC key), then the mouse will turn into a hand as it is placed over the component.

LTSpice ground component

Right-clicking on the voltage source component brings up the dialog window below. We are assigning the value 9 for 9 volts of direct current (DC). There are other options that we ignore for this tutorial.

LTSpice ground component

Now you will see that the letter V underneath the voltage supply symbol has been replaced by the value 9. We also right-clicked on the resistor component and assigned the value 1K.

LTSpice ground component

Having assigned all of the components values, we are ready to simulate the circuit in the schematic. To do this, we must create a command for SPICE, the algorithm that computes the simulations. Choose the Simulate > Edit Simulation Cmd menu item.

LTSpice ground component

This dialog appears. We have selected the DC opt pnt tab. This is the choice for a simple DC simulation.

LTSpice ground component

After clicking on OK, we placed the SPICE command “.op” at the bottom of the schematic, in the same way that one places components. The final step to running a simulation is to click on the Run button, highlighted in this image.

LTSpice ground component

A window opens with the results of the DC simulation. In this simple case, we see that the voltage supply is 9 volts, as we specified. In addition, the current is computed for the voltage supply and the resistor. As Ohm’s law requires, the current through the resistor is 9/1K = 0.009 amperes, or 9mA.

LTSpice ground component


| Up to LTSpice Topic |
Trackback URL for this post: right-click and copy

17 Responses to “An LTSpice Tutorial”

  1. Freedreamer said:

    I also usually use this program. it’s a good freeware choice although it has a small library.

    Posted 18.11.2007 at 11:51 am

  2. suprleed said:

    I’ve heard of spice on several occasions but I have never used it. As a relative new comer to the diy scene I was wondering if it could perform other calculations like input/output impedance or frequency response (for tone stacks)? Features such as these could really help a novice understand what each part of the circuit is doing as they work through the schematic in the software.

    Posted 28.11.2007 at 3:51 pm

  3. gaussmarkov said:

    Yes, you can. I have been using SPICE for those calculations to learn about such things. My plan is to share those simulations in the coming weeks. For example, I reproduced Duncan’s Tone Stack Calculator and I computed the input impedance of the DOD Overdrive 250. I was thinking of starting with the simulation of the entire OD 250 circuit.

    Thanks for asking!

    Posted 28.11.2007 at 4:44 pm

  4. gaussmarkov said:

    Freedreamer, I meant to reply earlier. I have found several of the library items that I needed among the files of the Yahoo group for LTSpice.

    Posted 28.11.2007 at 4:46 pm

  5. Electronics-Lab.com Blog » Blog Archive » LTSpice/SwitcherCAD III said:

    […] an introductory tutorial, go to An LTSpice Tutorial. I give a demonstration of some useful calculations in LTSpice Analysis and the DOD Overdrive […]

    Posted 01.02.2008 at 3:38 am

  6. resistance said:

    how would one calculate the equivalence resistance for a circuit? and furthermore, what does V(p001) mean?

    Posted 21.03.2008 at 2:37 am

  7. gaussmarkov said:

    hi,

    there are 2 nodes (or nets) in this circuit, one connected to ground and the other to the positive terminal of the voltage source and one lead of the resistor. LTSpice creates internal labels for nodes other than ground (or the one you label yourself). “n001” is the generated label for the ungrounded node. “V(n001)” is the voltage for that node.

    to compute the Thévenin equivalent resistance between two points in LTSpice, (1) measure the voltage when the points are not connected and (2) measure the current when the points are connected. the Thévenin equivalent resistance is the ratio of the voltage over the current.

    hope this helps, paul

    Posted 21.03.2008 at 10:21 am

  8. resistance said:

    Thanks for your reply, paul.

    This is the spice netlist for the circuit i want to find the equivalent resitance for.

    * C:\Program Files\LTC\SwCADIII\Draft1.asc
    R1 0 N003 1
    R2 N001 N002 1
    R3 N002 0 1
    R4 N003 0 1
    R5 N002 N003 1
    V1 0 N001 1
    .op
    .backanno
    .end

    Hope you can help me check out the value for the resistance.

    Posted 22.03.2008 at 6:17 am

  9. Ron Fredericks said:

    Nice intro to LTspice/Switcher CAD III.

    I share my experience as a first time user building a 555 CMOS timer circuit in a blog post too. Perhaps your readers will be interested. Here is the link:
    embeddedcomponents.com

    Posted 06.04.2008 at 10:25 am

  10. gaussmarkov said:

    Thanks, Ron! That’s a helpful post.

    Posted 07.04.2008 at 8:33 pm

  11. Troubled said:

    How do you run the program? I recently downloaded and installed it. At the end of the installation, an icon name “scad3.exe” appeared. But on clicking it, it generated an error–not win32 executable file.

    help!

    Posted 24.04.2008 at 7:22 am

  12. gaussmarkov said:

    I run the program from a shortcut to scad3.exe created by the installation. I have never seen your problem. I’m sorry that I cannot be more helpful.

    Have you tried looking for help at the LTSpice users group on yahoo?

    Posted 24.04.2008 at 8:43 am

  13. Luke said:

    I just installed LTSpice and was wondering how to use this program with three-phase circuits.

    Posted 07.07.2008 at 8:36 am

  14. fahad said:

    very nice

    but what about relay device where to find it in the library?

    Posted 09.04.2009 at 9:23 am

  15. gino vanilla said:

    once you used the first time you’ll never go back to another else spice program:

    + 100% pure freeware
    + incredible powerful and easy rather than p$pisce
    + zero limitation

    -ugly cad [but for this exists better alternative such as mdraw]

    Posted 23.12.2009 at 3:49 am

  16. arti dwivedi said:

    sir i like this software
    but i wants to see phase portrait between voltage across two capacitor so which edit simulation we will use

    Posted 05.05.2010 at 3:07 am

  17. ‘Tone Shaping’ Between Stages said:

    […] […]

    Posted 16.02.2011 at 6:46 am