Spice model format

Can someone please tell me what is wrong with this model. I am new to this and confused between .model and .subcrt. Thanks ! Guy

PS…I am new to this forum and not quite sure how to request information.

This is what happens. Parameter fields are blank.

You haven’t selected the model. Just click on the blue bar.

HI ML9104. Clicking on the blue bar doesn’t work as it should. I
've closed and reopened Kicad several times, but nothing.

Your subcircuit model does not have any parameters.

Thanks for your reply holger. Originally the model was as shown below (which still does not seem to work) . I looked at section 2.6 (.subcrt) in the ngspice manual and thought you didn’t add the L= C= just their values. Are they case sensitive ?? (n, p instead of N, P). I believe the first part of the model/subcircuit models the chip/die to case parasitics (very small), the zenier diodes the gate protection and the dual gate die as two single gate MOSFETs in series.

There is still no need to discuss the internals of the model.

First you have to find a suitable symbol for this device.
Then you have to create a circuit which allows to run (simulate) this device.
Then you need to attach the model to the symbol.
Then you have to do the proper pin assignment.
Next select adequate simulation type

If all this is done correctly, and still the simulation does not run, we might discuss the model internals.

Please post a simple project with the items from above done.

I tried out the model and it works. I am not very familiar with these dual gate mosfets. But I did a DC sweep with the model and it roughly does the same as in the datasheet.

See datasheet plot at VG1-S = 0V:

So, I think you should take step back and replicate this before you adapt the model.

Here you’ll find my example project: BF998.zip (7.0 KB)

As requested. PINS: 1=S 2=D 3=G2 4=G1
Here is the circuit:

Here is the output:

Thanks Lucas, I will try yours. I guess you were posting at the time I was !

A wild guess looking at the errors you see. The model file you are using might have a weird text encoding. It seems like you opened the file with Apple’s standard text editor. I think I remember that it can kind of mess with the encoding and tries to save everything in rich text format or something like that (I rarely use Macs and never use the built-in text editor, so just a guess).

Thanks lucas. I tried your file of the model in my circuit and it works ! I am usually pretty careful to save text in ‘plain’ format as opposed to ‘RICH’ format, but i guess something went wrong.
Problem solved; thanks again !

1 Like