Installing and using LTspice IV (now including LTXVII), From beginner to advanced

Hi - would really appreciate some help to install this model.

*
*Zetex ZVN3310A Spice Model v1.1 Last Revised 3/5/00
*
.SUBCKT ZVN3310A 3 4 5
* NODES: DRAIN GATE SOURCE
M1 3 2 5 5 MOD1
RG 4 2 356
RL 3 5 1E8
C1 2 5 21.5P
C2 3 2 2.5P
D1 5 3 DIODE1
*
.MODEL MOD1 NMOS VTO=1.736 RS=2.147 RD=1.682 IS=1E-15 KP=0.157
+CBD=25.5P PB=1
.MODEL DIODE1 D IS=6.12E-13 RS=.629
.ENDS ZVN3310A

It seems to be a .SUBCKT and a .MODEL !

Have tried many approaches based on the instructions here but so far without success.

thanks

p.s. the file has a .sub suffix
 
Last edited:
This is a "subcircuit" rather than a "model" definition. What may be confusing is the use of NMOS and diode models within the subcircuit, which have particular parameters associated with them.

The built-in LTspice symbol for a MOSFET expects a MODEL instead of a SUBCKT definition, so you will need a new symbol for this SPICE model. I usually prefix an "X" to such custom symbols to denote that they require a SUBCKT model for the device. I've attached the NMOS symbol I created for myself. The forum won't let me upload an .asy file extension, so change the file name from xnmos.txt to xnmos.asy. This should be stored in the LTspice "sym" folder, or a user folder of your choosing.
 

Attachments

  • xnmos.txt
    655 bytes · Views: 58
This is a "subcircuit" rather than a "model" definition. What may be confusing is the use of NMOS and diode models within the subcircuit, which have particular parameters associated with them.

The built-in LTspice symbol for a MOSFET expects a MODEL instead of a SUBCKT definition, so you will need a new symbol for this SPICE model. I usually prefix an "X" to such custom symbols to denote that they require a SUBCKT model for the device. I've attached the NMOS symbol I created for myself. The forum won't let me upload an .asy file extension, so change the file name from xnmos.txt to xnmos.asy. This should be stored in the LTspice "sym" folder, or a user folder of your choosing.

Thanks Ray,

I dropped your symbol in the sym folder and found it in the Components area, added it into the circuit and changed the "value " to ZVN3310A

I also added the zvn3310 model ".sub file" into the "sub" folder.

But when I ran it it did not work and reported: "unknown subcircuit called in . . . . ( see attachment )

So then as the model says :

SUBCKT ZVN3310A 3 4 5
* NODES: DRAIN GATE SOURCE

I opened up the symbol and renumbered the pins:
Drain 3 Gate 4 Source 5

But this still gave the same error message

What am I doing wrong ?

Thanks

p.s. I have also tried pasting the entire subckt into the circuit and tried adding A SPICE DIRECTIVE ".SUBCKT ZVN3310A" without success . . . and also tried using ".inc ZVN3310a.mod" as Mooly mentions but with this method I could not find where I have to place the actual model so that the directive can find the it.
 

Attachments

  • LT Spice error message.jpg
    LT Spice error message.jpg
    21.5 KB · Views: 189
Last edited:
I just tried this model in one of my own circuits, in place of the NMOS device I used originally, and the simulation ran OK. Can you post your .asc file so that we can take a look? That may help us spot what might be wrong. One thing to check is the complete file name for the subcircuit file. You mentioned that it has a .sub extension; if so, using ".inc ZVN3310a.mod" will give an error. Try ".inc ZVN3310a.sub" instead.
 
Last edited:
Member
Joined 2005
Paid Member
unknown source of distortion

Not sure this problem was already discussed here, but I just found a pretty curious bug, please check attached circuit which is an ideal source into an ideal resistor, giving me 2.1% harmonic distortion.....

what am I missing here, any ideas? This is puzzling me to say the least, many thanks in advance!
 

Attachments

  • sinus distorted.jpg
    sinus distorted.jpg
    167.4 KB · Views: 157
Member
Joined 2011
Paid Member
If I were you I would explore the use of a small number of periods in the analysis, rather than 1000 periods. Which is what your "-1" does when you run 1 second of 1 kHz sinewaves.

I would also explore the creative use of ".OPTIONS" commands, and discover whether some of them are beneficial or detrimental in this case.