LTSpice – adding an element model to the schema

LTSpice has a large built-in library of elements. But sometimes we need an element that is not in the library. Electronics manufacturers themselves provide models of elements that they publish in the form of text files.The easiest way is to add an element to the library. But sometimes I want to be able to send someone a simulated circuit. In this case, we had to attach all the elements in the library, and someone else would have to import it. But there is another way out of this situation and I will present this solution.

Suppose we want to add a MM5Z6V2S diode to the diagram. We go to the manufacturer’s website and search for our diode. On the website, go to the tab: “Technical Documentation & Design Resources”. We have a position there “Simulation Models”.

After hovering over the menu, you will see a list with 2 types of files.

For example, click on the first item (“PSpice Model”), then download the text file with the model of our diode. When you open this file in any text editor we will see:

.SUBCKT mm5z6v2st1 2 1
**************************************
* Model Generated by MODPEX *
*Copyright(c) Symmetry Design Systems*
* All Rights Reserved *
* UNPUBLISHED LICENSED SOFTWARE *
* Contains Proprietary Information *
* Which is The Property of *
* SYMMETRY OR ITS LICENSORS *
*Commercial Use or Resale Restricted *
* by Symmetry License Agreement *
**************************************
* Model generated on Dec 9, 03
* MODEL FORMAT: PSpice
* anode cathode
*node: 2 1
* Forward Section
D1 2 1 MD1
.MODEL MD1 D IS=3.36832e-08 N=2.4425 XTI=1 RS=0.562
+ CJO=9e-11 TT=1e-08
* Leakage Current
R 1 2 MDR 8e+07
.MODEL MDR RES TC1=0 TC2=0
* Breakdown
RZ 2 3 1.66202
IZG 4 3 0.12
R4 4 3 100
D3 3 4 MD3
.MODEL MD3 D IS=2.5e-12 N=0.0205799 XTI=0 EG=0.1
D2 5 4 MD2
.MODEL MD2 D IS=2.5e-12 N=0.0645282 XTI=0 EG=0.1
EV1 1 5 6 0 1
IBV 0 6 0.001
RBV 6 0 MDRBV 6169.05
.MODEL MDRBV RES TC1=0.000331656
*– PSpice DIODE MODEL DEFAULT PARAMETER
* VALUES ARE ASSUMED
*IS=1E-14 RS=0 N=1 TT=0 CJO=0
*VJ=1 M=0.5 EG=1.11 XTI=3 FC=0.5
*KF=0 AF=1 BV=inf IBV=1e-3 TNOM=27
.ENDS mm5z6v2st1

It is very important that the “.SUBCKT” command is in the file. Otherwise, this method may not work. After downloading, we open LTSpice and create a new schematic. After that, click “Spice Directive“:

In the new window, paste the contents of the text file diode model:

It is very important that the Spice directive position is selected, not Comment. Click OK and click on schemat. Then we will paste our directive.

After that we add elements of our scheme. Of course, we must have a diode in the schematic.

Right click on the diode with the Ctrl key pressed simultaneously. In the new window, we need to change the prefix, for example, to “X”, and Value to the value from the model. The model name can be found after the .SUBCKT directive.

Click Ok and run the simulation. If there is no problem with our model, an additional window to the charts should be displayed. If an error occurs, an additional text window will open with information about the error.

We will click, for example, on the cathode of the diode, we will see its potential:

Now we can give our diagram to anyone. There is no need to include a library of elements.

Leave a Reply

Your email address will not be published. Required fields are marked *