Lm358 Ltspice Model Download

61 views
Skip to first unread message

Dionna Niebergall

unread,
Jan 4, 2024, 3:36:18 AM1/4/24
to rolatobti

That's the quiescent current, which is of minor interest in a simulation.
What should be useful is modelling the current drawn by each supply pin when the opamp delivers signal into a load. Most models fail to do that accurately.

Hi, I need some help simulating an circuit with the LM358 Opamp. I want to see if there is an instable oscillation problem.
I found two Spice models of the device an I decided to go with the more complex one from TI:
I downloaded the SICE model file from here:

lm358 ltspice model download


DOWNLOAD https://t.co/jJdhMTrPcQ



The OpAmp tries to zero the voltage difference between its input nodes 3 and 2 by a suitable output voltage at node 1. With the circuit and the resistor parameters chosen, the diference would be zero if the output was 6V, the power supply voltage. The LM358 bipolar OpAmp, however, can never output a voltage up to its supply rail. Thus the output is saturated somewhere below the supply, Then the difference between nodes 3 and 2 is not 0. Depending on the model, this may be not a good starting point for iterating the operating point.

For dealing with convergence problems from manufacturer supplied models, you might need to utilize the .ic or .nodeset commands. Adding uic to the .tran command might work too in specific scenarios. All this nonsense is covered on page 253 of the ngspice manual: -30-manual.pdf

There is an aswitch in ngspice. It is part of the XSPICE analog/digital enhancement. You will need to enable XSPICE in your compilation setup to get access to these models. If you already have done so, the error messages seem to indicate that the code model installation is not correct.

Here are a couple of things to keep in mind. Those two op-amps are not manufactured by ADI and so we would not supply / include simulation models for other manufacturers products. Such modes are created by testing the actual ICs. We don't make those ICs.

Other manufacturers ( for those two circuits) often supply spice macro models (.cir netlist files) for their products. We suggest that you search on-line for such files, usually found on their web sites.

The common components such as LM358..Someone who user name is Dmercer told me that "Those two op-amps are not manufactured by ADI and so we would not supply / include simulation models for other manufacturers products"

I downloaded a spice model LMX58B_LM2904B from the TI website to simulate with LTSpice. The simulation displays an odd dual step in response to a step input. It seems to fail to converge when running an AC analysis. Files are attached. It seems the LM358 and the LM2904 have the same spice model. I ran a Tina simulation with the LM358 part and it works fine, both step and AC analysis, but it also looks like that's a much simpler model. Is there a problem with the 'lm2904b.lib' model?lm2904b.lib Test point frequency response w_LM2904B.zip

The LM2904B model was built in TINA-TI and is tested to work in TINA-TI and PSpice for TI. We aren't able to exhaustively test our models in all simulators for multiple reasons, but we recommend TINA-TI or PSpice for TI. Additionally, the LM358 model is much simpler than the B version model. When we released the B version of our devices, we released them with our most up to date model architecture.

i just tried to simulate the LM358 and encountered some problems. After some tries, i found out that the model included in TINA-TI and the SPICE Model that can be found at the product page is very different. I thought that the TI-tool should simulate the part from TI better, but simulating with LTSpice, i get exactly the resut from the datasheet, whereas with TINA-Ti i get something very different.

I find these results troubleing. Can i use the Spice-Model for simulation? Why is the model in TI-Tina so off? Did I choose the wrong part (I also tried the LM358/101)? I have the strong feeling that i made a mistake setting up the simulation in TI-Tina. Please find attached both simulations.

Our PSPICE code is usually generated from our TINA macromodel. So it is odd that the results don't match. I will go ahead and test the PSPICE and macromodel again to see what's causing this difference. If I don't get back to you by end of today then I will follow-up with you on Tuesday.

Thanks for the suggestions re the simulation, but neither the addition of a feedback cap, nor switching to the universal opamp in LTSpice eliminated the oscillation. So, I can't blame the LM358 model.

My main hypothesis is that the gate capacitance of the IRF540N is not modeled in the SPICE model and I'm driving a 2nF capacitive load that's not accounted for. I don't think this is quite right because I see capacitances in the model ( -info/models/SPICE/irf540n.spi) that look to be the right order of magnitude.

Ok, it turned out that the LTspice model I was using for the LM358 op-amp was quite old and was not sophisticated enough to model the frequency response properly. Updating to a relatively recent one by National Semi did not predict the oscillation, but clearly showed the 20% overshoot, which gave me something to work with. I also changed the pulse peak voltage to match my breadboard test, which made the overshoot easier to see:

However, when using the LM358/NS model the margin is slightly negative!This explains the observed instability during measurements. Hence, external stabilization of the feedback scheme is necessary.

PSpice model library includes parameterized models such as BJTs, JFETs, MOSFETs, IGBTs, SCRs, discretes, operational amplifiers, optocouplers, regulators, and PWM controllers from various IC vendors.

I'm trying to run a simulation on the LM158 dual OpAmp component. The component is available on Ultra Librarian from DigiKey. When loading in the component, I'm given the option of adding the Spice model (.MDL) file. When I select this option, I change the spice type to X: Subcircuit, and press Map. At this point, I can select Load Model, and am able to bring in the Model from Ultra Librarian. When I press "OK", however, I receive an error "Part E1 cannot be simulated, check value and connections!

As an alternative, the LM358 is available from the list of parts included in Eagle. It does, however, separate into two Op Amps and two pins for a power supply, and the model for the 358 is the same as the 158.

I hope you're doing well. I would say to grab the LM358 for now, currently NGSPICE requires a vanilla SPICE model. Most of the models online are PSPICE or some other proprietary version of SPICE with some mods. We hope to shortly update our NGSPICE version so that this will no longer be an issue.

Currently, I can access an Opamp model from the EAGLE 9.6.2\examples\spice\examples folder. Is this what you mean by "vanilla spice model"? Would this mean that there is no way import the specific characteristics of components for ngspice as of right now?

I hope you're doing well. That's not what I mean by "vanilla spice model", what I mean by that phrase is that the model file you download should only contain standard SPICE syntax, it can't have any of the proprietary additions that PSPICE, TINA, and others have added to the default SPICE language. This will become less of an issue soon but it's a problem now.

35fe9a5643
Reply all
Reply to author
Forward
0 new messages