 Seeking for explanations regarding LM317

Hi, electronic noob here. Could anyone help me explain how LM317 works? I got the resistor value part, but anyone able to help me explain (in layman terms) how output is adjusted in terms of voltage? I'm scared of a huge combination of resistance values, and I want to know if I can apply a consistent voltage on the Adj pin, and if that's possible, what is the relation between V(adj) and V(output)? Thank you very much people! :)

The LM317 passes current from Vin to Vout in whatever amount is necessary to keep Vout the amount of the reference voltage (1.2V or whatever) above that on the Adj pin.

Part of the calculation is that the current it feeds into the Adj pin is very low and quite constant, so that you can compensate for it in the design of the voltage divider.

To the extent that the output voltage goes too high, then the voltage on each part of the voltage divider would rise, and the voltage between Vout and Adj would increase, causing the regulator to pass less current to Vout and bring the voltage back to the point where the reference voltage as a proportion of the total output voltage corresponds to the ratio of the resistor between Vout and Adj to the total resistance of the two resistors, and the converse if the output voltage goes too low.

The adjustment pin is a negative-feedback pin. If the voltage on that pin goes above 1.2V, the voltage on the output pin goes down. If the voltage is below 1.2V, the voltage goes up.

When you add two resistors, you create a [u]Voltage Divider[/u] where the voltage on the adjustment/reference pin is proportional to the output voltage. Since the device is in a constant state of negative feedback, the voltage is held constant.

Negative feedback is used a lot in analog electronics. And, negative feedback is how you keep your car on the road... It drifts a little to the left, so you steer a little to the right.

I’m going to repeat the other two in the hopes of hitting on a clear explanation. Note: some manufacturers rate it at 1.2V, some at 1.25V. I’m going to say 1.2V for ease of calculations.

An LM317 is merely a 1.2V voltage regulator. The circuitry inside adjusts itself so that there is always 1.25V between the Output and the Adjust pin. (within the design parameters, of course)

If you were to connect the Adjust to ground, the Output would be at 1.2V. But if you were to connect Adjust to 5V, then Output would be at 6.25V with respect to ground. But still at 1.2V between Output and Adjust.

We can take advantage of the fact that only a very small current flows out of the Adjust pin to change the voltage at the Adjust pin. The maximum is about 100uA and usually varies between about 50 and 100uA.

Since there is always 1.25V between Output and Adjust, a resistor is placed from Output to Adjust will always have the same current flowing through it. Current equals voltage divided by resistance. I = 1.2/R1 If we make the resistor low enough, then this current is much, much larger than the small current flowing out of the Adjust pin. If we make this current 100 times larger than the current out of the Adjust pin, this will effectively swamp the effects of that current.

So we’ll use around 10mA. R = V/I so R1 = 1.2V/0.01A = 120 ohms

If we now connect a resistor between Adjust and ground, this constant current will cause a voltage drop equal to the current times the resistance. VR2 = I x R2 Replace the resistor with a potentiometer, and you have an adjustable output regulator.

The output will be equal to the LM317’s 1.2V regulated voltage, plus the voltage drop across the resistor.

So if we want 3.3V out, then 1.2V of that is subtracted to get the voltage required across R2.

R2 = (3.3 - 1.2)/0.01 = 210 ohms

wxhemiao: Hi, electronic noob here. Could anyone help me explain how LM317 works? I got the resistor value part, but anyone able to help me explain (in layman terms) how output is adjusted in terms of voltage? I'm scared of a huge combination of resistance values, and I want to know if I can apply a consistent voltage on the Adj pin, and if that's possible, what is the relation between V(adj) and V(output)? Thank you very much people! :)

The LM-317 is very easy to use once you understand it. Remember this:

The LM-317's only purpose in life is to maintain 1.2 volts between the output and control pins.

Knowing that, everything else falls into place.

