Lm317 vs LM338 - Page 1
Forum section: electronics / beginners

author: queennikki1972
author_rank: Regular Contributor
timestamp: August 25, 2019, 01:29:14 pm
content: So I played around with the LM338 5 amp variable IC in the T0-220 package and I literally wasted 3 of them and still cant get them to work the same as a Lm317.. It would immediatelty short them out. According to Google they have the same pinout so I dont understand why..Both were being powered by the same setup.. 40VA transformer - Bridge Rectifer - Smoothing Capacitors - Resistor and Variable Resistor (Pot) and one works and the other doesnt.Am I missing something here... The circuit below is the basic circuit used for learning.

author: queennikki1972
author_rank: Regular Contributor
timestamp: August 25, 2019, 02:31:37 pm
content: But that would short it out like that?

author: Bud
author_rank: Super Contributor
timestamp: August 25, 2019, 03:03:02 pm
content: Try reducing the output capacitor to the value recommended in the datasheet. Also the datasheet recommends using a prote tive diode across the 317.

author: Ian.M
author_rank: Super Contributor
timestamp: August 25, 2019, 03:20:38 pm
content: Quote from: queennikki1972 on August 25, 2019, 02:31:37 pmNope.However overvoltage at the input could be an instant failure.Quote from: Bud on August 25, 2019, 03:03:02 pmA large output capacitor shouldn't be a problem. The regulator will simply current limit till its charged. An anti-parallel diode to protect the pass transistor is only required if the input can ever be shorted to (or rapidly dragged down to) ground with a large output capacitor. Its internal protection is good for a reverse surge of up to 25A. There is no way short of rectifier failure for the voltage of a conventional secondary => bridge rectifier => reservoir capacitor unregulated supply, not powering other large loads, to collapse rapidly enough to damage the LM338 unless you physically short the input.One possibility is that it may be acting as a RF power oscillator due to poor layout. That can cause excessive dissipation and cause the internal thermal limiting to misbehave. Post a photo of your actual circuit!Also, where did you get them from? If it wasn't a major distributor you could have fakes.

author: queennikki1972
author_rank: Regular Contributor
timestamp: August 25, 2019, 03:42:15 pm
content: I tend to order bulk from china so its a possibility of fakes. I dont always get bad stuff from china. Ill try some US ones and i will consider all of the advice. The layout is a mess do to soldering and desoldering in frustration but was basically like the drawing attached. As I said I hooked up a LM317 and it worked just fine so I doubt the layout was the issue.

author: floobydust
author_rank: Super Contributor
timestamp: August 25, 2019, 04:33:53 pm
content: You absolutely have to have the two protection diodes, and the LM338 minimum load is3.5-5mA3.5mA typical 10mA max. so make sure you have that.In another thread your power transformer was 24VAC 40VA, which under light load can go over 35VDC, especially if it's an import. It could go too close to the IC's ~40V limit. Otherwise, I would guess you have fakes that can't take high voltage input or high current.edit: corrected LM138/338 mixup

author: Zero999
author_rank: Super Contributor
timestamp: August 25, 2019, 05:03:44 pm
content: Quote from: floobydust on August 25, 2019, 04:33:53 pmYes and if the output capacitor is oversized, there's more chance it will overvoltage the LM338, since the rectifier capacitor will charge up much more quickly, than the output capacitor.I think the more likely cause of failure is the LM338 being fake.

author: magic
author_rank: Super Contributor
timestamp: August 25, 2019, 05:31:03 pm
content: Test them in some simpler/safer circuit.Connect ADJ to ground through 100Ω.Connect OUT to ground through 100Ω.Connect IN to 5V through 100Ω.ADJ should be at 0V, OUT should be at 1.25V.

author: Audioguru again
author_rank: Regular Contributor
timestamp: August 25, 2019, 08:14:03 pm
content: Quote from: floobydust on August 25, 2019, 04:33:53 pmNope. The minimum load for the more expensiveLM138is 5mA when the input voltage is fairly high. For the LM338 it is 10mA. Therefore the value of the output to adj resistor is too high. Use 120 ohms and change the pot to match.But it affect only the output voltage rising with no load and will not cause the IC to short.Why do people buy cheap Chinese fakes anyway??

author: queennikki1972
author_rank: Regular Contributor
timestamp: August 25, 2019, 08:23:43 pm
content: QuoteBecause not everyone can afford $0.25 resistors.

