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

I just grabbed your model, saved it in a project directory as IRF820.sub

Thanks Tony. I could save it as IRF820.inc, since that's the system I have set up. So I'm with you, but then...

copied the nmos.asy to the same project directory and renamed it to IRF820.sub

Wouldn't that give you two files named IRF820.sub in the same directory? I suspect you didn't mean that. Maybe you meant, 'save a copy of nmos.asy to the project directory and rename that IRF820.asy'?

added a .include IRF820.sub to the project.

OK, I'm with you there too.

added the mosfet (when you add component you need to change the top directory to your project directory) , connected all pins to ground (because it had no use in the project I was using), and ran a sim.

It worked fine. So I suspect if you follow the above it should work :)

edit: That is pretty much how I do things these days rather than changing things in the spice libraries, it also makes it easy to just zip up the project dir and anyone else can use it without having to muck around getting models and placing them in the right place.

Tony.

OK, thanks. I gave it a whirl, got it to sim, but the results look wrong. I'm getting a source to gate voltage of -40V, with a drain current of 25mA. That ain't right...

--
 
Last edited:
A quick search in the 49 pages of this thread did not find a specification for the number of digits to specify to ensure that Double Precision processing is used.

This SPICE directive should be added to increase the resolution, resulting in smoother plots (at the possible expense of processing time).

.OPTIONS NUMDGT=8

Elsewhere on this site, I have seen the number '7' used, but I recall from the LTSPice Users' Group on Yahoo that the minimum number to use for Double Precision processing is '8'. I should note that I have seen a recommendation on a generic SPICE tutorial page to use anything more than '6', so it is possible that either '7' or '8' is correct when used with LTSpice.


Jeff
 
Administrator
Joined 2007
Paid Member
Hi Jeff,

This is something I no real experience of... perhaps others could chime in with their thoughts on this. I've just had a quick scan through Mike Engelhardt's book 'The LTSPICE IV SIMULATOR' and couldn't just pick up any references there either.
 
A quick search in the 49 pages of this thread did not find a specification for the number of digits to specify to ensure that Double Precision processing is used.

This SPICE directive should be added to increase the resolution, resulting in smoother plots (at the possible expense of processing time).

.OPTIONS NUMDGT=8

Elsewhere on this site, I have seen the number '7' used, but I recall from the LTSPice Users' Group on Yahoo that the minimum number to use for Double Precision processing is '8'. I should note that I have seen a recommendation on a generic SPICE tutorial page to use anything more than '6', so it is possible that either '7' or '8' is correct when used with LTSpice.


Jeff

This is copied from the LTSpice help function,

numdgt, Num. 6, Historically "numdgt" was used to set the number of significant figures used for output data. In LTspice, if "numdgt" is set to be > 6, double precision is used for dependent variable data.
 
This is in the help file, as is a lot of other answers. If you look up the .options command in the help file you get:

LTspice help file said:
Historically "numdgt"was used to set the number of significant figures used for output data. In LTspice, if "numdgt"is set to be >6, double precision is used for dependent variable data.

People just naturally assume it's 8 or something, because they are used to square binary numbers. I was confused about that too.
 
Administrator
Joined 2007
Paid Member
That could be by design.
 

Attachments

  • Capture.PNG
    Capture.PNG
    64.9 KB · Views: 237
That is Cordell's model of the LSK389.
The 389 is a dual version of the 170.
All I need is to convert it to the singleton and it becomes a valid model by Cordell's method for use in LTspice.

I can't see any pin out designations even though it is a 7pin device.
What needs modifying to allow it to be used where a singleton 170 is used in the .asc?
 
Administrator
Joined 2007
Paid Member
All you need do to use the model is to pick 'njf' (nchannel jfet) from LT's component menu and overwrite the device number as you would for any other model. Of course you place two fet's on the diagram, or however many you want.

You could make your own unique part and pattern outline up but its a lot of trouble to go to, and working like this allows more freedom placing parts on the diagram.

Is that what you mean ?
 

Attachments

  • njf.PNG
    njf.PNG
    15.7 KB · Views: 245
I did pick njf from LT.
But the dc op is showing a tiny 0.11mA of Id instead of ~1.4mA
it could be a faulty CCS tail current, but it only has a LED from LT and a BC550C from Cordell.
So It seemed more likely that the njf was the problem.

If I change the device from njf to 2sk170, the dc op fails.
If I try lsk170, then I need a model in Cordell models.
 
Administrator
Joined 2007
Paid Member
So you are saying its not behaving as expected when used in a complete circuit ?

I think we would need to see a .asc file that shows the problem together with an attached txt file of the models you use. It might even be one to ask Bob at some point.
 
Solved two problems at this visit.

I had not specified the LED in the CCS.
Cordell has a "RED" in his models.

I just swapped in "lsk389c" for njf and it works.
Seems the 389 is not modeled as a dual and is actually a singleton, i.e. it is actually a model for an LSK170. And that explains why there are no pin designations for the 7 lead device!

Note that c in lsk389c is Cordell and nothing to do with Linear's C grade.
 
Last edited: