Installing and using LTspice IV (now including LTXVII), From beginner to advanced

LTSpice IS the free version. There is no commercial version.

I have never even given a thought to the "hierarchy" function, dunno what it means or what it does, never even thought I might need it but maybe it's useful.

I do know that you have to load a schematic first before the hierarchy button at the top of the window will appear. Maybe you are trying to get to it without opening a schematic?
 
The LTspice user group on Yahoo is a tremendous resource, you just need to join to access a huge amount of useful material - in particular, examples of doing just about anything. In that vein, from the Examples_edu collection comes a simple, self-explanatory use of Hierachy - attached is a Zip of just that material, to have a play with ...

View attachment HierachicalEg.ZIP

Just open top_preamp.asc ...
 
The LTspice user group on Yahoo is a tremendous resource, you just need to join to access a huge amount of useful material - in particular, examples of doing just about anything. In that vein, from the Examples_edu collection comes a simple, self-explanatory use of Hierachy - attached is a Zip of just that material, to have a play with ...

View attachment 438097

Just open top_preamp.asc ...

thank you fas42!
i'll check out the group, and
i'm playing with the example now, great help, thank you!
 
Last edited:
LTSpice IS the free version. There is no commercial version.

I have never even given a thought to the "hierarchy" function, dunno what it means or what it does, never even thought I might need it but maybe it's useful.

I do know that you have to load a schematic first before the hierarchy button at the top of the window will appear. Maybe you are trying to get to it without opening a schematic?

didn't know there's no commercial version before.

i'll go check out the LTspice group as fas42 suggested, and go from there, no need to bother everyone for now, until next time,

thanks a lot for helping!
 
The LTspice user group on Yahoo is a tremendous resource, you just need to join to access a huge amount of useful material . . . .
YES!!

There are some EXTREMELY knowledgeable and helpful people there. Helmut Sennewald (the group's moderator) is occasionally criticized for being somewhat strict and harsh with his policies but they actually work to maximize the helpfulness of those knowledgeable people, and to keep the group well organized.

In short, don't expect much help from the group unless you are trying to help yourself. Make a reasonable effort to search the old discussions, and the group's "Files" area, before starting a new topic. Mention things you have already done, or resources you have already consulted, in an attempt to answer your question or solve your problem. Remember that the group is about SPICE simulation in general, and LTSpice in particular - it's not about general circuit design.

Dale
 
LTSpice IS the free version. There is no commercial version. . . .
Or, LTSpice IS the commercial version. There is no crippled or dumbed-down version.

Mike Englehardt (the author and developer of LTSpice) says that the "free" version is identical to what is used by engineers and IC designers within Linear Technology. The only difference is that LT employees have visibility into details of the encrypted, proprietary models of the LT switching regulators.

Dale
 
Can't you setup libraries for your favorite parts by grouping them together yourself? And only use the stock libraries for the generic parts? These personal libraries do not get erased during the update either . . .
Yes, you CAN create personal libraries using whatever organization or directory structure seems useful to you. The disadvantage is that the components within these personal libraries are not listed or cataloged by any menu or dialog box in LTSpice. You must know where (i.e., directory path and filename) to find the particular model you are interested in using, and then explicitly enter this information into the "Attributes" window ( <ctrl><rt-click> ) for every component that uses one of your models.

Dale
 
Ex-Moderator
Joined 2011
Yes, you CAN create personal libraries using whatever organization or directory structure seems useful to you. The disadvantage is that the components within these personal libraries are not listed or cataloged by any menu or dialog box in LTSpice. You must know where (i.e., directory path and filename) to find the particular model you are interested in using, and then explicitly enter this information into the "Attributes" window ( <ctrl><rt-click> ) for every component that uses one of your models.

Dale
And that is harder what you guys have to go through now?! Since you create the custom libraries, you ought to know where they are stored, in fact, the lists would be much shorter, so getting the correct part would be much faster. I doubt anyone could even use 10% of the parts contained in the LTSpice libraries, the rest of them just take up un-necessary space (well that's true of most sim programs).
 
hi, any one has any ideas on this?

in trying to include a personal lib, this is waht i did:

1) made a model file, named it, and moved it to the lib/cmp folder. then added a .include directive in the schematics.

2) changed the old bjt name to a new one in my personal model file.

3)ran simulation.

i got a popup saying could not open my model file. so i right clicked on the directive, there is an OPEN button in the dialog box with my model file name already there, i clicked on OPEN, and the model file was opened within LTspice.

so it's not that LTspice couldn't open it. what did i do wrong? i also didn't get the bjt's in my personal model file listed in the "Pick New Transistor" list, is it supposed to be this way? what do i need to do to make it work?

i'm using version 4.20i on windows8.

tks a lot for helping!
 
