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.

What am I doing wrong - Spice

Status
Not open for further replies.

kinarfi

Well-Known Member
I have upload and followed the direction for adding the IRF4905 & IRF2805 .sub files and created the .asy files but spice doesn't like something and says so.
I have been having this problem for a while, so I uninstalled and most of the files I didn't create, reinstalled ltspice, added LtSpiceIV_Plus_12_2009.exe, down loaded IRF spice.zip, extracted the IRF4905 & IRF2805 .spi files and renamed them .sub, instead of having it all in a folder named ltspice, I have it all in a folder named A1 Spice so it higher up in the folder on my C: drive, not in my program files.
Any idea of what I'm doing wrong?
Thanks,
Jeff
 

Attachments

  • Untitled.png
    Untitled.png
    88.9 KB · Views: 289
  • irf2805.txt
    1.9 KB · Views: 188
1. Place .include irf2805.txt on the Draft1.asc schematic (must match the file containing the model )

2. Edit the symbol IRF2805.asy, and remove the IRF2805.sub attribute value on the SpiceModel line. (Do not use the second line for your added models, the name on the third line "VALUE" must match the .SUBCKT line in the included file)

3. Make sure that the file irf2805.txt is in the same subdirectory where the .asc and .asy file are located.
 
Last edited:
I have upload and followed the direction for adding the IRF4905 & IRF2805 .sub files and created the .asy files but spice doesn't like something and says so.
I have been having this problem for a while, so I uninstalled and most of the files I didn't create, reinstalled ltspice, added LtSpiceIV_Plus_12_2009.exe, down loaded IRF spice.zip, extracted the IRF4905 & IRF2805 .spi files and renamed them .sub, instead of having it all in a folder named ltspice, I have it all in a folder named A1 Spice so it higher up in the folder on my C: drive, not in my program files.
Any idea of what I'm doing wrong?
Thanks,
Jeff

hi Jeff,
Where is your .include iRF2805.sub file.???

Ignore the distortion in my crude sim
 

Attachments

  • AAesp05.gif
    AAesp05.gif
    36.4 KB · Views: 205
Thank you, gentlemen,
Still Pulling my hair out, that didn't fix it either, I thought you were supposed to add the .sub files to the lib / sub folder and reference that file using the spice title line in the .asy, or is that just another way to accomplish the same thing?
The attachments had to be renamed from .sub to .txt so I could upload them here.
Would you attach you sub files and asy files for these FETs so I can compare what you have to mine, please.
When I run 709.asc, I get then cant open flag for one irf, so I deleted any reference to that one and then I get the cant open flag for the other. Still,
Thanks, I've been trying to figure what I'm doing wrong for 3 or 4 days now and had to give up and ask for help, so I definitely appreciate you help!!
Jeff
 

Attachments

  • FILES.png
    FILES.png
    265.8 KB · Views: 216
  • IRF2805.png
    IRF2805.png
    42.4 KB · Views: 305
  • IRF4905.png
    IRF4905.png
    41.8 KB · Views: 403
  • irf4905.TXT
    1.7 KB · Views: 199
  • irf2805.TXT
    1.9 KB · Views: 149
  • 7.09.asc
    11.1 KB · Views: 179
hi Jeff,
Please post your asc file.
 
Spice

I often have the same problem. Seems there are several ways to do it. Attached is a procedure I wrote to try and get some input from the experts. I have done your IRF2805 using your file and this method. I think this only works for symbols from the library that you can modify, but I use it often. The thing I like about it is it doesn't take include statements.
 

Attachments

  • Spice.doc
    225.5 KB · Views: 638
Jeff, in the Symbol Attribute Editor window, the default prefix is for a .model. If you are using a .subckt, change the prefix to X. This should solve your problem.
 
BING, 10 POINTS TO ROFF, 7 POINTS TO RONV, 4 POINTS TO EVERYONE ELSE, Changing the prefix to X took care of my problem, Thanks so much.
Thank for the help, greatly appreciated,
Jeff
 
