LTSPICE IRF820 model - diyAudio
Go Back   Home > Forums > Amplifiers > Pass Labs

Pass Labs This forum is dedicated to Pass Labs discussion.

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 11th August 2007, 01:54 PM   #1
diyAudio Member
 
Join Date: Nov 2002
Location: Brazil
Default LTSPICE IRF820 model

Hi. Does anyone can help me using this model on LTSPICE? It doesnīt work...

.subckt IRF820 D G S
.model mosfet NMOS( LEVEL=7 VTO=3.81 RS=0.06816 KP=2.149 RD=2.3567 TC1RD=0.0127 RG=15 IS=1e-36
+ CGDMAX=1.00E-09 CGDMIN=1.06E-11 XG2CGD=0.5 XG1CGD=0.1 CBD=6.97E-11 VTCGD=0)
.model diode D( IS=3.50e-13 RS=0.0343 TT=1.657e-06)
M1 D G S S mosfet
D1 S D Diode
Cgs G S 3.18E-10
.ends

Iīm new to all this spice things, but I donīt have any problems making tube models work. I just included a file called tubes.inc, and I call it with the .inc command from the schematic, and it works great. So, I thought I could just creat a file called mosfets.inc and do the same, you see? But for some reason it wonīt work.

Anyway, thereīs also this one:

.SUBCKT XIRF820 10 20 40 40
M1 1 2 3 3 DMOS L=1U W=1U
RD 10 1 1.42
RS 30 3 76M
RG 20 2 60
CGS 2 3 323P
EGD 12 0 2 1 1
VFB 14 0 0
FFB 2 1 VFB 1
CGD 13 14 475P
R1 13 0 1
D1 12 13 DLIM
DDG 15 14 DCGD
R2 12 15 1
D2 15 0 DLIM
DSD 3 10 DSUB
LS 30 40 7.5N
.MODEL DMOS NMOS (LEVEL=3 THETA=60M VMAX=1.04MEG ETA=2M VTO=3 KP=1.3)
.MODEL DCGD D (CJO=475P VJ=.6 M=.68)
.MODEL DSUB D (IS=10.3N N=1.5 RS=.34 BV=500 CJO=236P VJ=.8 M=.42 TT=260N)
.MODEL DLIM D (IS=100U)
.ENDS XIRF820

Thanks for any help!
  Reply With Quote
Old 11th August 2007, 03:21 PM   #2
gootee is offline gootee  United States
diyAudio Member
 
Join Date: Nov 2006
Location: Indiana
Blog Entries: 1
There may be a better way to do it, but this works for me:

I first made my own mosfet symbol. It could be even just a rectangle. The appearance isn't really important. What matters is that you have three pins, numbered (see below) in the same order as those in the subckt file.

To make the symbol, select Hierarchy-->Create a New Symbol. Then select Edit-->Add Pin/Port. In the case of your first subckt, for the first Pin you could enter D in the "Label" field. You could enter anything, there, I think. The main thing is that the "Netlist Order" field's numbers must be in the same sequence as whatever is listed after the device name, in the "subckt" line of the model file.

Position that pin with your mouse and then select OK.

Again, select Edit-->Add Pin/Port. Enter G in the Label field. "Netlist Order" field should be "2". Position the pin. Click OK.

Again, select Edit-->Add Pin/Port. Enter S in the Label field. "Netlist Order" field should be "3". Position the pin. Click OK.

You can then select Draw-->Line, or Draw-->Rect, etc, to make any artwork you want to make, as part of the symbol.

When done, select File-->Save As, and enter the name of the device. I always use the name from the subckt line of the model file. But I don't think it really matters what you use.

Later, after you see the appearance of the symbol, on your schematic, you can always edit the symbol, to change that.

(Note that the second subckt in your model file has four "pins". It looks like the last two are the same node, with the fourth one probably being the heatsink tab. If you make a symbol for that one, I gues you could assume, since they apparently didn't state it, that the pin order is D, G, S, Tab.)

Going back to your schematic, now, you do need to add a spice directive (with the .op button) to include the file that contains the subckt. Filename and filename extension can be anything. Your .include statement just needs to use the same filename and filename extension. It's best to keep the model file, the asy (symbol) file, and your .asc schematic file all in the same directory/folder.

To actually use the mosfet in your circuit, click the "add component" button. Then click on the "down arrow", near the top, to drop down the list box for "Top Directory", and select the directory where your schematic and symbol are located (i.e. your current working directory, as opposed to the standard ...\lib\sym directory). The name of the mosfet symbol that you just created should then be in the list of components. Double-click on it and place the symbol on your schematic.

THEN, the following must be done, to get it to work: Right-click on the new mosfet symbol that you just placed on your schematic. Click on "Prefix". The dialog box in the upper part of the window changes to "Prefix =". Enter X in that box. Click on "Value". The dialog box in the upper part of the window changes to "Value =". Enter, in that box, the device name, exactly as it appears in the "subckt" line in the model file that you include'd. Click OK.

It should work, now.

This procedure should work for ANY type of subckt model.

Note that in the case of an op amp subckt, you can just use the "opamp2" symbol, from the opamp library, and skip to the step where you right-click on the symbol and change the Prefix to X and the Value to the subckt name.

Note, too, that there should be a generic mosfet symbol, in one of the subdirectories, that you could just copy to your working directory. Then you would only need to make sure that the Netlist Order fields were in the same sequence as whatever pins are listed after the device name, in the subckt line in the model file, which are usually in a "standard" pin-order, for each type of component.

- Tom Gootee

http://www.fullnet.com/~tomg/index.html
  Reply With Quote
Old 11th August 2007, 05:01 PM   #3
diyAudio Member
 
Join Date: Apr 2006
Location: Minnesota
The mosfet part of your subckt is part of the problem. I don't know if you have a line wrap problem or what, but you need a + sign in front of each continuation line. It should look like this.

.subckt IRF820 D G S
.model mosfet NMOS( LEVEL=7 VTO=3.81 RS=0.06816 KP=2.149 +RD=2.3567 TC1RD=0.0127 RG=15 IS=1e-36
+ CGDMAX=1.00E-09 CGDMIN=1.06E-11 XG2CGD=0.5 +XG1CGD=0.1 CBD=6.97E-11 VTCGD=0)
.model diode D( IS=3.50e-13 RS=0.0343 TT=1.657e-06)
M1 D G S S mosfet
D1 S D Diode
Cgs G S 3.18E-10
.ends

I think I have a line wrap problem.
  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
10m45s LTspice model dave slagle Tubes / Valves 12 8th February 2014 06:02 AM
Does anyone know of an LTSpice model for 12B4? ray_moth Tubes / Valves 2 28th May 2008 09:12 AM
LM1875 ltspice model Anthony C Smith Chip Amps 2 2nd November 2007 05:58 AM
LTSpice - some help with model needed Cybergent Everything Else 4 29th October 2005 11:14 PM


New To Site? Need Help?

All times are GMT. The time now is 06:44 PM.


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