Electronic – add transistor model to LTspice

libraryltspicemodeltransistors

I'm trying to add the mmbt3904lt1g model to LTspice.
– I've copied its data from the MMBT3904LT1.LIB.txt in the standard.bjt library.
– I've added an NPN to my schematic then I've changed its value to mmbt3904lt1g
– through the Edit->spice directive I've pasted the path to this library
I thought it was all to use this device but no simulation is achieved.. I get only:
Can't find definition of model "MMBT3904LT1g"

where I'm doing wrong ?

Best Answer

If the model definition is a whole subcircuit (starts with .SUBCKT), you need to use the X prefix: Ctrl + Right click on the component, and set the prefix value to "X".

Also check that the Value is set according to the name of the SUBCKT.

Also check that you have an ".include" directive somewhere on your schematic, set with the correct path of the file. Alternatively, you can paste the entire component description within a spice directive block on your schematic, but it takes a lot of space.

I wouldn't recommend putting the definition within standard.bjt file, as you seem to have done. I think you can't put whole SUBCKT in there (I also seem to remember it requires restarting LTSpice).