LM317 output voltage drop out of spec (maybe) - Page 1
Forum section: electronics / projects

author: francesco_97
author_rank: Contributor
timestamp: July 01, 2024, 06:53:58 pm
content: Obviously, it is another post in the venerable LM317. I am reviewing a stabilizing module that I've done in the past for my ULTRA WOW LOW RIPPLE DUPER SUPER STABILIZED BENCH PSU but the lack of experience teaches me that a fixed voltage can't be kept fixed under load how I dream.As you can see from the attachments the stabilization module is a dual-rail version of the scheme in Fig.9 at pag. 11 of the LM317 datasheet BUT with the pot replaced by a set of fixed resistors, because I wanted the PSU with fixed voltages selected by a rotary switch, with a 120R resistor to keep more stable the IC and with a ripple filter at the beginning that I copied from the Dave's video. Under no load and at ambient temperature everything works fine.Now let me show the issue.From the Electrical Characteristics table at pag. 6 we can read that under V_0 > 5V the max load regulation is 1.5%V_0 (supposing at high temperature) and that the Output-voltagetemperature stability is 0.7%V_0 so we SHOULD (and here could be the issue) sum them to obtain a maximum voltage drop of (1.5+0.7)%V_0 so, using a 21V input voltage and an open circuit output voltage of 9V, the drop should be at maximum 9V*2.2/100 = 0.198V leaving 8.8V clean at the output.This is not the case.As two 17W 4.7R resistors put in series are connected, the clean 9.00V drops to 8.76V at 38° 0.95A and with a stabilized temp of 80° the voltage reaches 8.43V at 0.90A. It is too low for the specs.Probably I didn't read the right way datasheet and maybe summing everything that could be the thermal error like the base 1.5% load regulation + 0.7% temperature stability + 10W*0.07%/W = 0.7% Thermal regulation + I don't know what else to sum we can obtain a 2.9%V_o drop = 0.261V that corresponds to an output of 8.74V. However, I'm too out.I tried to change the output capacitor from 100u to 1u and to avoid the fixed resistors using an external pot to manually regulate the open voltage but nothing.What I'm not considering?You can find the schemes attached below.Please don't hit me too hard for my mistakes.Thank you.

author: wraper
author_rank: Unknown
timestamp: July 01, 2024, 07:23:58 pm
content: Quote from: francesco_97 on July 01, 2024, 06:53:58 pmDidn't bother figuring out from where you pulled that strange math but voltage drop does not depend on output voltage whatsoever. In fact LM317 always "sees" 1.25V between its output pin and ADJ pin, so it doesn't even "know" what actual output voltage is. As of dropout voltage, it's <2.5V (for ST part) and depends on current and die temperature.EDIT: answered what wasn't asked.

author: tooki
author_rank: Super Contributor
timestamp: July 01, 2024, 07:33:04 pm
content: Wraper, I don’t think the question is intended to have anything to do with dropout voltage. The title tripped me up, too! I think the title is meant to read as “the output voltage goes out of spec.” I was also looking at the dropout specs until I realized OP has 21V going in and 9V going out, so more than enough dropout for any situation.As I understand it, the question is why the output voltage is plummeting to 8.43V under a 0.9A load.Edit: and I see you also realized this after the fact, just like me!

