Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

LT Spice model file question

Status
Not open for further replies.

large_ghostman

Well-Known Member
Most Helpful Member
Hi When you download a model file from yahoo user group where in the LT Spice lib folder do all the different files go?
For example in the attached zip file, where would I place all the different files in the Lib folder of the program.
The other question is some of the model folders you download have text file in them, where in the lib folder do I put this as I cant find any txt files in the standard lib shipped with the program.

Its slightly confusing as you can there are file extension not in the basic lib when you download the program and I cant find an explanation where you would put the different file types. Sorry if I havnt made mt question very clear
 

Attachments

  • LM113_.ZIP
    5 KB · Views: 294
Ok thanks, does this stop me having to reference them in other schematics?
 
here is some stuff on ltspice models.
The .asy (assembly) file goes in the “sym” (symbol) folder and the .sub file into the sub folder. Sub stands for subcircuit I thnk.
Hopefully they have done a symbol for you, (.asy file) otherwise you have to make one yourself, then you have to have a .sub file which correctly refers to the pins of the symbol that you make.
Sometimes the .sub file text is pasted into the schematic as a “spice directive”.
You should drop the .sub file into the sub folder. Sometimes you also have to paste it into the schematic (as a ‘spice directive’). I think if you don’t paste the sub file into the schematic, then you have to use the .include command to tell the schematic to go look for the .sub file in the .sub folder.
Here is some stuff on how to do it for the TL431 component, which i nicked off the yahoo group.
You have to ensure the naming corresponds between the .asy file and the name at the top of the .sub file
 

Attachments

  • LTspice _models.zip
    8.4 KB · Views: 275
Note that the "sym" folder has a number of subfolders, so put the .asy file in the proper category subfolder.
 
cheers chaps.
 
If you don't want to have to insert the ".include ....." directive for the .sub file each time you use a model, or have to paste the .sub file contents on the schematic, another option is to open the model's .asy file in LTspice, press Ctrl A to call up the attribute editor, enter the name of the model's .sub file in the ModelFile field, then save the edited .asy file. (This assumes you have the .sub file in the sub folder and the .asy file in the appropriate asy category folder, as mentioned above.)
SpiceAsyEdit.PNG
 
If you don't want to have to insert the ".include ....." directive for the .sub file each time you use a model, or have to paste the .sub file contents on the schematic, another option is to open the model's .asy file in LTspice, press Ctrl A to call up the attribute editor, enter the name of the model's .sub file in the ModelFile field, then save the edited .asy file. (This assumes you have the .sub file in the sub folder and the .asy file in the appropriate asy category folder, as mentioned above.)
Thanks alot Alec, that was exactly what I was looking for, in some libs there are text files, which folder do these go in?

I have watched a few good tutorials on models but none say much about where to put the files except in the schematic, that seems a bit 'one shot' to me. The rest of the videos have been good though, there is a good amount to learn but I am starting to see just how powerful it can be.

I know it dosnt beat 'real' experiments and measurements, but while I tend to do things by trial and error the sim does give you a good idea if the principle will work.
 
The only two files you need to place in the LTC path are LM113.sym (I would put it in the ..LTC/lib/sym/References subdirectory), and LM113.sub (put it in the ../LTC/lib/sub subdirectory). The other files are for testing the original model release, and do not need to be kept in the ../LTC hierarchy.

If you want to run the tests, unzip into a clean, new subdirectory, run all the .asc tests to see what they are about, and then discard them. Only the .sym and .sub files are relevant to future uses of the reference in future sims...
 
Thanks Mike, useful info! Its Jims fault!! He made me feel guilty about the state of my lab, so I started clearing up and found so many box's of analogue stuff I thought I better start some analogue projects :D.
I have used Proteus before but spice just seems much better sim wise, some of the models seem really accurate compared to what I am measuring on the board.
 
...but spice just seems much better sim wise, some of the models seem really accurate compared to what I am measuring on the board.

