Add component to LTSpice ..#2

Thread Starter

akashnair1729

Joined Mar 10, 2024
1
Hello people !
im using LTspice, but i can't find the lm317 regulator.. i found the code from RonH


but lol... how do i use this to have lm317 in LTSpice ?? i searched on google, but it's not as easy for such a "simple" thing

thanks for your help :)
 
Last edited by a moderator:

crutschow

Joined Mar 14, 2008
34,686
If you want it to be available as other devices are in the Component Selector, then put the model file in the LTC\LTCspice sub directory and the symbol file in the LTC sym\powerproducts directory.
 

Audioguru again

Joined Oct 21, 2019
6,758
An LM317 is a voltage regulator. The simulation program does not know if the one you are using has a "good spec" with low dropout voltage or you are using a "poor spec" LM317, and the simulation program does not know if your heatsink is large enough to prevent high temperature shutdown.
Use a voltage source in your simulation instead.
 

crutschow

Joined Mar 14, 2008
34,686
Use a voltage source in your simulation instead.
Why would you use a voltage source than does not emulate the voltage regulation and current limit of a LM317 (which the model I use does)?
If you want to simulate a circuit to determine how the LM317 will work, you don't use a voltage source.
And the fact that Spice doesn't show when the power rating of a device is exceeded, or whether it's a "good model" is true for any model, not just the LM317.

You can of course, with LTspice, look at the power dissipated in any device during a transient simulation, to determine if its power rating is being exceeded, and whether a heat-sink is required.
I assume you are aware of that.
Determining a device's dissipation is just part of good design process, whether you are using a simulator or not.

You seem to negative about simulators for what they don't do.
I'm positive about simulators for what they do, and have found them invaluable during my many years of doing analog design for refining my designs, and identifying problems that have occurred in operating designs.
You can also do things with a simulator that can't always be readily done with the real circuit, especially for a complicated circuit with many components, such as a Monte Carlo simulation of the worst-case circuit operation for the tolerance variation of all the components.
 

Audioguru again

Joined Oct 21, 2019
6,758
The output voltage of a simulated voltage source is always correct.
Since I rarely use a variable voltage LM317, I do not know if its simulation knows when its voltage-setting resistors have resistances that are too high and if that causes the low-load output voltage to be much too high

We see people posting simulations that actually only work if the hFE of a transistor is "typical".
 

crutschow

Joined Mar 14, 2008
34,686
The output voltage of a simulated voltage source is always correct.
Obviously.
But how does that help determine what a regulator might do?
And if they built the real circuit, without a simulation, using transistors that happen to be near "typical" they still wouldn't know that the circuit is marginal.
If people misuse a tool, you blame the person, not the tool.
 

ericgibbs

Joined Jan 29, 2010
18,997
We see people posting simulations that actually only work if the hFE of a transistor is "typical".
hi agu,
When the manufacturers base their typical performance figures as that produced by ~80% of the production batch, suggests to me if you include the 10% above the typical value, the chances of the circuit working OK are ~90%.
I will take those odds anytime when building a simple home project.

E
 

Papabravo

Joined Feb 24, 2006
21,261
The purpose of simulation should be understanding, not design verification. This is especially true if you are using models of unknown provenance. There is no central authority to verify or certify models. We use models in the sure and certain knowledge that we are not familiar with their internal workings. Over time we learn to trust certain ones and discard others. The people who make the models don't stand behind them or maintain them with revision control like pieces of software so we deal with the universe we are in and lament that it cannot be the one we want.
 
Top