I recently started using CircuitLab. I was analyzing the 2N7000 MOSFET, but I saw several parameters (see the figure attached below) that did not match those on the datasheet or even were not on the datasheet.

1) Where can I find the .MODEL file that I can import into CircuitLab? Digikey? TI?

2) If I can't find the .MODEL file, I have to find in the datasheet and manually write the parameters in the figure .. but some are not in the datasheet (LAMBDA, K_P, R_G etc.). For example, in the figure below there are the parameters of the 2N7000 MOSFET that CircuitLab already has in its "stock", so in theory you can use them as they are .. but some of them I can't find in the datasheet and some have different values from what I found in the datasheet :/

enter image description here


2 Answers 2


This is actually quite tricky, due to (1) how SPICE models in general are not typically created from datasheet parameters, and (2) how discrete power MOSFETs are modeled in the first place. The built-in SPICE MOSFET structures are for lateral monolithic (i.e. on an integrated circuit) devices. So, in order to accurately model those, manufacturers needed to create more complex subcircuits around a base monolithic MOSFET. That is what you see in the 2N7000 subcircuit provided by OnSemi, where the .model MM NMOS... is the base device. Everything else in there are additional components around the MOSFET to assist in modeling it accurately.

However, LTspice (due to its focus for simulating switch-mode power supplies) created its own proprietary structure called the VDMOS. This builds upon a LEVEL=1 monolithic MOSFET, but changes a few things while keeping the simulation speed high. You can find more info in the LTspice Help page for MOSFETs. The most relevant information is duplicated below:

The discrete vertical double diffused MOSFET transistor(VDMOS) popularly used in board level switch mode power supplies has behavior that is qualitatively different than the above monolithic MOSFET models. In particular, (i) the body diode of a VDMOS transistor is connected differently to the external terminals than the substrate diode of a monolithic MOSFET and (ii) the gate-drain capacitance(Cgd) non-linearity cannot be modeled with the simple graded capacitances of monolithic MOSFET models. In a VDMOS transistor, Cgd abruptly changes about zero gate-drain voltage(Vgd). When Vgd is negative, Cgd is physically based a capacitor with the gate as one electrode and the drain on the back of the die as the other electrode. This capacitance is fairly low due to the thickness of the non-conducting die. But when Vgd is positive, the die is conducting and Cgd is physically based on a capacitor with the thickness of the gate oxide.

Traditionally, elaborate subcircuits have been used to duplicate the behavior of a power MOSFET. A new intrinsic spice device was written that encapsulates this behavior in the interest of compute speed, reliability of convergence, and simplicity of writing models. The DC model is the same as a level 1 monolithic MOSFET except that the length and width default to one so that transconductance can be directly specified without scaling. The AC model is as follows. The gate-source capacitance is taken as constant. This was empirically found to be a good approximation for power MOSFETS if the gate-source voltage is not driven negative...

Unfortunately, CircuitLab cannot accept subcircuits so it cannot take the OnSemi model directly. CircuitLab's implementation of discrete MOSFET models is not disclosed (or at least I can't find any documentation for it), but it looks to be based off of a LEVEL=1 monolithic structure. They seem to do a strange thing where they mix standard SPICE parameters with standard datasheet (non-SPICE) parameters. For example, if you paste in a LEVEL=1 model like the one below (the Motorola model found on this page), it will try to fill in the parameters for you.

.MODEL MN7000 NMOS (LEVEL=1 VTO=2.4 KP=.17 GAMMA=1.76U
+ PHI=.75 LAMBDA=1.25M RD=.35 RS=.448 IS=41.6F PB=.8 MJ=.46
+ CBD=44.4P CBS=53.3P CGSO=24N CGDO=20N CGBO=116N)

It will copy in the DC parameters (VTO, KP, LAMBDA, and the series resistances). However, the capacitances will be auto-calculated to match the typical power MOSFET dynamic AC parameters you usually find in datasheets:

$$ \begin{align*} C_{ISS} &= C_{GS} + C_{GD} \\ C_{OSS} &= C_{DS} + C_{GD} \\ C_{RSS} &= C_{GD} \end{align*} $$

For \$C_{GS}\$ and \$C_{GD}\$, it uses CGSO and CGDO (respectively) and multiplies them by the default SPICE MOSFET channel width of 100µm. For \$C_{DS}\$, it uses CBD directly.

Anyway, the takeaway from all this is that it's not straightforward to map standard discrete MOSFET models you get from manufacturers into CircuitLab. Perhaps the best way is to copy the DC parameters from whatever base model you find within the manufacturer's subcircuit, and then add the AC parameters directly from the datasheet???

One last tidbit. I copied in the following LTspice VDMOS model into CircuitLab and it successfully parses the parameters:

.model 2N7002 VDMOS(Rg=3 Vto=1.6 Rd=0 Rs=.75 Rb=.14 Kp=.17 mtriode=1.25 Cgdmax=80p Cgdmin=12p Cgs=50p Cjo=50p Is=.04p ksubthres=.1 mfg=Fairchild Vds=60 Ron=2 Qg=1.5n)

CircuitLab seems to only reject parsing models with a LEVEL that's not equal to 1. Since VDMOS never lists a LEVEL, the parameters don't get rejected...but it also looks like it might be specifically coded to handle the VDMOS capacitance parameters differently. It calculates them as follows (looks like it can't properly find \$C_{DS}\$ or it's purposely ignored for some reason):

C_ISS = Cgs + 2*Cgdmin
C_OSS = 2*Cgdmin
C_RSS = 2*Cgdmin

You can find the 2N7000 simulation models directly from the manufacturer.

ONSEMI: Technical Documents → Simulation Models

enter image description here

  • \$\begingroup\$ thank you for your reply. I downloaded the .lib (or .spice file) and opened it with wordpad. There are a lot of ".MODEL" but I don't know which one I should import (copy and paste) into the CircuitLab "import spice model" box. Maybe all of them? \$\endgroup\$
    – KaleM
    Commented Apr 24, 2023 at 10:13
  • \$\begingroup\$ The PSpice, SPICE2 and SPICE3 models are essentially the same (in this case): i.sstatic.net/SJgqr.png. \$\endgroup\$
    – Velvet
    Commented Apr 24, 2023 at 10:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.