# LTspice problem

Status
Not open for further replies.

#### confounded

##### New Member
Hi, i have a problem with LTspice.

I just started to learn this by watching the two beginner videos. ECE Software & Training Videos

I downloaded the spicemodel of a BC847BPDW1T1_NPN transistor and saved it to a new folder i called 'LTspicemodels' in desktop.

The video says that to use the new component you right click on name of existing transistor you've placed and replace it with the name of the new component. I did this.

Then it says you add a spice directive by pressing 's' and then typing .include C:\etc
I typed in .include C:\Desktop\LTspicemodels\BC847BPDW1T1_NPN[1]

However when i go to run the sim i get the message: SPICE ERROR could not open include file ''C:\desktop\LTspice\BC847BPDW1T1_NPN[1]''

also how do i post my schematic so it can then be viewed by others?

#### ericgibbs

##### Well-Known Member
Hi, i have a problem with LTspice.

I just started to learn this by watching the two beginner videos. ECE Software & Training Videos

I downloaded the spicemodel of a BC847BPDW1T1_NPN transistor and saved it to a new folder i called 'LTspicemodels' in desktop.

The video says that to use the new component you right click on name of existing transistor you've placed and replace it with the name of the new component. I did this.

Then it says you add a spice directive by pressing 's' and then typing .include C:\etc
I typed in .include C:\Desktop\LTspicemodels\BC847BPDW1T1_NPN[1]

However when i go to run the sim i get the message: SPICE ERROR could not open include file ''C:\desktop\LTspice\BC847BPDW1T1_NPN[1]''

also how do i post my schematic so it can then be viewed by others?

hi,
As a newcomer to LTS I'm still studying.
I have noticed in this example the name of the device differs from that within the lib description.

I have edited the lib file:
The text was. Qbc847bpdw1t1-npn, I changed this to: bc847bpdw1t1_npn
and resaved it as bc847bpdw1t1_npn.lib

I placed this lib file in my main LTC/LTspiceIV/lib that is located in the Program Files folder.

I then created a dummy *asc file, attached, see the name of the transistor and the include directive.

The asc file runs OK.

I'm sure there must be an easier way, if so, lets hear it from the pro's.

To attach a file to your posts use the 'manage attachments' button

#### Attachments

• esp03 Jun. 17.gif
26.5 KB · Views: 673
Last edited:

#### confounded

##### New Member

I'm going to go try what you suggested now.

I meant how can i attach my LTspice model i made. I can't seem to find it when i browse in manage attachments. I go into the LTspice folder and the models i have made are not listed

#### confounded

##### New Member
How do you create a dummy *asc file?
Did you attach it?

#### ericgibbs

##### Well-Known Member
How do you create a dummy *asc file?
Did you attach it?

Hi,
Its just an asc file so that I can load the symbol.

Here it is.

#### Attachments

• Draft16.asc
896 bytes · Views: 332
Last edited:

#### confounded

##### New Member

I opened the file you attached and replaced the name of my lib file with the one you have in your INCLUDE and i now get a different error message:

can't find definition of model ''BC847BPDW1T1_NPN'' select ok to continue the simulation with the default model or cancel to quit now.

I dont seem to be able to attach an asc file like you have to your reply

Last edited:

#### ericgibbs

##### Well-Known Member

I opened the file you attached and replaced the name of my lib file with the one you have in your INCLUDE and i now get a different error message:

can't find definition of model ''BC847BPDW1T1_NPN'' select ok to continue the simulation with the default model or cancel to quit now.

I dont seem to be able to attach an asc file like you have to your reply

hi,
To attach a file.

Scroll down the page to 'manage attachments' button.
Click the button, a 'manage attachments' window should appear
Use the Browse option locate the *.asc file,
when uploaded click 'close this window'.

Give it a try.

#### confounded

##### New Member
I get to 'use the browse option to locate file' and i cant locate a asc file.
I go into where it is in the LTspice folder and i dont see any asc files

Actually i can only see the asc files when im in LTspice. Even looking in the LTspice folder via my computer/programfiles/ltspice etc i dont see the asc files

Last edited:

#### ericgibbs

##### Well-Known Member
I get to 'use the browse option to locate file' and i cant locate a asc file.
I go into where it is in the LTspice folder and i dont see any asc files

hi,
If you use 'windows explorer' can you find any asc files in the LTSpice sub folders.????

#### confounded

##### New Member
Sorry but i'm such a noob with computers you must explain how i use windows explorer to look.

Is that just looking through my computer then into programs etc.

#### ericgibbs

