Adding libraries to LTSpice

Thread Starter

djsfantasi

Joined Apr 11, 2010
8,320
I just recently downloaded Bordodynov’s library (and examples) and copied them to the appropriate locations.

And like many before me, can’t seem to locate a component in LTSPICE. I’m looking for the 2N7000 model. It’s in the standard.mos file, but a search in the component function doesn’t find it.

My LTSPICE location in Win 10 is
C:/users/OneDisk/Documents/LTXVII/…

(I know the slashes are backwards)

I also reset the download restriction do the files should be useable)

Please help… it’s been a L O N G. time since I last used LTSPICE.
 

Papabravo

Joined Feb 24, 2006
18,400
You have at least a couple of choices:
  1. Put the model card in your schematic as a ".model" spice command
  2. Put just the 2N7000 model in a file by itself and include it with a ",inc" spice command
  3. Merge the ".model" card from the standard.mos.XVII.txt into the standard.mos file in the cmp sub-folder.
Using option number 3. has been deprecated by some in the LTspice community because they believe that the distribution files should remain pristine. I've been merging things for 25 years since Switcher Cad III so it is manifestly too late for me to adopt that policy.
Using OneDrive may also be complicating your life because your files are not actually where you think they are. I abandoned this approach when I could not use LTspice and backup my work to my local USB drives. It was just too much mental gymnastics.

I see there is also a custom symbol and a subcircuit definition in:
C:\Users\%username%\Documents\LTspiceXVII\Bordodynov\LargeCollection\LargeCollection\LTspiceIV\lib\sym\EXTRA\Philips\NMOSFET

You can add this to your symbol and library search paths and it will be accessible to you; or you can move both the custom symbol and the subcircuit definition to the folder containing the schematic you are working on.
1652481659350.png
Lot's of options
 
Last edited:

eetech00

Joined Jun 8, 2013
3,147
I just recently downloaded Bordodynov’s library (and examples) and copied them to the appropriate locations.

And like many before me, can’t seem to locate a component in LTSPICE. I’m looking for the 2N7000 model. It’s in the standard.mos file, but a search in the component function doesn’t find it.

My LTSPICE location in Win 10 is
C:/users/OneDisk/Documents/LTXVII/…

(I know the slashes are backwards)

I also reset the download restriction do the files should be useable)

Please help… it’s been a L O N G. time since I last used LTSPICE.
First, place an NMOS symbol on the schematic.
Then, rht-clk the symbol, then click "Pick new mosfet".
When the selection list pops up, click the far left column header to sort the list.
The 2N7000 is about the forth device down from the top.
 

Thread Starter

djsfantasi

Joined Apr 11, 2010
8,320
First, place an NMOS symbol on the schematic.
Then, rht-clk the symbol, then click "Pick new mosfet".
When the selection list pops up, click the far left column header to sort the list.
The 2N7000 is about the forth device down from the top.
So, I tried, but I am missing something. I don't see "Pick New Mosfet" as an option". This is what I see...
 

Attachments

Papabravo

Joined Feb 24, 2006
18,400
So, I tried, but I am missing something. I don't see "Pick New Mosfet" as an option". This is what I see...
You did a Ctrl-Right-Click, which can work if you know what to do. Keep your finger OFF the Ctrl-key, hover over the part until you see the hand symbol, and then just do a Right-Click

1652552128716.png
 

Thread Starter

djsfantasi

Joined Apr 11, 2010
8,320
You did a Ctrl-Right-Click, which can work if you know what to do. Keep your finger OFF the Ctrl-key, hover over the part until you see the hand symbol, and then just do a Right-Click

View attachment 267211
I’ll try, but I’m 99.999% sure that I did NOT do a ctrl-click. What would have motivated me to do a ctrl-click

I’m on the Atlantic beachfront without my laptop. So I can’t try right now.

Edit: corrected typos
 
Last edited:

eetech00

Joined Jun 8, 2013
3,147
So, I tried, but I am missing something. I don't see "Pick New Mosfet" as an option". This is what I see...
The symbol "Prefix" attribute has been changed to "X".
Change the "Prefix" back to "MN".

All NMOS mosfet models contained in the selection list are defined using ".model" statements.
So the symbol "Prefix" attribute should remain "MN".

If a model is defined using a .subckt statement, then you would need to change it to "X".

"I’m on the Atlantic beachfront without my laptop. So I can’t try."

Must be nice...enjoy...:)
 

Thread Starter

djsfantasi

