Electronic – LM317 Constant Current vs Transistor Current Limiter

current-limitinglm317

LM317 with Current Limiter configuration:
enter image description here

Current limiter circuit with transistors:
enter image description here

I am used to drive LEDs in my PCBs with LM317. However I recently came across this circuit which will cost less.

Questions:

  1. Is the transistor circuit a good choice for an application with potential voltage spikes? If not, can you tell me what extra measures are taken in LM317 for better stability?

  2. What can I do to increase current stability in transistor circuit?

Best Answer

The LM317 adjusts the output current so that the voltage between the OUTPUT and ADJUST pins is 1.25 V. This reference voltage is compensated against temperature and current variations.

In the transistor circuit, the reference voltage is based on the voltage drop over the base/emitter junction of Q2. It's usually 0.65 V, but will change with temperature (you could use it as a temperature sensor). Futhermore, a plain transistor is not designed as a voltage reference, so different transistors will have manufacturing variations.

The LM317 is rated for 40 V; plain transistors are available with higher ratings, and are more robust in general.

To make the transistor circuit more stable, replace Q2 with a shunt voltage reference such as the widely-used and cheap TL431 (2.5 V) or TLV431 (1.25 V). It might be possible to create a stable voltage reference from discrete parts, but it is unlikely that that would be cheaper:

TL431 detailed schematic
source: TL431 datasheet

Anyway, for driving LEDs, the increased stability might not matter.