Do all LM 317's work the same? (if not which do I need) - Page 1
Forum section: electronics / beginners

author: XOIIO
author_rank: Super Contributor
timestamp: November 12, 2013, 03:23:21 pm
content: Alright so I need a specific voltage for a project (4.5v) and came across thishttp://static.electro-tech-online.com/imgcache/991-LM317.gifR1 needs to be 150rr2 needs to be 390rMy question is, do all lm317s work the same? I tried with an lm317t and it didn't work at all, the one I can get locally is an LM317UC, will that work? If not what adjustment do I need to make to the circuit?

author: John Coloccia
author_rank: Super Contributor
timestamp: November 12, 2013, 03:29:26 pm
content: The T in LM317t just specifies a slightly different package. It should work the same, so it's either broken or you did something wrong. I have no idea what an LM317UC is.

author: XOIIO
author_rank: Super Contributor
timestamp: November 12, 2013, 03:31:54 pm
content: Quote from: John Coloccia on November 12, 2013, 03:29:26 pmHm, must have gotten damaged somehow then, I did salvage it from an old board.yknow looking at their listing a lot of regulators have UC after them, i wonder why. I guess it's just some stock thing maybehttp://www.be-electronics.com/product_p/lm317uc.htm

author: John Coloccia
author_rank: Super Contributor
timestamp: November 12, 2013, 03:37:31 pm
content: It might just be a rev too. There's a whole alphabet of letters that you find at the end of some chips, and the LM317 is one of them. There's no way to memorize them all. You need to have the secret decoder ring from the specific datasheet.

author: mariush
author_rank: Super Contributor
timestamp: November 12, 2013, 03:50:28 pm
content: There's all kinds of LM317 - they're made in different packages, they're made by different companies, usually the difference between them is the maximum input voltage and how well they handle heat (in linear regulators, the difference between input voltage and output voltage is turned to heat, and some packages are more resistant to heat, others have to heatsinked and kept cooler)The formula to determine the output voltage is Vout = 1.25 x (1 + R2 / R1 ) but the R1 must be a value close to 100-120 ohms. Both 100 and 120 are standard resistor values so you can easily find these. So determine R2 with the formula, or use R2 = (Vout / 1.25 - 1 ) x R1 which for 4.5v and R1 = 120 ohm gives you about 312 ohm, which is not a standard value, but you can put two 620 ohm resistors in parallel to get 310 ohm and then get vOut = (310/120 + 1 ) x 1.25 = 4.48v Or you can put a standard 330ohm or a 100ohm and a 220 ohm in series to get 320 ohm and get about 4.55-4.6v at output.150 ohm may work but in some cases and with some lm317 regulators it may randomly not work properly.Read the datasheet and see the examples but keep in mind the examples are with LM117 which needs a 240 ohm resistor, while LM317 works with 100-120 ohm like I said:http://www.ti.com/lit/ds/symlink/lm117.pdfAlso keep in mind that LM317 needs about 1.5-2v ABOVE the output voltage, to work properly so you'll need about 6-6.5v at the input to get 4.5v. There are other linear regulators that don't need as much input voltage, chips with 1117 (they're made by various companies, 1117 is like 317 in the LM317, a pretty much standard code) in the name for example would only need about 1-1.2v above 4.5v to work, for example.

author: XOIIO
author_rank: Super Contributor
timestamp: November 12, 2013, 03:53:12 pm
content: Quote from: Andy Watson on November 12, 2013, 03:40:59 pmoh, really? What do I need for 4.5v then?I guess there is probably an online calculator for this lol.Quote from: mariush on November 12, 2013, 03:50:28 pmalright thanks. I ordered one of those assorted resistor packs so I got whatever I need. Thanks for the tips.

author: Andy Watson
author_rank: Super Contributor
timestamp: November 12, 2013, 03:57:27 pm
content: Quote from: XOIIO on November 12, 2013, 03:53:12 pmDOH ! Sorry, I'd managed to interchange R1 and R2 between figure and calculator. Ignore me, go with what mariush posted.