Joined Apr 11, 2010
8,320
OK, I'm home from Nantasket Beach in Hull, MA on the open Atlantic. Stopped by for a fresh seafood dinner (fish and clams bought from the Boston Fish Pier this morning).
  1. I have confirmed that I did NOT press ctrl-right-click when capturing that screen shot.
  2. I have confirmed that I did keep my finger OFF the Ctrl-key, hovered over the part until I saw the hand symbol, and then just did a Right-Click
  3. I have confirmed that the symbol "Prefix" attribute has NOT been changed to "X"; it is always "X".
  4. The MOSFET symbol (if I were to edit the symbol) is labelled "NMOS_SSM3K09FU'. I am assuming what the FU stands for is... ;)
 

eetech00

Joined Jun 8, 2013
3,147
OK, I'm home from Nantasket Beach in Hull, MA on the open Atlantic. Stopped by for a fresh seafood dinner (fish and clams bought from the Boston Fish Pier this morning).
Now I have to go Red Lobster… :)

I have confirmed that the symbol "Prefix" attribute has NOT been changed to "X"; it is always "X".
If it is X, change it to MN

[*]The MOSFET symbol (if I were to edit the symbol) is labelled "NMOS_SSM3K09FU'. I am assuming what the FU stands for is... ;)
heh…I don’t know where that symbol came from. But use the standard NMOS symbol
 

Thread Starter

djsfantasi

Joined Apr 11, 2010
8,320
Now I have to go Red Lobster… :)



If it is X, change it to MN



heh…I don’t know where that symbol came from. But use the standard NMOS symbol
my comments regarding the results of right-clicking (not ctrl-right-click) AND the appearance of an “X” apply to the standard MOSFET symbol as well.

I am also suspecting that the install of the Bordodnyev wasn’t successful. There is no folder containing “Borfodnyev” nor 2N7000… (spelling is unsure of Bordodnyev right now, but the spelling when downloading was correct.)
 

Papabravo

Joined Feb 24, 2006
18,400
It is @Bordodynov
This is the proper link
http://bordodynov.ltwiki.org/
Sorry you are having difficulties.
I don't actually remember if the 2N7000 is part of the standard library or not, but I do know that NMOS_SSM3K09FU is not currently from @Bordodynov because it is part of a library contributed by Toshiba according to it's present location on my system.
Let me investigate further.
It is indeed a subcircuit and not a .model, which I might have seen had I paid closer attention to you original screenclip.
1652569955939.png

The basic NMOS transistor symbol is called "nmos.asy" and it is located in the folder:
C:\Users\%username%\Documents\LTspiceXVII\lib\sym
Substitute your username for %username% in the path above
It should look like the screen clip from post #5
If it looks like the clip above, then your main library may have become corrupted.
You may be able to recover by comparing the library in \Documents with the copy in \Program Files
 
Last edited:

Thread Starter

djsfantasi

Joined Apr 11, 2010
8,320
Progress !!!

@eetech00 mentioned that the symbol "Prefix" attribute had been changed to "X" and it should be "MN", I obsessed on the obervation that it had never been changed... by me. So I changed it manually to "MN" (or did I change it to "M"?). Suddenly when right-clicking on the symbol, "Pick New Mosfet" appeared! So I selected "2N7000".

Different errors appeared, but I figured out what I had done wrong. Or at least figured out enough to make the errors disappear. I was able to run the simulation with far fewer errors. However, Im left with the following errors in the log file.

Code:
Circuit: * C:\Users\don_d\OneDrive\Documents\LTspiceXVII\Projects\LED_driver_3.asc

Error on line 2 : m2 n003 n004 0 0 2n7000 2n7000
    Error:  No unlabeled parameter permitted for MOSFET's
Error on line 5 : m3 n002 n003 0 0 2n7000 2n7000
    Error:  No unlabeled parameter permitted for MOSFET's
WARNING: Specified period is not longer than the sum of Trise, Tfall, and Ton for v§trigger.  Increasing period to 0.34
Per .tran options, skipping operating point for transient analysis.

Date: Sat May 14 19:33:22 2022
Total elapsed time: 10.181 seconds.

tnom = 27
temp = 27
method = modified trap
totiter = 320496
traniter = 320496
tranpoints = 160175
accept = 160147
rejected = 28
matrix size = 14
fillins = 0
solver = Normal
Matrix Compiler1: 724 bytes object code size  0.5/0.5/[0.2]
Matrix Compiler2: 1.04 KB object code size  0.3/0.7/[0.3]
I need to tune the .tran parms - but one thing at a time.
 

Attachments

Papabravo

