Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Challenge: Find the circuit flaw?

Status
Not open for further replies.

MrAl

Well-Known Member
Most Helpful Member
Hi,

Here is a typical LM317 regulator circuit and layout. Nothing fancy but the layout was done using a screw type connector so that the operation of the LM317 could be changed easily for different functions such as current regulation, so it can be used as a voltage regulator, battery charger, etc., just by changing resistor values and their location on the connector. For this problem however it will only be used in the voltage regulation mode so the RCC is not used and so is open.

The circuit is shown on the top and the layout on the bottom of the drawing.

Some notes about the layout:
The layout drawing shows the placement of the parts. It's very close to real life except the heatsink is vertical.
All the wiring is done with #24 gauge wire and the longest length of wire is 8 inches or a little less, so no wires resistance is more than about 0.020 ohms.
The connections are all well soldered and the screws tight.
RCL is a direct short here, Rvs is around 1.5k but the pot + Rvs resistance totals about 2.3k.
The word "tested" appears at the top corner of the drawing, but it was only tested for use as a battery charger, not (as then) as a voltage regulator.
The heatsink is fairly large, not a tiny one.

Symptom:
Poor voltage regulation with a load like a simple resistive load. With the pot set to create 14.2 volts output (total lower resistance around 2.3k), with only a 1 amp resistive load (connected from Vout to GND) the voltage drops to 14.0 volts. That's way too much for this kind of regulator. The input voltage is 20v DC and well filtered and well regulated.

Can you find the flaw?

I can assure you that if you dont know what is wrong with this and you like to use these kinds of three terminal regulators then you will definitely want to see the solution to this. It's also very interesting within general power supply design.
 

Attachments

  • PowerSupply-LM317-01.gif
    PowerSupply-LM317-01.gif
    12.7 KB · Views: 222
Last edited:
Ah, a good mystery. Yes, that's a known problem with 3-terminal regulators that operate without a ground reference. A clue: It's related to the resistance of one of the wires, but I'll leave the discovery of which wire and the explanation of why the output voltage drop is so large to the reader.
 
Hi Carl,

Well that is very considerate of you to give other members a chance to think about this too before they get the answer. I was going to suggest that anyone that already knows the answer already just reply with a simple, "I know what it is", or something like that. :)
Thanks a bunch.

I'll add a little more too here...

Since the max resistance of any one wire is really 0.017 ohms, at 1 amp that is only 0.017 volts and even twice that is only 0.034 volts (a run to and fro) so that alone can not account for the drop of 0.2 volts. If you prefer to go with the max of 0.020 ohms then it is still only 0.040 volts which still does not account for the entire 0.2 volts drop at 1 amp load.
BTW with no load it does put out 14.2 volts.
 
Last edited:
I was going to suggest that anyone that already knows the answer already just reply with a simple, "I know what it is"
I know what it is.
 
What is the temperature of the tab on the TO220 when the regulator is dissipating (20-14.2)*1 = 5.8Watts?

Assuming that the heatsinking is adequate to keep the tab below ~100degC, then the addition of a single resistor will fix it...
 
Last edited:
What is the temperature of the tab on the TO220 when the regulator is dissipating (20-14.2)*1 = 5.8Watts?

Assuming that the heatsinking is adequate to keep the tab below ~100degC, then the addition of a single resistor will fix it...
But that's not the cause of the observed voltage drop.
 
What is the temperature of the tab on the TO220 when the regulator is dissipating (20-14.2)*1 = 5.8Watts?

Assuming that the heatsinking is adequate to keep the tab below ~100degC, then the addition of a single resistor will fix it...

Hi Mike,

I am glad you asked this because others might want to know too and it was hard to think of all the possible wonders of everyone reading this. I can now state that the temperature is 'near' room temperature or definitely less than 40 degrees C. I can say 'near' room temperature because this problem will show up right away, as soon as the load is connected, so there is no thermal time constant at play here at least not for this huge drop of 0.2 volts. True there may be a tiny drop (or increase) later, but the main concern is the immediate drop of 0.2 volts which happens right away.
The heat sink is not infinite but it's pretty big for just 1 amp, and lower the input voltage (within reason) doesnt help even though the TO-220 package then dissipates less power. There is also adequate thermal paste and tight tab screw, although a loose screw would be a problem too which would show up after a few seconds of run time probably.

Still, what resistor were you talking about adding here? That addition could help in other cases so it would be good to mention here. Of course there's also the possibility that you found another solution of some type, and that would be good to know too.