##### Well-Known Member
Sorry but i'm such a noob with computers you must explain how i use windows explorer to look.

Is that just looking through my computer then into programs etc.

no problem.

click Start [bottom left of desktop]
Programs/Accessories/Windows explorer

OK.

#### confounded

##### New Member
When i follow those instructions and click on windows explorer it opens up my documents folder.
When i explore into myprograms then into LTspice i dont see any asc folders. All i see is shown in attachment

I'm using Vista in case that helps

#### Attachments

• screen.jpg
93.6 KB · Views: 404

#### ericgibbs

##### Well-Known Member
When i follow those instructions and click on windows explorer it opens up my documents folder.
When i explore into myprograms then into LTspice i dont see any asc folders. All i see is shown in attachment

I'm using Vista in case that helps

In that image you have 3 'yellow' folders, click on the examples and open the folder

#### confounded

##### New Member
inside examples are these 2 folders

#### Attachments

• screen 2.jpg
79.2 KB · Views: 367

#### ericgibbs

##### Well-Known Member
inside examples are these 2 folders

You are getting close

Now click the yellow educational folder

Last edited:

#### confounded

##### New Member
There are lots of asc files but my model i saved is not one of them Where can i find that?

Got to go out for a few hours now, thank you for your help and quick responses

#### Attachments

• screen 3.jpg
108.5 KB · Views: 331
Last edited:

#### ericgibbs

##### Well-Known Member
There are lots of asc files but my model i saved is not one of them Where can i find that?

Got to go out for a few hours now, thank you for your help and quick responses

OK.
Do this.
Click Start
Search
For Files or Folders
type in the name of the file into the search for text box
[make sure you have spelt the name correctly]
click Search.

#### confounded

##### New Member
Ok i had to do a scan that took the same amount of time as i took me to eat a large bowl of cereal but it found it

And then i dragged it to desktop and then uploaded it from there so success 1

However my simulation still doesnt run and i still get the error message:

can't find definition of model ''BC847BPDW1T1_NPN'' select ok to continue the simulation with the default model or cancel to quit now.

#### Attachments

• Test1.asc
896 bytes · Views: 158
• screen 4.jpg
98.8 KB · Views: 342
Last edited:

#### confounded

##### New Member
and heres the error message i get

#### Attachments

• screen 5.jpg
121.9 KB · Views: 419

#### Torben

##### Well-Known Member
Hi there,

The model name you're using in your schematic should match the 'MODEL' string in the library file, not the name of the library file itself.

Right-click on your transistor's value and change it from BC847BPDW1T1_NPN to Qbc847bpdw1t1-npn and try it.

I got this by looking in the BC847BPDW1T1_NPN.lib file using a text editor:

Code:
**************************************
*      Model Generated by MODPEX     *
*   Contains Proprietary Information *
*      Which is The Property of      *
*     SYMMETRY OR ITS LICENSORS      *
*Commercial Use or Resale Restricted *
*   by Symmetry License Agreement    *
**************************************
* Model generated on Feb 28, 00
* MODEL FORMAT: PSpice
.MODEL Qbc847bpdw1t1-npn npn
+IS=1.02883e-10 BF=3441.88 NF=1.5 VAF=50.4069
+IKF=0.0513316 ISE=6.57032e-12 NE=1.90684 BR=11.3392
+NR=1.5 VAR=2.18491 IKR=0.513316 ISC=1e-16
+NC=4 RB=0.117532 IRB=0.100021 RBM=0.100913
+RE=0.376664 RC=1.88332 XTB=50 XTI=4
+EG=1.05 CJE=9.22073e-12 VJE=0.680201 MJE=0.85
+TF=5.8626e-10 XTF=3.3324 VTF=7.33802 ITF=0.210664
+CJC=4.07024e-12 VJC=0.95 MJC=0.347426 XCJC=0.800007
+FC=0.114115 CJS=0 VJS=0.75 MJS=0.5
+TR=1e-07 PTF=0 KF=0 AF=1

Check out the line which starts with the word 'MODEL'. That tells you the model name to give to your transistor.

Also, if you save the .lib file to the sub/ directory inside lib/, (i.e. move it to C:\Program Files\LTC\LTspiceIV\lib\sub\BC847BPDW1T1_NPN.lib) then you can omit the directory from your .include line and just have the filename (i.e. '.include BC847BPDW1T1_NPN.lib') which is much shorter (and more portable, too).

Hope this helps,

Torben

Status
Not open for further replies.

Replies
6
Views
1K
Replies
7
Views
4K
Replies
13
Views
8K
Replies
3
Views
3K
Replies
14
Views
5K