Eric, did you see my 7.09.asc file or would you like a png picture of it.
 
Hi Again kinarfi,

Here is a correctly written symbol file for the IRF4905 using your model:

Version 4
SymbolType CELL
LINE Normal 48 48 48 96
LINE Normal 16 80 48 80
LINE Normal 16 48 24 48
LINE Normal 48 48 24 44
LINE Normal 48 48 24 52
LINE Normal 24 44 24 52
LINE Normal 16 8 16 24
LINE Normal 16 40 16 56
LINE Normal 16 72 16 88
LINE Normal 0 80 8 80
LINE Normal 8 16 8 80
LINE Normal 48 16 16 16
LINE Normal 48 0 48 16
WINDOW 0 56 32 Left 0
WINDOW 3 56 72 Left 0
SYMATTR Value IRF4905
SYMATTR Prefix X
SYMATTR SpiceModel MOSFET\IRF4905.sub
SYMATTR Value2 IRF4905
SYMATTR Description HEXFET® Power MOSFET Transistor
PIN 48 0 NONE 0
PINATTR PinName D
PINATTR SpiceOrder 1
PIN 0 80 NONE 0
PINATTR PinName G
PINATTR SpiceOrder 2
PIN 48 96 NONE 0
PINATTR PinName S
PINATTR SpiceOrder 3

Note that the third symbol attribute (SYMATTR) line points to the location of the subcircuit file created. Inclusion of the path to any sub folder in the subcircuit folder must be correct, that the naming be identical and the extention matches. I have the symbol file above located in a sub folder named MOSFET in sym/Misc/MOSFET. The subcircuit file is in a sub folder in the sub library named MOSFET in sub/MOSFET.

If you eliminate any symbol file you currently have to avoid any conflicts, install the above symbol file after modifying the pathing appropriately and have correctly installed the subcircuit file, which is the one I installed last year and works, you should be off to the races. I routinely use NotePad to edit and save these files as it appears to not include any text attributes. And I always save as type "All Files" and "ANSI" encoding.

Hope this helps.

Merv
 
If you are planning to use the same MOSFET (or BJT, or op amp, or...) in many simulations, it makes sense to make a dedicated symbol for it. Otherwise, I believe it is simpler to use the generic symbol, edit the attributes, and include the model or subcircuit file name on your schematic.
 
If you are planning to use the same MOSFET (or BJT, or op amp, or...) in many simulations, it makes sense to make a dedicated symbol for it. Otherwise, I believe it is simpler to use the generic symbol, edit the attributes, and include the model or subcircuit file name on your schematic.

Hi Roff,

I take your point insofar that it is an option if one has little or no use for the symbol in the immediate future. There are many components in the stock library provided by LT that go unused or are seldom used. For my part, I prefer a more robust library that is easily viewable so adding easily accessible components is the road I took not long after I started using LTS last April. After my photographic memory ran out of film a few years ago, it is difficult for me to remember all the .sub files in the sub folder. :D

If one takes the time to edit the component attributes using the editor provided or by editing the generic symbol file, the very same five symbol attributes are being edited; Prefix, Value, Value2, SpiceModel and Description (optional). The difference is the edited file can be saved and used later, if needed, exactly like any other component in the library with only a minute or less of additional time invested to save it. It can be located in the symbol library just as any other existing component via the menu, placed on the schematic and used without any further attribution such as spice directives. I guess it boils down to personal preference, overall, in the approach employed.
 
it is difficult for me to remember all the .sub files in the sub folder.
I hear that.:) For that reason. my SUB folder is on my bookmark toolbar.
If one takes the time to edit the component attributes using the editor provided or by editing the generic symbol file, the very same five symbol attributes are being edited; Prefix, Value, Value2, SpiceModel and Description (optional).
I typically only edit the value, unless the model is a subcircuit, in which case I also edit the prefix.
Maybe I should try your method. I might like it.:)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top