Last edited:
If it is a .subckt model, it should go in /lib/sub. /lib/cmp is for .model type models.

Subcircuit models will never show up in the transistor selection menu, which works for .model types only, and only the ones that are included in /lib/cmp/standard.bjt (or standard.mos/jfet/dio).

From the LTSpice help file, which is available by clicking on the Help button in LTSpice:

Syntax: .include <filename>

This directive includes the named file as if that file had been typed into the netlist instead of the .include command. This is useful for including libraries of models or subcircuits.

An absolute path name may be entered for the filename. Otherwise LTspice looks first in the directory <LTspiceIV> \lib\sub and then in the directory that contains the calling netlist [which is also your schematic directory], where <LTspiceIV> is the directory containing the scad3.exe executable, typically installed as C:\Program Files\LTC\LTspiceIV.
 
If it is a .subckt model, it should go in /lib/sub. /lib/cmp is for .model type models.
I didn't know....
Subcircuit models will never show up in the transistor selection menu, which works for .model types only, and only the ones that are included in /lib/cmp/standard.bjt (or standard.mos/jfet/dio).
Can you please explain how these (.subckt) models ought to be invoked, for they also have to be linked in some way with a symbol in the schematic?
 
Once you have successfully pointed LTSpice to the .subckt model, whether you use .lib or .inc or (my favorite) pasting the model directly to the schematic, the symbol that will represent the model needs to indicate which model it will use.

Most discrete symbols (BJT, Jfet, ferrite...) are configured by default to directly use the .model models included in their respective standard libraries (standard.bjt/jft/bead). You can easily reconfigure them to use a .subckt model.

Right-click on the symbol and change the prefix to X. Then put the name of your model in the value box. If you subcircuit says ".subckt 1N918", then you would put "1N918" in the box.

.subckt models will not always have the same pin order as the symbol you're using, so if you get weird results that's something you can check.
 
Last edited:
If it is a .subckt model, it should go in /lib/sub. /lib/cmp is for .model type models.

thank you keantoken for the tip! now i know something about .subckt as well:)

but the model file i made contains only a few of .model type models, only npn and pnp bjt .model type models, to be exact.

the file can be opened up from within LTspice, just by invoking the directive edit dialog box, where the file name, name only, not the complete path, is pulled in from the .inc line i suppose, and LTspice opened the file up with no problem, but simulation insists it can't open it.

also, if all models added by users are not listed somewhere, what is the way of placing such components in a schematic?

i'm totally lost now.
 
It's possible that the model statements in your include file are not correct, try adding them directly to the schematic: copy the text in the file, and create a Spice Directive - Edit menu | Spice Directive - paste in the box, OK, click in open space on the schematic, and the text of the model statements is now part of the schematic. Then Run, if the models still can't be found then there is something wrong with the text.
 
The .model models can be copied into standard.bjt or whatever and then they will appear in the part selection list.

Sometimes .lib works when .inc does not. When one fails without an obvious error, I try the other.

You add a .subckt or .model model to the schematic the same way you add the .inc line.
 
It's possible that the model statements in your include file are not correct, try adding them directly to the schematic: copy the text in the file, and create a Spice Directive - Edit menu | Spice Directive - paste in the box, OK, click in open space on the schematic, and the text of the model statements is now part of the schematic. Then Run, if the models still can't be found then there is something wrong with the text.

thank you for the hint!

i tired that first. i think it worked with the model i pasted in the schematic. don't know how to verify that IS the model it ran with though, when i right click on the transistor symbol, the properties, manufacturer, Vceo, Ic fields etc. were blank. but these fields are blank with LTspice default transistors as well, so i couldn't verify positively that the model pasted in was the model it ran with. on the other hand, i got different gain and THD numbers when i did that, so i suppose it worked.

it'd be great if i could identify why LTspice says it couldn't open the model file, and get that fixed.
 
The .model models can be copied into standard.bjt or whatever and then they will appear in the part selection list.
having the added componets appearing in some list as possible selections is surely a huge advantage! the drawback to me is the default LTspice standard.bjt file is no longer original anymore, and over time confusion, being overwritten, and other unexpected things might happen. i was trying to avoid that by keeping things separate. i might be forced to do just that in the end, which is too bad.

Sometimes .lib works when .inc does not. When one fails without an obvious error, I try the other.
ok, good to know this sort of behavior is not that extraordinary after all.

You add a .subckt or .model model to the schematic the same way you add the .inc line.
i meant to say parts, components, and/or transistors. when i need to have a transistor in a schematic, i'd say place component, add transistor, then choose a particular transistor from a selection list. when the user added transistors don't appear in the selection list, how do i say give me this transistor, not that transistor, so that i can have my schematic drawn with the transistor of my choice?
 
Last edited: