A constant current source source can supply a fixed current to a load regardless of input voltage or load change. **LM317 constant current source** is one of the simplest design.

The **LM317** IC is quite useful as a constant current source, works on a wide input voltage range, from 3 V up to 40 V, and cheap too, here’s the datasheet.

So, here’s the LM317 based constant current source, it’s design and a little about it’s working principle.

### LM317 constant current source circuit diagram

First, have a look at the circuit diagram, it’s pretty basic.

Only three components, excluding the power source and connecting wires. It’s really simple, you can build the circuit on a bread board or just by soldering components to each other.

LM317 is said to be sensitive to reverse polarity, most designs uses a protection diode before the input. But that will add another voltage drop of around 0.7 V to 1 V, so I excluded it.

### LM317 constant current calculator

The value of R sets the amount of constant current, use the formula below.

Where I is the amount of constant current and R is series resistor.

So **R** has to be precise enough and it should be capable of dissipating the generated heat.

Metal film resistors are good choice for their 1% tolerance. But you can’t find a 12.5 Ohm, 6.25 Ohm or 1.25 Ohm resistor for 100 mA, 200 mA and 1 Amp current respectively.

So the the trick is to use some higher value resistors in parallel combination. Like for a 12.5 Ohm resistor, you can use eight 100 Ohm resistor in parallel. Or for a 1.25 Ohm resistor, use eight 10 Ohm half watt resistor in parallel.

Using resistors in parallel has many advantage over a single resistor.

- A resistor bank can be much more precise than a single high power resistor.
- They can dissipate the heat more effectively than a single resistor.
- It’s easier to get small resistors than a single high power resistor, cheaper too.

What about the heat dissipation on the LM317 regulator IC ? LM317 is available in various packages, the commonly available TO-220 package can dissipate up to 500mW without heatsink for few minutes.

### Prototype and testing

I built a prototype 100 mA LM317 constant current source on a breadboard.

The resistor bank is eight 100 Ohm carbon film resistors in parallel, around 12.8 Ohm resistance, measured with a cheap multimeter.

The output constant current is around 99.4 mA, quite close to the estimated value. The input voltage was around 4.10 V, a single 18650 Li-Ion cell.

I’ve used this to measure few low value resistors, 1 Ohm, 0.33 Ohm, and 0.05 Ohm. It performed surprisingly well, around 1% to 2% difference compared to the marked values.

### Possible applications

You can use this current source in many ways, few of them below.

- Current regulated power supply.
- LED forward voltage measurement in constant current mode.
- Low resistance measurement.
- Battery capacity measurement.
- Constant current battery charger.
- Reliable LED driver, though not much efficient.

So, that’s all about this constant current source. The next constant current source will be a variable type, 4 selectable ranges, 1 A, 500 mA, 100 mA, 10 mA, stay tuned ! If you have any suggestion, question, just drop a comment.

Ric De Bisschop says

You can use the LM317 in combination with a power transistor, the formula become then 0,6 / I = R.

If You want the schematic , send me a mail adres.

Arnab says

Thanks for dropping by, that will be another project. I’ve sent you a mail.