For example, want to build a 12 volt linear regulator? First, place a resistor across the output and control pins of the nominally suggested value in the data sheet. They usually say "240", but 220 or 270 or 330 are equally OK. Assume you used a 220 ohm resistor.

The current across the resistor is 1.2 / 220 = 0.005455 amperes.

As you know, another resistor goes from the control pin to ground. How to calculate it?

You want a 12 volt regulator, the LM-317 has 1.2 across the first resistor (the 220 ohm) and the current is 0.005455 amperes.

So, to make 12 volts you need 12 - 1.2 = 10.8 volts across the second resistor. It's value then is:

10.8 / 0.005455 = 1979.835 ohms.

So you either choose the closest standard value such as 2K or else use a potentiometer.

If you choose a 2K resistor, you end up with:

2000 * 0.005455 = 10.91 volts

10.91 + 1.2 = 12.11 volts

Your regulator actually produces 12.11 volts. If that's OK for your use, you're all set.

Now, let's say you need a regulated CURRENT SOURCE, say to drive the backlight LED for an LCD panel. Assume the backlight needs 200 milliamperes (0.2A).

1.2 / 0.2 = 6 ohms

Place a 6 ohm resistor across the LM-317 output and control pins and the control pin will supply 200 milliamps.

Then simply connect your LCD backlight between ground and the LM-317 control pin.

Of course, obviously, the INPUT pin in any case has to be a few volts higher than any output voltage.

In the first example (the 12 volt regulator) you need 14 to 15 volts INPUT as a minimum.

For the second example, if the backlight runs at 200 milliamps and 3 volts, you need to put at least 5 or 6 into the input pin.

Hi,

I'll renew an old, old offer: Anyone who sends me a Self-Addressed Stamped Envelope, I'll send you 3 LM317's and encourage you to learn a bit about electronics and teach/show to some young people. I once bought a barrel of them :)

Terry King 152 Colby Road West Topsham, VT 05086 terry@yourduino.com

How full still is the barrel? lol

Hmmm I bet there's some interesting project to be made using lm317's and discrete components...

cjdelphi: How full still is the barrel? lol

Hmmm I bet there's some interesting project to be made using lm317's and discrete components...

A while back I built a 1.2 to 15 volt at 10 amp adjustable power supply using an LM-317.

The supply is, of course, controlled by an Arduino (UNO R3). It has a few unusual features.

One feature is that the output voltage is adjusted using a 10 turn potentiometer... connected to a small gearmotor... setup as a servo loop with the Arduino. The servo loop drives the motor with the DELTA of the setpoint and the actual voltage, so that the motor initially runs fast and slows down as it approaches the setpoint. The delta value is divided by an empirically determined constant to avoid overshoot and hunting.

Upon selecting the desired output voltage, the motor rotates to set the pot accordingly. It isn't involved in regulating, just in getting to the desired voltage.

Also, there is a FET switching circuit (also run by the Arduino) that switches the 24 volts DC from the transformer / rectifier / capacitor section and PWM drives another large capacitor to control the INPUT voltage to the regulator circuit.

It's setup to provide "Output + 3" volts to the regulator input. This limits power dissipation when using the supply at low output voltages and high currents.

The LM-317 "core" drives a parallel pair of MJ2955 PNP power transistors used as current boosters. The transistor output (the collectors) and the LM-317 output are separate and used as plus side voltage sense (that is, they are joined at the load).

The transformer circuit minus side and the "ground" end of the potentiometer are also separate and joined at the load for minus side voltage sensing.

Current is sensed with a Pololu current sensor module.

The Arduino also drives a Noritake 128 x 64 graphical VFD (vacuum florescent display) to display output voltage, current, power and cooling fan RPM. It also provides a warning if the edges of the safe operating area are approached.

It also monitors actual output voltage vs commanded output voltage and activates a crowbar SCR if the output does something nasty.

It's a nice rugged supply. I've been hard on it and it hasn't burned out yet!

terryking228: Hi,