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
    Can you explain me step by step. i am noob in computers.
     
  2. neptune

    neptune Member

    Joined:
    Jun 14, 2009
    Messages:
    466
    Likes:
    5
    Location:
    New delhi, India
    hey man,
    > I dont understand i downloaded a file from yahoo groups it should work directly without changing it , but you changed that file to 3 files.
    How will i be able to use other components of yahoo groups when they require alteration !
    > i next want to use a chip - which has quad amps (LM324N), (http://www.datasheetcatalog.com/datasheets_pdf/L/M/3/2/LM324N.shtml)
    where can i find its model , or will i have to place 4 amps instead of chips.
     
  3. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,233
    Likes:
    645
    Location:
    Ex Yorks' Hants UK
    You have to place a LM324NS on your circuit 4 times , if you want to represent a quad LM324NS.

    Use the F6 key to copy your first LM324NS symbol, 4 times.

    The 3 files I created have a unique name, LM324NS,,, it is different from the original LM324/NS , so how will that stop you from using the other components.???

    Google for LTspice tutorials.
     
  4. dave

    Dave New Member

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


     
  5. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,315
    Likes:
    1,230
    Location:
    Cardiff, Wales

    1) Find the opamp2.sym file. If you used the default installation settings for LTSpice the file will be in folder C:\Program Files\LTC\LTspiceIV\lib\sym\Opamps.
    2) Highlight the file name and copy the file to the same folder.
    3) Right-click the file-copy name and change the name to LM324NS.asy.
    4) Double-click the file name to open the file in LTS.
    5) Right-click the 'opamp2' text.
    6) Change the string contents to LM324NS.
    7) Save the file.
    8) Open file LM324NS.asc (wherever you stored it), ignoring any message about a missing symbol.
    9) Add the LM324NS symbol (which should now appear in the Opamps folder).
    10) Save the .asc file (ignoring any warning about missing symbol).
    11) Reopen the .asc file. It should now open without any warning. Job done.
     
    • Like Like x 1
  6. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,315
    Likes:
    1,230
    Location:
    Cardiff, Wales
    Why do you assume it should work directly? Never assume anything in computerland :D
    Downloads are often in zipped form. A single zipped file can contain several individual files.
     
  7. neptune

    neptune Member

    Joined:
    Jun 14, 2009
    Messages:
    466
    Likes:
    5
    Location:
    New delhi, India
    it worked as you said , now its symbol is shown in components box , but its only a symbol where is the working file !
    and where do i save .asc file and .mod file. i will post back again here if it doesnt work.
     
    Last edited: Sep 1, 2011
  8. neptune

    neptune Member

    Joined:
    Jun 14, 2009
    Messages:
    466
    Likes:
    5
    Location:
    New delhi, India
    http://tech.groups.yahoo.com/group/LTspice/files/ Lib/Digital CD4000/
    i downloaded CD4000 sereis of .lib file and .sym symbols file from two different sources shown in this link.
    i copy pasted .lib files in library and .sym file in sym folder , they are showing in component box. what to type in .op box so that library files are included ?
     
  9. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,315
    Likes:
    1,230
    Location:
    Cardiff, Wales
    Eric has already told you. See post #15.

    Type .inc CD4000.lib

    If LTS can't then find the .lib file you'll get an error message. If so, try moving the .lib file to the .sub folder (that worked for me).
     
  10. neptune

    neptune Member

    Joined:
    Jun 14, 2009
    Messages:
    466
    Likes:
    5
    Location:
    New delhi, India
    here look i saved it in .sub folder
    i maked a test circuit to see weather its working but its still giving me error.
    i downloaded an example circuit which uses same CD4000.lib file and it works fine.
     

    Attached Files:

    • lib.png
      lib.png
      File size:
      125.9 KB
      Views:
      143
    • fgfg.png
      fgfg.png
      File size:
      175.2 KB
      Views:
      140
    Last edited: Sep 1, 2011
  11. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,315
    Likes:
    1,230
    Location:
    Cardiff, Wales
    Remove the space between '4000' and '.lib' in your schematic!
     
  12. neptune

    neptune Member

    Joined:
    Jun 14, 2009
    Messages:
    466
    Likes:
    5
    Location:
    New delhi, India
    lol :p
    it worked. its input are 2v,2v and output is 3.3V
     
  13. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,233
    Likes:
    645
    Location:
    Ex Yorks' Hants UK
    The default VDD supply voltage for the digital models is +5V, if you want to change it right click on the CD4000 symbol and change VDD in the Spice Line
     
    Last edited: Sep 1, 2011
  14. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,315
    Likes:
    1,230
    Location:
    Cardiff, Wales
    Eric, I'm puzzled (situation normal, then!).
    Running that LM324NS.asc sim shows Vout as negative, with a mid-point ~ -1.8V. How is a negative output possible with the single-ended supply shown? The load on the LM324 is essentially resistive, so its output should never go below ground.
     
  15. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,233
    Likes:
    645
    Location:
    Ex Yorks' Hants UK
    hi alec,
    Its not my model, but I will recheck the original and the modified models, let you know.

    EDIT:
    For some as yet unknown reason, LTS will not let me overwrite the asy file.???
    The original LM324/NS works OK after downloading without any user changes.

    Will resume work on it later...
     
    Last edited: Sep 1, 2011
  16. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

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

    Finally got LTS to save the file I wanted.!

    Look at this v2.zip for the LM324NS,, remove all the OLD LM324NS files before unzipping and moving files to their respective folders, lets know.
     
    Last edited: Sep 1, 2011
  17. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,315
    Likes:
    1,230
    Location:
    Cardiff, Wales
    That zip only contains shortcuts; not the files themselves.
     
  18. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,233
    Likes:
    645
    Location:
    Ex Yorks' Hants UK
    I think my PC needs new batteries, what the heck.! I'll be back!!!!

    EDIT:
    Sorry about the mix up, thanks for your time.:eek:
     

    Attached Files:

    Last edited: Sep 1, 2011
  19. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,315
    Likes:
    1,230
    Location:
    Cardiff, Wales
    Still only shortcuts, that won't open :-(
     
  20. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,233
    Likes:
    645
    Location:
    Ex Yorks' Hants UK
    I have just downloaded that last zip from post #37 and its all there.
    Look at this screen shot.
     

    Attached Files:

  21. neptune

    neptune Member

    Joined:
    Jun 14, 2009
    Messages:
    466
    Likes:
    5
    Location:
    New delhi, India
    i downloaded your zip file, and it contains all three files, why do people Zip such small files !
    Anyway that .MOD file shown in your pic doesnt resembel mine when i open it in notepad.
    have a look
     

    Attached Files:

Share This Page