Electronic – LM317 intermittent current source

constant-currentcurrent-sourcelm317

I need a 50 mA current source despite the load value (resistor LOAD), and I need the current flowing just when the microcontroller says so.

It works fine with LOAD = 0 ohm and IL = 50 mA, but when I enlarge LOAD the current decreases (LOAD = 330 ohm and IL = 11 mA / LOAD = 1,330 ohm and IL = 3 mA).

What am I missing in the design?

schematic

simulate this circuit – Schematic created using CircuitLab

Best Answer

To drive 50 mA through 330 ohms, you need 16.5 V.

For 50 mA through 1330 ohms you need 66.5 V.

In the constant current mode, the maximum output voltage of the LM317 circuit is \$V_{in} - 3\ {\rm V} - 1.25\ {\rm V}\$. With 9 V input, that means you won't get more than about 4.75 V output.

Your circuit should work pretty well for load resistance below about 95 ohms. If you want to be able to drive higher resistor values, you'll need a higher supply voltage. To get above about 700 ohms, you'll need a different regulator (or a totally different design), since the LM317 is only rated for 40 V.

Also realize that the 2N7000 is not a particularly low resistance FET. Even with 4.5 V on the gate (your uC is probably only providing 3.3 V) the Rds spec is 6 ohms, which reduces your possible load resistance to achieve 50 mA even further.