Two terminal current regulators can be made with fixed-output regulators; however, their high output voltage and high quiescent current limit their accuracy. With the LM117 as shown in circuit, a high performance current source useful from 10 mA to 1.5A can be made. Current regulation is typically 0.01%/V even at low currents since the quiescent current does not cause an error. Minimum operating voltage is less than 4V, so it is also useful as an in-line adjustable current limiter for protection of other circuit.
You should obey the following parameters to do your circuit: 0,8Ω≤R1≤120Ω
Being you can adjust like this the circuit them your need, since R1 obeys the limits from 0,8 to 120Ω. It is ideal to maintain a constant load of maintenance in a battery, to avoid a discharge with the time and consequent sulfatation and loss of the battery. it can also be implemented in circuits emergency illumination as loader of the battery of the circuit.
Example montage battery charger constant current 50mA.
50mA=1,2/R1 »R1=1,2/50m »R1=0,024*1000 »R1=24Ω
Several versions of the lm317 exist you should choose the most appropriate to your circuit.
Battery charger current constant circuit for 50 mA