Pages: [1]   Go Down
Author Topic: Fine tuning dimming LEDs with PWM  (Read 2116 times)
0 Members and 1 Guest are viewing this topic.
Gurnee, IL
Offline Offline
Jr. Member
**
Karma: 0
Posts: 65
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


I've got 8 x 3w Cree LEDs, mix of blue and royal blue, powered by a Meanwell ELN-60-48P driver drawing about 700mA. I'm using them over my fish tank and have them dimming using the "map" syntax via PWM signal from my Arduino ATMega1280.

All of that works, basically.

One issue I have is that when the PWM gets below 25%-ish it causes the LEDs to flash slowly on and off at about 1 second on and 1 second off. So for now I have them only dim to 25% and then off completely. I would prefer to have them dim further down before off. I also have 10 white LEDs on a 2nd driver which I didn't notice the blink when they dimmed to 0, but as they are both being run thought the same code they both only dim to 25% before off.

The other issue is that when I have them turn off I also have a solid state relay switch off that controls the drivers. This results in a single flash of the LEDs. I'd like to eliminate that as well.

Any thoughts/help?
Logged

"The old Europe"
Offline Offline
Edison Member
*
Karma: 1
Posts: 2005
Bootloaders suck!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

According to the datasheet you can't dim it to 0% when fed with PWM. Even when supplying a DC voltage it doesn't go down to absolute 0.
Logged

• Upload doesn't work? Do a loop-back test.
• There's absolutely NO excuse for not having an ISP!
• Your AVR needs a brain surgery? Use the online FUSE calculator.
My projects: RGB LED matrix, RGB LED ring, various ATtiny gadgets...
• Microsoft is not the answer. It is the question, and the answer is NO!

Gurnee, IL
Offline Offline
Jr. Member
**
Karma: 0
Posts: 65
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

According to the datasheet you can't dim it to 0% when fed with PWM. Even when supplying a DC voltage it doesn't go down to absolute 0.

And that I'm okay with but I'd like to get closer to 0 than 25% and as I don't remember noticing the 10 white LEDs flashing as they approached 0. They simply dimmed until they didn't work anymore, and that is what I like for the blues, in an ideal world.

 As well I'd like to rid myself of the shut down flash.
Logged

NL
Offline Offline
Newbie
*
Karma: 0
Posts: 30
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

About the pwm, i just guessing here but could it have to do with the wavelength/frequency of the bluenleds and white leds. And that there is a certain incongruety in the pwm and wavelenvth o the blue leds which results into this dimming pattern. A bit like sound when you 'mix' a 400hz and 402hz tone you get roughly a 401hz tone but the amplitude (aka brightness with the leds) is like a sinusoid wave.

About the shutdown flash try cutting power to the leds in a diff way, maybe after the driver but befote leds or some transistor and pullup/down resistors. Not totally sure how your current schematic/connections are. It would be easier for other people to suggest more shutdown ways when we know how you have connected them;)!
Logged

Montreal
Offline Offline
Edison Member
*
Karma: 23
Posts: 2483
Per aspera ad astra.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think, that you make a design w/o math. Data sheet for driver says: 43.2 ~ 52.8V
Even it's adjustable, I don't believe you can drop it to 8 x 3.5 = 28 V w/o consequences.
My guess is, when you request (by pwm) to drop current below 25% driver become unstable, as it moved out of "normal" operation zone.
This confirmed, why it's working with 10 leds, because 10 x 3.5 = 35 V
Solution:

 edited:

1) change driver for .... ooopss, eln-60-27 (good for 8 leds maximum)
    you can split diodes in a group of 4 leds, and use 2 drivers eln-60-12

2) add more leds in series, up to   52.8 / 3.5 = 15, minimum 43.2 / 2.8 = 15,
   again 15,    now we know how they calculate their data sheet  smiley

May be 10 would be o'k, but as you can see, there is no warranty.

« Last Edit: July 10, 2011, 06:24:50 pm by Magician » Logged

Gurnee, IL
Offline Offline
Jr. Member
**
Karma: 0
Posts: 65
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think, that you make a design w/o math. Data sheet for driver says: 43.2 ~ 52.8V
Even it's adjustable, I don't believe you can drop it to 8 x 3.5 = 28 V w/o consequences.
My guess is, when you request (by pwm) to drop current below 25% driver become unstable, as it moved out of "normal" operation zone.
This confirmed, why it's working with 10 leds, because 10 x 3.5 = 35 V
Solution:

 edited:

1) change driver for .... ooopss, eln-60-27 (good for 8 leds maximum)
    you can split diodes in a group of 4 leds, and use 2 drivers eln-60-12

2) add more leds in series, up to   52.8 / 3.5 = 15, minimum 43.2 / 2.8 = 15,
   again 15,    now we know how they calculate their data sheet  smiley

May be 10 would be o'k, but as you can see, there is no warranty.



2+ more LEDs I can do. Can't say I follow the math exactly but I need between 10 and 15 LEDs for it to run optimally? Or are there specific numbers of LEDs that would work optimally? I was already planning to add a few more LEDs so this is the perfect time to figure out how many of each would work best.
Logged