Also, if anyone wants to PM me with their answer i could then say if i agree or not, or if they found anther solution. So please PM me with the result if you would, thanks. If you like i can then post if i agree with your result, but that's your option.
It will be interesting if we find other things too.

I will assure anyone reading this that this is certainly worth looking into. I made this mistake when i quickly wired up the board back around 2004, and mostly used it for a battery charger of fairly low current so never noticed what was not right until now when i needed higher current and was looking for better voltage regulation.
 
Last edited:
I think that it's a layout problem.

Rcc and the 220 Ω should be connected much closer to the LM317. There is a small voltage drop in the wire from the LM317 to the output terminal, and that is where Rcc etc is connected. That voltage drop causes a current reduction in Rcc etc, and that current all goes through Rvs and the pot. Because Rvs and the pot are much larger resistance than Rcc etc, there is a much bigger voltage drop across them, which is where the real output voltage reduction comes from.

The voltage drop in the wire is being amplified by the ratio of (Rvs + pot)/(Rcc etc)
 
Let me ask: measure input and output ripple?

Hi,

The input is clean, well filtered and well regulated DC coming from a decent power supply that can easily handle much more than 1 amp current. The output has no ripple either. It's all just DC.
 
Hi,

What do you mean by "IA", what does that stand for here?

Since others are posting their results now then if anyone else wants to post their answer/result/fix then by all means please do so. I wont say anything else yet but we'll compare a little later. This really is an interesting problem.
 
At first I thought that this is a minimum load current problem; you know, the one that Audioguru keeps harping about, were he insists that R3 must be 120 Ohms or lower.

Well, that is a minor contributor, but not the primary problem.

Here is a sim (ignoring wiring resistance) showing what happens if the minimum load current spec for the LM317 is not met. I start with Mr Al's resistors that set the regulator output to ~14.2V. With no external load, the output current -Ix(U2out) is determined solely by 1.25/220 = 5.7mA. According to Audioguru, this should cause the V(out) to be much higher than predicted by R3,R4. See Green traces, which are for R7=1GOhm (open). There is a slight peaking of V(out) for load currents less than 4mA, but this is obviously not sufficient to account for MrAl's problem.

Fixing this is easy. Either lower the value of R3 and R4, keeping the same ratio, or shunt the output with a resistor to keep the min current at -Ix(U2out) a bit higher. The red, lt. blue, and dk. blue traces are for R7=3.3K, 1K and 500, respectively. Note that adding about 5mA to the minimum current from the 317 gets rid of the slight peak. This accounts for my original "add one resistor comment".

317ml.gif

The major problem is wiring layout. The way the original pcb was layed out, the parasitic wiring, pcb trace, and terminal strip resistance ends up inside the feedback loop to the regulator. There are two ways the layout can be improved. One is to connect the top end of R3 directly to the '317 output pin, bypassing R1 (ne R9). The voltage drop across wiring resistance R1 gets multiplied by the ratio R4/R3, so this is best opportunity for improving the regulation.

A second opportunity is to move the bottom end of R4 directly to the output terminal, bypassing the voltage drop across R5 (ne R11), a sort of poor man's version of remote sensing. This only improves the regulation 1:1.

A before and after sim comarison is shown: You can see the slight peaking at low load currents caused by not meeting the min. load current, too.

317rs.gif
 
Last edited:
I know the answer too. Very simple.

May I say it now or wait until the quiz has ended :)?

All the best,
tvtech
 
I know the answer too. Very simple.

May I say it now or wait until the quiz has ended :)?

All the best,
tvtech
Say now. I PMed Mr Al, and he gave me the go ahead...
 
Sneaky buzzards.

I shall not forget this :banghead:
You don't play fair. I never had a chance anyway. This thing was rigged from the start...

"Mumbles and goes home muttering about people and things and choices and words and trickery and sneaky stuff and outfoxing and everything"

Wakes up and realizes...he likes to be associated with people like this. Salt of the Earth. Sneaky but good people. People that like a bit of fun now and again.
Good people that are well versed in just being....normal, and maybe fun loving too...

I cannot explain ETO and the people here. And I mean everyone that I have ever encountered here that knows me...

Such a really good bunch of people. From Moderators to regular Posters and Members and well just about anybody that is here to be themselves. No airs and graces or trying to look smart...

I keep playing the "goodness" card. That ultimately determines personality. It's not what you back down for....that's easy....it's for what you stand up for.

Standing up for something means flack. It requires balls. I have known some Women that grew a pair in order to do stuff.

And I hijacked this thread. Sorry.

^^^^still cross I was beaten to the answer :)

That does not mean I love anybody less :p

Regards,
tvtech
 
Hi,