author: Mr. Scram
author_rank: Super Contributor
timestamp: August 25, 2019, 08:29:15 pm
content: Quote from: Audioguru again on August 25, 2019, 08:14:03 pmProbably for the same reason we don’t all have a lab filled with R&S and Keithley gear.

author: exe
author_rank: Unknown
timestamp: August 25, 2019, 08:34:05 pm
content: Quote from: queennikki1972 on August 25, 2019, 08:23:43 pmA fake component can cause a lot of damage, consume a lot of time to troubleshoot, and cannot guarantee performance. For these reasons I suggest not to buy ICs from unauthorized suppliers.I do buy things from China when I can verify performance, or I'm willing to take the risk, or just for fun, or I believe the part is hard to fake, or when a part is not available elsewhere.

author: floobydust
author_rank: Super Contributor
timestamp: August 25, 2019, 09:52:05 pm
content: I used to use Linear Tech versionLT138A/338Awhich was in a beefy package TO-3 or TO-3P. That thing was tough and had higher SOA output current. But too bad it's obsolete now.

author: Audioguru again
author_rank: Regular Contributor
timestamp: August 26, 2019, 03:10:53 am
content: ArealLM338will shut down safely if it is overloaded and gets too hot. A fake one might simply melt into a short circuit.EDIT: AnLM338at Digikey costs less than a cheap McDonalds hamburger.

author: Mr. Scram
author_rank: Super Contributor
timestamp: August 26, 2019, 03:33:28 am
content: Quote from: Audioguru again on August 26, 2019, 03:10:53 amIf you include shipping the difference can be 1000%

author: David Hess
author_rank: Super Contributor
timestamp: August 26, 2019, 04:48:49 am
content: I have never had any problem with genuine LM350s or LM338s. They have always operated as higher current and power LM317s like they should.

author: mikerj
author_rank: Super Contributor
timestamp: August 26, 2019, 11:17:36 am
content: Quote from: Mr. Scram on August 26, 2019, 03:33:28 amWho orders a single cheap component? You order a bunch of stuff you need to make the most of the postage.

author: dcbrown73
author_rank: Regular Contributor
timestamp: August 26, 2019, 01:54:45 pm
content: There seems to be a disconnect here between people who do EE for a living and those who only do it as a hobby. Your normal hobbyist doesn't use 100 LM338 transistors in any type of reasonable time frame nor can all of them afford to buy all possible components they may need in their hobby in bulk. (not to mention finding a place a to store a huge inventory of components in any type of organized manor in a corner of your bedroom or whatever.I try to order in lots of 10, but my problem is that today's learning experiment has me ordering 5 different components and as I learn something new. It leads me to another learning experiment that has me ordering three more components again two days later. (a major reason I buy resistor / transistor / cap / etc bulk kits, but alas those are normally Chinese kits) All the sudden I find my self needing to order 3-4 times in two weeks as my learning moves forward. At $9-$12 per shipment. All the sudden I'm getting close to $50 is shipping alone in two weeks.It would be nice if I knew everything I would need for a month or two in advance. I could save a lot of money over the course of a year for maybe a new Keysight scope!

author: schmitt trigger
author_rank: Super Contributor
timestamp: August 26, 2019, 02:04:24 pm
content: I am also a little dumbfounded by these failures. I built many power supplies utilizing the LM338 without problems.The only points you should be well aware of are:-Ensure the minimum 10 mA load current, as Audioguru explained. But that in itself won't cause a failure.-Use the antiparallel diode, as recommended in the datasheet, to prevent the output capacitor from discharging into the regulator.-Keep the ground (common) wiring short, use thick wires. A star-grounding system also helps.Of course, if the devices are fakes, this will not prevent the damage.

author: exe
author_rank: Unknown
timestamp: August 26, 2019, 04:32:15 pm
content: Quote from: dcbrown73 on August 26, 2019, 01:54:45 pmThat's why I tend to buy a lot of stuff that I don't use in the end to save on shipping and waiting.I used to be upset about it, now I just call it "price for education". Unless you are really short of money, I don't see $50 as a big expense. I myself can save much more just by stop buying junk food, alcohol, etc.Anyway, I'm yet to finish a project without a need to order missing parts last minute. I just accept that I'll have to do an additional order or two. My annual budget for this hobby is $XXXX (amount removed not to shock people) (it's ok to spend less, it's the amount I allow myself without hesitation). It's big money, and people tell I'm crazy, but I think it's fine to pay so much for own education. Who said it should be for free? Last year I didn't spend much because most of the time I already have parts and equipment I need. I spend my money, but when I was a child my parents just gave pocket money so I could buy spare parts from the flea market because they thought that would facilitate development of my tech skills that would make me more competitive on the job market.So, I suggest optimize for speed of learning and development, and not put unnecessary budget constraints that limits you. Save on beer, but not on parts.

