Jump to content
Electronics-Lab.com Community

The LM317 Calculator


surajbarkale

Recommended Posts


Hi Suraj,
Why do you need a calculator, especially one with a serious error like that one, when the resistor calculation with numbers is so easy?
The datasheet for the LM317 is here:
http://www.national.com/ds/LM/LM117.pdf
Page 1 shows a typical circuit that is exactly the same as our Calculator Article. Except, it uses the expensive LM117, not the cheap LM317!
R1 is shown as 240 ohms, but for an LM317 must be 120 ohms, or the output voltage will rise without a load with some LM317's.

Page 5 of the datasheet shows a guaranteed minimum load current of 10mA for the LM317 (the LM117 requires only 5mA). This means that all LM317 devices will work properly with a 10mA load. If you decrease the load current to 3.5mA, most devices will work because that is typical. But maybe the ones that you have require the full 10mA. So calculate with 10mA and they all will work.

Calculation:
R1 = 1.25V divided by 10mA = 125 ohms. Using a standard value of 120 ohms results in a current of 10.42mA.

R2 = output voltage minus 1.25V, divided by 10.42mA.

So for a 12V output, R2 must be 757 ohms. Using a standard value of 750 ohms results in an output voltage of 11.9V. The LM317 has a tolerance of +,- 4% so the output voltage will be from 11.42V to 12.38V plus the resistors tolerance.

Link to comment
Share on other sites

There is nothing wrong with the calculator except as with all calculators, you can plug unlimited numbers into it. There is a warning on the page that tells you this.

BTW- You are incorrect about the 240 ohm and 120 ohm resistors. 240 ohm is ok for both LM117 and LM317. The adjustment pin current spec is the same on both regulators.
If you read the rest of the same data sheet, you will see the illustration below on page 19.

MP

post-555-1427914173334_thumb.jpg

Link to comment
Share on other sites

MP,
National Semi. rates the Minimum Load Current for their LM317 as 10mA, so why don't you believe them?
The very low Adjustment Pin Current has nothing to do with it. That current is so low because this regulator transfers all of its operating current to the load. The expensive LM117 simply has a low operating current and the LM317 has more.
See page 8 of their datasheet here:

post-1706-14279141733408_thumb.jpg

Link to comment
Share on other sites

Thanks, audioguru & MP
but u missed the point. Well i learned elementry maths early in life & can do it well (i belive ;D). But i like to rest my brain once a while & let the computer do the dumb stuff. Thanks for the LM117 & LM317 tip uptill now i almost always used 220E. But then i was not arguing aout LM317 but this was just a suggesion to improve the calc since it is already there & there is no user feedback link.

Link to comment
Share on other sites

Hi Suraj,
I do see your point with the calculator article. If you enter the desired output voltage, it won't calculate the value of R2, which is what is needed.
In my "easy" calculation for a 12V output, I made a mistake with my numbers and ended up with a wrong value for R2. I discovered my mistake only because I used the calculator article backwards.
Maybe another member can write a new article with a calculator that does what is needed.

Link to comment
Share on other sites

Audioguru,
I see you still have not learned how to accurately read a data sheet. (I have discussed this with you in the past). I even posted a diagram from the data sheet showing the manufacturer's example of what you said could not be done. (Look at the diagram; R1 is 240 ohms) Obviously, it is you who does not agree with the manufacturer. Then you post a question asking me why I do not believe the manufacturer? Nice spin! The data sheet shows the load current spec and the adjustment pin current spec. Load current is from Vout to Ground. You know, the load? Not from Vout to Adj. These are two different things.
Also, I use the LM317 a lot and bench testing also shows this value works well as shown in the data sheet example. It is easy to check.

Suraj,
No problem. I only jumped in because audioguru was making a gross misstatement about this regulator. But for what it is worth: What is so hard about plugging in a few resistor values? Seems pretty fair since you do not have to calculate it out the long way.
Besides, it is easy to change the calculator since you can view the source code with any html editor. Make the calculator the way you want it.

MP

Link to comment
Share on other sites

further to my last post, here I have found some examples from the web using 220 to 240 ohms for R1 from credible sites:

Miscellaneous from web:
http://www.eidusa.com/Electronics_Kits_0_24_ADJ_Post_Power_Supply_Reg.htm
http://www.epanorama.net/documents/components/lm317.html
http://www.qsl.net/yo5ofh/projects/vps/vps.htm

http://vancouver-webpages.com/peter/vreg.pdf

This one from the Electronic Engineering department at New Mexico University:
http://www.ee.nmt.edu/~thomas/ee322_s03/labs/volt_reg/ee322_lab1.html

This one from University of California, Santa Barbara College of Engineering:
http://www.ece.ucsb.edu/courses/ECE002/2C_Su04Rhodes/Laboratory_1_S2004.pdf

One from France:
http://perso.wanadoo.fr/jmdefais/techn_jm/circ317.htm

Two from Australia:
http://www.acs.comcen.com.au/buildregs.html
http://my.integritynet.com.au/purdic/power4.htm

One from our site:
http://www.electronics-lab.com/projects/power/015/

One from Canada; Guelph University: (Audioguru has told me that this is a very credible school. Perhaps he has changed his mind, now.)
http://www.uoguelph.ca/~antoon/circ/vps.htm

There were a lot more, but I got bored...

Oh, just looked at my STK200 development board from Atmel for programming AVR Microcontrollers.....Also uses the LM317 with a 240 ohm resistor for R1...

Perhaps these are all wrong and audioguru is the only one who knows how to use a LM317 regulator?
I doubt it.

MP

Link to comment
Share on other sites

MP.
You are correct, load current for an LM317 is from its output to ground. But so is the current through R1 plus R2, which become, you know, its load.

Most of the many circuits that you posted have a permanent load with a current far exceeding the minimum load current requirement, especially National Semi's own battery charger circuit. So the value of R1 doesn't matter to them.

I will stick to reliably using the recommended 120 ohms for R1, so that it draws 10.42mA, thanks. When using my LM317 power supply to power a CMOS circuit that uses barely any current, I don't want its output voltage to rise. ;D

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
  • Create New...