Author Topic: Is it ok to PWM before LM317s driving LEDs in constant current mode?  (Read 7968 times)

0 Members and 1 Guest are viewing this topic.

Offline Neutron7Topic starter

  • Contributor
  • Posts: 16
I am building under counter LED lighting for my kitchen, there is a transformer/rectifier/capacitor then each group of 8 LEDs has a constant current driver made from LM317 and a resistor. (there are no capacitors basides the power supply one.)

here is some of the project
http://www.thingiverse.com/thing:30470
based sort of on this instructable
http://www.instructables.com/id/Build-LED-Under-Counter-Lighting-that-ROCKS/

i would like to be able to dim them, i am just wondering if i could get a power FET and chop the main output of the power supply, so i only need one.

will the lm317s overshoot and kill the LEDs? or die from being rapidly turned on and off?
the pwm source will be 5 volts (common ground to the led supply of course)
led supply is 24v 6A transoformer (overkill but i might add more inside cabinets with switches)
there are 6 strips of 8 leds each limited to 350ma
anyone know of any pitfalls doing that?
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 11859
  • Country: us
Re: Is it ok to PWM before LM317s driving LEDs in constant current mode?
« Reply #1 on: September 15, 2012, 02:38:33 am »
My guess is that as long as you PWM at a low enough frequency it will be fine. To avoid visible flicker, try somewhere around 100 - 200 Hz. Keeping the frequency down there will avoid annoying audible whines too.

The reason I think this will be fine is that I think an LM317 can respond in microseconds.
 

Offline David_AVD

  • Super Contributor
  • ***
  • Posts: 2806
  • Country: au
Re: Is it ok to PWM before LM317s driving LEDs in constant current mode?
« Reply #2 on: September 15, 2012, 03:25:21 am »
I've done this a couple of times with no issues.
 

Offline ftransform

  • Frequent Contributor
  • **
  • Posts: 728
  • Country: 00
Re: Is it ok to PWM before LM317s driving LEDs in constant current mode?
« Reply #3 on: September 16, 2012, 12:06:23 am »
I was just working on this and it works great!

Careful not to fry your switching 5v circuit though. I did my design using lm317 driven by a PNP transistor driven by a NPN transistor switched by a 555 timer.
« Last Edit: September 16, 2012, 12:14:18 am by ftransform »
 

Offline David_AVD

  • Super Contributor
  • ***
  • Posts: 2806
  • Country: au
Re: Is it ok to PWM before LM317s driving LEDs in constant current mode?
« Reply #4 on: September 16, 2012, 01:59:08 am »
Ground switching is always easier and more universal with respect to mixed voltages.  NPN transistors or N-channel MOSFETs are cheaper and more common too.

On some LED strobes I made, I put the LM317 on the same board as the LED array.  It makes no difference whether you put the LM317 CC section in the +ve or -ve leg of the LED string so long as the LM317 input is still towards the +ve side.  Make sense?

There were 5 LED boards hooked up (in parallel) to one controller that did the timing (flash rate & duration) of the 24V DC pulses.  So the LM317 set the maximum current (for that LED array), but the controller could still PWM all of the LED boards if we required a lower light level.
 

Offline PSR B1257

  • Frequent Contributor
  • **
  • Posts: 330
  • Country: de
Re: Is it ok to PWM before LM317s driving LEDs in constant current mode?
« Reply #5 on: September 16, 2012, 07:56:30 am »
Why do you guys go to the trouble to use a LM317 as a constant current regulator when you got a constant input voltage and set a steady current for the LEDs?
For simplification it would be enough to just use one resistor to set the LED current and the PWM-MOSFET...
In theory, there is no difference between theory and practice. But, in practice, there is.
 

Offline David_AVD

  • Super Contributor
  • ***
  • Posts: 2806
  • Country: au
Re: Is it ok to PWM before LM317s driving LEDs in constant current mode?
« Reply #6 on: September 16, 2012, 09:26:27 am »
Why do you guys go to the trouble to use a LM317 as a constant current regulator when you got a constant input voltage and set a steady current for the LEDs?