author: ArdWar
author_rank: Frequent Contributor
timestamp: July 01, 2024, 07:37:44 pm
content: Where do you measure the voltage?With how the circuit are laid out. Output power trace going a long way to the connectors while sense trace going exactly the other way in what could be described as anti-Kelvin connection it bounds to cause bad load regulation.From eyeballing alone and assuming 1 oz PCB you may have about 40 milliohm separating your output connector pins from the sense pins, that alone will cause additional 40mV load regulation drop at 1A load. Strangely matching your missing voltage... (no it isn't caused by that alone)

author: francesco_97
author_rank: Contributor
timestamp: July 01, 2024, 07:39:36 pm
content: Yes, sorry, maybe the world "dropout" is not the best choice but i meant drop "space space pause space" out of voltage

author: tooki
author_rank: Super Contributor
timestamp: July 01, 2024, 07:40:13 pm
content: Francesco, have you monitored what is happening to yourinput voltageunder load?Where are you measuring the output voltage? If your load is at the end of long, thin wires and you measure at the load, you could be seeing simple voltage drop across the wires.Have you put an oscilloscope on the output to see if it’s actually stable?The really badcapacitorcomponent placement is creating big loops, exactly as the datasheet warns not to do. It is conceivable that the large loop areas are causing oscillations.

author: AnalogTodd
author_rank: Regular Contributor
timestamp: July 01, 2024, 07:41:44 pm
content: Two things I would look at right away:1. Check the signals with a scope. Make sure that the output is not oscillating and that the input stays at 21V while you are loading the regulator. More than once I have seen people fail to check for oscillations and they find that the output compensation cap just isn't keeping things stable. That, or they find that their input supply can't handle the load they thought.2. Check voltages around the board, not just at the output pins. Your grounding isn't that great and you may have too narrow of traces on inputs and outputs such that you are getting voltage drops due to trace resistance that are throwing everything off.

author: TimFox
author_rank: Super Contributor
timestamp: July 01, 2024, 07:50:57 pm
content: Agreeing about using a 'scope.For actual dropout voltage on linear regulators, it is important to verify that any ripple on the input does not dip below the dropout point: you can't tell that with a DC voltmeter reading only (which will read mean voltage).

author: wraper
author_rank: Unknown
timestamp: July 01, 2024, 07:51:22 pm
content: Quote from: tooki on July 01, 2024, 07:33:04 pmYou're right.Minimum load requirement is barely met by current through R3/R4, so it shouldn't be the problem with no load.However PCB layout is an utter shit to put it mildly and you want C3/C4 way more than 0.1uf for good noise rejection and LM317 stability. It would be fine if they were just forlocal decoupling(that isn't local at all with this layout) but not like this where they're the only capacitance. IMHO this is either oscillating or there are some huge voltage drops along this PCB layout.

author: tooki
author_rank: Super Contributor
timestamp: July 01, 2024, 07:53:57 pm
content: Quote from: wraper on July 01, 2024, 07:51:22 pmAren’t Q1/R1/C2 a capacitance multiplier providing the bulk capacitance?

author: francesco_97
author_rank: Contributor
timestamp: July 01, 2024, 07:55:52 pm
content: Thanks you all for the answers. Now I'm out but tomorrow i'll check with the scope.Just to fill the questions i used 2.5mm wires at the end to avoid strage resistances due to wiring and i made the "signals" traces with a 1mm width and the power traces with a 1.5mm width.The 4.7R resistors are connected twisting their legs together and inserting the others directly into the connector.Unfortunatly i couldn't place the caps in the right spots far away fron the heatsinks due to limited space and the needing to use a single side pcb but tomorrow i'll try with the scope.

author: enut11
author_rank: Super Contributor
timestamp: July 02, 2024, 12:44:38 am
content: Could the LM317 chips themselves be out of spec? I bought some on eBay that looked like the real-deal but were only able to regulate to 20% of spec! Price was good :-). I now use them in less demanding applications. Buying components on the internet can be risky...

author: wraper
author_rank: Unknown
timestamp: July 02, 2024, 01:14:46 am
content: Quote from: francesco_97 on July 01, 2024, 07:55:52 pmIf it's 1oz copper, trace resistance from vreg/GND to the output connector should be enough to be responsible for at least 1/4-1/3 of this voltage sag. And the rest probably comes from a poorly laid out resistor divider GND or/and oscillation. Not to say output voltage must be sensed by divider at the connector to reduce voltage sag (or even closer to the load if possible)(EDIT: only on GND side, not on output side, resistor must be connected directly to IC out pin there as it's not a negative feedback). This PCB layout is so bad it gets me vibes that it should be burnt in exorcism ritual to never come back to life.QuoteSolder all those resistors on rotary switch terminals as it's done by sane people and run just 2 wires to PCB.

