LM317 PSU - Page 1
Forum section: electronics / beginners

author: ikrel
author_rank: Contributor
timestamp: May 25, 2012, 07:56:44 pm
content: I'm trying to build a 12V power supply with a lm317, I have a rectified output of 34V and I'm going by the datasheet, but instead of 12V I'm getting 16.6V. I'm using 4.7K for R1 and 47K for R2 which should give me 13.75V which is acceptable,what am i missing here?

author: MikeK
author_rank: Super Contributor
timestamp: May 25, 2012, 08:02:24 pm
content: R1 is supposed to be a low value, like 240 ohms.

author: ikrel
author_rank: Contributor
timestamp: May 25, 2012, 08:12:14 pm
content: Much better, Thanks

author: Zero999
author_rank: Super Contributor
timestamp: May 26, 2012, 08:34:17 am
content: Quote from: MikeK on May 25, 2012, 08:02:24 pmActually, the LM317 isn't guaranteed to regulate properly across the temperature range, under no load conditions, unless R1 is 120R. The worst case minimum load current for the LM317 is 10mA.

author: Mechatrommer
author_rank: Super Contributor
timestamp: May 26, 2012, 08:50:44 am
content: if its for general purpose, i suggest using trimpot for R2 (to ground) because your 47Kohm resistor is not 47Kohm. and you'll get adjustable PSU, and 34V input is too much i believe, for 12V output. YMMV

author: Mint.
author_rank: Frequent Contributor
timestamp: May 26, 2012, 09:04:10 am
content: Can anyone shed some light on why the value has to be 120 ohms?

author: T4P
author_rank: Super Contributor
timestamp: May 26, 2012, 10:39:05 am
content: Quote from: Mint. on May 26, 2012, 09:04:10 amread the datasheet, it can explain further into detail

author: MikeK
author_rank: Super Contributor
timestamp: May 26, 2012, 02:26:06 pm
content: Quote from: Hero999 on May 26, 2012, 08:34:17 amI'm just going by the datasheet, which says 240 ohms is typical.Quote from: Mint. on May 26, 2012, 09:04:10 amI'd like to know this too, since the datasheet doesn't elaborate on it.EDIT: I found this thread that has some good explanations:http://forum.allaboutcircuits.com/showthread.php?t=5494

author: MikeK
author_rank: Super Contributor
timestamp: May 26, 2012, 03:27:04 pm
content: From the datasheet we have: VOUT= VREF(1+R2/R1) + IADJ(R2)Plugging ikrel's original values in, along with some others:R1R2Iadj (50uA)Vout (with Iadj term)Vout (without Iadj term)difference% of Vout4,70047,0000.0000516.1013.752.3514.60%2402,3000.0000513.3413.230.120.86%1201,2000.0000513.8113.750.060.43%R1R2Iadj (100uA)Vout (with Iadj term)Vout (without Iadj term)difference% of Vout4,70047,0000.000118.4513.754.7025.47%2402,3000.000113.4613.230.231.71%1201,2000.000113.8713.750.120.87%So having a large IADJterm is bad.

author: Bored@Work
author_rank: Super Contributor
timestamp: May 26, 2012, 04:04:46 pm
content: Quote from: MikeK on May 26, 2012, 02:26:06 pmIt does. It just requires some trivial math and some thinking.1. Minimum load current under worst case conditions is given as 10 mA for the LM317. The voltage between the Out and Adj pin is regulated to 1.25V. Apply Ohm's law, and pick the nearest standard resistor value, erring on the safe side. You end up with 120 Ohms.2. The condition stated for the worst case minimum load is given as Vin - Vout = 40 V. Which happens to be the maximum allowed voltage difference between the input and output.Now, what if you don't operate the LM317 under this extreme condition (which is a good idea)? You turn to page 7 of the datasheet, and look into the minimum operating current figure. First thing you noticed is it doesn't give the maximum, but the typical values. E.g. something like 2.9 times lower figures. Anyhow, if you look at the diagram it tells you that the required minimum operating current decreases if you use a lower Vin - Vout difference than 40V. If you just work with, lets say, a difference of 18V, you roughly end up at 1.75 mA typical current, which is roughly 5 mA maximum current. Taking the maximum current you end up with a resistor of not larger than 240 Ohm.3) But, if you look at the example schematics some also use a 240 Ohm resistor when the difference is e.g. 30 V (e.g. figure 906303). And now you have to really read the datasheet. Most example circuits specify the LM117, not the LM317. And the LM117 requires 5 mA, not 10 mA worst case. And that results in 240 Ohm instead of240120 Ohm.The conclusion of all this is if you want to be on the safe side, especially if you have a large Vin - Vout difference then go with 120 Ohm. If you want to take some risk, or your Vin - Vout is anyhow 18V or lower, go with 240 Ohm. If you need low quiescent current, if you know your load consumes the required minimum current on its own, and if your Vin - Vout is not large then go with 1.2 kOhm (figure 906317). 1.2 kOhm gives you 1 mA, which is still ten times the maximum adjustment pin current. I.e. your voltage setting current still dominates the feedback loop.QuoteYes, that is an easy to read, nice to swallow and pointless description.

author: IanB
author_rank: Super Contributor
timestamp: May 26, 2012, 04:38:31 pm
content: Quote from: Mint. on May 26, 2012, 09:04:10 amQuote from: MikeK on May 26, 2012, 02:26:06 pmFrom memory, I believe the data sheet does explain.The LM317 an IC, which means it has some on board electronics that need power to operate (it needs a power supply, basically, like other ICs). But the LM317 is a three terminal regulator, which means it although it has a Vin connection for the power supply feed, it doesn't have a GND pin to complete the circuit and make a power supply return. How then can a device be powered when it has only one terminal? The answer is it cleverly returns its required power supply current through the load. It can only do this if the load has a low enough resistance to sink that current.But then what happens if the load is not connected? This is where the voltage setting resistor divider comes in. It acts not only to set the voltage, but also as a dummy load to keep the IC functioning when the real load is not connected. Since the IC needs at least 10 mA of supply current to function correctly, the 120 ohm resistor enables this 10 mA to flow and keeps everything working.

author: free_electron
author_rank: Super Contributor
timestamp: May 26, 2012, 05:00:00 pm
content: Quote from: Bored@Work on May 26, 2012, 04:04:46 pmWhich is spot on.!There is one more factor though. You could increase this resistance if you have enough load ( which you typically have. You dont build power supplies to power 'air')But, it is a bad idea... Simply because you make the system more sensitive for oscillations. The higher that resistor the more sensitive the system becomes. You want to have a low impedance between out and adjAs for this:QuoteThat is,indeed, a pile of senseless drivel.

author: Zero999
author_rank: Super Contributor
timestamp: May 26, 2012, 09:33:53 pm
content: Quote from: free_electron on May 26, 2012, 05:00:00 pmHe did mention that and I see no problem with using a higher value for a circuit which uses more than the minimum load current, as long as you're aware of the shortcomings.Quote from: Bored@Work on May 26, 2012, 04:04:46 pm