<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://lms.onnocenter.or.id/wiki/index.php?action=history&amp;feed=atom&amp;title=LTSpice%3A_IRF540</id>
	<title>LTSpice: IRF540 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://lms.onnocenter.or.id/wiki/index.php?action=history&amp;feed=atom&amp;title=LTSpice%3A_IRF540"/>
	<link rel="alternate" type="text/html" href="https://lms.onnocenter.or.id/wiki/index.php?title=LTSpice:_IRF540&amp;action=history"/>
	<updated>2026-04-27T21:13:00Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://lms.onnocenter.or.id/wiki/index.php?title=LTSpice:_IRF540&amp;diff=46341&amp;oldid=prev</id>
		<title>Onnowpurbo: Created page with &quot;Sumber: http://www.diyaudio.com/forums/solid-state/16491-ltspice-subcircuits.html  I am trying to incorporate the spice models provided by IRF in my design simulated under LTS...&quot;</title>
		<link rel="alternate" type="text/html" href="https://lms.onnocenter.or.id/wiki/index.php?title=LTSpice:_IRF540&amp;diff=46341&amp;oldid=prev"/>
		<updated>2016-10-13T22:07:04Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Sumber: http://www.diyaudio.com/forums/solid-state/16491-ltspice-subcircuits.html  I am trying to incorporate the spice models provided by IRF in my design simulated under LTS...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Sumber: http://www.diyaudio.com/forums/solid-state/16491-ltspice-subcircuits.html&lt;br /&gt;
&lt;br /&gt;
I am trying to incorporate the spice models provided by IRF in my design simulated under LTSpice. the IRF models come in as sub circuits and I went through the FAQ and here is what it said about using 3rd party subcircuit spice model:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;If you want to use a subcircuit, follow the following steps:&lt;br /&gt;
&lt;br /&gt;
1. Change the &amp;quot;Prefix&amp;quot; attribute of the component instance of the symbol to be an &amp;#039;X&amp;#039;. Don’t change the symbol, just the instances of the symbol as a component on a schematic.&lt;br /&gt;
&lt;br /&gt;
2. Edit the value of the component to coincide with the name of the subcircuit you wish to use.&lt;br /&gt;
&lt;br /&gt;
3. Add a SPICE directive on the schematic such as &amp;quot;.inc filename&amp;quot; where filename is the name of the file containing the definition of the subcircuit.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Just precisely what I should do to incorporate a subcircuit in a file called IRF540.spi that reads like:&lt;br /&gt;
&lt;br /&gt;
Thanks in advance.&lt;br /&gt;
&lt;br /&gt;
=======IRF540.spi==========================&lt;br /&gt;
.SUBCKT irf540 1 2 3&lt;br /&gt;
**************************************&lt;br /&gt;
* Model Generated by MODPEX *&lt;br /&gt;
*Copyright(c) Symmetry Design Systems*&lt;br /&gt;
* All Rights Reserved *&lt;br /&gt;
* UNPUBLISHED LICENSED SOFTWARE *&lt;br /&gt;
* Contains Proprietary Information *&lt;br /&gt;
* Which is The Property of *&lt;br /&gt;
* SYMMETRY OR ITS LICENSORS *&lt;br /&gt;
*Commercial Use or Resale Restricted *&lt;br /&gt;
* by Symmetry License Agreement *&lt;br /&gt;
**************************************&lt;br /&gt;
* Model generated on Apr 24, 96&lt;br /&gt;
* Model format: SPICE3&lt;br /&gt;
* Symmetry POWER MOS Model (Version 1.0)&lt;br /&gt;
* External Node Designations&lt;br /&gt;
* Node 1 -&amp;gt; Drain&lt;br /&gt;
* Node 2 -&amp;gt; Gate&lt;br /&gt;
* Node 3 -&amp;gt; Source&lt;br /&gt;
M1 9 7 8 8 MM L=100u W=100u&lt;br /&gt;
* Default values used in MM:&lt;br /&gt;
* The voltage-dependent capacitances are&lt;br /&gt;
* not included. Other default values are:&lt;br /&gt;
* RS=0 RD=0 LD=0 CBD=0 CBS=0 CGBO=0&lt;br /&gt;
.MODEL MM NMOS LEVEL=1 IS=1e-32&lt;br /&gt;
+VTO=3.56362 LAMBDA=0.00291031 KP=25.0081&lt;br /&gt;
+CGSO=1.60584e-05 CGDO=4.25919e-07&lt;br /&gt;
RS 8 3 0.0317085&lt;br /&gt;
D1 3 1 MD&lt;br /&gt;
.MODEL MD D IS=1.02194e-10 RS=0.00968022 N=1.21527 BV=100&lt;br /&gt;
+IBV=0.00025 EG=1.2 XTI=3.03885 TT=1e-07&lt;br /&gt;
+CJO=1.81859e-09 VJ=1.1279 M=0.449161 FC=0.5&lt;br /&gt;
RDS 3 1 4e+06&lt;br /&gt;
RD 9 1 0.0135649&lt;br /&gt;
RG 2 7 5.11362&lt;br /&gt;
D2 4 5 MD1&lt;br /&gt;
* Default values used in MD1:&lt;br /&gt;
* RS=0 EG=1.11 XTI=3.0 TT=0&lt;br /&gt;
* BV=infinite IBV=1mA&lt;br /&gt;
.MODEL MD1 D IS=1e-32 N=50&lt;br /&gt;
+CJO=2.49697e-09 VJ=0.5 M=0.9 FC=1e-08&lt;br /&gt;
D3 0 5 MD2&lt;br /&gt;
* Default values used in MD2:&lt;br /&gt;
* EG=1.11 XTI=3.0 TT=0 CJO=0&lt;br /&gt;
* BV=infinite IBV=1mA&lt;br /&gt;
.MODEL MD2 D IS=1e-10 N=0.4 RS=3e-06&lt;br /&gt;
RL 5 10 1&lt;br /&gt;
FI2 7 9 VFI2 -1&lt;br /&gt;
VFI2 4 0 0&lt;br /&gt;
EV16 10 0 9 7 1&lt;br /&gt;
CAP 11 10 2.49697e-09&lt;br /&gt;
FI1 7 9 VFI1 -1&lt;br /&gt;
VFI1 11 6 0&lt;br /&gt;
RCAP 6 10 1&lt;br /&gt;
D4 0 6 MD3&lt;br /&gt;
* Default values used in MD3:&lt;br /&gt;
* EG=1.11 XTI=3.0 TT=0 CJO=0&lt;br /&gt;
* RS=0 BV=infinite IBV=1mA&lt;br /&gt;
.MODEL MD3 D IS=1e-10 N=0.4&lt;br /&gt;
.ENDS&lt;br /&gt;
&lt;br /&gt;
==========end=========================&lt;br /&gt;
  	Reply With Quote&lt;br /&gt;
