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!
 
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
 
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. :xeye:
 
For LTspice...

Is there a model for IRF820, IRF830, or IRF840 that can be added to the standard.mos file in the \cmp directory?

I've tried to create a symbol (.asy file with .inc file) for IRF820 using the .subckt files above, but have not met with success. I keep getting cryptic error messages such as the IRF820.inc file does not have a .end statement (but it does!).

Thanks for any help...
--
 
I've found IRF830 model here: http://www.bdtic.com/download/vishay/sihf830.lib, but it is all in one line. I tried to split using my scarce knowledge of Spice, but still doesn't work:

Code:
*Feb 22, 2010
*Doc. ID: 90225, Rev. A
*File Name: part irf830_sihf830_PS.txt and part irf830_sihf830_PS.spi
*This document is intended as a SPICE modeling guideline and does not
*constitute a commercial product datasheet. Designers should refer to the
*appropriate data sheet of the same number for guaranteed specification
*limits.
.SUBCKT irf830 1 2 3
**************************************
* Model Generated by MODPEX *
*Copyright(c) Symmetry Design Systems*
* All Rights Reserved *
* UNPUBLISHED LICENSED SOFTWARE *
* Contains Proprietary Information *
* Which is The Property of *
* SYMMETRY OR ITS LICENSORS *
*Commercial Use or Resale Restricted *
* by Symmetry License Agreement *
**************************************
* Model generated on May 21, 96
* Model format: SPICE3
* Symmetry POWER MOS Model (Version 1.0)
* External Node Designations
* Node 1 -> Drain
* Node 2 -> Gate
* Node 3 -> Source
M1 9 7 8 8 MM L=100u W=100u
* Default values used in MM:
* The voltage-dependent capacitances are
* not included. Other default values are:
* RS=0 RD=0 LD=0 CBD=0 CBS=0 CGBO=0
.MODEL MM NMOS LEVEL=1 IS=1e-32
+VTO=3.86308 LAMBDA=0.00289944 KP=2.00897
+CGSO=5.55536e-06 CGDO=1e-11 RS 8 3 0.0001 D1 3 1 MD
.MODEL MD D IS=3.21167e-09 RS=0.018759 N=1.44803 BV=500
+IBV=0.00025 EG=1.2 XTI=3.01692 TT=0
+CJO=5.33099e-10 VJ=3.77417 M=0.9 FC=0.5 RDS 3 1 2e+07 RD 9 1 1.27635 RG 2 7 3.87074 D2 4 5 MD1
* Default values used in MD1:
* RS=0 EG=1.11 XTI=3.0 TT=0
* BV=infinite IBV=1mA
.MODEL MD1 D IS=1e-32 N=50
+CJO=1.01524e-09 VJ=1.43239 M=0.9 FC=1e-08 D3 0 5 MD2
* Default values used in MD2:
* EG=1.11 XTI=3.0 TT=0 CJO=0
* BV=infinite IBV=1mA
.MODEL MD2 D IS=1e-10 N=0.527364 RS=3e-06 RL 5 10 1 FI2 7 9 VFI2 -1 VFI2 4 0 0 EV16 10 0 9 7 1 CAP 11 10 1.01524e-09 FI1 7 9 VFI1 -1 VFI1 11 6 0 RCAP 6 10 1 D4 0 6 MD3
* Default values used in MD3:
* EG=1.11 XTI=3.0 TT=0 CJO=0
* RS=0 BV=infinite IBV=1mA
.MODEL MD3 D IS=1e-10 N=0.527364
.ENDS
 
This model works in LTSpice

*Feb 22, 2010 *Doc. ID: 90225, Rev. A *File Name: part irf830_sihf830_PS.txt and part irf830_sihf830_PS.spi *This document is intended as a SPICE modeling guideline and does not *constitute a commercial product datasheet. Designers should refer to the *appropriate data sheet of the same number for guaranteed specification *limits. .SUBCKT irf830 1 2 3 ************************************** * Model Generated by MODPEX * *Copyright(c) Symmetry Design Systems* * All Rights Reserved * * UNPUBLISHED LICENSED SOFTWARE * * Contains Proprietary Information * * Which is The Property of * * SYMMETRY OR ITS LICENSORS * *Commercial Use or Resale Restricted * * by Symmetry License Agreement * ************************************** * Model generated on May 21, 96 * Model format: SPICE3 * Symmetry POWER MOS Model (Version 1.0) * External Node Designations * Node 1 -> Drain * Node 2 -> Gate * Node 3 -> Source M1 9 7 8 8 MM L=100u W=100u * Default values used in MM: * The voltage-dependent capacitances are * not included. Other default values are: * RS=0 RD=0 LD=0 CBD=0 CBS=0 CGBO=0 .MODEL MM NMOS LEVEL=1 IS=1e-32 +VTO=3.86308 LAMBDA=0.00289944 KP=2.00897 +CGSO=5.55536e-06 CGDO=1e-11 RS 8 3 0.0001 D1 3 1 MD .MODEL MD D IS=3.21167e-09 RS=0.018759 N=1.44803 BV=500 +IBV=0.00025 EG=1.2 XTI=3.01692 TT=0 +CJO=5.33099e-10 VJ=3.77417 M=0.9 FC=0.5 RDS 3 1 2e+07 RD 9 1 1.27635 RG 2 7 3.87074 D2 4 5 MD1 * Default values used in MD1: * RS=0 EG=1.11 XTI=3.0 TT=0 * BV=infinite IBV=1mA .MODEL MD1 D IS=1e-32 N=50 +CJO=1.01524e-09 VJ=1.43239 M=0.9 FC=1e-08 D3 0 5 MD2 * Default values used in MD2: * EG=1.11 XTI=3.0 TT=0 CJO=0 * BV=infinite IBV=1mA .MODEL MD2 D IS=1e-10 N=0.527364 RS=3e-06 RL 5 10 1 FI2 7 9 VFI2 -1 VFI2 4 0 0 EV16 10 0 9 7 1 CAP 11 10 1.01524e-09 FI1 7 9 VFI1 -1 VFI1 11 6 0 RCAP 6 10 1 D4 0 6 MD3 * Default values used in MD3: * EG=1.11 XTI=3.0 TT=0 CJO=0 * RS=0 BV=infinite IBV=1mA .MODEL MD3 D IS=1e-10 N=0.527364 .ENDS
 

Attachments

Last edited: