LTspiceIV librairies management - diyAudio
Go Back   Home > Forums > Amplifiers > Solid State
Home Forums Rules Articles diyAudio Store Gallery Wiki Blogs Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

Solid State Talk all about solid state amplification.

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Thread Tools Search this Thread
Old 13th April 2010, 12:20 PM   #1
diyAudio Member
steph_tsf's Avatar
Join Date: Mar 2008
Default LTspiceIV librairies management


attached you will find a file containing BJT models commonly used in audio power amplifiers. In order to see it at work, you need to open the C:\Program Files\LTC\LTspiceIV\lib\cmp directory. Over there, start backuping the original "standard.bjt" file, renaming it "standard.bjt.original". Then, copy the "my_own_npn_pnp_bjt_v400.lib" (that's the file I'm providing) in the directory, and rename the file "standard.bjt", in effect replacing the original standard.bjt file.

Start LTspiceIV, and you will see that you can pick-up and select all those new transistors upon drawing the schematic. Right click on the BJT symbol for picking-up a new transistor.

How to share ?
When you've done your .asc schematic containing your own BJT transistors, you may want to share it. Are you going to ask the recipient to replace his own "standard.bjt" file. No, of course. What you do is to send the "my_own_npn_pnp_v400.lib" file along with the .asc schematic, to the recipient. Your .asc needs to contain the following spice directive : ".include my_own_npn_pnp_v400.lib".
This way, the recipient WILL BE ABLE TO RUN the simulation, without needing to replace his "standard.lib". That's comfortable, and safe.

What if we share ?
LTspiceIV may report warnings saying that there are two different models for your BC556B BJT : one from your "standard.bjt" file, and another from the included "my_own_npn_pnp_bjt_v400.lib".
The question is : what model got actually used ?

Sharing the ability to run, is not upgrading
What's stated above doesn't mean that the recipient will be able to pick-up and select an alternate transistor, from the new set. When the recipient will right click on the BJT symbol, LTspiceIV will only display the transistor listed in his own "standard.bjt" file.
So, for being ABLE TO SELECT a transistor from the new list, the recipient will need, like the sender, to replace his "standard.bjt" file by the upgraded one.

Upgrading method - a suggestion
A viable solution is to have everybody upgrading by using a new, common, shared "standard.bjt" file to be manually placed in the C:\Program Files\LTC\LTspiceIV\lib\cmp directory.
I'm proposing here "standard.bjt" revision 4.00 (the 4 because it is introduced on LTcadIV).
At the moment, standard.bjt version 4.00 lacks american transistors and japanese transistors.
Can somebody make the list of the most wanted american and japanese transistors ? I'll manage to include them.

See attached .zip file.

Attached Files
File Type: zip Kuroda (17.5 KB, 136 views)

Last edited by steph_tsf; 13th April 2010 at 12:27 PM.
  Reply With Quote
Old 14th April 2010, 12:10 AM   #2
diyAudio Member
steph_tsf's Avatar
Join Date: Mar 2008
version 4.01 here, attached. Many useful BJT spice models, easy to select. The voltage, current and manufacturer data will appear in LTspiceIV selection window (right-click on the symbol to pick-up another transistor).
Attached Files
File Type: zip (8.8 KB, 88 views)
  Reply With Quote
Old 14th April 2010, 12:18 AM   #3
diyAudio Member
steph_tsf's Avatar
Join Date: Mar 2008
The Yahoo LTspice Group just took position, advising a scheme for upgrading the BJT library :

Yahoo! Groups


Re: [LTspice] Re: how to avoid overwriting standard.bjt ?

Helmut's advice is the best : don't mess with the supplied lib files.

* Instead, make a file called, for example, myparts.lib
* Place it in the .\lib sub directory - .\lib\myparts.lib
* Put all of your special .models and .subckts in it
* It will Not get erased upon update
* Put - .include ..\lib\myparts.lib into your project .asc
* Now, when you sim, do it from a project directory one level down
* ie. .\LTspiceIV\myproject\myproject.asc
* Never worry about your models getting stepped on!

Al D.


Everybody agreeing ?
No objections ?
  Reply With Quote
Old 14th April 2010, 12:22 AM   #4
diyAudio Member
steph_tsf's Avatar
Join Date: Mar 2008
Will this method avoid LTspiceIV generating warnings about duplicate model definitions, like a BC556B found in the "standard.bjt" file, and another BC556B found in "myparts.lib" ?
  Reply With Quote
Old 14th April 2010, 05:18 AM   #5
diyAudio Member
Join Date: Apr 2010
Location: Germany
Originally Posted by steph_tsf View Post
Everybody agreeing ?
No objections ?

I do it this way since it is the easiest to do and I don't feel comfortable replacing the libraries provided by LT.
An update of LTSpice might overwrite the modified library.

Will this method avoid LTspiceIV generating warnings about duplicate model definitions, like a BC556B found in the "standard.bjt" file, and another BC556B found in "myparts.lib" ?
No. LTSpice complains and I don't know which model it used for simulation.
Any ideas how to solve this issue? (Other than what you proposed.)
My idea is to rename the foreign model.
  Reply With Quote
Old 30th April 2010, 09:37 PM   #6
diyAudio Member
Join Date: Mar 2010
Well, modifying the standard files provides the most user friendly way of working because the new devices can be used as easy as the built-in devices, but you have to do the work of updating these files again whenever you update program. To avoid this disadvantage, I myself am using a python script to do all the updating automatically.
  Reply With Quote


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Megasquirt engine management john blackburn The Lounge 7 1st June 2008 04:04 PM
Thermal management Linear Purpose Solid State 12 15th May 2008 03:45 AM
Thermal management: it this not really of concern? LowRedMoon Tubes / Valves 18 16th November 2006 01:11 AM
opamp/bass management Miki Solid State 0 12th June 2003 06:28 AM

New To Site? Need Help?

All times are GMT. The time now is 12:26 AM.

vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Copyright 1999-2017 diyAudio

Content Relevant URLs by vBSEO 3.3.2