Joined Feb 24, 2006
18,400
One other debugging tip:
On the menu bar there is a choice called "View". When you click on that choice there is a drop-down menu with things that you can "View". Among those choices is "Spice Netlist", a temporary file created at the beginning of a simulation. You can however select all the text in the "View window" and paste it somewhere so you can examine it at your leisure. Like this:

1652573669760.png

Notice in my Netlist that the string 2N7000 occurs ONE TIME ONLY. In your implementation it thinks you are trying to pass a parameter to a model which you cannot do explicitly. Notice also that I have the ".model" card in the schematic, which of course means it will be in the netlist for this schematic.
 

eetech00

Joined Jun 8, 2013
3,147
Progress !!!

@eetech00 mentioned that the symbol "Prefix" attribute had been changed to "X" and it should be "MN", I obsessed on the obervation that it had never been changed... by me. So I changed it manually to "MN" (or did I change it to "M"?). Suddenly when right-clicking on the symbol, "Pick New Mosfet" appeared! So I selected "2N7000".

Different errors appeared, but I figured out what I had done wrong. Or at least figured out enough to make the errors disappear. I was able to run the simulation with far fewer errors. However, Im left with the following errors in the log file.

Error on line 2 : m2 n003 n004 0 0 2n7000 2n7000
Error: No unlabeled parameter permitted for MOSFET's
Error on line 5 : m3 n002 n003 0 0 2n7000 2n7000
Error: No unlabeled parameter permitted for MOSFET's
The errors are related to the symbol. I think Papabravo may be correct.
There may be symbol attributes populated that shouldn't be.

I'm thinking your user library installation has become thrashed. The Prefix attribute of the native mosfet symbols should have either MN or MP, and not "X". So if you didn't populate it that way, it must have gotten overwritten by one that did have different atttributes. The user native mosfet symbols, for win10, are located in "..Documents\LTspiceXII\lib\sym" folder.
There is a master copy of symbols in "C:\Program Files\LTC\LTspiceXVII\lib\sym". You can copy them from the master location and paste them into the user location to recover the native symbols.

WARNING: Specified period is not longer than the sum of Trise, Tfall, and Ton for v§trigger. Increasing period to 0.34
This is caused by the pulse voltage source params:

0 0 300m 30m 30m 300m 300m 5

Ton and period are the same but you've specified a TR/TF of 30m each so the simulator is complaining.
Ton should include TR/TF, So:

Per=300m
TR=30m
TF=30m
Ton= (300m - (TR+TF))= 240m
 

ElectricSpidey

Joined Dec 2, 2017
2,146
IMHO the last thing someone should do is dump additional files/libraries into the default folders, but this seems to be what most people suggest.

I always place new files in a separate folder and the add that folder to the search path in LTSpice using the control panel.

Then when you want to use those files you simply use the dropdown list from the menu.
 

Audioguru again

Joined Oct 21, 2019
4,671
A problem with most simulation programs is that they show that "some" circuits made with the simulation parts values will work, but devices with minimum or maximum specs might not work.
When you buy a device you do not know if its specs are minimum, typical or maximum so you should design the circuit so that it works with all specs.

If you are making only one of a circuit then you can select its parts values to match the device's specs or you can buy hundreds of the device, test them all and select one that matches the "typical" specs in a simulation.
 

eetech00

Joined Jun 8, 2013
3,147
IMHO the last thing someone should do is dump additional files/libraries into the default folders, but this seems to be what most people suggest.

I always place new files in a separate folder and the add that folder to the search path in LTSpice using the control panel.

Then when you want to use those files you simply use the dropdown list from the menu.
My own main user library is on a fault tolerant disk array.
I manage my libraries using a symbolic link for symbols within the default "sym" user folder location. I use the symbolic link to point to the root folder of my main library. I only use the search path in LTspice for .subckt or .model file folder locations (I seperate these using folders named by device category). Works excellently. I never touch any of the LTspice installed files.
 

Thread Starter

djsfantasi

Joined Apr 11, 2010
8,320
It turned out to be a combination of dumb things that I did.

When searching for a 2N7000, I accidentally picked another component instead (I mentioned the component earlier).

I renamed that component “2N7000”.

Then I picked another MOSFET as was suggested. This was the actual “2N7000” module. But I’m doing do, I completely garbaged the parameters.

I removed the incorrect name of “2N7000” from the munged component. This fixed most of the errors.

Independently, I fixed the .tran parms. This corrected all the errors reported in the log. And the simulation was close to my expected results.

Thanks everyone for the help. I consider my stupidity taken care of. :rolleyes::oops::)
 
Top