LM317 voltage regulator? How to use

Discussion in 'General Electronics Chat' started by epic_newb, Apr 14, 2011.

  1. epic_newb

    Thread Starter Member

    Apr 10, 2011
    44
    0
    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?
     
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    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.
     
  3. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    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.
     
  4. tom66

    Senior Member

    May 9, 2009
    2,613
    213
    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.
     
  5. debjit625

    Well-Known Member

    Apr 17, 2010
    790
    186
    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.​
    .​

    [​IMG]


    Good luck :)

     
    • 1.jpg
      1.jpg
      File size:
      28 KB
      Views:
      532
  6. epic_newb

    Thread Starter Member

    Apr 10, 2011
    44
    0
    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.
     
  7. someonesdad

    Senior Member

    Jul 7, 2009
    1,585
    141
    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).
     
  8. Wendy

    Moderator

    Mar 24, 2008
    20,764
    2,534
    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...

    [​IMG]
     
  9. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    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.
     
  10. epic_newb

    Thread Starter Member

    Apr 10, 2011
    44
    0
    sounds good! I have more than enough info to start building, just gotta get the parts :)
     
  11. epic_newb

    Thread Starter Member

    Apr 10, 2011
    44
    0
    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?
     
  12. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    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.
     
  13. someonesdad

    Senior Member

    Jul 7, 2009
    1,585
    141
    If you have plenty of room, a slab of aluminum sheet will sometimes work for a heatsink. But such a think is not as efficient as a purpose-designed one, Besides, the purpose-built ones are pretty cheap.
     
  14. epic_newb

    Thread Starter Member

    Apr 10, 2011
    44
    0
    If they don't cost much I will probably just buy it. I also saw somebody make a heatsink with a penny :p
     
  15. K7GUH

    Member

    Jan 28, 2011
    191
    23
    Follow Bill's schematic and parts list. It is the one most likely to work on your first try.
     
  16. Wendy

    Moderator

    Mar 24, 2008
    20,764
    2,534
    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.
     
Loading...