I can see now that most of you know what this was already and that's good. TvTech im sure you know too but feel free to add more if you like.

First, this was a real life problem that i discovered in my power supply just recently because i wanted better regulation than i normally need with battery charging, because with battery charging i dont mind if the voltage is a little lower to start with and then picks up later when the current decreases.

Second, it's not really about the 220 ohm resistor 'value'. True it should be lower, but keep in mind that the min current spec is not a cut and dry spec it's a "to be sure over all temperature and specific part selections" min spec which means some regulators at some temperatures (like room temperature) will operate pretty much the same with either a 220 ohm, 150 ohm, or 125 ohm, or 120 ohm, except of course for the choice of R2 which also has to change to maintain the same output voltage. That said, changing the 220 ohm to 100 ohm (and R2 to the appropriate value) does not change the result as it still drops by 0.2 volts from 14.2 to 14.0 as before. However, 100 ohms will be used for the remainder of this discussion when a calculation is made but not in the schematic diagrams where it is still shown as a 220 ohm.

Third, those who stated that the problem had something to do with the layout where the physical layout position of the 220 ohm resistor with respect to the TO-220 package where correct, at least in part, and for the most part, correct. I'll explain next.
Those that said that it was a 'single wire' that was the problem were absolutely correct but this is very close to the same reasoning as the physical location of the 220 ohm resistor so the two ideas are almost the same. I'll explain next.

The main problem:

The main problem is that the wire connected to the center pin (Vout) is SHARED between the 220 ohm current AND the load current (see where Vout is taken from pin 12 of the connector). That means that any current that flows through the load also flows through this wire. Since the wire gauge is #24 AWG and the length is about 8 inches long, that puts the resistance of that one wire at close to 0.017 ohms (just 17mOhms). That is not much, and at 1 amp there is only 0.017 volts drop in that wire, which is not much. If it was just that, it would mean the output would drop by only 17mv which would not really be as much of a problem except in the most extreme cases where we need super great regulation.
But the problem is that it also drops the voltage getting to the 220 ohm resistor, and that is the resistor that should have the internal reference voltage across it at all times in order to ensure good regulation. Comparing the 17mv to the 1.25 internal voltage drop we get:
0.017/1.25=0.0136
which can be read as "1.36 percent" of the reference voltage, which still doesnt seem like much but considering this regualtor should be at least as good as 1 percent OVER THE FULL TEMPERATURE RANGE, that means we might expect another 1 percent drop which would be nasty.
But how this affects the output is quite astonishing. Since we experience a 1.36 percent drop in reference, we can expect a 1.36 percent drop in output, which means the output could drop to 100-1.36=98.64 percent. Starting with 14.2 volts that means we have as output:
Vout=14.2*0.9864=14.00688 volts !

Now we see how big a deal even a small resistance like 0.017 ohms can make in the output voltage.

The real equation is like this:
Vout=(Vref*(R2+R1)*RL)/(R1*RL+Rs*RL+Rs*R2+Rs*R1)

where R1 is the upper resistor (like 220 ohm or 100 ohm) and R2 is the lower resistor, and
RL is the load resistance and Rs is that pesky series resistance between the Vout terminal and the 220 ohm resistor when the load is drawn through that same resistance. Also, Vref=1.25 volts or close to that.

If we solve that equation for Rs, we get about 0.017 ohms, which is the resistance of that one wire.

I should also point out however that the real problem is that the one wire is SHARED with the 220 ohm current and load current. That's the real problem. If there were two individual wires, there would be no problem because then the 220 would have it's own wire for current so there would be no drop. This means the resistor itself does not have to be moved, we just need to add a new wire from Vout to the load so that any load current drops a little voltage but only in that wire not the 220 ohm resistors wire.

The fix then is very simple as many here thought: just add a separate wire to Vout that goes to the load.
The fix is shown in the new diagram, where the connector terminal 1 was disconnected and instead used for the LOAD connection for Vout (see attachment). Note i removed some of the resistors that were not being used anyway for this.

If there are any other ideas too though i welcome them as well.
For example, with some choice component selections we might be able to measure very low value resistances because we can get the output to change by 10 times the resistor R3 value. Measuring the output voltage would then tell us what value of R3 (now a resistor we want to measure) is.
Another example is if we make that resistance a low value low power resistor we can get a 'soft' output voltage regulation profile for higher currents without the need for a higher power resistor directly in series with the output.

Also, as it turns out, this isnt the only problem with these regulators, but i'll save them for next time :)
 

Attachments

  • LM338-PS3b.gif
    LM338-PS3b.gif
    8.8 KB · Views: 166
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top