Nc pin in simulation

I read this and this but I still have some doubts.

I want to simulate an IRFR024NTR, and its spice model requires 3 pins:

  • Node 1 → Drain
  • Node 2 → Gate
  • Node 3 → Source

While the symbol in kicad have 4 pins:

immagine

ngspice says:

Too many parameters for subcircuit type “irfru024n” (instance: xxm1)

I can create a new symbol without the substrate, but I wonder if there is a proper syntax for the alternate node sequence field to tell the spice model the pin 4 is not connected (ignored).

Otherwise, can I just add the number 4 on this line?

.SUBCKT irfru024n 1 2 3

Several solutions:

Use a better fitting symbol (there are many on IRF power devices with three pins)

Or try alternate node sequence 1 2 3

Why on earth select such a weird symbol?
Just use the normal “Q_NMOS_GDS” symbol in the “Device” library.

“Why on earth”? Because I’m learning how to use the simulator in kicad and in the tutorials I read they suggested to use the symbols in the pspice library. I didn’t know I can use any symbol I like.

Ok, so the missing number in the alternate node sequence lead to ignore that pin. As a general rule, this is true even if the nc pin is in the middle? Example: the model requires 1 2 3 4, but pin 3 is nc. What should be the right alternate node sequence here?

The model sets (with its nodes) the number of nodes in the alternate node sequence. So if the model has 4, you will need 4 in the alternate node sequence.

If in your circuit you will not connect one of the nodes, well that’s up to you (is it o.k. for the model?).

OK, makes sense. I’ve never used that library myself, so excuse my ignorance. Interestingly, the “MNMOS” symbol in the “pspice” library has no Spice model, so it’s pretty useless.

Anyway, to your issue: if the symbol has 4 pins, your model needs to have 4 pins. Otherwise it will never work. I learned this the hard way. “Alternate sequence” is a different thing.

Use a standard NMOS symbol from “Device” with 3 pins and a model from the web with 3 pins and you’re on the way.

Cheers.

The pin-mapping stuff should be clearer in 7.0 (which also shows the pin names).

You’ll need to expand a bit on this. I’ve no idea what it means.

When you Edit Properties on a Symbol there’s a “Simulation Model” button at the bottom of the dialog.

If you go into that dialog, there’s a tab for “Pin Assignments” which let’s you choose which Kicad symbol pin goes to which SPICE model pin.

In 6.0 this just showed the pin numbers. In 7.0 it also shows the pin names.

Ah! Nice feature. (I’m still on 6.0).
But how does it resolve a mismatch between the number of pins in symbol and model?

You just set the substrate pin (the extra one in the symbol) to not-connected in the model.

Nasty, quick-n-dirty, and not reproducible two years later when you try to use the model somewhere else.
But you skirted the question, which was how 7.0 handles the issue. I’d expect an error, or at least a warning.

Why? The connectedness of the pin in the schematic is an ERC issue, not a simulation issue. A simulation never has 100% fidelity; the pin’s function may or may not be simulated by the model.