Go Down

Topic: Which capacitor with LM317 driving a series of leds? (Read 4331 times) previous topic - next topic

robitabu

I'm driving 6 white led in series with a LM317 used as a current regulator out of a 24V DC power supply. I wonder if I should/could use a capacitor (on the input/output side of the LM317).

I'm open to suggestions since I'm relatively new to this stuff :-)

floresta

Quote
I wonder if I should/could use a capacitor (on the input/output side of the LM317)

Only if you want it to work reliably.

Don

CrossRoads

Put a couple of polarized 10uF before & after the LM317, be done with it. Or 3.3uF.  Or 1uF. Whatever you have handy, it will only help.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

robitabu

Ok, this is pretty much what I've already read on the datasheet, fact is I don't want to overengineer it and still I don't want to be too lazy ad miss an important detail.

From the datasheet (and so does CrossRoads suggest too) I read I can put an input capacitor to be used as a bypass and an output capacitor to improve transient response.

Since I still have only a vague idea of what a "bypass capacitor" does and what a "transient response" is, I will start by following CrossRoads' suggestion but will dig deeper into this bypass_capacitor/transient_response stuff ... I really don't like doing things only because I'm told too.

Anyway, my circuit is pretty simple, no need to worry about that too much. It's just my need to understand how it all works. Making up this simple circuits is already a way to deal with more controllable scenarios and give me the opportunity to face basic concepts one at a time.

Btw, I'm using this: http://cgi.ebay.it/24V-DC-2-1A-50W-Regulated-Switching-Power-Supply-/250672045980?pt=LH_DefaultDomain_0&hash=item3a5d37df9c to power the circuit. I wonder if knowing that can help choosing the right capacitor.


Magician

Quote
Normally, no capacitors are needed unless the device is situated more than 6 inches from the input filter capacitors in which case an input bypass is needed. An optional output capacitor can be added to improve transient response

I think, this is true only for Voltage regulator. In case Current regulator you don't need any external capacitors, especially if you drive leds with PWM or turn  on-off them rapidly.
What is your set-up?

floresta

Quote
I think, this is true only for Voltage regulator. In case Current regulator you don't need any external capacitors, especially if...


The previously mentioned statement on the the first page of the data sheet does not make any distinction between the various applications for the device and the need for capacitors.

Don


robitabu


Quote
Normally, no capacitors are needed unless the device is situated more than 6 inches from the input filter capacitors in which case an input bypass is needed. An optional output capacitor can be added to improve transient response

I think, this is true only for Voltage regulator. In case Current regulator you don't need any external capacitors, especially if you drive leds with PWM or turn  on-off them rapidly.
What is your set-up?


Plain and simple LM317L (TO-92 package) in current control configuration (with a 60R resistor) feeding a series of six bright white 5mm leds (at 20mA). There's no IC to worry about at all.

As you see, not much to worry about ... but I know if tension goes weird, that can cause damage to those leds (the LM317 does a good job in protecting itself most of the times) and I want to make it failproof (as long it's not overcomplicated). Fact is I don't know if I really have to worry about those capacitors; my first guess: a simple input bypass capacitor (0.1uF disc as per datasheet) can be enough to cover noise coming from the power supply and making the lm317 work without issues (but again, is that even relevant in such a simple circuit?).

robitabu


At least read through Grumpy_Mikes epic tutorial: http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html


Nice tutorial ... good job Grumpy_Mikes, thanks KE7GKP for the hint :-)

Magician

"The LM117 series of adjustable 3-terminal positive voltage regulators is capable of " - I'd assume that all information on front page related to [font=Verdana]voltage regulator [/font]ONLY.

Even input capacitor harmless, in this application (current regulator), output capacitor is different
story. It significantly decreases stability of the circuit, as it delay negative feedback signal, or in other words, create pre-condition for "square wave" generator.



floresta

Quote
I'd assume that all information on front page related to voltage regulator ONLY.


No matter how many external components you connect to the LM317 and no matter what their configuration is, the LM317 is still a voltage regulator.

Don

robitabu


No matter how many external components you connect to the LM317 and no matter what their configuration is, the LM317 is still a voltage regulator.


:-) Of course it is.
Current regulation is still a side effect of a peculiar configuration where the voltage regulation forces a fixed current on the output.

Magician

Quote
No matter how many external components you connect to the LM317 and no matter what their configuration is, the LM317 is still a voltage regulator.

I don't think so. Basically, LM317 is nothing else, than Amplifier with high voltage gain and offset 1.25 V at the output . Plus it include thermo-compensation.
Using external components make it regulator, two resistor divider for voltage reg., and one resistor in series - current reg.   


floresta

I guess I misread the description given by the manufacturer, the one that says "The LM117 series of adjustable 3-terminal positive voltage regulators ...."   
 
Don

Magician

You've made "analytical" mistake, assuming that if datasheet says "improve transient response" -
it's always true. Don't "extrapolate" , if document doesn't says explicitly "improve transient response in current regulator mode" it doesn't say anything related to the topic question.
  And if datasheet little help (it's nevertheless show on p. 18 current 1A regulator w/o output cap,
but let pretend it's a typo for now), we coming to common question:
Does current source require coupling capacitor? No, capacitor [font=Verdana]degrade[/font] transient response. It would take time to charge capacitor to new voltage level adequate to V(cap) = I(const) x R(variable). It even could  drive IC in "overcurrent protection mode", that definitely doesn't improve reliability.


Grumpy_Mike

@Magician
If you actually read the data sheet instead of pontificating it says of the output capacitor:-

Quote
†Optional--improves transient response. Output capacitors in the range
of 1?F to 1000?F of aluminum or tantalum electrolytic are commonly used to provide improved output impedance and rejection of transients.


If your transient response is too good you get an oscillator, which is what happens in actual real life if there is no output capacitor.
The trick is to get a good transient response, achieve a stable circuit, get good rejection of transients and have a low output impedance. These things are mutually exclusive. What you have to do as an engineer is to get a good compromise.

Quote
(it's nevertheless show on p. 18 current 1A regulator w/o output cap, but let pretend it's a typo for now)


Not a typo but it is in a "Typical applications" section of the data sheet. These are by definition NOT production ready circuits.

Quote
It even could  drive IC in "overcurrent protection mode",

Have you ever had any practical experience in electronics? With that sort of nonsense it sounds like you haven't.

Go Up