The LM317 voltage regulator may be used as a constant current source (useful for supplying strings of LEDs, for example). The 317 works by adjusting the voltage on its output pin to maintain a constant 1.25V between the "output" and "adjust" pins. To use as a constant current source, put a resistor between "output" and "adjust", and connect the load between "adjust" and ground. The 317 will supply current such that the voltage drop across the resistor is 1.25V - so to supply a current I the resistor should be 1.25 ÷ I Ω
The circuit models an LM317 as a constant current source - change the resistor on the left hand side to change the sourced current.
The LM317 can supply a maximum of 1.5A.