Electrical – LTspice error reading a downloaded model

ltspicespice

I'm downloading a model for an n-channel MOSFET, the DMG6968U-7. This is the SPICE code:

*SRC=DMG6968U;DI_DMG6968U;MOSFETs N;Enh;20.0V 6.50A 25.0mohms  Diodes Inc MOSFET
*SYM=POWMOSN
.SUBCKT DMG6968U   10 20 30
*     TERMINALS:  D  G  S
M1   1  2  3  3  DMOS L=1U W=1U
RD  10  1  10.9m
RS  40  3  1.62m
RG  20  2  33.7
CGS  2  3  119p
EGD 12  0  2  1  1
VFB 14  0  0
FFB  2  1  VFB  1
CGD 13 14  226p
R1  13  0  1.00
D1  12 13  DLIM
DDG 15 14  DCGD
R2  12 15  1.00
D2  15  0  DLIM
DSD  3 10  DSUB
LS  30 40  7.50n
.MODEL DMOS NMOS(LEVEL=3 VMAX=41.7k THETA=80.0m
+ ETA=2.00m VTO=0.900 KP=31.8)
.MODEL DCGD D (CJO=226p VJ=0.600 M=0.680)
.MODEL DSUB D (IS=27.0n N=1.50 RS=55.4m BV=20.0
+ CJO=176p VJ=0.800 M=0.420 TT=247n)
.MODEL DLIM D (IS=100U)
.ENDS

I cannot open the file with LTspice (if I try opening it from within LTspice, it does absolutely nothing; if I drag-n-drop the file into the LTspice workspace, it gives me an "Encountered an Improper Argument" error). Please help!

Actually, the above is not exactly the downloaded code — all of the .model directives were missing the closing bracket (parenthesis), so I added them, but I'm still getting the same error.

Best Answer

How did you add the model file to the schema? Maybe you have not added the model correctly or have you selected the option?

You must add the model to the scheme as SPICE Directive.Add a n-channel MOSFET symbol and right click on the MOSFET with the Ctrl key pressed simultaneously. In the new window, you need to change the prefix, for example, to “X”, and Value to the value from the model. The model name can be found after the .SUBCKT directive.

You can find more details on my blog:

https://sigaris-electronics.eu/2018/11/ltspice-adding-an-element-model-to-the-schema/