Confusion with Formula for LM317 circuit

kurtselva:
I found this more detailed diagram: http://www.globalspec.com/reference/81979/203279/chapter-4-linear-power-supplies

And got abit more confused =(

Can some kind soul explain to me how this circuit works?
As in how are the voltages at the inverting and non-inverting input determined and stuff

Thanks in advance

Well you should be confused since they got the formula wrong on the page for starters.

As for the schematic, when you tie the output of an op-amp directly back to the inverting (-) input, you create a "voltage follower". The op-amp will strive to the keep the output voltage at a level the same as the voltage at the non-inverting (+) input of the op-amp. The transistor that the op-amp output is going thru increases the current output greatly over what the op-amp itself can supply. The non-inverting (+) input of the op-amp is biased at 1.25V because of the Zener diode. The bias increases as R2 goes up. This drives the output higher in voltage.

The output of the op-amp will actually be .6V higher than the voltage being fed back which is the same as the output voltage of the transistor.

@don, Vin is not part of the math for calculating Vout.