Standard, platform independent simulations for DIYAudio

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
At the very least, LTspice will download the file and use it in the simulation. After it downloads it, I don't know what it does with it. The documentation for the .lib/.inc/.ferret commands is not detailed. I'll have to do some tests and see.

You don't have to say or do something special, just send Mike an email and describe the problem. I've done it and he responded even though I was mistaken.

Unfortunately, it won't allow to see those models in the GUI. Perhaps if you made a schematic in the /lib/cmp directory with that line, and the web file was named standard.bjt, it would rewrite it and show the new version in the GUI, but this would be inconvenient because you'd have to store all your schematics in the cmp directory. Furthermore, I don't know if LTSpice would detect the changes right away or if it would require a restart.

In Linux I could perhaps make a symbolic link in the schematic directory to /lib/cmp/standard.bjt, so that LTSpice would unwittingly overwrite the standard.bjt. I don't know if this could be done on Windows or Mac though.
 
First, see if you can download the file in your browser using this:

http://startfetch.com/keantoken/ltspice/kean4.bjt

If not, then it is a problem with the server or with your network. If you can download the file, then it's a problem with LTSpice. If you go to Help->About, it will give you Mike's email address and you can send him a report.

It is getting downloaded as "kean4.hmt"

edit: It could be renamed as kean4.bjt and opening in word pad normally.
 
Last edited:
Maybe you should standardize on a "DA" suffix on the models (like Bob Cordell does with "C") to let LTSpice choose the correct library
That was a bit of a brain-fart, IMHO, since a lot of parts can have a suffix anyway e.g. there's BC547A/B/C as well as ungraded BC547. Apparently Bob based his models on ungraded parts, so the "C" suffix can be misleading.

Anyway, my solution was to edit the text file and add a "bob" prefix to all the part numbers. That also groups all the decent models together alphabetically, which I find useful.
 
I use an underscore before the suffixes that aren't part of the part number, so I got that covered.

As I suggested earlier in this thread, if we work with LTspice instead of despite it, we can replace the standard.bjt with a read-only copy of a vetted model library, with model metadata added with inline comments rather than on the model number line. This could be more compatible with SPICE->PCB workflow and would just be a cleaner solution overall I think.
 
It is getting downloaded as "kean4.hmt"

edit: It could be renamed as kean4.bjt and opening in word pad normally.

That's strange - could LTSpice be going through Explorer to do this, and Explorer is automatically renaming it? Try this:

Code:
.lib http://fidelityforce.com/keantoken/ltspice/kean4.bjt

And if that doesn't work, try this:

Code:
.ferret http://fidelityforce.com/keantoken/ltspice/kean4.bjt
.lib kean4.htm

I assumed you misspelled .htm to .hmt, but use the extension that it gets when downloaded.
 
I use an underscore before the suffixes that aren't part of the part number, so I got that covered.

Won't that prevent any integration with other packages? Such as eagle or whatever. When the part numbers are altered that way, they can't match.

Plus it's kind of disturbing to see on the schematics some odd looking part name, especially if those part names have been stretched with extraneous characters.

As I suggested earlier in this thread, if we work with LTspice instead of despite it, we can replace the standard.bjt with a read-only copy of a vetted model library, with model metadata added with inline comments rather than on the model number line. This could be more compatible with SPICE->PCB workflow and would just be a cleaner solution overall I think.

Exactly!! I think this is more suitable and work work better. It would be nice to see the exact part name on schematics too.
 
The problem is, when I drop my library into a thread, no one will even try to use it unless it's an uncomplicated process.

You're likely right, it needs to be easy and simple.

I can't edit out the suffixes until I have a system in place that will make that a wise idea. Until then I have to make them stand out.

That's fine, we're searching and things will evolve. You've had plenty of very nice ideas so far to make this very good. Let's take it one step at a time.

I just tried again and got the same error. I'm posting a screenshot for illustration.
 

Attachments

  • Screen Shot 2014-02-28 at 11.04.33 AM.png
    Screen Shot 2014-02-28 at 11.04.33 AM.png
    39.1 KB · Views: 102
You'll have to ask Mike about it like I suggested. Does kean.bjt appear in the schematic directory?

I emailed to linear, I guess that generic address goes to mike. On the mac there is no "about" option under the help menu, it's somewhere else, but I found it and got that address. We'll see if something is done to fix this.

I forgot to mention earlier, but I only get the error and no file gets downloaded anywhere.

Now I have one other question: How do we simulate darlingtons?

I dug out some old models from what I saved over time, let's see if this is usable:

.SUBCKT tip142 1 2 3
* Model generated on Feb 8, 2004
* Model format: SPICE3
* Darlington macro model
* External node designations
* Node 1 -> Collect
* Node 2 -> Base
* Node 3 -> Emitter
Q1 1 2 4 qmodel
Q2 1 4 3 q1model area=19.6725
D1 3 1 dmodel
R1 2 4 8000
R2 4 3 40
* Default values used in dmodel
* EG=1.11 TT=0 BV=infinite
.MODEL dmodel d
+IS=1e-12 RS=10 N=1 XTI=3
+CJO=0 VJ=0.75 M=0.33 FC=0.5
.MODEL qmodel npn
+IS=2.92836e-16 BF=233.76 NF=1.2 VAF=1000
+IKF=0.222129 ISE=4.61322e-11 NE=2.48158 BR=1.89854
+NR=0.75 VAR=168.458 IKR=0.108495 ISC=9.99999e-14
+NC=2.00001 RB=7.90758 IRB=0.2 RBM=7.90758
+RE=0.275456 RC=1.42279 XTB=0.232595 XTI=3.02293 EG=1.206
+CJE=1e-11 VJE=0.75 MJE=0.33 TF=1e-09
+XTF=1 VTF=10 ITF=0.01 CJC=1.67157e-09
+VJC=0.95 MJC=0.23 XCJC=0.9 FC=0.5
+TR=1e-07 PTF=0 KF=0 AF=1
.MODEL q1model npn
+IS=2.92836e-16 BF=233.76 NF=1.2 VAF=1000
+IKF=0.222129 ISE=4.61322e-11 NE=2.48158 BR=1.89854
+NR=0.75 VAR=168.458 IKR=0.108495 ISC=9.99999e-14
+NC=2.00001 RB=7.90758 IRB=0.2 RBM=7.90758
+RE=0.275456 RC=1.42279 XTB=0.232595 XTI=3.02293 EG=1.206
+CJE=1e-11 VJE=0.75 MJE=0.33 TF=1e-09
+XTF=1 VTF=10 ITF=0.01 CJC=0
+VJC=0.95 MJC=0.23 XCJC=0.9 FC=0.5
+TR=1e-07 PTF=0 KF=0 AF=1
.ENDS
 
It probably has the same pinout of the standard transistor symbol. On Windows, you would CTRL->Rclick on the transistor symbol, set the prefix to X and then give the transistor the name of your subcircuit. I can't say how to do this on Mac.

But, there is probably a more topical thread for that...
 
Originally Posted by keantoken
An externally hosted image should be here but it was not working when we last tested it.

First, see if you can download the file in your browser using this:

http://startfetch.com/keantoken/ltspice/kean4.bjt

If not, then it is a problem with the server or with your network. If you can download the file, then it's a problem with LTSpice. If you go to Help->About, it will give you Mike's email address and you can send him a report.


Today, when I clicked on it, kean4.bjt is getting downloaded directly.
--gannaji
 
It probably has the same pinout of the standard transistor symbol. On Windows, you would CTRL->Rclick on the transistor symbol, set the prefix to X and then give the transistor the name of your subcircuit. I can't say how to do this on Mac.

But, there is probably a more topical thread for that...

Seems this won't be possible on mac, at least until that version gets more completed. There are so many things missing on the mac version, it's not easy sometimes to do certain things.

That option to right click on a part doesn't have the same effect on mac, and there is nothing to go change that QN or QP into an X, so I'm stuck with that.
 
You can open the symbol manually, edit->attributes to set it to X, then save it as a new symbol.

That's the problem, there is no way to edit attributes on the mac version, so there is no access to the attributes or anything else that way. Only the main libraries show up and we can't change to anything else.

I tried it on windows and the menu comes up and I did it there. Once the changes have been made and I go back to the mac to open that sim, then it does work.

That missing feature on the mac version is far from the only one. There is an other that I am really missing badly. Just like accessing the attributes of parts, we can't touch the data labels either. For example if I want a data label to display a current, or a power (from a calculation), then it can't be done.

An other missing thing is that when on windows we hover over some part to get that thermometer and get a power dissipation, that too doesn't work... And it goes on...
 
Wow, that's pretty bad. I would go to the Yahoo group about this one; it's probably already been asked.

Well, barring cometary intervention, you could manually edit the symbol files in a text editor, but I would only be guessing how to do that (may be fairly straightforward).
 
Wow, that's pretty bad. I would go to the Yahoo group about this one; it's probably already been asked.

Well, barring cometary intervention, you could manually edit the symbol files in a text editor, but I would only be guessing how to do that (may be fairly straightforward).

Editing the symbol files doesn't help much. I need to be able to insert something into a simulation and make changes. This is the hard part. Once it's in there, then as long as we don't need to edit attributes or change something else, it works.

I've figured out a few things that I do outside of ltspice, to compensate for some of those shortcomings, so I can do sims. Some manual editing of the actual text files sometimes, some done briefly on a windows ltspice install when all else fails.

I can't add (or change/edit) data labels for currents and power or other calculated values on the mac version, so I do that quickly on windows and go back to mac. A real pain, but it gets me by for now.

I wish I could get those dissipation readings and the likes as well, those don't work. Amazingly when hovering over a part, while holding shift, we can see sometimes the cursor changing to the thermometer, even with a small tooltip saying things, but all we can do is plot something, not make data labels.

Since I've been digging into those raw files directly with a text editor, I know a tiny bit more about them and I can edit a few things that way, and then it helps later in ltspice...
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.