As you have probably noticed, I use it all the time. It is just great for analog circuits, SMPS, power, and even non-electrical things such as would normally be the domain of MatLab... Follow some of my postings to see how to use it for what-if simulations...
 
It's always good to compare sim results with actual built circuits. It helps you to gauge the accuracy of the models, so that you have a good idea of the reliability of future sims.
 
As you have probably noticed, I use it all the time. It is just great for analog circuits, SMPS, power, and even non-electrical things such as would normally be the domain of MatLab... Follow some of my postings to see how to use it for what-if simulations...
Thanks Mike, this is where a TAG feature would be good in the forum! still ONLY 9000+ posts to search through:confused:.
Time for a little google voodoo in the general electronics forum :joyful:.

I have seen a few of your sims, much easier to learn by looking at what others have done and how they did it.
Sorry Alec you posted as I did.
I am building small sections as I go, at the moment I have no clear idea what I am going to build.
But a junk box full of old parts so its a great chance to explore something other than micro etc. I will probably build something of little use in the real world, maybe based on sound and light. That way I can learn plenty of Op amp stuff and maybe afterwards it might be something the special unit at my sisters little school can use for the disabled kids, They like sensory things
 
Thinking about it I want to add in some bits to explore DACS etc, and I want to do another component tester, I was going to use the PI mainly but now I might add in some other bits. This is more about learning,building and using some stuff that probably wouldnt get used otherwise.

I have a large number of Op amps that I dare not mention just in case a certain Guru is about, if you know what I mean ;). HINT..............there crap and always have been crap and were crap 40 years ago.......... sound familiar? :hilarious:

Sorry AG but I have tubes of them and just think about the soldering practice I will get lol
 
As you have probably noticed, I use it all the time. It is just great for analog circuits, SMPS, power, and even non-electrical things such as would normally be the domain of MatLab... Follow some of my postings to see how to use it for what-if simulations...

I would sure appreciate a quick how-to video. You seem to pop an LTSpice simulation onto a conversation in a matter of minutes. That is the kind of video I need - something that gets a basic circuit done with a variable input voltage and an o-scope output.
 
If you don't want to have to insert the ".include ....." directive for the .sub file each time you use a model, or have to paste the .sub file contents on the schematic, another option is to open the model's .asy file in LTspice, press Ctrl A to call up the attribute editor, enter the name of the model's .sub file in the ModelFile field, then save the edited .asy file. (This assumes you have the .sub file in the sub folder and the .asy file in the appropriate asy category folder, as mentioned above.)
View attachment 97163

Ever since I installed LTSpice (Long time ago), I have always had problems importing models into the program. No matter where I copied the files, I would copy the .subs, .asy, etc. as described in these forums and still would get a message that the .subckt could not be opened or whatever the message said. Well today I was trying to get Alec's LM3915 files to work, and everything I tried would not work. Well just by luck, I was poking around in the folder properties tab, and noticed I was not set as admin, so I changed it, and viola, that fixed the problem.
I am not sure if this has been previously mentioned but it was news to me, so I thought I would pass on the info, in case anyone else encounters this issue.

LTspice.PNG
LTSPice1.PNG
 
Glad you found a solution. Another gotcha with LTspice is that unless you run it as administrator, or install it in in a User location rather than in the default Program Files location, it won't let you save draft asc files in the default location.
 
Glad you found a solution. Another gotcha with LTspice is that unless you run it as administrator, or install it in in a User location rather than in the default Program Files location, it won't let you save draft asc files in the default location.
Yeah, I have had that happen quite often. Also I tried updating my LTSpice and it kept failing until now :) I thought I was always set as admin...
 
Took me ages to find that option!! My screen didnt look like yours but have put it in admin mode, you watch i will download a model with a virus in now lol :p
 
I got round the problem by un-installing LTS from the default Program Files location and installing it instead in a folder in the User location. Didn't even have the problem with my old XP laptop!
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top