Old 15th June 2003, 05:18 PM 	  #2&lt;br /&gt;
Christer is offline Christer  Sweden&lt;br /&gt;
diyAudio Member&lt;br /&gt;
 &lt;br /&gt;
Join Date: Sep 2002&lt;br /&gt;
Location: Sweden&lt;br /&gt;
	&lt;br /&gt;
Forget what they write in the FAQ and do it this way, which&lt;br /&gt;
should work (I actually just tested since it has been a while&lt;br /&gt;
since I did it).&lt;br /&gt;
&lt;br /&gt;
1) Save the file with the subcircuit definition (the one you quoted)&lt;br /&gt;
in the lib/sub directory and call it irf540.sub&lt;br /&gt;
&lt;br /&gt;
2) in the lib/sym directory, you find all the graphical symbols.&lt;br /&gt;
Copy the file nmos.asy and call it irf540.asy (must be the same&lt;br /&gt;
name as the sub file above). Then click on this file to open the&lt;br /&gt;
symbol editor where you can change the generic name NMOS&lt;br /&gt;
to IRF540.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Advanced course&amp;quot;&lt;br /&gt;
------------------------&lt;br /&gt;
The asy file may be placed in a subdirectory of lib/sym. Since&lt;br /&gt;
many MOSFET models come as subcircuits rather than just&lt;br /&gt;
spice models, I have a directory named transistors where&lt;br /&gt;
I put all such transistors. You will find there already are&lt;br /&gt;
such subdirectories for opamps etc. and this ís reflected by&lt;br /&gt;
the component selection hierarchy you see when using LTSpice.&lt;br /&gt;
As far as I remember you cannot have a hierarchy in the mod&lt;br /&gt;
directory on the other hand, but that matters less since the&lt;br /&gt;
sym directory dictates the selection hierarchy.&lt;br /&gt;
&lt;br /&gt;
Furthermore, in case you don&amp;#039;t already know it, components&lt;br /&gt;
that come as .model commands need not be handled&lt;br /&gt;
in the above way. They are better just added to the appropriate&lt;br /&gt;
file in the lib/cmp directory. There are files called standard.bjt&lt;br /&gt;
standard.cap etc, with the obvious meaning&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Referensi==&lt;br /&gt;
&lt;br /&gt;
* http://www.diyaudio.com/forums/solid-state/16491-ltspice-subcircuits.html&lt;/div&gt;</summary>
		<author><name>Onnowpurbo</name></author>
	</entry>
</feed>