primer on creating ltspice models

LT spice, Curve Captor, PSUDII and whatever other sims you can think of.

Post Reply
nanana
Posts: 143
Joined: Mon Jun 14, 2010 7:34 pm
Location: malmö sweden

primer on creating ltspice models

Post by nanana »

hey all you computer saavy intact audio people!

how about a thread on making models. i wish i was more fluent with this stuff but my head is wired for other things. this doesn't come naturally... the semantics are the problem, although when i look over someone else's shoulder, i usually can make my own translations pretty quick. and i am willing. i have guilt for always relying on stephie and slagle for help with this. there are so many of you out there, pitch in!

and of course, if the big guns have the time, please accept my gratitude.

much needed:

DN2540 or any of the IXYCP depletion mode MOS equivalents (which turn out to be much better).

2SK170 BL and GR/2SJ74 BL and GR

6688/404A

thanks in advance!

jc
my skin is thin, my skull is thick.
dave slagle
Posts: 2037
Joined: Sat Jan 22, 2005 3:54 am
Location: NYC
Contact:

2SK170

Post by dave slagle »

First, I found these models on the web so no promises on their accuracy. They seemed to work for what I needed them for.

For the Jfets.

Go into the spice file CMP library

C:\Program Files\LTC\SwCadIII\lib\cmp

and open the standard jfet file and paste the following models in at the bottom.

.MODEL 2sk170 NJF
+ VTO=-5.211e-001 BETA=3.683e-002 LAMBDA=4.829e-003
+ IS=1.000e-009, RD=0.000e+000 RS=0.000e+000
+ CGS=5.647e-011 CGD=2.562e-011
+ PB=4.860e+000 FC=0.5


.model J2sk170 NJF(Beta=59.86m Rs=4.151 Rd=4.151 Betatce=-.5 Lambda=1.923m
+ Vto=-.5024 Vtotc=-2.5m Cgd=20p M=.3805 Pb=.4746 Fc=.5
+ Cgs=25.48p Isr=84.77p Nr=2 Is=8.477p N=1 Xti=3 Alpha=10u Vk=100
+ Kf=111.3E-18 Af=1)

.model J2sk389 NJF(Beta=51.76m Rs=8.008 Rd=8.008 Betatce=-.5 Lambda=11.22m
+ Vto=-.5275 Vtotc=-2.5m Cgd=18.28p M=.3367 Pb=.3905 Fc=.5
+ Cgs=20.07p Isr=112.8p Nr=2 Is=11.28p N=1 Xti=3 Alpha=10u Vk=100
+ Kf=92.85E-18 Af=1)

.model J2sj74 PJF(Beta=92.12m Rs=7.748 Rd=7.748 Betatce=-.5 Lambda=4.464m
+ Vto=-.5428 Vtotc=-2.5m Cgd=85.67p M=.3246 Pb=.3905 Fc=.5
+ Cgs=78.27p Isr=129.8p Nr=2 Is=12.98p N=1 Xti=3 Alpha=10u Vk=100
+ Kf=26.64E-18 Af=1


Then select either the njf or pjf symbol and right click, they should appear when you click on the "select new" button.

there are two different 2SK170's not sure how they differ or which is more accurate....

I used them for a version of the ZEN I/V converter at the post below

http://www.intactaudio.com/forum/viewtopic.php?t=1082

cut and paste should get you there.

dave
Last edited by dave slagle on Thu Feb 10, 2011 4:21 am, edited 1 time in total.
Get Your Fix
www.hifiheroin.com
dave slagle
Posts: 2037
Joined: Sat Jan 22, 2005 3:54 am
Location: NYC
Contact:

6688

Post by dave slagle »

I am guessing you want the pentode model for the 6688. I can do triode models from curves using curve captor, but pentode models are a bit tougher, I'm still trying to get me 6E5P to work.

Funny thing is, I typed in "6688 LTspice model" into google and your post was the third hit and the first tube related one. A DIYaudio request for the model came in at 4. Weird!

dave
Last edited by dave slagle on Thu Feb 10, 2011 4:22 am, edited 1 time in total.
Get Your Fix
www.hifiheroin.com
dave slagle
Posts: 2037
Joined: Sat Jan 22, 2005 3:54 am
Location: NYC
Contact:

DN2540

Post by dave slagle »

Same deal as the Jfets.

open the standard.mos file and paste the model in (make sure it gets saved as a .mos and not a .txt)

.MODEL DN2540 NMOS (LEVEL=3 RS=1.05 NSUB=5.0E14
+DELTA=0.1 KAPPA=0.20 TPG=1 CGDO=3.1716E-10
+RD=11 VTO=-1.50 VMAX=1.0E7 ETA=0.0223089
+NFS=6.6E10 TOX=725E-10 LD=1.698E-9 UO=862.425
+XJ=6.4666E-7 THETA=1.0E-5 CGSO=2.50E-9 L=4.0E-6
+W=59E-3)
.ENDS

Naz uses it in the file in this post so the .asc will get you going to cut and paste :-)

http://www.intactaudio.com/forum/viewtopic.php?t=1185
Get Your Fix
www.hifiheroin.com
sbench
Posts: 296
Joined: Fri Jan 28, 2005 3:45 pm

Post by sbench »

If you open those files .mos, .dio etc under LTSpice, it will correctly save the extension. One of the tricks I use is to put my name or some other identifier in the "manufacturer" field so I know they are "additions" to the file.

On 6688, I'll try to do that one soon and update it in tetrode drop down.

Stephie <3
nanana
Posts: 143
Joined: Mon Jun 14, 2010 7:34 pm
Location: malmö sweden

Post by nanana »

thanx! where are you getting these models? are they from the manufacturer or are you making them yourselves? i am curious how you do it... i will have to go look at "curve trace", unless you want to tell me about it?
my skin is thin, my skull is thick.
reVintage
Posts: 364
Joined: Fri Sep 07, 2007 9:54 am
Location: Sweden

Post by reVintage »

DN2540 came directly from Supertex site. If you don´t make the models yourself, "Google is your friend".

But beware some models aren´t good enough. To check this, one can easily plot the Ua/Ia-characteristics in LTSpice and compare to the original curves. Measure current through R6.
Attachments
UaIa.asc
(1008 Bytes) Downloaded 475 times
Brgds
Lars
sbench
Posts: 296
Joined: Fri Jan 28, 2005 3:45 pm

Post by sbench »

While you have the standard library files open... one thing that comes in very handy is an "ideal" diode). This critter immediately conducts at 0 volts and has low resistance (I used 1 milliohm). Feel free to add it into your .DIO files. Also I usually put the tube diodes and VR tubes (as Zeners) in that library too. For the tube rectifiers, I put type=vacuum, which works just fine.

.model Ideal D(Ron=.001 mfg=Stephie)


Stephie <3
lukaku1
Posts: 3
Joined: Mon Nov 10, 2014 1:02 am

Post by lukaku1 »

I can do triode models from curves using curve captor, but pentode models are a bit tougher, I'm still trying to get me 6E5P to work.
Post Reply