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.

LM317 Circuit Challenge

Status
Not open for further replies.

MrAl

Well-Known Member
Most Helpful Member
Hi there,


[Please see attached circuit diagram]

As many of you know, the LM317 is a simple voltage regulator that can be used in a very simple circuit in order to provide for a continuously variable power supply with reasonable temperature compensation. That circuit is shown in the diagram. The intended application is a very low cost variable power supply for general purpose testing so it doesnt have to be super perfect, but it does have to have reasonable temperature behavior like the LM317 already has.


There is a slight problem with the circuit however. Potentiometers are not perfect devices in that sometimes when they fail their 'arm' opens up either permanently or sporadically causing a change of resistance from some low value to some very high unpredictable value (same effect causes static in audio amplifier volume controls). This change in resistance could easily cause the output to jump from an adjusted point of say +5v up to as high as +22v in the circuit shown, and this would quickly blow out a device that was being tested at it's rated 5v. This is where the challenge comes in...

The challenge is to redesign the circuit as simple as possible so that this can not happen, or alternately so that if it does happen (the pot arm opens up) the voltage drops to 0v instead of jumping way up to some high value. The external circuit under test will be ok in that case.

Bear in mind now that this isnt exceptionally hard to achieve if it were not for one other little catch: the circuit can not use any op amps. Transistors would be ok i guess, but limited to 3 small transistors and a few resistors BUT the temperature behavior can not be allowed to get worse than it is with only an LM317 device.