author: francesco_97
author_rank: Contributor
timestamp: July 02, 2024, 08:10:38 am
content: Ok, I have news for you.I forgot the ACTUAL power supply. When the board is in the PSU it gets the power from the line with the 50 HZ ripple filtered by the capacitance multiplier but NOW i'm testing it with my switching PSU. Connecting the scope with the 20MHz filter engaged at the output with a 10x probe and measuring the voltage at the output AND at the input of the LM317 directly (I'm getting the input at the leg of the diode D1) I've got this:At 30° we have 17.82V at input, 8.73V at output and something like 0.9V pkpk rippleAt 80° we have 17.60V at input, 8.48V at output and the same rippleMaybe measuring it with the probe and the ground flying wire is not the best idea as Dave says but I don't have any idea how to get a better result with my setup. Could the issue be the switching power supply? Maybe using the 50Hz power the issue disappears? Or maybe is the LM317 that is cooked?You can find the screenshots down below.

author: ArdWar
author_rank: Frequent Contributor
timestamp: July 02, 2024, 08:37:36 am
content: Quote from: francesco_97 on July 02, 2024, 08:10:38 amFix your layout.Quote from: francesco_97 on July 02, 2024, 08:10:38 amNot really, LM317 are capable of better PSRR. Switchers are indeed capable of making bad design worse however.Quote from: francesco_97 on July 02, 2024, 08:10:38 amReduced ripple for sure, but I doubt it'll improve any load regulation especially dynamic one.Quote from: francesco_97 on July 02, 2024, 08:10:38 amMaybe, who knows 🤷‍♂️. Tho 317 are usually robust enough that it rarely goes bad this way.

author: wraper
author_rank: Unknown
timestamp: July 02, 2024, 09:00:30 am
content: Quote from: francesco_97 on July 02, 2024, 08:10:38 amOr maybe schematic and especially PCB layout are crap. It's clearly oscillating and you cannot blame LM317 for that.

author: wraper
author_rank: Unknown
timestamp: July 02, 2024, 09:10:53 am
content: This and make a sensible PCB layout with short traces and not running them all across the board. EDIT: replaced the schematic.

author: francesco_97
author_rank: Contributor
timestamp: July 02, 2024, 09:15:19 am
content: Ok ok don't get angry, I'm not an engineer so I don't know how to design the PCB but I'll try to fix this and if it is needed I'm going to remake the board. If i have understood well the main issue should be the placement of the input capacitor and the loop area. From the datasheet we can read at pag. 18 that "The optimum placement is closest to the input terminal of the device and the system GND. Take care to minimize the loop area formed by the bypass-capacitor connection, the input terminal, and the system GND." Now they are placed 15mm from each other and the leg of the cap is directly on ground.Moreover, they are placed in a straight line so the surrounded area should be equal to nearly zero. Maybe the "loop area" cited in the paper includes also the output terminal? Could you draw on the PCB picture this area so I can understand better this concept?

author: wraper
author_rank: Unknown
timestamp: July 02, 2024, 09:33:12 am
content: Quote from: francesco_97 on July 02, 2024, 09:15:19 amFirst add at least 100uF, better 1000uF capacitance on the input of LM317/output of Q1, probably it will solve the oscillation. However PCB layout is so bad, you cannot possibly get a good load regulation from this no matter what you do without redoing the PCB.

author: francesco_97
author_rank: Contributor
timestamp: July 02, 2024, 09:36:59 am
content: Yes yes with remake the pcb i meant the layout and the board

author: ArdWar
author_rank: Frequent Contributor
timestamp: July 02, 2024, 10:53:45 am
content: Make the yellow line shorter. That's your "system GND" part of your loop. Minimizing area is a bit misnomer here, the circumference also need to be small.Also make the red and orange line shorter and going the same way, or at least go to the end of orange line before going to R3. The way wraper draw the schematic need to be quite literally followed in the board layout, it's more than just a logical node map.