author: XOIIO
author_rank: Super Contributor
timestamp: November 12, 2013, 06:46:12 pm
content: Well, what the hell. I've seen schematics without the caps but this won't work for some dang reason, I need over 11 volts for 4.3 output, and higher it just rises. Do I absolutely need those? I don't have a .1microfarad polarized cap on hand.

author: c4757p
author_rank: Super Contributor
timestamp: November 12, 2013, 06:55:13 pm
content: You often do need them for stability. Doesn't need to be 0.1uF (and that's too low anyway). Just stick a big one on there - 10 to 100 uF maybe? I usually use 47uF. Also, another possible problem - despite the example circuits in the datasheet, the upper resistor really needs to be 120 ohms or lower to work properly with no load at all, to meet the minimum 10mA. Usually it works fine with one a bit higher (often up to the example 240 ohms), but if your LM317 just barely meets the specs, you may need to increase the load on the output. (If you don't want to change the divider resistors, try adding 2.7k in parallel with the output to increase the load without changing the set voltage)The LM78xx series doesn't absolutely require caps, though they should still have them. LM317 does require them.

author: Andy Watson
author_rank: Super Contributor
timestamp: November 12, 2013, 07:01:28 pm
content: Suggest you study figure 6 on page 3 of the document that mariush linked to, very carefully!

author: c4757p
author_rank: Super Contributor
timestamp: November 12, 2013, 07:05:34 pm
content: Quote from: Andy Watson on November 12, 2013, 07:01:28 pmOrrrr... you could have it wired wrong. Yep. Next time I'lllookat the photo.

author: XOIIO
author_rank: Super Contributor
timestamp: November 12, 2013, 07:10:21 pm
content: Quote from: c4757p on November 12, 2013, 07:05:34 pmQuote from: Andy Watson on November 12, 2013, 07:01:28 pm

author: Andy Watson
author_rank: Super Contributor
timestamp: November 12, 2013, 07:19:46 pm
content: With regard to capacitors: I think it depends on the manufacturer. TI's data sheet seems to imply that it is safe to omit the output capacitor! What I do know is that I have destroyed several of the TO-3 package devices before noticing that I had (inadvertently) not connect the output capacitor. Some loads, particularly inductive loads, can cause the device to oscillate which defeats its internal protection mechanisms - I assume this to be the case - since adding an output capacitor the power supply has been happy for a good many years.

author: c4757p
author_rank: Super Contributor
timestamp: November 12, 2013, 07:22:17 pm
content: Quote from: Andy Watson on November 12, 2013, 07:19:46 pmDepends on the application:Quote

author: XOIIO
author_rank: Super Contributor
timestamp: November 12, 2013, 07:41:00 pm
content: damn whoever made that picture needs to be hanged, this is the most stressed out ive gotten in two days, I thought I screwed it up twice but luckily I didn't.I may make a small quick board and send it to osh park to avoid that trouble in the future. Sheesh

author: Monkeh
author_rank: Super Contributor
timestamp: November 12, 2013, 08:07:32 pm
content: Quote from: XOIIO on November 12, 2013, 07:41:00 pmWhy? It's a schematic diagram, not a drawing or a pinout. Do not confuse them. It's straight out of the TI datasheet you were told to read (read, not skim.).

author: c4757p
author_rank: Super Contributor
timestamp: November 12, 2013, 08:25:57 pm
content: Quote from: Monkeh on November 12, 2013, 08:07:32 pmTo expand on that a bit, schematics are not supposed to correspond directly to pinouts. In fact, prepare for some engineer-strength derision if you go to great lengths to make them match. Schematics are supposed to show the intent of the circuit, not the build pattern, so you instead follow the convention: signals (or power, in a power circuit) flow from left to right, and higher voltages go above lower. That's where the arrangement of pins in the diagram comes from.You canlabelpin numbers on the schematic - that's encouraged.

author: XOIIO
author_rank: Super Contributor
timestamp: November 12, 2013, 08:37:01 pm
content: Quote from: c4757p on November 12, 2013, 08:25:57 pmyeah, that would have helped lol

author: SeanB
author_rank: Super Contributor
timestamp: November 12, 2013, 08:54:43 pm
content: Remember as well negative voltage regulators have a different pinout, and the adjustable ones a different one as well. Even worse is some will be just different depending on the manufacturer. Always helps to refer to the exact manufacturers datasheet, as you will find that different manufacturers will change specs and ratings depending on both package and whim.

author: XOIIO
author_rank: Super Contributor
timestamp: November 13, 2013, 06:44:34 am
content: If anyone is interested here is a board I threw up on osh park, I also made it single sided so that anyone who has the stuff can make it at home.http://oshpark.com/shared_projects/IU9KGZF8

author: dr_p
author_rank: Frequent Contributor
timestamp: November 13, 2013, 07:30:17 am
content: Quote from: XOIIO on November 13, 2013, 06:44:34 amUsually(*), in beginner designs, the 317 is powered from a transformer. So you NEED a big filtering capacitor.1. the 0.1uF is not an input filtering capacitor, that one needs to be way bigger. A general rule of thumb is a couple thousand uF for each amp. Given the LM317 can deliver 1 or maybe even 2A, I would go for at least 2200uF (with twice the vorking voltage rating). Output capacitor is ok at 22-100uF(with twice the vorking voltage rating). If, however, you are powering it from a car battery (for instance) you can lower the input cap value.2. you need to thicken the traces where current flows. So from Vin to Vout, also include the input/output capacitorsand the ground return for the current.All of these have to be thicker (lower resistance) or you will drop voltage on them and that screws up your regulation and will heat up for no reason.Try to think of the whole current loop: from Vin, via C1(+), to 317, via C2(+), to Vout, then through the LOAD, then back in the output ground, via C2(-), to C1(-), then back to the input ground. So I recommend separate input and output grounds, it makes for a neater design and it's easy to connect the wires.So all the traces carry large currents, except for R1/R2 and the small 0.1uF capacitor.And try to keep them all the same size - if all the traces are 1mm then you can't skimp on the ground return, making it 0.2mm.Also, for power supplies like this, it might be a good idea to make the power traces as big as possible. A 1mm trace is decent for 1.5A. If you need 1mm, make them as large as they fit. They won't do any harm, only good, there will be more copper acting like a heatsink,

author: Rick Law
author_rank: Super Contributor
timestamp: November 13, 2013, 07:46:11 am
content: Quote from: c4757p on November 12, 2013, 06:55:13 pmFirst ... the LM317 appears rather easy to blow out by over current or mis-connected. I had one that seem to work and then stop and then work and then stop... I cooked it too hot once. Perhaps your LM317 might have cooked once?Second... Interesting. I recently made a voltage logger and I initially had a hell of an occasional run-away oscillation problem. After experimenting a while,a 100+uF at the input and a 47uF at the LM317 output is exactly what solved my problem. When I commit the circuit to solder, I ended up using a 220uF at the input (to both a 7805 and an LM317 separately for dual voltage) and two 47uF - one at the 7805 output and one on the LM317 output and I have not had an oscillation problem in over a month.(The oscillation gets started by the AC coming on, or the dish/cloth washer - a burst of noise 100 micro second'ish that most of the time is just noise, but frequently enough to knock the circuit into oscillation.)NowI am religious in ensuring I have a capacitor at the LM317's outputand putsome thought into heat-sink needs.

author: XOIIO
author_rank: Super Contributor
timestamp: November 13, 2013, 05:41:50 pm
content: Quote from: dr_p on November 13, 2013, 07:30:17 amYeah, this circuit will be powered by a wall plug, it's just to drop it down from 6v, and I'll just be powering some simple logic and some LED's so I won't get near the 1.5v current limit of the LM317

author: dr_p
author_rank: Frequent Contributor
timestamp: November 13, 2013, 06:33:01 pm
content: Quote from: XOIIO on November 13, 2013, 05:41:50 pmFigure 12, Page 7 from thedatasheetsays no. Input voltage must be 1.5 to 2.5V higher than output voltage for proper regulation. Mind you that your wallwart is powered from a transformer, thus gets AC, rectifies it and then filters it with a capacitor. But under load there will be ripple on the output. So an initially clean 6VDC will look like a saw-tooth between 6V and (let's say) 5.5V. And that needs to be 1.5-2.5V higher than 5V. See the problem?