6
\$\begingroup\$

I have an error while trying to run a third-party model in LTspice XVII and I am not sure what this means

M1: Only a level 9 B3SOI can have 5 nodes

I am running it on

enter image description here

With the lib code as from the digikey product page

* RU1C002UN NMOSFET model
* Model Generated by ROHM
* All Rights Reserved
* Commercial Use or 
* Resale Restricted
* Date: 2011/03/09
******************D G S
.SUBCKT RU1C002UN 1 2 3
M1   11 22 3 3 MOS_N
D1         3 1 DDS
R1        1 11 RTH 562m
D2       22 11 DDG
R2        2 22 270
.MODEL MOS_N NMOS
+ LEVEL=3
+ L=2.0000E-6
+ W=.1
+ KP=46.188E-6
+ RS=10.000E-3
+ RD=0
+ VTO=.77093
+ RDS=20.000E6
+ TOX=2.0000E-6
+ CGSO=147p
+ CGDO=10p
+ CBD=0
+ RG=0
+ N=2
+ RB=1.0000E-3
+ GAMMA=0.3
+ ETA=0.001
+ KAPPA=0
+ NFS=7G
.MODEL DDS D
+ IS=5.1484E-12
+ N=1.2524
+ RS=.12444
+ IKF=4.4627
+ CJO=3.8907E-12
+ M=.52657
+ VJ=.9987
+ BV=20
+ TT=12n
.MODEL DDG D
+ CJO=23.118E-12
+ M=.36358
+ VJ=.57093
+ N=10000
+ FC=-10
.MODEL RTH RES
+ TC1=0.0045
+ TC2=0.000008
.ENDS RU1C002UN

Any idea on how do I fix this?

\$\endgroup\$
5
  • 2
    \$\begingroup\$ Make sure your prefix is X, not MN because you have a subcircuit. And also be sure you name it right, without any spaces. The manual may be spartan, but it's worth a read or two. \$\endgroup\$ Commented Jun 15, 2020 at 15:46
  • \$\begingroup\$ @aconcernedcitizen what do u mean by prefix X and not MN \$\endgroup\$
    – tw.C4444
    Commented Jun 15, 2020 at 15:51
  • \$\begingroup\$ @aconcernedcitizen should the renaming be done inside the subckt part M1 11 22 3 3 or where the subckt is placed in the whole circuit ? \$\endgroup\$
    – AJN
    Commented Jun 15, 2020 at 15:53
  • \$\begingroup\$ See the help for Schematic Capture > Editing Components > Super Expert Mode (don't let the naming scare you, just read it). \$\endgroup\$ Commented Jun 15, 2020 at 15:54
  • \$\begingroup\$ would it be something like mentioned in analog.com/en/technical-articles/… ? \$\endgroup\$
    – AJN
    Commented Jun 15, 2020 at 15:58

1 Answer 1

1
\$\begingroup\$

On my current release, XVII, running on Windows it took the following steps to get the custom sub-circuit installed and running.

Copy the text and save to your computer. You can either put it in the same folder as the schematic file you are working on, or in the Spice library. On my computer the LT Spice was at C:\Users\you\Documents\LTspiceXVII\lib\cmp, or you could go to the executables folder C:\Program Files\LTC\LTspiceXVII\lib\cmp but there you would need Administrator privileges to create or modify the file. Call the file by its device name, or anything else that helps you keep track like my_nmos.sub.txt. It is very important to get the full filename including extension. If your windows is currently not configured to show all extensions this would be a good time to change that.

Open the schematic you want to use the custom sub-circuit model in. Insert a component of type nmos. Then control-right click to edit the device menu. Go to the Prefix row and edit that to 'X', then edit the Value row and enter the name of the device from the subckt definition line, in this case RU1C002UN,then close the edit window.

Next right-click a blank area on the schematic, select Draft, then Spice Directive, for the directive input .include <sub-circuit model file name including extension>. In this example .include C:\Users\you\Documents\LTC\LTspiceXVII\lib\cmp\RU1C002UN.sub.txt then close the window. The Spice Directive is now floating with your mouse pointer, pick a place to leave it and left click. You might not want this to remain visible, so point to it, right-click to edit, use the alignment pull down menu to select 'not visible', close the editor again and the directive will disappear but still remain part of the schematic.

You should now have the new sub-circuit replacement of the standard model. Once the rest of the schematic is finished you should be ready to run simulations. Be forewarned that this more detailed model will cause a simulation run much slower.

\$\endgroup\$

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.