EEVblog Electronics Community Forum

Electronics => Beginners => Topic started by: gregallenwarner on September 22, 2014, 05:27:12 pm

Title: LM317 Resistor Selection
Post by: gregallenwarner on September 22, 2014, 05:27:12 pm
So, just a question regarding what you all normally do when selecting resistor values for LM317 adjustable voltage regulators.

Based on the calculations I've made using the formula in the datasheets, and the resistor values I have to work with, I can hit very nearly my target voltages, either a little above or a little below. For instance, with my 3.3 volt rail, depending on which resistors I use in my divider, I calculate I'll either get 3.29 volts or 3.34. Likewise, with the 5 volt rail, it's either 4.97 or 5.06.

What's best practice here? Is it considered best to go a little over voltage, to allow for some sag and power bus resistance? (As long as you remain within spec of your components, obviously.)

If I'm on track here with shooting a little over, what do you normally do when setting your power rail for a small PCB design? (Not trying to send power over long distances here.)

Thanks.
Title: Re: LM317 Resistor Selection
Post by: katzohki on September 22, 2014, 06:25:26 pm
I pretty much always use a regulator with a set voltage unless I need some odd-ball voltage. But as you said, as long as you're within tolerance of your parts you are fine. In the case of logic, as long as everything is operating off the same voltage then you should be good.

Or you could throw in a pot if you want to be really picky with your voltage.
Title: Re: LM317 Resistor Selection
Post by: German_EE on September 22, 2014, 06:27:09 pm
If you are aiming for a 3,3V rail and you get 3,34V off load then I would be happy, even if it is an on load voltage the extra 40mV will not be a problem. Unless it is the output of a voltage standard you do not need to be exact.
Title: Re: LM317 Resistor Selection
Post by: gregallenwarner on September 22, 2014, 07:48:51 pm
Thanks for the replies.

The only reason I'm looking into adjustable regulators is I'm starting to get into CPLD and FPGA based projects, and since those require an array of different voltages, I figured I could make my BOM simpler if I only had one part number for regulators instead of going with various fixed ones.

I'll go ahead with my slight overage that I mentioned in my previous post, to allow for some voltage drop due to resistances. Thanks again.
Title: Re: LM317 Resistor Selection
Post by: Christopher on September 22, 2014, 07:57:36 pm
Calculate the track resistance & current consumption, worst case.

There you go, there's your volt drop to add on. A "little more" volts can't hurt either, as long as it's in the SOA range  :-+
Title: Re: LM317 Resistor Selection
Post by: sacherjj on September 22, 2014, 09:20:26 pm
If you are
The only reason I'm looking into adjustable regulators is I'm starting to get into CPLD and FPGA based projects, and since those require an array of different voltages, I figured I could make my BOM simpler if I only had one part number for regulators instead of going with various fixed ones.

It might be simpler in a FPGA or CLPD situation to looks for a 3-4 LDO chip that outputs the voltages you need.  These are often only a buck or two in even single quantity.  Much easier than multiple LM317s.  If you get into higher power FPGAs you might need to go to a switching chip to keep from wasting as much power.
Title: Re: LM317 Resistor Selection
Post by: just_fib_it on September 23, 2014, 12:53:27 am
The LM317 is not a bad regulator, but it's by no means a precision part.

I ran into that recently when I needed +/-12V rails to power some opamps. Spent quite some time looking for the right E96 values to get exactly 12V. Of course the opamp isn't really gonna care but it just felt better. OCD, I guess ;-)

Anyway, I was a bit disappointed when I measured 12.26V instead of the expected 12.02V. After some probing around it turned out that the reference voltage of my LM317 was 1.264V instead of 1.25V. A quick look at the datasheet showed that it can be anything from 1.2 - 1.3V... Add the 1% tolerance of the resistors and any output voltage between 11.35 and 12.75V is fair game.
Title: Re: LM317 Resistor Selection
Post by: Neilm on September 23, 2014, 06:18:44 pm
There are ready built supply chips that have multiple outputs at the correct voltage for the FPGA core and periphery voltages.
Title: Re: LM317 Resistor Selection
Post by: gregallenwarner on October 01, 2014, 06:59:26 pm
There are ready built supply chips that have multiple outputs at the correct voltage for the FPGA core and periphery voltages.

Any recommended part numbers?
Title: Re: LM317 Resistor Selection
Post by: katzohki on October 01, 2014, 09:26:16 pm
Search for LDO regulators on Digikey, go through the Voltage - Output column and select the voltages you need.

Here's an example search:
http://www.digikey.com/product-search/en?pv48=5560&pv48=3750&pv48=3716&pv48=4036&pv48=4035&FV=fff40027%2Cfff80182%2C10a40004&k=ldo&mnonly=0&newproducts=0&ColumnSort=0&page=1&stock=1&quantity=0&ptm=0&fid=0&pageSize=25 (http://www.digikey.com/product-search/en?pv48=5560&pv48=3750&pv48=3716&pv48=4036&pv48=4035&FV=fff40027%2Cfff80182%2C10a40004&k=ldo&mnonly=0&newproducts=0&ColumnSort=0&page=1&stock=1&quantity=0&ptm=0&fid=0&pageSize=25)

Looks like a lot are going to be surface mount, but you gotta bite that bullet sooner or later.
Title: Re: LM317 Resistor Selection
Post by: tszaboo on October 01, 2014, 10:11:55 pm
Well there seems to be some problems here. First, the LM317 is not a precision part, it alone has 1% tolerance, +1.5% over the load, + 1% over temperature. I'm not sure why would you be bothered with a few millivolt difference for the resistors. Which add + 1 + 1%.
The other problem is the usage of this with FPGAs. They are not designed for that.
Using an LM317 with an FPGA will be like putting an east Germany Trabant engine (22 HP) into a monster truck.
The problem is that they react much slower to high current peaks, than modern regulators. The voltage will sag, whenever you switch too many gates inside your FPGA. To avoid that you need absurd amount of capacitors.
And this is when it becomes easy. Because they already did the homework for FPGAs. There are reference designs from TI, AD, Linear for FPGAs. Buck converters which make everything for you.
Title: Re: LM317 Resistor Selection
Post by: gregallenwarner on October 06, 2014, 09:06:13 pm
Thanks for the advice.

I think I'll abandon the adjustable regulators and go with the fixed multi-volt ones specifically designed for what I'm doing.

Thanks again!
Title: Re: LM317 Resistor Selection
Post by: tszaboo on October 07, 2014, 11:46:58 am
Thanks for the advice.

I think I'll abandon the adjustable regulators and go with the fixed multi-volt ones specifically designed for what I'm doing.

Thanks again!
:-+ Excellent choice!
Title: Re: LM317 Resistor Selection
Post by: bills on October 14, 2014, 09:29:54 am
try here  http://www.electronics-lab.com/articles/LM317/ (http://www.electronics-lab.com/articles/LM317/)