how to translate spice model to ltspice standard?

LT spice, Curve Captor, PSUDII and whatever other sims you can think of.

Post Reply
©
Posts: 13
Joined: Sun Nov 27, 2005 9:31 pm
Location: zurich

how to translate spice model to ltspice standard?

Post by © »

hi all

looks like i'm the first poster in 2013, so first of all a happy new year to you!

i'd like to add the low capacitance ZVN0545 mosfet to my standard.mos library to simulate a source follower in a tube circuit.

all i could find is a pspice model on Zetex' site:

*
*Zetex ZVN0545G Spice Model v1.0 Last Revised 20/5/04
*
*
.SUBCKT ZVN0545G 3 4 5
* D G S
M1 6 20 8 8 MOSMOD
M2 6 20 8 8 MOSMODS
RG 4 2 55
RIN 2 8 200E6
RD 3 6 RMOD1 40
RS 8 5 RMOD1 2.5
RL 3 5 200E6
C1 2 8 160E-12
C2 17 3 2E-12
D1 5 3 DMOD1
D2 17 3 DMOD2
Egs1 2 17 2 8 1
Egt1 2 20 21 5 1
Vgt1 5 22 1
Igt1 5 21 1
Rgt 21 22 RMOD2 1
.MODEL MOSMOD NMOS VTO=2.26 IS=1E-15 KP=.59 CBD=15E-12 PB=1 LAMBDA=4.9E-3
.MODEL MOSMODS NMOS VTO=1.9 IS=1E-15 KP=0.02 PB=1
.MODEL DMOD1 D IS=2E-13 RS=10 N=1.01 IKF=3e-3
.MODEL DMOD2 D CJO=25e-12 IS=1e-30 N=10
.MODEL RMOD1 RES (TC1=8E-3 TC2=1.7E-5)
.MODEL RMOD2 RES (TC1=-2.5e-3 TC2=3.3e-6)
.ENDS
*
*$
*
* (c) 2005 Zetex Semiconductors plc
*
* The copyright in these models and the designs embodied belong
* to Zetex Semiconductors plc (" Zetex "). They are supplied
* free of charge by Zetex for the purpose of research and design
* and may be used or copied intact (including this notice) for
* that purpose only. All other rights are reserved. The models
* are believed accurate but no condition or warranty as to their
* merchantability or fitness for purpose is given and no liability
* in respect of any use is accepted by Zetex PLC, its distributors
* or agents.
*
* Zetex Semiconductors plc, Zetex Technology Park, Chadderton,
* Oldham, United Kingdom, OL9 9LL

now HOW do i translate this garble to a useful entry in the standard.mos file?

thanks a lot for help!!

best, ©
Ray
Posts: 15
Joined: Sat Oct 13, 2012 7:03 pm
Location: Kansas, USA

Post by Ray »

The devices in the standard.mos file are defined by the MODEL directive, whereas your ZVN0545G model is a SUBCKT (subcircuit). So you can't easily add this model to the standard.mos file. Instead, here is what I recommend you do.

Save the Zetex ZVN0545G model to a file named ZVN0545G.inc. Put this file in the LTspice library folder (lib\sub) and include it in your LTspice schematic using the following directive:

.inc ZVN0545G.inc

You will also need to create a new symbol file, since subcircuit devices need to have a Prefix of "X" rather than the "MN" in the LTspice nmos.asy symbol file. The easiest way to do this is with a text editor. Copy the nmos.asy file to a new file named xnmos.asy, and in the new file change the Prefix from MN to X. Use this symbol with your subcircuit file. You can put this file in the lib\sym folder, along with the symbol file included with LTspice.

I've attached both the subcircuit and X symbol files here.

I hope this helps.

Ray
Attachments
xnmos.asy
NMOS symbol used with a subcircuit
(655 Bytes) Downloaded 553 times
ZVN0545G.inc
ZVN0545G subcircuit file
(1.31 KiB) Downloaded 583 times
©
Posts: 13
Joined: Sun Nov 27, 2005 9:31 pm
Location: zurich

unknown subcircuit called in:

Post by © »

ray,

thanks for the files. i installed them as per your instructions and then added the ZVN0545G to a circuit (with the LT spice directive .inc..)

instead of a sim i get an error message: unknown subcircuit called in: xu1 n001 n005 out1 nmos

hmm... ?
Ray
Posts: 15
Joined: Sat Oct 13, 2012 7:03 pm
Location: Kansas, USA

Post by Ray »

Make sure that the name you give to the MOSFET in your schematic matches the subcircuit definition exactly (except for upper/lower case, which isn't important). In your subcircuit file, this would be ZVN0545G (the G is part of the name). It looks like you have left the device name as NMOS, which is the default name that will appear when you place the symbol on the schematic.

If you post your LTspice file I can probably help you find the problem.

Ray
©
Posts: 13
Joined: Sun Nov 27, 2005 9:31 pm
Location: zurich

thanks!

Post by © »

giving the baby a name did the trick :-)

(silly me, shoulda come to this conclusion myself.)

thanks! ©
Post Reply