I found LTspice model for LM317 in a very trustable recommended source, downloaded and simulated the following circuit:

enter image description here

As you see above in LTspice for R1=240 and R2=1.5k the output voltage is around 9.46V.

But online calculators calculates for the same resistors different output voltages than LTspice. Here some examples:

If someone encountered this or eligible to verify whether the LTspice model is correct, why is there big difference? Is this LTspice model reliable?

  • \$\begingroup\$ Looks like the macro-model is not real accurate across the various models. Phase shifts, Zout, Istandby, etc differ. \$\endgroup\$ – analogsystemsrf Sep 10 '17 at 2:52
  • \$\begingroup\$ Add up all the tolerances you get on the output voltage of a 317, that is 1) initial accuracy 2) line regulation 3) load regulation 4) resistor tolerances in external divider 5) temperature coefficient, and then you'll realise that the numbers you are seeing are 'good enough'. If you want 1% accurate voltage on your board, you don't use this regulator, and certainly not without trimming. \$\endgroup\$ – Neil_UK Sep 10 '17 at 5:19
  • \$\begingroup\$ @Neil_UK which regulator do you recommend for fixed 9 or 10V from a 12V supply? Voltage reference better than a regulator`? \$\endgroup\$ – user1245 Sep 11 '17 at 2:45
  • \$\begingroup\$ If I was to feel like choosing a regulator for you, which I may, but probably won't, then I'd need to know the specification you want. Are you allowed to trim it, or do you want accuracy 'as built', so 'initial accuracy'? What is the range of output current, min to max, it has to be accurate over? What is the range of input voltage, what is the range of ambient temperature? Usually a 'regulator' has poor voltage accuracy and stability, but a 'voltage reference' has small output current capability. \$\endgroup\$ – Neil_UK Sep 11 '17 at 5:15
  • \$\begingroup\$ @Neil_UK Thanks for the input. Output current will not exceed 2mA. That's why I thought maybe a reference would be more accurate. The regulator will be supplying the circuit in my prevuous question: electronics.stackexchange.com/questions/328408/… \$\endgroup\$ – user1245 Sep 11 '17 at 16:44

The correct nominal voltage according to datasheet calculations is 9.138V (min 8.775, maximum 9.50 resulting from the reference voltage tolerance, ignoring resistor tolerances and adjust current tolerance)

The equation is: \$V_O = V_{REF} (1+R_2/R_1) + (I_{ADJ} R_2)\$

The 9.06V (nominal) calculator results from ignoring the effect of the 50uA nominal Iadj current.


There are a number of LM317 models installed in LTSpice (at least in mine). The first one I tried (unknown source) yielded an output voltage of 9.125V, close enough. The second, a MOT model yielded 9.636V, which is a bit out of spec. The MOT-2 model oscillates (lol) with 100n or 1uF - supposedly not needed for stability- and yields 9.161V with 10uF. The TI and TI-2 models both give 9.467V- close to being out of spec.

The 240 ohm resistor is really putting load that is less than it should be on the output (though you'll see it a lot), so might want to try again with a significant load on the regulator- nope with a 2K load in addition the voltage on MOT is 9.635V, pretty much as you'd expect with it being in regulation sans load. TI model similarly drops about 1 mV with the extra 5mA load.

The results don't really engender a lot of confidence in the results being very accurate at DC.

| improve this answer | |
  • \$\begingroup\$ How did you calculate 50uA Iadj current flowing between ADJ and the R1-R2 node? In LTspice it is really around 50uA (48uA). \$\endgroup\$ – user1245 Sep 9 '17 at 23:32
  • \$\begingroup\$ It is directly from the datasheet. \$\endgroup\$ – Spehro Pefhany Sep 9 '17 at 23:33
  • \$\begingroup\$ But that 50uA should always exist then, why would the calculators ignore that multiplication? Im just curious \$\endgroup\$ – user1245 Sep 9 '17 at 23:35
  • \$\begingroup\$ @user134429 Because it's close enough- swamped by Vref and resistor tolerances unless you use a high value for R1 and establish the minimum load by some other means. \$\endgroup\$ – Spehro Pefhany Sep 9 '17 at 23:45

LM317 datasheet gives the reference voltage as between 1.2 and 1.3V (typically 1.25V), so using that value we get:

Current in R1 = 1.2 / 240 ohms = 5mA min, 1.3/240 = 5.4mA max.

This is great enough to make the 100uA max adjust terminal current a minor consideration, which I shall ignore.

These currents will develop 1.5k * 5 ma = 7.5V min and 8.1V max across R2, which when added to the reference voltage across R1 makes the output anywhere from 8.7V to 9.4V depending on what unit you happen to have.

This analysis also ignores the tolerances of the resistor network which is typically going to be much tighter then the reference in these old and unimpressive (but cheap) regulators.

| improve this answer | |

you may correct this and other simulations, by only changing 2 parameters in the subcircuit as shown in image

In the other hand the BF of the npn must be changed from "100" to "50" as shown in 2nd picture

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.