author: francesco_97
author_rank: Contributor
timestamp: July 02, 2024, 11:52:17 am
content: Ok so i've changed the cap from 100nF to 100uF and i've added a ground wire directly from the leg of the cap to the middle ground area. The results are worse. Now the output voltage reaches 8.4V at 60°. Maybe should i have to use a lower cap like 1nF?

author: wraper
author_rank: Unknown
timestamp: July 02, 2024, 12:10:52 pm
content: Quote from: francesco_97 on July 02, 2024, 11:52:17 amMeans it's oscillating due to board GND layout, not due to lack of capacitance on the input. You can try adding short wires as shown on the picture. You may also have fake LM317 contributing to the issue if you got it from China but the circuit is problematic regardless if it's genuine or fake.

author: David Hess
author_rank: Super Contributor
timestamp: July 02, 2024, 01:53:35 pm
content: wraper covered what I was going to post. Linear Technology discussed layout for best load regulation as shown below, and it makes a large difference with three terminal regulators. The problem is that the series resistance between the regulator's output pin and the connection to the resistive voltage divider, which sets the gain of the regulator's internal 1.25 volt reference, is also multiplied by the resistive voltage divider. Attaching the resistive divider as close as possible to the output pin minimizes the effective output series resistance.Full remote sensing may be implemented using an operational amplifier as shown below in the second attachment. Circuit operation is fascinating if you care to work through it.

author: francesco_97
author_rank: Contributor
timestamp: July 02, 2024, 02:15:12 pm
content: Ok so i tried to add wires as shown and nothing changed. I'm interested at the solution proposed regaeding the position of the sensing resistor connecting the leg directly to the pad of the IC. Unfortunatly i can't use the opamp due to the lack of a sufficient high rail to keep it tracking. I'll try that solution this evening when i'll come back fron the study and i'll post the results here.See you later and thanks for the effort ❤️

author: wraper
author_rank: Unknown
timestamp: July 02, 2024, 02:24:44 pm
content: Try soldering just a single resistor between ADJ pin/GND instead of that switch/resistors and disconnect that switch connector. You may also try removing R3 and soldering it right to LM317 pins. In any case, long wires and a bunch of things dangling in feedback loop is not good.

author: francesco_97
author_rank: Contributor
timestamp: July 02, 2024, 06:50:43 pm
content: Nothing new, I soldered the 120R resistor directly on the LM317 pin and I've got the same behavior. I'll post the new layout here in the next few days. Any idea before I definitely drop this one?

author: David Hess
author_rank: Super Contributor
timestamp: July 02, 2024, 08:50:06 pm
content: Quote from: francesco_97 on July 02, 2024, 06:50:43 pmThen I do not know what you are doing wrong. I have made current boosted regulators, that with the proper layout, handled 10 to 20 amps with excellent load regulation. Voltage drop was completely explained by wire resistance.Current boosted designs have the advantage of routing most of the current around the regulator, but I always ran the regulator at close to maximum current anyway for best stability and thermal protection.Is the regulator genuine? Maybe the regulator is defective.If load regulation must be better, or at precision levels, then a different circuit like the single operational amplifier remote sense is required. I like a modern implementation of the circuit shown below, which also replaces the integrated reference with a better one,

