Help adding part to LTspice library. - diyAudio
Go Back   Home > Forums > Design & Build > Software Tools

Software Tools SPICE, PCB CAD, speaker design and measurement software, calculators

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 20th February 2012, 11:57 AM   #1
Mooly is online now Mooly  United Kingdom
diyAudio Moderator
 
Mooly's Avatar
 
Join Date: Sep 2007
Default Help adding part to LTspice library.

Hopeing some of you Spice experts can help a total newbie to LTSpice

I'm stuck on how to import models into the library despite reading the help files, and searching these forums and googling.

Here's what I am trying to do if this is possible. I want to import the Spice models that Bob Cordell has on his audio site such that those parts are available to use on any simulation.

So I have tried to add them to the library by adding just one device to the appropriate file but find I can not then save the file, I get in loop.

I am following this method (section H),
LTspice Tutorial

by going to the library and adding a new .model line.

Nothing I try lets me save the file. Whether that is an operating system specific issue I don't know. I'm running Vista.
(Even I just alter a single character in a library file as a test it (Vista ?) stops me closing the altered document)


How do I do this ?

Is there a different or better way.

And please don't assume any knowledge whatsoever on my part on this.

Attached Images
File Type: jpg Capture.JPG (42.9 KB, 373 views)
__________________
-------------------------------------------------------
Installing and using LTspice. From beginner to advanced.
  Reply With Quote
Old 20th February 2012, 01:31 PM   #2
Mooly is online now Mooly  United Kingdom
diyAudio Moderator
 
Mooly's Avatar
 
Join Date: Sep 2007
Might be getting somewhere... been 2 days on this !

I've changed permisions for the library folders and can now save to them. Yay

The transistors I added to the "mosfet" file now show correctly but all the data on the initial selection is showing zero... which seems to be because that data isn't included in the original file I pasted in.

The libraries and importing models is thus far the most difficult aspect up to now for me...
Attached Images
File Type: jpg Capture2.JPG (94.9 KB, 359 views)
__________________
-------------------------------------------------------
Installing and using LTspice. From beginner to advanced.
  Reply With Quote
Old 22nd February 2012, 03:51 AM   #3
klewis is offline klewis  United States
diyAudio Member
 
klewis's Avatar
 
Join Date: Sep 2007
Blog Entries: 36
Quote:
Originally Posted by Mooly View Post
Might be getting somewhere... been 2 days on this !

I've changed permisions for the library folders and can now save to them. Yay

The transistors I added to the "mosfet" file now show correctly but all the data on the initial selection is showing zero... which seems to be because that data isn't included in the original file I pasted in.

The libraries and importing models is thus far the most difficult aspect up to now for me...
Hi mooly,
Have you tried to use the models you put in the library? I seem to remember that they will work even though the atributes don't show up. You can also open one of the standard models using the open with notepad comand while in windows explorer to look at the syntax and compare it to Bob's models.
Ken
  Reply With Quote
Old 22nd February 2012, 04:57 AM   #4
jcx is offline jcx  United States
diyAudio Member
 
Join Date: Feb 2003
Location: ..
you should be able to just put Bob's file in the same directory as your .asc, add an .include statement:

.include Cordell Models.txt

even more primitive is to just put the device models in your schematic - but most portable


modifying the Ltspice model folders isn't recommended - you will have problems sharing your asc with anyone else
or on another installation of LTspice
  Reply With Quote
Old 22nd February 2012, 06:47 AM   #5
Mooly is online now Mooly  United Kingdom
diyAudio Moderator
 
Mooly's Avatar
 
Join Date: Sep 2007
Thanks Ken, yes, the models all seem to work OK. I might try as you suggest and alter and add to the form of one of them to get the details to show. If I just try one I can always undo it easily if anything goes amiss

I know I'm going to have many more questions as I get more into it all. In fact I have two now (on FFT run) but I'll see if I can figure it out a little first
__________________
-------------------------------------------------------
Installing and using LTspice. From beginner to advanced.
  Reply With Quote
Old 22nd February 2012, 07:05 AM   #6
Mooly is online now Mooly  United Kingdom
diyAudio Moderator
 
Mooly's Avatar
 
Join Date: Sep 2007
Hi jcx,
honestly, until I added the models to the library I was getting nowhere.

This probably sounds really dumb but even with all the resources on the web I find a lot of the basic knowledge is assumed. Like saying "add the model to the .asc file". When you first open Spice (as in first ever time seeing it ) I didn't know what a .asc file was or where it lived

What you describe makes a lot more sense now than it did 72 hours ago.

See what you mean about the models added to the library only being local to my PC so if I posted or emailed a circuit it would be no good to anyone else.
__________________
-------------------------------------------------------
Installing and using LTspice. From beginner to advanced.
  Reply With Quote
Old 22nd February 2012, 08:45 AM   #7
just another
diyAudio Moderator
 
wintermute's Avatar
 
Join Date: Aug 2003
Location: Sydney
Blog Entries: 22
Hi Mooly I was doing the same (adding to my library files) but portability is definitely an issue. I now have an extras.sub file which I include. Any new models that I might need go in there. you can also save any asy files in the current directory (sometimes a new component needs an asy file to go with it.

Then if you want to share your creation, just zip up the entire folder (remove any .raw or .fft files first) and bobs your uncle

Windows7 is particularly insidious with LTSpice and saving stuff in the program files directory, it says it saved it, but it saves a copy somewhere else, but you can't see it. drove me around the bend for a while!!

Tony.
__________________
Any intelligence I may appear to have is purely artificial!
Some of my photos
  Reply With Quote
Old 22nd February 2012, 11:01 AM   #8
Mooly is online now Mooly  United Kingdom
diyAudio Moderator
 
Mooly's Avatar
 
Join Date: Sep 2007
Hi Tony,
Vista and W7 are pretty similar I think, so that's something I will watch out for... thanks.
__________________
-------------------------------------------------------
Installing and using LTspice. From beginner to advanced.
  Reply With Quote
Old 22nd February 2012, 04:56 PM   #9
jcx is offline jcx  United States
diyAudio Member
 
Join Date: Feb 2003
Location: ..
I have a folder in my user Documents folder for sims - navigate to your Documents folder and "save as" the 1st time you save a new schematic in Ltspice, then everything lives "in the open" on Vista, you can add any "extras" .sym, .sub files there too
  Reply With Quote
Old 22nd February 2012, 05:46 PM   #10
macboy is offline macboy  Canada
diyAudio Member
 
Join Date: Oct 2003
Location: Ottawa, Canada
I usually do as jcx suggested, just put the models into a text file in the same directory as your schematic is saved in, then add a "spice directive" (keyboard shortcut 's') with ".include yourfile.txt" no quotes. Then you can simply add that component. Press 'F2' (add component), select your file that you .included as above ("Top Directory" dropbox), and you can pick any component in your files.

When/if you distribute your schematic, you can just include your extra component files also.

If you add components to the standard libraries, you will likely lose them when LTSpice periodicially updates itself.
  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need part # for 30-pin connector part inside Logitech Transporter on front panel PCB Bellatone Digital Source 4 27th April 2011 07:39 PM
what part can take the place of ST part VB408B completely peterchen88 Parts 0 8th September 2007 05:45 AM
part# for spare part for CDM-1 wanted joe Digital Source 5 20th March 2007 07:59 AM
Eagle Library Part Devil_H@ck Parts 8 28th May 2006 02:46 AM
Tube library batinal Tubes / Valves 4 20th April 2006 10:34 PM


New To Site? Need Help?

All times are GMT. The time now is 09:04 AM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright 1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2