author: Mr. Scram
author_rank: Super Contributor
timestamp: August 26, 2019, 05:09:20 pm
content: Quote from: exe on August 26, 2019, 04:32:15 pmI don’t think “just spend $2000 a year” is useful advice.

author: floobydust
author_rank: Super Contributor
timestamp: August 26, 2019, 05:21:04 pm
content: IF a LM317/LM338/LM350 fails short, it burns up the potentiometer.So replacing the IC may not seem to work, the output stays at top voltage. You have to check the potentiometer with an ohmmeter that it can still dial down to zero.A very long time ago, my lovely 10-turn pot up in smoke. So I added a tiny fuse in series with it.

author: exe
author_rank: Unknown
timestamp: August 26, 2019, 05:33:12 pm
content: Quote from: Mr. Scram on August 26, 2019, 05:09:20 pmThat is not what I advised. It's not about spending a specific amount. It's about not going too cheap when it doesn't make sense. I'll remove the amount as other people can also trigger on it.

author: Mr. Scram
author_rank: Super Contributor
timestamp: August 26, 2019, 06:02:01 pm
content: Quote from: exe on August 26, 2019, 05:33:12 pmIt's not about the amount or "triggering". It's about advising people to spend what could easily be an order of magnitude more on parts where the cheap alternative is not only functional but for a lot of people even the only real option. Your junk food and beer budget may well exceed the disposable income of others. Fakes are an issue but not hugely so. I'm not saying you'll get original parts but most are functionally equivalent enough as not to make a difference for learning purposes.

author: exe
author_rank: Unknown
timestamp: August 26, 2019, 06:10:57 pm
content: Quote from: Mr. Scram on August 26, 2019, 06:02:01 pmAs I said before, I believe this is a wrong approach doing more harm than good. I advise buy new and original parts, esp. when it comes to jelly-bean components. Why gambling and guessing why it doesn't work? How do you know if it's "functionally equivalent" and not going to break any moment in the future? If one wants to save on delivery, buy, e.g., from lcsc.com.You can't have original parts, fast delivery and cheap price.

author: David Hess
author_rank: Super Contributor
timestamp: August 26, 2019, 06:13:47 pm
content: 20 years ago visiting the amateur radio swap meets around cities which supported aerospace and electronics industries could turn up small lots, 10s to 100s, of various parts including IC regulators and power transistors. I still have bags of various TO-3 bipolar, Darlington, and MOSFET power transistors, a tube full of LM337s, and about 2000 1N270 germanium diodes. Today I would be worried about counterfeit parts but maybe this source is still viable if you look for old date codes.If you do this though, you are likely to end up adapting your design to make use of parts which are not quite optimal which can lead to some eccentricity and personality in the result like using 4 LM337s in parallel, massively derated power transistors, or my favorite, using 2N4401s or 2N4403s in parallel for greater power dissipation because it is cheaper than a medium power part.When I order parts from Mouser or Digi-key, if 10, 25, or whatever quantity to get the price break is not economical, then I order double the number I need or at least a couple extra which I would likely do anyway for parts like power transistors which will operate in parallel so I can make matched sets.

author: janoc
author_rank: Super Contributor
timestamp: August 26, 2019, 06:19:53 pm
content: Quote from: Mr. Scram on August 26, 2019, 06:02:01 pmThe thing is, even when on a budget and buying from Asia there are sellers and "sellers".On AliExpress/eBay, passives like resistors and small value capacitors (not electrolytics) are rarely a problem if you can put up with larger tolerances (see the thread about the out of spec resistors). Semiconductors are risky but usually if the component is something complex like a microcontroller, you have a chance to get a genuine part.On the other hand, power components, simple stuff like transistors, opamps and similar that are easy to substitute for a similar working part (but with often much worse specs) are almost always fake. The same for electrolytic capacitors. I don't buy those from there unless I am feeling like a masochist or I am certain I am not going to push the component in question anywhere near its limits (like the OP does).One way to avoid this issue is to get semiconductors locally. Mouser, Farnell, DigiKey, RS etc. - the shipping fees sucks but e.g. RS does free shipping if you order on weekends, and all of these have free shipping beyond a certain value of the order, so one has to accumulate BOMs from multiple projects.An alternative if you really want cheap but still reasonable quality parts are outfits like Tayda (https://www.taydaelectronics.com/,they have also multiple eBay accounts) or then LCSC (https://lcsc.com/). With LCSC it is very unlikely you will get a fake component.Basically the rule of thumb for me is - if it can blow up/start a fire/cost me a lot of money in repair/lost business, I am spending the money on to get a genuine part from reputable distributor (a 40ish volt input supply would certainly fall under that "can blow up/start a fire" category). If it is just for fooling around, I will buy even a pack of transistors from AliExpress to have some stock, but then I am not going to use them for something like what the OP is building.