Montreal
Offline Offline
Edison Member
*
Karma: 23
Posts: 2483
Per aspera ad astra.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Math is pretty simple:
page 8 in documents for leds, shows charts V-A for different color leds.
The range for blue led V = 2.8 ( I = 0 ) and V = 3.5 ( I = 1000 ma ).
Multiplying this digits by number of leds you plan to connect in series, you will get
minimum and maximum necessary voltage from power supply(driver).
Using this info you can check in data-sheet for driver witch model best fits.

* ELN-60-spec.pdf (179.9 KB - downloaded 5 times.)

* XLampXP-E.jpg (68.77 KB, 849x1099 - viewed 21 times.)
Logged

Gurnee, IL
Offline Offline
Jr. Member
**
Karma: 0
Posts: 65
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Math is pretty simple:
page 8 in documents for leds, shows charts V-A for different color leds.
The range for blue led V = 2.8 ( I = 0 ) and V = 3.5 ( I = 1000 ma ).
Multiplying this digits by number of leds you plan to connect in series, you will get
minimum and maximum necessary voltage from power supply(driver).
Using this info you can check in data-sheet for driver witch model best fits.

Okay got it finally. took a little assistance from my math teacher wife to show me what I was missing. Thank you Magician.


I still have the other issue that when I shut down the LEDs I also have a solid state relay switch off that controls the drivers. This results in a single full bright flash of the LEDs. Any help pn this?
Logged

"The old Europe"
Offline Offline
Edison Member
*
Karma: 1
Posts: 2005
Bootloaders suck!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

As I assume you don't want to buy new drivers, you have one option: add another relay.

1)

If the drivers can run without any load attached to them, just disconnect the leds before you cut ac power and add a bleed resistor before the 2nd relay (10k 1/2 watt or thereabouts). The datasheet should be very clear on this.


2)

If the driver cannot tolerate this, use the relay in combination with a power resistor to 'short' the output right before you turn of the ac power. Also this should only happen at very low brightness levels to avoid fire. The resistance should be chosen as such that the driver's output voltage always stays below the minimum led voltage at maximum possible current.

Example:

# of leds: 10
led minimum voltage: 2.8V
voltage margin: 0.3V
minimum turn on voltage for the chain: 28V
maximum current the driver can supply: 1A

--> R = ( 28V - 3V ) / 1A = 25 Ohm (most likely you'll only find 22 Ohm).

wattage: 25W

But as the resistor only has to burn energy for a very short time, I guess you could get away with a 7W resistor as well. Nevertheless it should be in a well ventilated area an not be near any easily inflammable material. It would also be a good idea to add a suitable (~1A or less) slow-blow fluse in series with the resistor, just in case something goes wrong with the logic.
Logged

• Upload doesn't work? Do a loop-back test.
• There's absolutely NO excuse for not having an ISP!
• Your AVR needs a brain surgery? Use the online FUSE calculator.
My projects: RGB LED matrix, RGB LED ring, various ATtiny gadgets...
• Microsoft is not the answer. It is the question, and the answer is NO!

Montreal
Offline Offline
Edison Member
*
Karma: 23
Posts: 2483
Per aspera ad astra.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I doubt second option would works, if driver goes "crazy" whenever input voltage suddenly drops,
it would not limit current to 1A, as all "regulator" circuitry (voltage/current) are out of mind.
 Good news driver has OVP (over voltage protection) build in, so cut off a load should not be a problem, and first option looks reasonable and reliable.
Logged

"The old Europe"
Offline Offline
Edison Member
*
Karma: 1
Posts: 2005
Bootloaders suck!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I agree that option 1) is preferred.

Nevertheless, if the current regulation circuit goes crazy, what protects the leds in that case? It might be the case that the energy stored in the device is low enough so it can't over-power the leds when ac is cut. Maybe. Still this is not nice behaviour of the driver.
Logged

• Upload doesn't work? Do a loop-back test.
• There's absolutely NO excuse for not having an ISP!
• Your AVR needs a brain surgery? Use the online FUSE calculator.
My projects: RGB LED matrix, RGB LED ring, various ATtiny gadgets...
• Microsoft is not the answer. It is the question, and the answer is NO!

Montreal
Offline Offline
Edison Member
*
Karma: 23
Posts: 2483
Per aspera ad astra.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I agree that is completely driver design drawback. W/o schematic of the driver, it's difficult to say if there is any current limiting mechanism,  when it goes in  non-linear or "saturated" area.
My guess there is no such things, except natural current limits of SMPS itself, and low level energy stored in input filter capacitors, so current spike not last long. 
Logged

Gurnee, IL
Offline Offline
Jr. Member
**
Karma: 0
Posts: 65
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've just read in a fish tank forum how they were able to solve the flash by turning off the power supply before the LEDs are dimmed to "0". I'll give this a try and check back in. Thanks for the help guys.
Logged

Gurnee, IL
Offline Offline
Jr. Member
**
Karma: 0
Posts: 65
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've just read in a fish tank forum how they were able to solve the flash by turning off the power supply before the LEDs are dimmed to "0". I'll give this a try and check back in. Thanks for the help guys.

Bah. After some testing and more reading I've come up with: "That flash? Yeah Meanwells do that..."

Would someone be able to throw together a quick diagram of how I'd need to hook up the relay and resistor? Thanks.
Logged

Pages: [1]   Go Up
Jump to: