Skip to main content
Visitor II
September 5, 2025
Solved

Faulty LM358 SPICE model

  • September 5, 2025
  • 2 replies
  • 733 views

I'm trying to find a working spice model for the ST LM358. The one on the site gives an output of -12KV for a small sine wave when powered from ± 12V

And the "contact us" email doesn't work.

    This topic has been closed for replies.
    Best answer by AScha.3

    So in the sub the pin numbers are puzzled:

    ** Standard Linear Ics Macromodels, 1993.
    ** CONNECTIONS :
    * 1 INVERTING INPUT
    * 2 NON-INVERTING INPUT
    * 3 OUTPUT
    * 4 POSITIVE POWER SUPPLY
    * 5 NEGATIVE POWER SUPPLY
    .SUBCKT LM358 1 2 3 4 5

    vs

    PINATTR PinName In+
    PINATTR SpiceOrder 1
    PIN -32 -16 NONE 0
    PINATTR PinName In-
    PINATTR SpiceOrder 2
    PIN 0 -32 NONE 0
    PINATTR PinName V+
    PINATTR SpiceOrder 3
    PIN 0 32 NONE 0
    PINATTR PinName V-
    PINATTR SpiceOrder 4
    PIN 32 0 NONE 0
    PINATTR PinName OUT
    PINATTR SpiceOrder 5

    ----------------

    So try :   

    - modified sub

     

    2 replies

    Super User
    September 5, 2025

    So first try your circuit with a basic opamp model, first order compensation, as the lm358 is almost exactly like that.

    And then compare the output....and correct your circuit. :) 

    Because a simulation doesn't care about 10kV at 10kA in your circuit - all just numbers, coming from the calculation of the network. So if you have any open output or something like this, the result of the simulation just shows unrealistic results, what indicates: some start parameters or circuit elements producing this. Almost every time a error in the circuit.

    CP1Author
    Visitor II
    September 8, 2025

    Hi,

    The circuit produces a sensible output with the model for one of the generic opamps, an LT1013 from the library and a 741 model. It seems as if the model for the LM358 has a fault.

    I've tried to obtain one from ST Microelectronics but they are not helpful.

    Thanks.

    Super User
    September 8, 2025

    Hi,

    you didnt tell, which simu program you use,

    and the model you tried....?

    +

    if its the model from STM cad symbols, 

    did you check : the pin numbers are matching the function pin numbers of the symbol ?

    ** Standard Linear Ics Macromodels, 1993.
    ** CONNECTIONS :
    * 1 INVERTING INPUT
    * 2 NON-INVERTING INPUT
    * 3 OUTPUT
    * 4 POSITIVE POWER SUPPLY
    * 5 NEGATIVE POWER SUPPLY
    .SUBCKT LM358 1 2 3 4 5

    +

    as the model is 30 y old , is used often and so i suppose: the model is ok, just your pin numbers dont match.

    correct it and try.

    CP1Author
    Visitor II
    September 8, 2025

    Hi,

    I'm using LTSpice and the model came from ST's website. I used UniversalOpamp1 from the library.