1
\$\begingroup\$

I want to use LM317 to make a current source circuit for driving high power LEDs (500-700mA). The schematic in it's datasheet has no capacitor, but in some schematics there are one or two capacitors like the one below

LM317 current source are they necessary? If I omit them can the possible ripples damage the high power LED?

I quote from a forum:

"Don't use a capacitor on the output when you are using the LM317 as a constant current source. A theoretically ideal current source has an infinite output impedance, whereas a theoretically ideal voltage source has an output impedance of zero.

If you use a capacitor on the output of your current source, then your "real world" current source is further away from the theoretically ideal current source, which is not a good thing."

Is it correct?

\$\endgroup\$
5
\$\begingroup\$

True, but irrelevant in your case. An LED does not change forward voltage quickly- there is a slow (thermal) change, but nothing on the order of microseconds where the caps have some effect. The caps may effect better stability so I'd suggest using them.

Edit: In simulation, with 100uH inductance (long wires with some loop area) in series with an LED load (3 x 1N4004) the circuit is close to being unstable (or at least it rings- the current overshoots as well as the voltage). 10uF in C2 position completely eliminates the overshoot- as you might expect all you can see is the 25mA current charging the capacitor. Below trace is without C2 and short across load removed at t= 100usec.

enter image description here

Now, with 10uF in C2 position:

enter image description here

Same thing but with 4 ohms rather than 50 ohms and only 30uH inductance (no cap), showing current.

enter image description here

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ there is no advantage of placing that capacitor, It only could cause oscillation so you're better without it. \$\endgroup\$ – Bruce Aug 29 '15 at 15:32
  • 2
    \$\begingroup\$ Why do you think it could cause oscillation? \$\endgroup\$ – Spehro Pefhany Aug 29 '15 at 15:38
  • \$\begingroup\$ If it would be used for something else like or a more inductive load. Or maybe even the power cable's inductance. I think it hasn't any advantages if you place the capacitor? And when you take the load of you need to make sure the capacitor is rated for the max output voltage of the current source. At least that's what I think. \$\endgroup\$ – Bruce Aug 29 '15 at 15:46
  • 2
    \$\begingroup\$ @Bruce- if the wires to the LED are long then the cap near the regulator will help that inductance issue. Yes it has to be rated for supply voltage in case the LED becomes disconnected. \$\endgroup\$ – Spehro Pefhany Aug 29 '15 at 15:49
  • \$\begingroup\$ How would it help that inductance issue? Don't you just get an LC circuit? \$\endgroup\$ – Bruce Aug 29 '15 at 15:54
1
\$\begingroup\$

Despite the theoretical considerations above, the practical LM317 articles using it a LED driver or (more generally) as a current source usually don't use any capacitors. This mini-survey includes

and various hobbyist sources like

Actually the latter is only one that includes two 10uF capacitors (one on input and one on output) when driving a higher power led string. It doesn't make it terribly clear if that's really needed though.

Nor does the LM317 datasheet recommend any capacitors when used as a current source. So, unless your're building your LED drivers for NASA, I think it's safe to omit all capacitors in such an application of LM317, unless you have a proven practical reason to include them in a particularly demanding case.

| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

There are ample reasons for not putting a capacitor at the output of a regulator. But C2 is not there. R1 is in series with it, which completely negates the instability arguments. True, the cap tends to try to turn the current source back into a voltage source, but the LED's present so much load that C2 will have little effect. In fact, there's no effect if the power is unswitched (always on).

LED's don't care about ripple. Your eyes (or a video camera) might, if you can even see it. There shouldn't be any ripple unless the power supply can't keep up with the current.

| improve this answer | |
\$\endgroup\$
-1
\$\begingroup\$

Below is the schematic for an adjustable laser diode regulator I built and have used for a few years now. It uses 18V from a laptop battery (reason for such wasted high voltage). It does use an op-amp instead of the LM317.

As you can see the step response is very clean with no overshoot that might damage the laser diode.

schematic http://laserpointerforums.com/attachments/f65/31360d1296775831-2-2a-current-source-currentsourceschematic.png step-response http://laserpointerforums.com/attachments/f65/31361d1296775831-2-2a-current-source-step-responsecurrentsource.png

| improve this answer | |
\$\endgroup\$
  • 4
    \$\begingroup\$ This is a reasonably good answer to the question, "Design an op-amp based constant current source." It is not an answer to the OP's question which is whether capacitors are required on an LM317. \$\endgroup\$ – Transistor Apr 6 '16 at 20:57
  • 1
    \$\begingroup\$ Fair enough. I included this because I went down the same road as him; initially looking to use the LM317 to do the job and finally settling on the op-amp solution. Rather than withhold the information I figured I'd share another current-source implementation that actually works to drive a laser diode. \$\endgroup\$ – jbord39 Apr 6 '16 at 21:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.