1. 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.
    Dismiss Notice

how to import new component in LT spice ?

Discussion in 'Circuit Simulation & PCB Design' started by neptune, Aug 29, 2011.

  1. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,238
    Likes:
    645
    Location:
    Ex Yorks' Hants UK
    Why are using Notepad to open a *.MOD file, use LTspice,, Notepad will not display correctly
     
  2. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,321
    Likes:
    1,231
    Location:
    Cardiff, Wales
    Strange; it isn't when I try. Below are the screenshots I get.
    Pic 1 is the file listing of the zip before unzipping. Note the file type is shown as shortcut, but the file extension doesn't indicate this.
    Pic 2 is the file listing after unzipping. Note the file icons have the arrow indicating shortcut.
    Pic 3 is the message box I get on trying to open any of the unzipped files. Note the 'shortcut' reference and that the file extension is .xxx.lnk

    Screen1.gif
    Screen2.gif
    Screen3.gif
     
  3. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,238
    Likes:
    645
    Location:
    Ex Yorks' Hants UK
    hi alec,
    You are using the original duff zip..

    Use the one in post #37, I have tried for a second time its OK.

    Its should look like this, note file sizes
     

    Attached Files:

    Last edited: Sep 1, 2011
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,238
    Likes:
    645
    Location:
    Ex Yorks' Hants UK

    I use a zip because the Forum software doesn't allow some file type uploads, also its easier than changing the file extensions.
     
    Last edited: Sep 1, 2011
  6. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,321
    Likes:
    1,231
    Location:
    Cardiff, Wales
    Third time lucky (I swear it was the post #37 zip I tried last time! Maybe my system needs new batteries or refused to overwrite previous files!). The zipped files opened ok this time and the sim now shows Vout as positive. Result.
     
  7. neptune

    neptune Member

    Joined:
    Jun 14, 2009
    Messages:
    466
    Likes:
    5
    Location:
    New delhi, India
    ok .....
     
    Last edited: Sep 1, 2011
  8. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,238
    Likes:
    645
    Location:
    Ex Yorks' Hants UK
    Do you now have the LM324NS model working OK in a circuit.?
     
  9. neptune

    neptune Member

    Joined:
    Jun 14, 2009
    Messages:
    466
    Likes:
    5
    Location:
    New delhi, India
    hey man it is showing only symbol but is not running, it is giving me warnings
     

    Attached Files:

    • sub.png
      sub.png
      File size:
      120.5 KB
      Views:
      145
    • subb.png
      subb.png
      File size:
      143.6 KB
      Views:
      140
    • juj.png
      juj.png
      File size:
      54 KB
      Views:
      142
  10. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,238
    Likes:
    645
    Location:
    Ex Yorks' Hants UK
    its not a LIB file its a MOD file so .INCLUDE LM324NS.MOD
     
  11. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,321
    Likes:
    1,231
    Location:
    Cardiff, Wales
    ....and you've done it again; don't use a space before the file extension.
     
  12. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,321
    Likes:
    1,231
    Location:
    Cardiff, Wales
    Well it worked yesterday but today it doesn't! I think yesterday I was running the LM324.asc file using the opamp2 symbol renamed to LM324NS after adding it to the schematic. Today when I replaced the symbol with the LM324NS.asy one from post #37 (or with the one I created as per post #24) I got this error message:-
    Screen4.gif
    I guess this is something to do with the pin listing sequence. The sequence in the Pin Table for opamp2.asy is different from that in the table for LM324NS.asy, although the NetList for LM324NS.asy is consistent with the pin numbering in the .subckt definition in the LM324NS.MOD model file. I tried editing the Pin Table. LTS lets me do that, but refuses to save the changes.
    I'm now out of my depth. Anyone out there know how to fix this so that LM324NS.asy works, or can show me the error of my ways?
     
  13. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,238
    Likes:
    645
    Location:
    Ex Yorks' Hants UK
    hi alec,
    Its seems sometimes that LTS has a mind of its own!

    Just retested mine it works OK.

    As a test, post back the mod, asy and asc files, I will try to see whats happening.

    EDIT:
    Downloaded the zip from post #37, used the .mod and .asy files I created a new asc circuit.

    Tested the circuit, comparing with the LM324 datasheet, it works OK.

    Double checked the Opamps\Xopamps2.mod details, cannot see any problems.???
     
    Last edited: Sep 2, 2011
  14. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,321
    Likes:
    1,231
    Location:
    Cardiff, Wales
    Here they are :-
     

    Attached Files:

  15. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,238
    Likes:
    645
    Location:
    Ex Yorks' Hants UK
    alec,
    The asy had reverted back to the default pin outs.
    Corrected the pin outs and tested OK.

    Attached modified zip, remove existing MOD file and replace with this one.
     

    Attached Files:

  16. neptune

    neptune Member

    Joined:
    Jun 14, 2009
    Messages:
    466
    Likes:
    5
    Location:
    New delhi, India
    Done what you've told, it is running now
    will i have to put .include statement for each LM324NS opamp i use or just one will do ?
     
    Last edited by a moderator: Sep 2, 2011
  17. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,321
    Likes:
    1,231
    Location:
    Cardiff, Wales
    That was what I was finding when LTS refused to save my changes. Maybe cached files were being used by LTS instead of revised ones.
    I've replaced the mod file, and the asy file for good measure and things now seem ok. (Fingers crossed. Tomorrow is another day!). Thanks for restoring sanity to my system.
     
  18. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,238
    Likes:
    645
    Location:
    Ex Yorks' Hants UK
    Just one .include LM324NS.MOD is all you need, you can use as many LM324NS symbols as you need.
     
  19. neptune

    neptune Member

    Joined:
    Jun 14, 2009
    Messages:
    466
    Likes:
    5
    Location:
    New delhi, India
  20. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,238
    Likes:
    645
    Location:
    Ex Yorks' Hants UK
    hi,
    If you install that zen standard.bjt, you will over write the original LTS standard.bjt, do you really want to do that.??

    I would suggest you rename to say ZenTran1.mod and the in circuits that use these transistors have .include ZenTran1.mod.

    The other method which I use is to make a copy of the standard.bjt andrename the original standard.bjt as orgstandard.bjt as back up in case you mess up.

    Then copy and paste from the Zen.bjt only the transistors which you want to add to the standard.bjt , the original transistors and added transistors should then appear as normal when selecting a transistor from the list.

    Do you follow?

    EDIT:
    Comparing the Zen and LTS bjt files, according to the notes in the file, only these four transistors have been added!
    *
    *BC548B and BC558B Added (by Other Contributor)
    *AC127 and AC128 Added (by Other Contributor)
     
    Last edited: Nov 21, 2011
  21. neptune

    neptune Member

    Joined:
    Jun 14, 2009
    Messages:
    466
    Likes:
    5
    Location:
    New delhi, India
    Hello, that site is only text file , do i copy paste it in notepad and rename it to ZenTran1.mod or Zen.bjt

    and how do i copy the transistor files which i want to use from Zen.bjt to standard.bjt ?
     

Share This Page