LM317 voltage regulator? How to use

Thread Starter

epic_newb

Joined Apr 10, 2011
44
I was recently advised that instead of buying a regulated wall wart I could try to make my own voltage regulator so I figured why not.


I was told I could use the LM317 for this task, I looked up the datasheet and it has a typical use section. It said I could control the output voltage with the use of two resistors. My question is: What is the formula used to know exactly what resistance you need both resistors to get an output voltage?

Also, what is the resistor symbol with an arrow through it?
 

beenthere

Joined Apr 20, 2004
15,819
That symbol is for a variable resistor. You can make on by tying one terminal of a potentiometer to the wiper. You use the variable resistance so you don't grow old and weary trying to find a fixed resistor that gives an exact result. Just turn the trim until the voltage is exactly what you want. Don't forget the bypass capacitors.
 

Audioguru

Joined Dec 20, 2007
11,248
Many circuits for the LM317 on the web mistakenly use 240 ohms for the resistor from the output to the ADJ terminal. But the 240 ohm resistor is shown in the datasheet only for the more expensive LM117 IC. The LM317 output voltage might rise when it has a very low load current with a 240 ohms resistor and should use 120 ohms instead. Then the variable resistor value must be half.
 

tom66

Joined May 9, 2009
2,595
The formula is Vout = 1.25 * ((R2/R1) + 1).

So for R1 = 220 ohms, R2 = 470 ohms you'd get 3.92V, for example.

A minimum 10mA load is recommended so the voltage doesn't rise. One way to achieve this is to use a power LED. This serves two purposes, to keep the regulator in regulation and to show the circuit is working.
 

debjit625

Joined Apr 17, 2010
790
The formula is very simple


VO = VREF (1 + R2/R1) + IADJ R2


Here, VREF = 1.25 and IADJ = 100μA or 0.0001A

The " IADJ R2 " term can be neglected from the formula and you can use only
VO = VREF (1 + R2/R1) as the formula

Here is a circuit long ago I did,I used LM317 from STMicroelectronics.​
.​




Good luck :)

 

Attachments

Thread Starter

epic_newb

Joined Apr 10, 2011
44
And then there was light :D

I am definitely going to make a variable resistor. It sounds easy and I like the idea of being able to change output voltage whenever I want :)

Thanks a bunch guys.
 

someonesdad

Joined Jul 7, 2009
1,583
If you download the March 1, 2010 datasheet from National, it shows the formula for calculating the output on the first page. If you'll be making the adjustable supply as shown, you don't really need to do any calculations.

You need to worry about the thermal dissipation. If you're using a TO-3 or TO-220 case and you're drawing significant currents, those packages can get hot and go into thermal shutdown (of course, the same comment applies to the other package types). You must provide a good heat sink. A month or so ago I built a device using the TO-3 case running at 1 A so that the case was dropping about 10 W and even with a heat sink the thing gets too hot to touch when it was run continuously (but I only run it momentarily, which is why I know it's fine in my application).
 

Wendy

Joined Mar 24, 2008
23,415
The formula is very simple


VO = VREF (1 + R2/R1) + IADJ R2


Here, VREF = 1.25 and IADJ = 100μA or 0.0001A

The " IADJ R2 " term can be neglected from the formula and you can use only
VO = VREF (1 + R2/R1) as the formula

Here is a circuit long ago I did,I used LM317 from STMicroelectronics.​
.​




Good luck :)

For most LM317 R1 should be 120Ω. There are a lot of variations among these parts. The most common chip is the standard LM317 in a TO220 case (shown below), and the R1/120Ω is the lowest value you should go. Also, this schematic is missing some capacitors, which are also required.

This is closer to what you need...

 

Audioguru

Joined Dec 20, 2007
11,248
The 120 ohm resistor is the load when there is no other load. Its current is 1.25V/120= 10.4mA which is more than its minimum allowed current of 10.0mA so its output voltage will not rise.
But you can use 100 ohms (12.5mA) or 47 ohms (26.6mA) or 22 ohms or 10 ohms if you want.
 

Thread Starter

epic_newb

Joined Apr 10, 2011
44
Actually, about the heatsink I may need.

I've never used a heatsink and the only place I have heard of them used is in computers but I imagine the heatsinks used in those instances are alot larger and very different to the one you guys probably are talking about.

How would I go about making a heatsink? Or is it just something I can buy?
 

Audioguru

Joined Dec 20, 2007
11,248
Electronic parts distributors like Digikey (in North America) or Farnell (in the rest of the world) stock many heatsinks. They show all the important spec's.
 

Wendy

Joined Mar 24, 2008
23,415
I like the penny idea, but you need fins. The more air contact the more heat gets transmitted to air, which is the point. You can make one out of a small sheet of aluminum, such as you would get from a coke can.
 
Top