This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TINA/Spice/LM4562: Working SPICE model for LM4562 (for use with LTspice XVII)

Part Number: LM4562
Other Parts Discussed in Thread: TINA-TI, , OPA2131, OPA2140, TEST

Tool/software: TINA-TI or Spice Models

Hello,

I'm looking for a working SPICE model of the LM4562 that I can use within LTspice. The model provided at the website has two bugs (subckt pin order and virtual ground definition are wrong), but even after fixing these the model still results in numerous error messages when trying to run a simulation (singular matrix - the circuit has floating nodes -  less than two connections to node xxxx - etc.).

Thanks for help, and best regards - Tilmann

  • Hi Tilmann,

    I do not see a problem with the subckt pin order, what did fix? The errors such as singular matrix is resulted from the circuit as a whole, not just the model so without seeing your circuit, I cannot tell what is going on.

    Please note that we cannot support LTspice related issues. You can try duplicating your circuit in TINA-TI which is freely available from here: http://www.ti.com/tool/TINA-TI. If you still run into issues, we can look into them.

    Thanks,
    JC

  • Hello JC,
    thanks for your fast response.

    Regarding the pin order: normally, an OPAMP uses the pin order IN+/IN-/V+/V-/OUT - but in the LM4562.LIB subckt definition the inputs are swapped.

    The circuit is a rather simple signal amplifier which I am optimizing in terms of bandwidth and other parameters. It simulates perfectly with other opamp models like the OPA2131 (which is also in the previous version of the product and behaves as simulated), or the OPA2140. All other models I took from TI so far have worked correctly in this environment.

    Additionally, the nodes that are mentioned in the error messages are internal to the opamp. So I'm pretty sure that in this case, the problem is NOT caused be the circuit, but by the model. (Note again that other TI opamp types simulate correctly in exactly this circuit, I just change the values.)

    It's perfectly clear that you can't provide support for other partys software packages, but I think it would be at least nice to provide a correct and working model.

    Installing yet another complex simulation tool and getting used to it deep enough to really benefit of it just for very few simple simulations a year simply doesn't count - so please excuse me if I prefer to stay with the tool I know at least good enough for this purpose and occasional use. That's nothing against TINA-TI.

    Thanks & regards, Tilmann
  • Hi TIlmann,

    Let me first address your comment that "normally, an OPAMP uses the pin order IN+/IN-/V+/V-/OUT".

    Most SPICE simulators support implicit netlisting, meaning that when calling/instantiating a subckt, the order of the nodes on the calling line (start with X) needs to match the pin order of the subckt definition (.SUBCKT) to ensure proper connection. There's no such "normal" as you described.

    In other words, the subckt definition can use any pin order, as long as the schematic capture tool creates the netlist following that order. This is something you need to set up correctly in the tool that you use. I don't know how this works in LTSpice, my guess is that there is something similar to other tools that let you specify the order of the pins in the SUBCKT definition.

    We'll use PSPICE as an example. This is the schematic showing net names (in red). Note the numbers (in black) on the symbol pins, those are the orders in which the netlist will be created:

    Here is the netlist created and you can see that the net names follow that order:

    Which matches the order in the model:

    Please verify that this is correct in your environment.

    Thanks,
    JC

  • Tilmann,

    BTW, is it possible for you to paste the error messages here so we can see which nodes are causing trouble? We don't see that in either PSPICE or TINA-TI.

    Thanks,
    JC

  • Hello JC,

    many thanks for your support and your explanations.

    Regarding the pin order, I must confess that the "in+/in-/v+/v-/out" order appeared as a standard to me since the very most of all models I got so far really use this order. I looked up many of my models downloaded from NS/TI/others and most of them follow this (say) quasi-standard. But you are right, there also are models with other pin orders, and the main issue is that the model must match the symbol. The generic "opamp2" symbol in LTspice also uses this (say) quasi-standard pin order, so in fact this is the only order I am really used to...

    Nevertheless, it's really not a big deal to correct the pin order in the subckt declaration to match the (given) symbol, and that's what I did.

    Regarding the simulation problems, I created a test case with a very simple single amplifier stage. This simulates perfectly for the OPA2140 (with the model provided by TI), but persistently fails with the LM4562 (model provided by TI, but with swapped input order in the subckt definition). Please find all relevant files attached to this message.

    Perhaps I'm really doing something wrong, or perhaps LTspice really has some problem, but from these tests (and all experiences I made with other "alien" models in LTspice, mostly from TI) it appears to me that the model is causing the problems here.

    Thanks for taking the time - and best regards, Tilmann

    Opamp-Test.zip

  • Hello JC,
    were you able to have a look at the files I provided?

    In the meantime, I even installed TINA-TI and tried to enter at least a very small and simple single-OP amplifier stage, but already failed at the basics - seems to me that if you're used to the workflow of another program it's a really steep learning curve, and I must confess that several details appeared rather unintuitive to me... So I'd really appreciate a model of the LM4562 that works in LTSpice just the way all other TI models have done so far.

    Since you're probably used to working with TINA-TI, were you able to simulate a single amplifier stage with the LM4562 model "as it is"? If the model really is broken, you should run into problems with TINA-TI as well...

    Thanks for some feedback!
    Regards, Tilmann
  • Hi Tilmann,

    I cannot open the design you shared, but I did duplicate your PDF file in TINA and it simulates fine showing a 20dB DC gain. I attached it below.

    E2E.TSC

    thanks,
    JC

  • Hi JC,
    thanks for taking the time!
    Regards, Tilmann