The LED Vf is not constant (drops with increasing temperature) meaning that the current can spiral out of control if the overhead voltage is small and/or the supply voltage increases even by a seemingly small amount.

Using the LM317 solves this problem and saves you ending up with crispy LEDs.
 

Offline PSR B1257

  • Frequent Contributor
  • **
  • Posts: 330
  • Country: de
Re: Is it ok to PWM before LM317s driving LEDs in constant current mode?
« Reply #7 on: September 16, 2012, 09:47:35 am »
Quote
The LED Vf is not constant
I know. But is this really that critical?

In theory, there is no difference between theory and practice. But, in practice, there is.
 

Offline T4P

  • Super Contributor
  • ***
  • Posts: 3697
  • Country: sg
    • T4P
Re: Is it ok to PWM before LM317s driving LEDs in constant current mode?
« Reply #8 on: September 16, 2012, 10:05:36 am »
They have sharp positive coefficients, being slightly warmer doesn't kill them but can cause thermal runaway if not properly current controlled. It's crucial for maximum lifetime
 

Offline David_AVD

  • Super Contributor
  • ***
  • Posts: 2806
  • Country: au
Re: Is it ok to PWM before LM317s driving LEDs in constant current mode?
« Reply #9 on: September 16, 2012, 10:55:12 am »
Sorry, you are right about the positive coefficient.  Not sure what I was thinking there.   ;D

The Vf can also vary from batch to batch as well as with temperature.  Using a CC source is the sensible method when driving higher power LEDs.

I saw a really bad design for an LED floodlight.  They used a 1 Ohm current limiting resistor.  I can only presume the designer calculated the dropping resistor so low due to the near zero overhead (12V supply and series strings of 4 LEDs).  A very small increase in the supply voltage increased the LED current to the point of destruction in a short time.
 

Offline T4P

  • Super Contributor
  • ***
  • Posts: 3697
  • Country: sg
    • T4P
Re: Is it ok to PWM before LM317s driving LEDs in constant current mode?
« Reply #10 on: September 16, 2012, 11:57:04 am »
Sorry, you are right about the positive coefficient.  Not sure what I was thinking there.   ;D

The Vf can also vary from batch to batch as well as with temperature.  Using a CC source is the sensible method when driving higher power LEDs.

I saw a really bad design for an LED floodlight.  They used a 1 Ohm current limiting resistor.  I can only presume the designer calculated the dropping resistor so low due to the near zero overhead (12V supply and series strings of 4 LEDs).  A very small increase in the supply voltage increased the LED current to the point of destruction in a short time.

See them on cheapie flashlights. Just don't buy the ones that have rings of 5mm leds and it should be fine

Unless they get so bad they actually use a resistor on the larger LED dice
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16276
  • Country: za
Re: Is it ok to PWM before LM317s driving LEDs in constant current mode?
« Reply #11 on: September 16, 2012, 12:34:05 pm »
I have a couple of those torches, and added resistors in series with the LED's. mostly inside the 3 AAA pack in the case replacing a link between 2 cells. Works much better now. With those lights you really have to use the OHL cells, as the internal resistance of them when new is so high that they provide all the current limiting needed. Use a good alkaline cell set and you fry the dies in short order.

I saw an aquarium LED lamp today that was very charred, cheap chip diodes that were run so hot they melted the plastic cover above them and got so hot that they charred the melted plastic black in places. PCB was very brown under the white screenprint reflector over it, a lot more brown than SRBP should be. No heatsinking at all, and thin traces on the diodes as well, built to fail.
 

Offline PSR B1257

  • Frequent Contributor
  • **
  • Posts: 330
  • Country: de
Re: Is it ok to PWM before LM317s driving LEDs in constant current mode?
« Reply #12 on: September 16, 2012, 03:18:01 pm »
Quote
They used a 1 Ohm current limiting resistor. 
That's very poor.
I've got the exact opposite in mind (one LED across a resistor @ 12V e.g. - then even a voltagedrop of 1V at the LED (and/or at the powersupply) wouldend effect the current significantly), when I wrote, that one resistor would be fine.
In theory, there is no difference between theory and practice. But, in practice, there is.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf