Click Technology

Linux, Windows, Mac it's all good

How to set up LTSpice IV models

May17

This is just a brief reminder on how to add third party models to LTSpice IV, the venerable electronics modelling software. My copy is running on wine, under Linux. Installs and runs first time, no fuss. In this example, I’m going to add in a new triac I’d like to use.

Step 1 : On your machine you have two folders for models. The mathematical models themselves are at

/home/username/.wine/drive_c/Program Files (x86)/LTC/LTspiceIV/lib/sub/

while the symbols for those models are at..

/home/username/.wine/drive_c/Program Files (x86)/LTC/LTspiceIV/lib/sym/

Create a folder in each of these two folders called

myspice

and, for the sake of better long term organisation, create a new sub-folder called triacs, thus

mkdir -p "$HOME/.wine/drive_c/Program Files (x86)/LTC/LTspiceIV/lib/sym/myspice/triacs"
mkdir -p "$HOME/.wine/drive_c/Program Files (x86)/LTC/LTspiceIV/lib/sub/myspice/triacs"

Your folder tree should look like this. For clarity, some subdirectories have been removed.

.
.
|-- drafts
|-- examples
|   |-- Educational
|   |   |-- contrib
|   |   |-- FRA
|   |   `-- PAsystem
|   `-- jigs
`-- lib
    |-- cmp
    |-- sub
    |   `-- myspice
    |       |-- transformers
    |       `-- triacs
    `-- sym
        |-- AutoGenerated
        |-- Comparators
        |-- Digital
        |-- FilterProducts
        |-- Misc
        |-- myspice
        |   |-- transformers
        |   `-- triacs
        |-- Opamps
        |-- Optos
        |-- PowerProducts
        |-- References
        |-- SpecialFunctions
        `-- Trafos

Step 2 : Download the triac model from here into the /lib/sub/myspice/triacs/ folder.

In this particular case, the file from the vendor appears as a .htm file, but in reality is just a text file, so rename it as

Thyristor_TRIAC_Qxx15xx_Qxx16x_Hx_A_SPICE_Model.lib

99 times in 100, this is just a plain text file and downloadable as such.

Step 3 : Start LTSpice IV.

Step 4 : Choose File, Open and navigate to /lib/sub/myspice/triacs/ and open Thyristor_TRIAC_Qxx15xx_Qxx16x_Hx_A_SPICE_Model.lib

Step 5 : Press CTRL + F to open the ‘find’ dialog box and enter the model you want to create. In this case, I would like to use the Q6016LH3, so I enter that into the search box and click OK. The term is found and the term is highlighted.

Step 6 : Now right-click the highlighted text and click ‘Create Symbol’.

The message “Do you wish to automatically create a symbol that will netlist against the subcircuit Q6016LH3 and her 2 ports?” appears. Click Yes. The visual of the model is drawn.

Step 7 : Make any changes you need to to complete the model. I’m going to make some changes to the visual so that the Gate, MT1 and MT2 are shown clearly instead of the generic terms ‘1’, ‘2’ and ‘3’. It can be seen in the model file what the terminal numbers relate to, so 1 = MT2, 2 = G and 3 = MT1. Right click each blue square terminal in turn and modify as required.

Step 8 : Choose File, Save As, navigate to your /lib/sym/myspice/triacs/ folder and save your symbol file. Incidentally, the file automatically appears in a newly created folder called AutoGenerated. Close the model file and the symbol file. Finished.

To use the new symbol and model, simply open your normal simulation circuit and click the ‘component’ button. Navigate to your new model in the myspice\triacs folder and click to select the model. The new device appears.

Finished.

posted under Linux Tips

Comments are closed.

I used to run Click Technology from 1995 to 2010.  Now no longer, I maintain the site with things I find interesting or are noteworthy or have some handy-tip value.