Add component to LTSpice

Thread Starter

mauswiesel

Joined Apr 8, 2010
2
Hello people !
im using LTspice, but i can't find the lm317 regulator.. i found the code from RonH
Here is the Spice model I used for the LM317.
Code:
*LM317 TI voltage regulator - pin order: In, Adj, Out
*TI adjustable voltage regulator pkg:TO-3
.SUBCKT LM317 1 2 3 **Changes my be required on this line**
J1 1 3 4 JN
Q2 5 5 6 QPL .1
Q3 5 8 9 QNL .2
Q4 8 5 7 QPL .1
Q5 81 8 3 QNL .2
Q6 3 81 10 QPL .2
Q7 12 81 13 QNL .2
Q8 10 5 11 QPL .2
Q9 14 12 10 QPL .2
Q10 16 5 17 QPL .2
Q11 16 14 15 QNL .2
Q12 3 20 16 QPL .2
Q13 1 19 20 QNL .2
Q14 19 5 18 QPL .2
Q15 3 21 19 QPL .2
Q16 21 22 16 QPL .2
Q17 21 3 24 QNL .2
Q18 22 22 16 QPL .2
Q19 22 3 241 QNL 2
Q20 3 25 16 QPL .2
Q21 25 26 3 QNL .2
Q22A 35 35 1 QPL 2
Q22B 16 35 1 QPL 2
Q23 35 16 30 QNL 2
Q24A 27 40 29 QNL .2
Q24B 27 40 28 QNL .2
Q25 1 31 41 QNL 5
Q26 1 41 32 QNL 50
D1 3 4 DZ
D2 33 1 DZ
D3 29 34 DZ
R1 1 6 310
R2 1 7 310
R3 1 11 190
R4 1 17 82
R5 1 18 5.6K
R6 4 8 100K
R7 8 81 130
R8 10 12 12.4K
R9 9 3 180
R10 13 3 4.1K
R11 14 3 5.8K
R12 15 3 72
R13 20 3 5.1K
R14 2 24 12K
R15 24 241 2.4K
R16 16 25 6.7K
R17 16 40 12K
R18 30 41 130
R19 16 31 370
R20 26 27 13K
R21 27 40 400
R22 3 41 160
R23 33 34 18K
R24 28 29 160
R25 28 32 3
R26 32 3 .1
C1 21 3 30PF
C2 21 2 30PF
C3 25 26 5PF
CBS1 5 3 2PF
CBS2 35 3 1PF
CBS3 22 3 1PF
.MODEL JN NJF(BETA=1E-4 VTO=-7)
.MODEL DZ D(BV=6.3)
.MODEL QNL NPN(EG=1.22 BF=80 RB=100 CCS=1.5PF TF=.3NS TR=6NS CJE=2PF
+ CJC=1PF VAF=100)
.MODEL QPL PNP(BF=40 RB=20 TF=.6NS TR=10NS CJE=1.5PF CJC=1PF VAF=50)
.ENDS LM317 **changes may be required on this line**
but lol... how do i use this to have lm317 in LTSpice ?? i searched on google, but it's not as easy for such a "simple" thing

thanks for your help :)
 

SgtWookie

Joined Jul 17, 2007
22,210
The attached file, LM317.zip, contains:

LM317.sub - place in ...\SwitcherCad\lib\sub
LM317.sym - place in ...\SwitcherCad\lib\sym\PowerProducts
That way it will show up in the list with Linear Technology's power products.

Since I've added LM317.sub in the symbol itself, you don't have to use the .INCLUDE LM317.sub SPICE directive.
 

Attachments

kkazem

Joined Jul 23, 2009
160
Hi all,
FYI: There is an excellent forum for LTSPICE users on yahoo. Just go to yahoo and search the forums for LTSPICE. It's run and often answered by one of the authors of LTSPICE and there are lots of problems asked and answered. It's been there for at least about 2 years that I know of, if not longer and therefore, has a very long list of answered questions and problems. And of course, it's free to join and open to anyone interested.
Regards,
Kamran Kazem
 

kingdano

Joined Apr 14, 2010
377
Hi all,
FYI: There is an excellent forum for LTSPICE users on yahoo. Just go to yahoo and search the forums for LTSPICE. It's run and often answered by one of the authors of LTSPICE and there are lots of problems asked and answered. It's been there for at least about 2 years that I know of, if not longer and therefore, has a very long list of answered questions and problems. And of course, it's free to join and open to anyone interested.
Regards,
Kamran Kazem

i can vouch for this forum as well - just this week i needed to add the same part to my LTSpice - i joined the group and had the .zip file in a matter of minutes.
 

picbuck

Joined Dec 13, 2010
3
A word of thanks to SgtWookie from me too. Worked the first time and the readings make sense. Saved!
 
Last edited:
Top