Good day folks. Messing around the shop and sometimes not having stuff to actually do, I thought might as well learn something, so: constant current source using an LM317....I know the general principle of operation and even built one a while back, but can't figure out a couple of things and there don't seem to be any clear-cut tutorials. I don't just want it to work without knowing HOW it works. I can't sleep well at night if something's puzzling me, so let's work this out

1) what exactly are those 1.25v we divide by the resistance and why that number ?

2) what happens if the load is disconnected ?

3) what's going on with the power dissipation in the resistor ?

Have a look HERE at the very first diagram.

1) I understand that 1.25v divided by R equals the current we try to achieve, which leads us to my first question: what exactly is 1.25v ? Why that number ? Of course, I had a look at the datasheet and saw it's the reference voltage on the non-inverting input of the op-amp, but the anode of that internal diode doesn't go to ground like in a traditional zener regulator, but to the ADJ pin....how does this work and what's the mechanism that keeps the current constant anyway ? Indeed, drawing 125mA through that 10ohm resistor in the example DOES equal 1.25v and I don't have to take their word for it: the math doesn't lie.

2) this one is easier and makes more sense: I reckon if the load is disconnected, the voltage goes all the way up to VCC, or really close, since the non-inverting input is driven high straight off the input pin and opens the transistor. Correct ?

3) nobody seems to mention that resistor: take the first example again: 125mA...ok, but what about the voltage drop on that resistor ? How do you calculate its power dissipation ? I KNOW the formula of course, V x I = P, I don't mean that, I mean where do I get my numbers. Going back to 1) again: 125mA through a 10ohm resistor gives us that elusive 1.25 again. Solving for the formula above, would this be 1.25V x 0.125A = 0.156W ? Let's say 0.15w to round it out...is this correct ?

The thing that's really confusing is the absence of GND in the LM317....it just floats there...

Cheers and thanks.

1) what exactly are those 1.25v we divide by the resistance and why that number ?

2) what happens if the load is disconnected ?

3) what's going on with the power dissipation in the resistor ?

Have a look HERE at the very first diagram.

1) I understand that 1.25v divided by R equals the current we try to achieve, which leads us to my first question: what exactly is 1.25v ? Why that number ? Of course, I had a look at the datasheet and saw it's the reference voltage on the non-inverting input of the op-amp, but the anode of that internal diode doesn't go to ground like in a traditional zener regulator, but to the ADJ pin....how does this work and what's the mechanism that keeps the current constant anyway ? Indeed, drawing 125mA through that 10ohm resistor in the example DOES equal 1.25v and I don't have to take their word for it: the math doesn't lie.

2) this one is easier and makes more sense: I reckon if the load is disconnected, the voltage goes all the way up to VCC, or really close, since the non-inverting input is driven high straight off the input pin and opens the transistor. Correct ?

3) nobody seems to mention that resistor: take the first example again: 125mA...ok, but what about the voltage drop on that resistor ? How do you calculate its power dissipation ? I KNOW the formula of course, V x I = P, I don't mean that, I mean where do I get my numbers. Going back to 1) again: 125mA through a 10ohm resistor gives us that elusive 1.25 again. Solving for the formula above, would this be 1.25V x 0.125A = 0.156W ? Let's say 0.15w to round it out...is this correct ?

The thing that's really confusing is the absence of GND in the LM317....it just floats there...

Cheers and thanks.

## Comment