author: francesco_97
author_rank: Contributor
timestamp: July 02, 2024, 09:24:09 pm
content: Now that i'm more relaxed i'm thinking about one thing that i've could missed. To draw the right amount of current i used two 4.7R resistors connected in series. They are rated to 17W but MAYBE when they turn hot their resistance changes going higher and lowering somehow the voltage. Below the photo of the resistor. But if this is the case how is possible that changing the resistance towards the high the voltage drops?Moreover i've replaced the IC with a new one but now it acts stranger than before because at 60° it lower the current down to half an amp amd the voltage to 4.5 volts.Edit1:Could it be the mechanical connection between the heatsink and the IC? In order i used a screw, IC, thermal pad rubber, heatsink plastic insulator, metallic bolt. In this way the IC is insulated from the pcb but maybe it has a connection with the heatsink and heating up it changes somehow the voltage with it.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: July 02, 2024, 10:29:13 pm
content: Quote from: francesco_97 on July 02, 2024, 09:24:09 pmYou would see any load changes on your current meter.Quote from: francesco_97 on July 02, 2024, 09:24:09 pmThose values are nuts. It's either oscillating, or going into thermal overload.Try a regulator only on a heatsink, (no PCB complexity) with minimal parts directly soldered, (two measured resistors, and two caps) and check it at 100mA 300mA 600mA 900mA.Proper cooling is going to be a challenge, How large is that heatsink ?This data sheet has some measured plotshttps://www.lcsc.com/datasheet/lcsc_datasheet_2304120930_Shanghai-Siproin-Microelectronics-LM317T_C5444279.pdf

author: David Hess
author_rank: Super Contributor
timestamp: July 02, 2024, 10:47:37 pm
content: Quote from: PCB.Wiz on July 02, 2024, 10:29:13 pmA 20 watt finned passive heat sink is about the area of a small smartphone.

author: dietert1
author_rank: Super Contributor
timestamp: July 03, 2024, 05:12:51 am
content: In our lab i would find some fan to test whether it's about voltage regulator temperature.I have seen many, many designs with overheated voltage regulators, e.g. vertical TO-220 regulators without heat sink and consuming 1 W or more, e.g. a 5V voltage drop * 200 mA. One could even consider the temperature fail safe voltage regulator a design trap. At least the OP noticed that something was wrong. The problem is easy to spot using a thermal camera.A ground plane isn't possible on a one-sided PCB. Those fills may help for cooling, but not against oscillation. What you can do is add wire bridges to "shorten" the distances across some of the signal traces cutting through the plane, but why not a double sided PCB?Regards, Dieter

author: francesco_97
author_rank: Contributor
timestamp: July 03, 2024, 06:36:51 am
content: Down you can find the photo of the board with a ruler to see the heatsinks. I'll try first the minimal configuration suggested with the components directly soldered and to eliminate any issue with the load resistors i ordered from amazon a cheap 60w dc load. If everything goes well i must go out from my laziness and make a double sided pcb but...UFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFIT'S SO HARD WITH THE CNCBut i'll do and this time star design with the ground everywhere.

author: dietert1
author_rank: Super Contributor
timestamp: July 03, 2024, 10:20:35 am
content: Just use double-sided material and CNC the bottom side as before. After drilling the holes you need to enlarge them on the Gnd plane side so you don't get unintended shorts when inserting the parts. Gnd connections get soldered on both sides - easy for resistors, transistors and diodes. For sockets and electrolytical caps just solder one side as before.Of course an industrial PCB would be much better, with coating and thermals around the Gnd pins (easier to solder).Regards, Dieter

author: David Hess
author_rank: Super Contributor
timestamp: July 03, 2024, 12:22:32 pm
content: A two sided board is not required to make a good layout for a 3-terminal regulator.

author: francesco_97
author_rank: Contributor
timestamp: July 03, 2024, 12:32:41 pm
content: Yes but here we have two regulators and all the resistances. I was thinking about replacing them with SMD 8085 to save a lot of space and to maintain the single layer of traces with the second layer for GND. Could it be a good idea?

author: wraper
author_rank: Unknown
timestamp: July 03, 2024, 02:16:19 pm
content: Quote from: francesco_97 on July 03, 2024, 12:32:41 pmThe best idea is throwing out all those wires and using series resistors in voltage divider soldered directly on the switch or placing them on another PCB that is soldered to the switch, thus reducing wire count by 5x