author: Mr. Scram
author_rank: Super Contributor
timestamp: August 26, 2019, 06:22:38 pm
content: Quote from: exe on August 26, 2019, 06:10:57 pmIt’s hard to call it a gamble if the parts usually work. Although the discussion is irrelevant to many as they simply don’t have the beer budget for original parts. Regardless of assessments it’s the “wrong” approach.

author: Mr. Scram
author_rank: Super Contributor
timestamp: August 26, 2019, 06:25:02 pm
content: Quote from: janoc on August 26, 2019, 06:19:53 pmWe're obviously talking about learner and hobbyist territory here. If you buy Aliexpress components when you're doing customer work you're just an idiot. Not because it'll definitely blow up but because the risk reward proposition is completely skewed. Just charge marginally more and cover your ass.

author: exe
author_rank: Unknown
timestamp: August 26, 2019, 06:43:23 pm
content: Quote from: Mr. Scram on August 26, 2019, 06:22:38 pm"The Greedy Pay Twice".

author: Mr. Scram
author_rank: Super Contributor
timestamp: August 26, 2019, 06:54:40 pm
content: Quote from: exe on August 26, 2019, 06:43:23 pm"He Who Resorts To Sayings Seems To Have Run Out Of Arguments".We can go over this again and again but the vast majority of Chinese parts work fine and vast differences in disposable income exist. There's not much more to be said. Continuing to foul up someone's thread isn't productive.

author: janoc
author_rank: Super Contributor
timestamp: August 26, 2019, 06:58:12 pm
content: Quote from: Mr. Scram on August 26, 2019, 06:25:02 pmYes, absolutely. Sadly it is sometimes difficult to convince the folks in charge that saving 10 euro on shipping costs could well cost us thousands in wasted time and troubleshooting customer issues. (And still ignoring the fact that 10 bucks gets you second day delivery vs. 3-4 weeks from AliExpress).But that's a different debate, not very relevant to the OP's issue.

author: magic
author_rank: Super Contributor
timestamp: August 26, 2019, 08:36:15 pm
content: Don't you people have shops, internet stores and auction site sellers who specialize in hobby stuff? Inexpensive shipping by snail mail, small quantities of common parts, either from reputable Western distributors or trusted and verified Asian sources? There surely is a bunch of such vendors in PolandYou can sometimes get fakes but at least it's fakes that work (or somebody would have complained before you) and the more professional sellers take it seriously and change suppliers if something fishy is found.Going back to OP, I don't think it's caused by failing to meet the minimal load spec or even lack of reverse protection diodes. Somebody suggested that perhaps peak voltage from the transformer exceeds 40V. That's worth testing - just measure it with the diode bridge and capacitors in place but without the LM338.If not, the regulators may be fake. As I said yesterday, test them at low voltage and see how they behave.

author: dcbrown73
author_rank: Regular Contributor
timestamp: August 26, 2019, 09:47:07 pm
content: Quote from: exe on August 26, 2019, 06:43:23 pmThat is only true occasionally if you learn from mistakes. It shouldn't happen all that often. There are reputable Chinese component sellers out there that at least sell functioning parts.I've bought many from Amazon that work and they usually come with several in a package. I've had to toss out one before, but I had 4-9 more from the kit. That has happened maybe three times since I started this in 2014.I'm in agreement that if you're buying parts for a customer's device or a product you are selling. Buying high quality parts are a must. Otherwise, your products will end up being sold at the $1 store, or nobody will send you products to fix due to inferior product life after fixing it.On a hobby bench while learning. Buy from a trusted reseller. Chinese or not unless you building / repairing something you expect to use for a long time to come.I built a Elenco power supply kit and I replaced the electrolytic caps with higher quality ones during the build, but as for the diodes, resistors, and ICs that came with it. I used what was shipped. I sent it to a friend so he could enter the electronics hobby and I expect it to last him a long time or at least until he upgrades to bigger better PSUs.