LM317T Based Regulator- What Did I Goof Up?

Discussion in 'The Projects Forum' started by PGB1, Feb 9, 2013.

  1. PGB1

    Thread Starter Member

    Jan 15, 2013

    I am very much a novice with electronic circuitry. I have ben studying on & off for years, but at warp speed the last 3 or 4 months. I finally decided to actually build something, so I chose to make a simple voltage regulator based on the LM317T IC.

    I designed it by primarily copying (stealing?) from datasheets. I added a rectifier for AC input if desired & used separate input terminals so a DC source would not have to pass through the bridge. I also put in some protection diodes, per Texas Instrument's sheet.

    I also thought I was smart & installed a switch for the fixed resistor. My thought was to have two different (selectable) fixed resistances, thus making the 360 degrees of turn on the variable either coarse or fine. I calculated the two ranges to be:
    High Range 1.2 to 27.85 using the 470 ohm resistor with the 10k variable
    Low Range 1.2 to 9.58 using a 1.5k ohm resistor with the 10k variable

    But, when I tested it things didn't go as planned:
    Source was a 12 volt 'regulated' power supply with no load output measured at 13.87 vdc
    With no load on the new project, both ranges give me 7.78 volts to 13.68 volts, measured at the output terminals. I thought a load might improve the results.

    With a 28 volt 1 watt incandescent panel lamp as the load, I read 1.24 to 1.65 volts as I dialed the variable resistor. I got the same results with each switch position.
    With a 250 volt 1/4 watt panel lamp or even 2 of them in series or a 500 ohm resistor or a 220k ohm resistor- I get 7.78 to 13.68 volts at the output terminals. I tried several combinations. The results never varied.

    I checked the wiring against my drawing & tested each component, except the LM317T, because I don't know how. I isolated the switch & checked it. A-OK. I even swapped the LM317T for a new one. No change. I have not tested with AC input yet.
    My only guess it that I should connect the un-used terminal of the variable resistor to negative. I did not try this, fearing destroying the IC.

    I am not sure if I designed the circuit wrong or am testing improperly. If any of you don't mind taking a look at my (rough) sketch of the circuit & commenting, I would be very appreciative of your thoughts & lessons.

    Thanks Very Much!
    "Paul The Novice"

    PS: Note about the drawing- C-1 is 0.1uf Ceramic C-3 is 25uf 50 volt Electrolytic C-4 is 100uf 50 volt Electrolytic The bridge rectifier is taken from an old typewriter, but bench tests OK.
  2. bertus


    Apr 5, 2008

    Why do you have the choice between 470 and 1k5 between the output and the adj pins?
    Looking at the data sheets a resistor of 240 Ohms is always used between the output and adj pins.
    This will give a better stability of the output voltage.

  3. #12


    Nov 30, 2010
    You designed it wrong. The regulator chip has a minimum load of 5ma for the top grade and 10 ma for the lower grade chips. Putting in a 470 or a 1k5 denies the chip its minimum current.
  4. Audioguru

    New Member

    Dec 20, 2007
    The 240 ohm resistor is shown on the more expensive LM117 in the datasheet, not on the cheaper LM317. It does not show an LM317.
    The LM317 needs 120 ohms maximum or its output voltage might rise when it has no load.

    The 120 ohm resistor draws 1.25V/120 ohms= 10.4mA which is a little more than the 10mA minimum load current for the LM317.
    The LM117 has a 5mA minimum load current so it can use 240 ohms.
  5. PGB1

    Thread Starter Member

    Jan 15, 2013
    Hi Folks!
    Thank you all for replying.
    I thought I was smart when I included a choice of resistors. Allegedly, it would change the total voltage range as the variable resistor was adjusted. I could have fine control or coarse control. I got the numbers by playing around with the LM317 calculations for combinations of resistances.

    So, after reading what you each wrote, I took out the two resistors (470 & 1.5k) and substituted a 120 ohm. Connecting to a 12 volt 2 amp supply, I got the exact same results with no load as I had with the wrong resistors. (7.78 -13.68 volts) Then I tried with a 240 ohm. Same thing.

    Next, I used an incandescent for a test load and the 120 ohm resistor. It is labeled 12 watts at 12 vdc. The voltage range was 1.25 - 1.70 as I turned the variable resistor. I swapped it for a 28 volt 1 watt bulb & got the same results.

    After that, out came the 120 ohm & in went the 240. Believe it or not, the voltage out was the same- 1.25 to1.70.

    I sure am stumped!
  6. Ron H

    AAC Fanatic!

    Apr 14, 2005
    Incandescent bulbs have a much higher resistance when they are hot than when they are cold - about 15 to 1! So, a 12W, 12V bulb will be 12Ω when hot. That means it is less than an ohm when cold. The LM317 is basically bulletproof. It has built-in current limiting and thermal overload limiting. It will probably current limit the output, even if you have the pot at zero ohms.
    You need to test your regulator with a load which is thermally stable, so you can predict the current.
    Keep in mind that the regulator has a dropout voltage which varies with load current. See Fig. 3 in the datasheet. The dropout voltage is the voltage from output to input required to maintain regulation. For instance, if your input is 12V, you will not get more than ≈10V max on the output.
  7. Audioguru

    New Member

    Dec 20, 2007
    Your main filter capacitor is only 47uF so it filters properly only when the load current is very low. Use 2200uf or 4700uf instead. That is why the output voltage was low when you had high current light bulbs as a load.

    Do you believe that the output can be as high as 27.85V when the input is only 13.87V?? Is the LM317 a mechanical generator?
    No, it is an electronic regulator. Its maximum output is about 11.87V when the load current is 1A.
    Then the ratio of the 470 ohm to the 10k pot is completely wrong.
    The ratio of the 1.5k to the 10k pot is also wrong. The values are also much too high since one resistor should have a maximum resistance of 120 ohms..

    Are you using an online "Wizard" who knows nothing about the LM317 and simple arithmatic?

    Do it like this:
    In my schematic the 120 ohm resistor always has 1.25V across it so its current is 1.25V/120 ohms= 10.42mA. Then the 1k pot has nothing or 10.42mA x 1k= 10.42V across it. Then the output is either 1.25V or is 10.42V + 1.25V= 11.67V.

    EDIT: Your fuse has resistance that reduces the output voltage and ruins voltage regulation. The fuse is not needed since the LM317 shuts down if it is overloaded (too much current and/or too hot).
  8. Evil Lurker


    Aug 25, 2011
    I have used values for R1 in the diagram above ranging from 120Ω to 560Ω and still have the regulator poop out the desired output voltage at no to very low loads.

    I have also used the exact values in the datasheet and had regulators output all over the place thanks to purchasing a lot of fakes off Ebay.

    Where did you get them at?
  9. PGB1

    Thread Starter Member

    Jan 15, 2013
    Good Morning!
    Thanks guys for taking time to reply & help out.

    Ron H, you mentioned the non liner resistance of a light bulb. I knew bulbs are non-liner, but I didn't even think of that when choosing them for a test load. Maybe that is my primary wacky-voltage problem, now that I got rid of my 470 & 1.5k resistors.

    What is a good test load? Perhaps a plain, old resistor or variable resistor to limit me to less than one amp? Or, would I destroy something? That's about all I can think of so far.

    AudioGuru, I mis-wrote about the 12 volts versus 27.85. I should have clarified that I also wanted to try my circuit with a variable transformer, so I could input around 30 vac through the rectifier. It was not meant for any specific project, just a learning thing. The 12 volt DC supply was used yesterday just as a test source. I suppose the 12vdc will be the everyday source, if I ever am successful in the test-build. I also have some battery boxes I scavenged so I can have DC V-in of 3, 4.5, or 9 (before drop). Sorry about the confusion.

    I used a datasheet formula for figuring out the resistances. I looked at some wizards, but no two I tried matched, so I abandoned that idea quickly.

    On paper, I can get any V-out value from 1.2 to the sky by changing resistances. I knew enough to stay within the voltage range of the IC and account for the dropout. But, I did not account for the regulator's need for a minimum load current (Until I read the explanations from Bertus, #12 & Audioguru.) Your explanations of the minimum current seems like a corner stone of my design's failure.

    The 47uf rectifier filter cap was a mistake & I should have known better. I read too much on internet "I'm a genius & I Made This..." places. A few sites said the LM317 provides really good filtering, so to skip the rectifier filter, or they specified low values, like 20uf. I decided some kind of filter would not hurt. The 47 was the biggest one at 50 volts I had in the box-o-treasures.

    You mentioned your schematic has 1.25 across the 120 ohm resistor & 0 or 10.42 at the 1k. Is your schematic published somewhere? I'd like to compare a known honest one (yours) to a known messed up one (mine) to an "I picked it off the internet..." one, so I can step-by-step find the differences & determine why x = OK & y= No Good. It's all about learning. Even some of the datasheets I saw don't match (120 0hm versus 240 ohm & 1k, 5k or 10k variable).

    Thanks for mentioning the fuse resistance-
    I was thinking "Why heat the IC to the point of shutdown if I over-load it?" Let the fuse open. Also, I was thinking of a short circuit in whatever I connect as a load destroying the regulator.

    Evil Lurker, you asked where I got the regulators.
    You hit the nail on the head. eBay! A USA seller, but...
    I have one I found at a garage sale in a Radio Shack package. I don't know if that improves my odds or not.

    I think, after reading all the information that all 6 of you supplied, I should go back to the breadboard and start with the simplest possible regulator circuit. If it tests OK, add in the rectifier, etc. Once satisfied, maybe I'll build one to keep (probably without the rectifier- I don't see a future need to use AC.)

    But, I'm still not sure what to use for a load while testing. What's a good plan there?

    Thanks Again for each of your generous help!
  10. Audioguru

    New Member

    Dec 20, 2007
    A voltage regulator circuit should regulate the voltage even when it has no external load. It is impractical to add a load resistor to the output of a variable voltage regulator because it will get hot when the voltage is turned up. So the resistor from the OUT pin to the ADJ pin can be used as a load that does not get hot because the voltage across it never increases even when the variable voltage is very high.

    The expensive LM117 has a minimum load current of 5mA so every datasheet, tutorial and circuit shows 240 ohms for the resistor from the OUT pin to the ADJ pin (1.25V/240 ohm= 5.2mA). No circuit shows double the value (470 or 480 ohms).

    The Cheaper LM317 has a minimum load current of 10mA so it needs the resistor to be 120 ohms (1.25V/120 ohms= 10.4mA).
    Then why does nearly every datasheet, tutorial or circuit for an LM317 WRONGLY use 240 ohms for the resistor?

    I have NEVER bought cheap junk from E-BAY. I never thought that they sell FAKE PARTS!
  11. tubeguy

    Well-Known Member

    Nov 3, 2012
    With a properly functioning regulator circuit you should not be able tor get that close to the input voltage because the 317 drops Approximately 1.75-2.75 volts depending on the load current and temperature as shown on the Fairchild datasheet.

    Starting over with a basic circuit sounds like a good idea. Pay careful attention to the pin outs on the 317.
  12. PGB1

    Thread Starter Member

    Jan 15, 2013
    Thanks to the advice & knowledge each of you supplied, the project is now successful and I learned quite a bit, as did everyone reading this, I'm certain!

    My intention was to start over, building the simplest circuit possible, then add in the capacitors, then diodes, etc. I did not get very far...

    When I was first working on this project & got consistently improper results, I wrote here & you all taught me what was wrong. So, after corrections, I still had bad results. So, I tested each component & even substituted some. Same results.

    What I did not test was my brand new, spiffy breadboard & jumper set. There are several places on the board where the connections within pin groupings have no springs. I noticed the jumpers were kind of lose in some places, but was not concerned. I added shim wire. Also, 5 jumpers have no continuity (they are the kind with ends on them).

    So, a start over with my old breadboard & good jumpers yielded success.
    I ended up with a 120k ohm R-1 and a 2200 ohm parallel to R-2 to take it from 10k ohm maximum to 1803 ohm maximum, which seems to give me good control while dialing.
    Thank all of you very much for helping. I appreciate the lessons.