author: francesco_97
author_rank: Contributor
timestamp: July 04, 2024, 02:07:45 pm
content: Ok, first attempt of the day.I used a minimum configuration with only a 120R, a 1K pot to set the voltage, the same IC and the same two 4.7K resistors used yesterday. Everything directly soldered each other.Same results:Open circuit 9.0VClosed, 30°: 8.9V 0.95AClosed, 80°: 8.0V 0.85AYou can find the setup below: the left red wire is the thermocouple going to Peaktech 2040, crocodile connectors on the right coming from the switching PSU set at 21V and reading the current and hooks in the middle going to the HP3478A to read the voltage.Maybe with the full setup and all the bypass capacitors the situation gets better?

author: David Hess
author_rank: Super Contributor
timestamp: July 04, 2024, 02:16:46 pm
content: Quote from: francesco_97 on July 04, 2024, 02:07:45 pmWith those wire lengths, at a minimum the input ceramic/film capacitor is required to prevent oscillation. A small output electrolytic capacitor should be used also.

author: wraper
author_rank: Unknown
timestamp: July 04, 2024, 02:31:37 pm
content: You're not supposed to measure temperature like that. Actual temperature should be 1.5-2x of what you measured. Touching something with thermocouple junction does not magically make it heat to the same temperature. Also your LM317 is a fake ST imitation. Regular silicone pads are quite poor thermal conductors while being quite thick. Mounting directly on a heatsink with thermal paste can significantly lower the temperature when heat dissipation is high.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: July 04, 2024, 09:11:51 pm
content: Quote from: francesco_97 on July 04, 2024, 02:07:45 pmYou should add caps for any test, but if that only changes with temperature, you have your answer.I did find this in another thread on here - interesting comments re the venerable LM317, under 'extreme' stress conditionsQuoteYou have many watts there, so it looks like it is simply doing the thermal reduction thing.Another low tech test : Does it hiss with a wet finger ?

author: GigaJoe
author_rank: Frequent Contributor
timestamp: July 05, 2024, 02:44:02 am
content: I have good newsreeeally good newsthat LM317 are fake ...That supposed to STM LM317 , are fake LM with unknown crystal inside ..I have a lot experience with 317 from aliexpress)) , how about LM317 , TO220 with 0.1A limiterprobably encapsulation cost more, it has a thick pure copper sole btwfor a future look at engraving of original STM, that font kinda unique , C as line , not oval , "1" tail ... etc ... STM never encapsulated TO220 317 in MAR ( morroco?) , only CHNhttps://i.ebayimg.com/images/g/N9gAAOSwWkJY8nRQ/s-l1600.webparbageyour are garbage ... good for magic smoke

author: francesco_97
author_rank: Contributor
timestamp: July 06, 2024, 10:11:40 am
content: Sorry guys for my silence, I'm busy with exams. Thank you all for the suggestion and for the effort. I did again the measures with the added caps and the IC now acts weirder raising the temperature almost in the first 3 seconds at 90° so FAKE CONFIRMED. I liked the comment about the thermal paste, is it really better than the thermal pad? If so I'll use the pc paste. Now I must find the original LM317 and this is a problem here in Rome. There are only 4 physical stores and the salesman's kindness in giving information about the components is astonishing, practically you have to get what they give you and SHUT UP. Excluding the option where I suffocate with my hands the salesman, how can I see at a glance that the IC is trustworthy?

author: francesco_97
author_rank: Contributor
timestamp: July 06, 2024, 12:33:54 pm
content: Finally something near to the specs.Today my new shitty dc load arrived from Amazon (60W dc load ZPB30A1). I'm still alive but I don't know why.Using the LM shown below I obtained:Open circuit 30°: 9.004V80° 1A: 9.124VUsing the datasheet value of 1.5% load regulation at 9V we have a maximum ±0.135V error so we are in the specs range.The only strange thing is the temperature because with the thermal pad now the temperature rises immediately so maybe it is cooked. Without anything as interface, I obtained the results listed so I probably have to switch to thermal paste.In a few days the will arrive the results with the IC mounted on the PCB that you have seen to check if it's enough for this project or if the layout MUST be changed anyway.