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. neptune

    neptune Member

    Joined:
    Jun 14, 2009
    Messages:
    466
    Likes:
    5
    Location:
    New delhi, India
    i have downloaded LM324_unisym_test from yahoo groups
    , and it is .asc file, when i click the icon it opens itself in LT spice and says
    but how do i import it in LT spice.
    please explain step by step.
     
  2. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,190
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
    ONLINE
    hi,
    Did you also download the LM324.mod file on that yahoo link, I just downloaded the unis and .mod and it works ok without any other actions.

    Make sure the LM324.mod is in the same folder as the LM324_unis.asc.

    Lets know

    EDIT:
    If you have used the LTS install default folder, place the *.mod file into this folder C:\Program Files\LTC\LTspiceIV\lib\sub
     

    Attached Files:

    Last edited: Aug 29, 2011
  3. neptune

    neptune Member

    Joined:
    Jun 14, 2009
    Messages:
    466
    Likes:
    5
    Location:
    New delhi, India
    yes i have cut paste both of the file in this address but still cant find the component.
    .MOD file is showing as movie player icon :?
    what about the procedure above in quotes it is telling me to do ?
     
  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,190
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
    ONLINE

    hi,
    The BLUE text in the asc file is only a comment by the author of the asc and model. No action is required from you.

    This image shows how it looks in Win XP Pro
     

    Attached Files:

  6. neptune

    neptune Member

    Joined:
    Jun 14, 2009
    Messages:
    466
    Likes:
    5
    Location:
    New delhi, India
    i have pasted this file here E:\Program Files\LTC\LTspiceIV\lib\sub
    i have windows 7 , it looks like this.
    what should i do ?
     

    Attached Files:

    • filo.jpg
      filo.jpg
      File size:
      36.1 KB
      Views:
      514
  7. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,190
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
    ONLINE
    hi,
    Run the LTspice program and the Open the LM324_unisym_test.asc , then press RUN, it works for me without any problems.

    As a further test, Open and Run any one of the asc Example files provided in the LTspice folders, make sure it runs OK.
     
  8. neptune

    neptune Member

    Joined:
    Jun 14, 2009
    Messages:
    466
    Likes:
    5
    Location:
    New delhi, India
    ok it is running but why cant i find it in components list in components button (The and gate), & also if i download new components would i have to open them seperately all the time ?
     
  9. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,190
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
    ONLINE
    The author of the LM324 has used the ' opampX2' model , which is located at the end of the list under F2/Opamps. [ thats explained in the blue text on the asc circuit]

    I dont understand what you are asking.???
    The and gate), & also if i download new components would i have to open them seperately all the time ?
     
  10. neptune

    neptune Member

    Joined:
    Jun 14, 2009
    Messages:
    466
    Likes:
    5
    Location:
    New delhi, India
    http://www.simonbramble.co.uk/lt_spice/ltspice_lt_spice_tutorial_4.htm

    like if i downloaded a chip which is a complex part. if i have to use it i will have to open .asc file all the time like you explained.
    but if i want this chip to be shown in components box, from where i select all chips, diodes, opamps , voltages etc. then what will i have to do ?

    i will have to use 2-3 LM324N repeatedly in my projects !
     
  11. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,190
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
    ONLINE
    What I do in that case is have an asc file with just the LM324 on it and the .include command

    So for a new circuit I open that file, save it as my new circuit name, and add the extra components to make the new circuit.
    Using F6 you can make more copies of the LM324 symbol.

    Do you follow.?
     
  12. neptune

    neptune Member

    Joined:
    Jun 14, 2009
    Messages:
    466
    Likes:
    5
    Location:
    New delhi, India
    where is .include command ?
    i renamed it and saved it , i pressed F6 to make extra copies now how do i paste it in my renamed circuit ?
     
  13. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,190
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
    ONLINE
    hi neptune,
    Have you read the LTS help files and documentation.?
     
  14. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,190
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
    ONLINE
    hi,
    I have made a symbol for the LM324NS

    NOTE: the name is now LM324NS not LM324/NS which LTS will not allow as a valid name.

    Unzip this and move the LM324NS.asy into the OPA folder, the LM324NS.mod into the SUB folder and the LM324NS.asc into your working folder.

    Use the .include LM324NS.mod in your circuit diagram.

    The LM324NS symbol should then be accessible from the F2/OPA list.
     

    Attached Files:

  15. neptune

    neptune Member

    Joined:
    Jun 14, 2009
    Messages:
    466
    Likes:
    5
    Location:
    New delhi, India
    I downloded your file, it has 3 files , .asc , .asy , .mod
    where in OPA folder to move ? it has 3 sub folders -> cmp , sub , sym .
    whats working folder ?
    where do i write this ?

    LTC help is beyond my understanding.
     
  16. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,190
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
    ONLINE
    Create a Folder in the LTSpice folder called 'MyWork' [ or a name of your choice], which will be YOUR working folder.

    Inside the MyWork folder, create folders for the various projects that you are working on OR for the Types of IC being used.

    eg: I have 'MyWork/OPA and MyWork/555 etc, in that way I can quickly find projects I worked on earlier.

    NOTE: .asc , .asy , .mod are File Type Folders that LTS uses.

    When you import files place the asy files in the C:\Program Files\LTC\LTspiceIV\lib\sym folder.

    Place the .mod , .lib in the C:\Program Files\LTC\LTspiceIV\lib\sub folder.

    Place the .asc files in the appropriate folder under your MyWork folder.

    eg: your LM324.asc could be placed in the C:\Program Files\LTC\LTspiceIV\MyWork\OPA folder.

    Its important that the .include LM324NS.mod text is entered as a Spice directive on your circuit, when using the LM324NS model.
     
    Last edited: Aug 31, 2011
  17. neptune

    neptune Member

    Joined:
    Jun 14, 2009
    Messages:
    466
    Likes:
    5
    Location:
    New delhi, India
    all done as said .asc file in new folder, .mod file in sub folder and .asy file in sym folder
    it is still not showing in component list.
    but when i open .asc file it is showing me warning "couldnt find symbol of LM324N"
     

    Attached Files:

    • dodo.png
      dodo.png
      File size:
      150.6 KB
      Views:
      390
    • kiki.png
      kiki.png
      File size:
      121.1 KB
      Views:
      347
    Last edited: Aug 31, 2011
  18. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,190
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
    ONLINE
    hi.
    As a test I have downloaded that zip file I posted, unzipped to my desk top, it works fine, look at this image.

    There is something wrong in your installation.??

    EDIT:
    You have also got two include directives in your circuit.!
     

    Attached Files:

    Last edited: Aug 31, 2011
  19. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,259
    Likes:
    1,218
    Location:
    Cardiff, Wales
    Is that because you're using LM324NS ?
     
  20. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,190
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
    ONLINE
    alec,
    Have you tried the zip in post #13, if not, could you confirm that there is or is not a problem,,, it works OK for me, but an independent check would be a good idea.:rolleyes:
     
  21. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,259
    Likes:
    1,218
    Location:
    Cardiff, Wales
    Downloaded the zip and installed as directed. Got similar result to Neptune, i.e. it isn't showing in component list, and when I open .asc file there's the warning "Couldnt find symbol of LM324" and a blank where the op-amp symbol should be.

    Is there a .sym file missing from the zip, Eric?

    EDIT:
    Update:
    I hadn't spotted the ref in post #1 to using the opamp2 symbol. So I made a copy of that, renamed to LM324NS.asy, in the sym folder, opened the .asy file and edited the value to read LM324NS. The sim now runs ok after resaving the .asc file to get rid of the warning about the missing LM324 symbol.
     
    Last edited: Aug 31, 2011

Share This Page