This kind of improvement would be a very nice thing to have for the LM317 when used as a supply for testing other things (LED's, etc.) so i hope you guys/gals can come up with some new ideas.
 

Attachments

  • LM317-01.gif
    LM317-01.gif
    3.9 KB · Views: 1,230
Last edited:
I am not an expert but I would replace R2 with a bunch of resistors in series and use a multiple throw position switch between the resistors to give different voltages.
That's as simple as I can think of!

Mike
 
Last edited:
That's a goodi idea, a small pot could be put in series with the rotary switch for fine adjustment.

Apart form the rotary switch solution, adding a bypass capacitor across the pot. will smooth any sharp transients.
 
Choose R2 for the maximum safe value. Protection circuits won't guard against somebody moving R2 too far (which is probably more likely than R2 failing).
 
Yeah, but if this is a lab supply, you will want the maximum output to be higher than is safe for some of the circuits you might be powering. I suppose you could put a crowbar on every circuit, set to trigger if the supply exceeds a the safe value.:(
 
Because of slight differences of reference voltage between samples I suggest to use a pot to determine the resistance values for all desired output voltages, and replace the pot with fixed value resistors - changing output voltage by shorting resistors successively via the rotary switch.

Boncuk
 
Try making R1 the adjustable pot and R2 the fixed resistor, that way if the wiper on R1 goes open it will go to the max resistance and the output will drop instead of going higher.
You will have to experiment with resistor values to get the range you need.
 
Last edited:
Brevor,

R1 is across the 1.25V reference, which establishes the set current. That would not be a viable soultion to the challenge or perhaps the longevity of the regulator.
 
acroR1 is ss the 1.25V reference, which establishes the set current. That would not be a viable soultion to the challenge or perhaps the longevity of the regulator
Hi. MRCecil, Im not sure what you mean, can you explain more?
 
Making R1 adjustable instead of R2 should be a good way to solve the problem. R1 does not determine set current for the 317. Some adjustable regulators do determine the output voltage by adjusting the set current out of the adjustment pin, but the 317 is basically voltage adjusted. R1 and R2 form a simple voltage divider between the output, the reference voltage, and ground. The only current to be concerned about is the 100µA or less of bias current flowing out the reference pin which will increase the voltage output above the calculated value if R2 gets too large.
 
Brevor,

The LM317 employs a 1.25V reference between the output and adjust terminals. R1 establishes a constant set current for that reference. Making R1 variable would not be a good idea, because only the current would change given the constant voltage of the reference. Shorting the output terminal to the adjust terminal via a pot would not be such a good thing for the proper operation of the regulator. You can take a look at thye datasheet here:

https://www.electro-tech-online.com/custompdfs/2010/05/LM117HV.pdf
 
Varying R1 would change the output voltage, because the ratio of R1 to R2 determines the set point.

The primary reasons this isn't practical are
(1) Although decreasing R1 increases the output it also increases the current in R1 & R2. This means R1 & R2 must be higher power resistors, and the LM317 will also dissipate more.
(2) The lowest possible voltage can no longer be 1.25V since this would require changing R2.

Example: If R2 became a fixed 120R, and R1 was 12R in series with a 125R pot, the minimum Vout would be 1.25 * ( 1+ (120/137)) = 2.34V. The maximum Vout would be 1.25 * ( 1 + (120/12)) = 13.75V. At the maximum setting, the current wasted in the divider would be 105mA which is why this isn't an efficient solution.
 
Last edited:
Use a dual ganged pot, one for the LM317 and the other to adjust the crowbar which you set to always be about 5% to 10% higher than the output voltage of the LM317.
 
Varying R1 would change the output voltage, because the ratio of R1 to R2 determines the set point.

Yes, the ratio influences the output set point. I obviously wasn't clear in my last post; bad habit of mine trying to be too brief.

I was speaking to the set current, which is the factor that determines that ratio and the output set point for operation within the design parameters of the device. As you showed in your example, at maximum, the output would be set 13.75V and the set current would be ~104.2mA for an R1 drop of 1.25V and an R2 drop of 12.5V, which total the 13.75V output. Negating the typical 50uA Adj. pin current through R2, which is swamped by the set current, it should be clear that the set current controls the selection of R2 for the desired output. Determining the set current is the logical step in determining the value of R2 from my POV.

Example: A 10V output is desired. R1 is selected for a value of 150 ohms. Then Vref/R1=Iset or 1.25/150=8.333mA. To determine the value of R2 is another simple calculation. The drop across the divider will total 10V with 1.25V across R1 so 8.75V will be dropped across R2. So V/Iset=R2 or 8.75/8.333mA=1.05K. Now if R2 were a pot and it was set for 10V out, R2 would naturally be 1.05K, but if one cranked on the pot increasing it to 1.65K, the output would change to 15V but the set current through the divider remains the same at 8.333mA.

I concur that varying R1 is not viable, as I tried to communicate before, and as you displayed that would limit the designed operating parameters which could impact the regulator's longevity under differing load conditions.
 
There is no "set" current in a 317. It's true that there is current going through R1 and R2, of course, but it's the ratio of the two resistors, not the current through them that determines the output voltage. Thus different resistors with the same ratio will generate a different current but the same output voltage.

After some thought, I also realized that adjusting R1 has some disadvantages.

Thus my second idea is to use R2 in the potentiometer configuration with the wiper connected to the 317 Adj terminal, and R1 and R2 in series. Then connect a larger resistor (say 10KΩ)from the wiper to ground. That way if the wiper open circuits, the resistor provides a path to ground which will cause the output to drop to near 1.2V rather than increase in voltage.
 
Hello again,


Thanks for the replies. Some very good ideas here. I tried to point out the various shortcomings of various ways
to handle this but keep in mind im searching for a *very* good way to get around this problem...one that will be
simple and cheap and solve the problem perfectly for a wide range of output voltages. I am hoping it does not
boil down to needed an op amp to get it right because i felt that that would just clutter up the circuit too much
when it is such a nice and simple circuit to begin with...i hate to do that.

Of all the ideas it's starting to sound like the secondary circuit idea is the best as long as that secondary
circuit can be simple too. We'd have to start looking at circuit ideas for this too then i guess, the simplest
crowbar or other secondary regulator circuit. Anyone mention a shunt regulator on the output, set to slightly
higher? But then again that circuit would have to be adjustable too and i guess the dual ganged pot comes back
into the picture. I was hoping to use a regular ol' pot you can get almost anywhere too so other people can
build this easily without ordering any special parts. Of course then we also have to have a fail safe mechanism
for the second section of the pot in case it goes bad and we dont know it, or that part of the circuit defaults
to 0v instead of some 22v or so.

More ideas or additions to the ideas already presented here are certainly most welcome.



[1]
Multiple Throw Switch With a Bunch of Resistors:
Not a bad idea, but then we have to worry about the switch contact instead of the pot 'arm' contact.

[2]
Bypass Cap Across Pot:
That's a good idea too, but unfortunately it doesnt help the completely open 'arm' problem.

[3]
Higher Quality Pot:
Not too bad either, but again it could open up and besides the higher quality pot will come with a higher price tag.
But on the other hand i do have to wonder now if anyone makes a high quality pot that is guaranteed not to open up
and cause this kind of problem. That would certainly solve it although we'd have to pay more for the pot.

[4]
Choosing R2 (the pot) For Max Safe Value:
Well, that would defeat the purpose of being able to adjust to a higher voltage (as others pointed out).

[5]
Roff Crowbar:
That is very interesting...in the form of a secondary adjustable circuit to guard against the first one failure.
It would have to be cheap too and simple, and fast to react.

[6]
Brevor/Make R1 Adjustable instead of R2:
Yes, that's a very good idea. The only problem is that with some required output voltages the current drawn through
the resistor to ground will have to be up around 500ma. That's a bit high. We want to get down to around 1.5v and
up to about 22v or something like that. Because of the various problems this would only work for limited output
voltages. For a dual plus and minus version, we want to get down to 0v and up to say 22v or around there, but dont
worry about the dual version just yet.

[7]
Hero, Dual Ganged Pot, One For Primary and One for Crowbar:
That's sounds interesting too, except for the fact that we would have to purchase dual pots. We'd also have to have
a way to keep track of the second section of the pot to make sure it didnt go bad and we wouldnt know it.
Maybe two separate pots to adjust the two circuits individually? That would be a bit of a hassle i guess.



Thanks again for all the ideas and comments, and any more ideas would certainly be appreciated.
 
Well, I know the 317 pretty well. Your question has me bummed here. There is a way. And it is probably simple too.

Think, think is all I can do....
 
There is no "set" current in a 317. It's true that there is current going through R1 and R2, of course, but it's the ratio of the two resistors, not the current through them that determines the output voltage. Thus different resistors with the same ratio will generate a different current but the same output voltage.

Well, I don't want to argue semantics. If you don't wish to call the common current developed with Vref across R1 Iset or Iref, call it Inetwork or Idivider or what ever. It is what it is, a common current of the divider. As a common current, for a given output voltage that would necessitate a fixed ratio of the two resistors. For a 5V output the ratio would be 3, and for a 10V output the ratio would be 7, and for 15V it would be 11. If R1 were 250ohms the common current would be 5mA for all three cases. The resistance and voltage of R2 would change but the current would remain the same. It seems kinda natural to call it a reference or set current, but I guess that's just me.

After some thought, I also realized that adjusting R1 has some disadvantages.

Thus my second idea is to use R2 in the potentiometer configuration with the wiper connected to the 317 Adj terminal, and R1 and R2 in series. Then connect a larger resistor (say 10KΩ)from the wiper to ground. That way if the wiper open circuits, the resistor provides a path to ground which will cause the output to drop to near 1.2V rather than increase in voltage.

You might want to draw that out and compare it with the standard configuration, and then run the numbers. From your discription, if I am interpreting it correctly, the output could not come down to that range. R2's value needs to be pulled down to drop the voltage in case of a wiper fault. Its that darn common current again. R1 must go across the Adj and Out pins.
 
Hi again,


Since a crowbar circuit or secondary regulator would require another regulator ic, i guess it would be reasonable to allow a reference diode or three terminal shunt regulator ic to enter the picture.
See the new attached diagram (predicted voltages are approximate but should be close, and when the pot is set to 8k and 2k for example that means the top section is 8k and lower section is 2k).

This LM431/LMV431 solution seems pretty simple and fail safe, but the main problem is that it will not adjust down lower than 3.75v with the LM431 and 2.5v with the LMV431. Also, the adjustment range is spread out pretty badly over the pot rotation, in fact very nasty...which probably means a fine tune adjustment would have to be introduced too.

Any more ideas or comments welcome too.
 

Attachments

  • LM317-02.gif
    LM317-02.gif
    12 KB · Views: 2,664
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top