Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

How to configure schematic attribute of NPN transistor with model type model?

Status
Not open for further replies.

richardm55

New Member
I have downloaded spice model for transistor BCM847BS. It was text file with an extension prm and containing model definition with syntax .model model_name NPN. I placed this file in folder MyLib which has path: .......LTSpiceXVII/lib/sub/MyLib.
I copied sym file from standard NPN symbol file and I named it with new component's name. Then I open this sym file in the spice and I opened Edit/Schematic Attribute Editor and then I filled some fields.
Prefix: I don't know what prefix should? I am not sure I use X because it is not sub-circuit model, I think?
SpiceModel: name of spice model used in that model file
Value: BCM847BS
Value2: BCM847BS
ModelFile: path and file name where is model is located.
When I used NP as prefix I get an error message that

Thank you in advance for any help.
 

Attachments

  • error-message.jpg
    error-message.jpg
    23.5 KB · Views: 217
Welcome to ETO!
Try X as the prefix.
 
I have tried it before and I set prefix as X I get another error message;
Unknown subcircuit called in:
xu1 n002 n003 n005 qbcm847bs bcm847bs bcm847bs
 
Post the transistor spice model.
 
Here is attached its spice model. I have changed its extension because prm extension has not been accepted to upload. Anyway, it does not matter because it is txt file
 

Attachments

  • BCM847BS.prm.txt
    1.4 KB · Views: 193
I have another extra question. Does it matter if statements in model body have spaces between equal signs and rest?
 
Try copying all the text from .MODEL on down to the *## into the cmp/standard.bjt file, which has all the NPN transistor models.
Look at the other models to understand the format.
You can add things like the voltage and current rating at the end of the model listing as shown in the other models, if you like.
That should then bring the device up as available when you place the NPN symbol in the schematic.

(Note: You may have to add parentheses before IS and after FC=0.979, to match the other transistor models for proper operation if you still have a problem).
Does it matter if statements in model body have spaces between equal signs and rest?
I think not.
I believe spaces are ignored.
 
"I have another extra question. Does it matter if statements in model body have spaces between equal signs and rest?"

No...it does not.
 
I have downloaded spice model for transistor BCM847BS. It was text file with an extension prm and containing model definition with syntax .model model_name NPN. I placed this file in folder MyLib which has path: .......LTSpiceXVII/lib/sub/MyLib.
I copied sym file from standard NPN symbol file and I named it with new component's name. Then I open this sym file in the spice and I opened Edit/Schematic Attribute Editor and then I filled some fields.
Prefix: I don't know what prefix should? I am not sure I use X because it is not sub-circuit model, I think?
SpiceModel: name of spice model used in that model file
Value: BCM847BS
Value2: BCM847BS
ModelFile: path and file name where is model is located.
When I used NP as prefix I get an error message that

Thank you in advance for any help.

Hi

There's a few ways to do this. Here's as easy one.

The file contains a "model" definition so it is not a subckt.
This means you don't have to change anything in the native NPN symbol except the "value" property.

1. If you are placing your model files in the default LTspice path, then just copy the file to the default sub folder location and LTspice will find it.
2. Then, place an NPN symbol on the schematic and change the "value" field from NPN to QBCM847BS.
3. Place this statement on the schematic using the name of the file:

.lib Mylib\BCM847BS.txt

Note:
MyLib is a folder located in the default "sub" folder, so a relative path can be used as reflected in the .lib statement above.
If the file is not located in a path relative to the default "sub" folder path, the an absolute path must be specified.

4. Your done.

You can also add the model params to the default standard.bjt file (as described in post #7) but there is the risk of it being overwritten by LTspice program updates.

eT
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top