DIY LED driver for reef lighting

Being new to HPLED drivers and having no real world design experience, I have no idea what the rammifications of switching frequency and ripple have on the end result. Sadly, these are the variables that must be fiddled with to optimize a buck regulator like this.

Lower Qg means higher Rds-on and the datasheet indicates that there is a trade-off but (again) I am not sure of the rammifications on either side of the trade, other than the high Qg and heating.


So, in the end it may be worth trying to move the Cin cap to the alternate position (away from Vin) to accomodate the high Qg and low Rds-on
 
Initially I had a pfet with high Rds and low Qg and the fet was getting quite hot... I guess having higher Qg moves the heat to the IC, having higher Rds, makes the FET hotter. Now that I've added a heatsink to my board, it is probably better to have the FET take the heat.

The part I'm using is FQP27P06 with max Rds of 0.07Ohms and typ Qg of 33nC. It seems to work well for me. I guess doubling the Roff resistor will lower the switching frequency and reduce the load on the IC, so maybe that's another option...

The only downside of this IC, too many things to consider and trade off.

The CAT4101 is a simple alternative, but not as fun :D
 
My biggest gripe is the current sense.. Due to the topology, there is no way to make an adjustable output driver... You can't just toss a POT on the sense pins and adjust Imax as needed.
 
LM3409 specs

10,000:1 PWM Dimming Range
250:1 Analog Dimming Range

It statest that both types of dimming can be done over the full range... but the specs above indicate that if you want high resolutiom then PWM needs to be used.


So I am a bit puzzled but may be reading the datasheet wrong... But when driven with a PWM signal it would appear that the input PWM signal is used to derive an output PWM signal and brightness is a function of that output PWM duty cycle. When EN is tied high (analog dimming) the LEDs are driven by a fixed PWM (based on component selection) and dimming of the LEDs is done by leaving the duty cycle as is but varying the output amplitude (voltage). Make sense, or am I not reading the theory of operation correctly?


It would also follow (if my assumption is right) reading the 250:1 spec, that that output voltage is derived from an onboard DAC and therefore only has ~250 steps from Vled to cutoff (the extra 6 missing steps likely the cutoff threshold area).

Anybody?

So if my assumptions are anwhere near correct, then connecting a 10, 12 or 16 bit DAC to do ANALOG dimming does not add resolution, as it is fixed at 250 steps and in fact the only way to get higer resolution is to drive a PWM signal from a 10, 12 or 16 bit source.


The next question being... with a PWM signal present on the EN pin, can the ADJ pin stil lbe used to drive down the overall amplitude, regardless of the PWM input. That is lets say that the driver is built for 1000mA and PWM, does lowering the voltage to the ADJ pin act as a MAXIMUM current adjuster? Looking at the block diagram it appears that it may.
 
Last edited:
So i am still missing some details with, but I am partly correct (albiet partly wrong):


Here is a link to an article from National describing the topic and partly specific to the LM3409.
http://powerelectronics.com/images/DesignFeatures_1-1110.pdf

of note is the color shift related to analog diming, though at low outout levels, analog is more efficient than PWM. A tradeoff, but in our case, spectral shift may not be a good thing.

So... I suspect I am going back to the drawing board and going to use PWM instead of analog. That still leaves me with the problem of being able to trim the maximum current for a given design, unless of course it can be Iadjusted down.
 
Last edited:
Yo Bean! It's very confusing so I have no doubt you're not clear on this.

Here's the main confusion issue:

A lot of drivers, like Meanwells, have versions of drivers that can be dimmed by analog then they have some versions that are PWM. In their PWM versions they just take in your PWM signal and average it into the controller which runs just exactly the same as the analog version. The average the PWM to give themselves an analog signal internally that is the controller reference.

Then you have other controllers that are PWM and the PWM signal is actually ANDed with the current driver's output drive signal. When the PWM is zero it flat shuts-off the output. PWM = 0% = ZERO output current.

PWM = 100% = No interference with the controlled output.

PWM = any other value is the output OFF then current controlled to the drivers full current limit.


Now, the 3409 is special. It has an analog input that sets the controllers operating point. Then it has another input that will gate off the output driver.

This is why the analog input can only dim the output over a smaller range than the PWM.
 
While I never intended to use 4000+ steps for dimming, I absolutely see finer steps than 250:1 on the analog range. Unfortunately it doesn't look like it is linear. From 1000-1001 (dac step), I get about 0.25mA increase in current. At the lower range there is pretty much no difference between, say 50 and 120 (dac steps). I get an increase of about 0.020mA from 50 to 150...

The PDF you linked kind of supports that it isn't limited to 250 steps on the analog side, but rather to 0-248mV across Rsns. Now, I assume internally it is just an analog scale, rather than going from analog to digital in the logic unit and back out to analog.

We'd need a scope to verify this, but I really doubt Vout is PWMed. I think it is constant voltage, constant current (with slight ripple). But I could be wrong.

Regarding color shifting, I'm not sure that is a problem. Especially since we don't know at what current are the colors are measured by Cree. My guess would be 350mA, since that's pretty much their standard current (for XP series anyway). Also, for me it feels like the LEDs become warmer when they are at the dimmest levels, which would also be similar to the color shift of the rising or setting sun (at least I'd like to think that way :D ) which is what I'm trying to get with the dimming anyway.

At the end of the day, as long as PWM is not used for setting the maximum current, I think it doesn't really matter for the 1-2hrs of dimming we do a day. I do, however, have a problem with setting the max using PWM... the fact that we don't 'see' the on/off cycle, doesn't mean that other organisms don't mind it. No science to back this up, just me.

To answer your question, yes, you can have a 0-1.24V voltage or just a pot on Iadj while PWMing the EN pin. I think it is just an on/off switch for the IC so it should be independent from the analog adjustment.
 
Yo Bean! It's very confusing so I have no doubt you're not clear on this.

Here's the main confusion issue:

A lot of drivers, like Meanwells, have versions of drivers that can be dimmed by analog then they have some versions that are PWM. In their PWM versions they just take in your PWM signal and average it into the controller which runs just exactly the same as the analog version.
Right... I get that part and for the most part get the difference in topology between a buck converter with a PWM output and one that only chops the duty cycle on the current (analog).

Now, the 3409 is special. It has an analog input that sets the controllers operating point. Then it has another input that will gate off the output driver.
I gathered that, but am not clear if both can be used at the same time. That is, build the basic driver for 1000mA max and use the analog adj with a trimmer to set the real world max to 900mA (or some other value) so that the string can NOT be overdriven by mistake via the software, etc.

This is why the analog input can only dim the output over a smaller range than the PWM.
It is my understanding from the datasheet that both methods can dim over the FULL range, it just a question of resolution.
 
While I never intended to use 4000+ steps for dimming, I absolutely see finer steps than 250:1 on the analog range. Unfortunately it doesn't look like it is linear. From 1000-1001 (dac step), I get about 0.25mA increase in current. At the lower range there is pretty much no difference between, say 50 and 120 (dac steps). I get an increase of about 0.020mA from 50 to 150...
Interesting, the low end problems are mentioned in the datasheet, but in the context that they are only slightly non linear. I would imagine that it depends on the frequency as well.

The PDF you linked kind of supports that it isn't limited to 250 steps on the analog side, but rather to 0-248mV across Rsns. Now, I assume internally it is just an analog scale, rather than going from analog to digital in the logic unit and back out to analog.
I would imagine the input to the logic unit was a DAC, and thus the 250 steps. Maybe worth an email to National.

We'd need a scope to verify this, but I really doubt Vout is PWMed. I think it is constant voltage, constant current (with slight ripple). But I could be wrong.
The way I read it and the way the plots in the datasheet appear, the output type depends on the mode of the regulator (as dictated by the status of EN and IADJ).

The
adjustable current sense threshold provides the capability to
amplitude (analog) dim the LED current over the full range
and the fast output enable/disable function allows for high
frequency PWM dimming using no external components.

In other words, the driver acts like a true current source with variable current, or can drive the leds via PWM (or appearnatly a combination of both.


At the end of the day, as long as PWM is not used for setting the maximum current, I think it doesn't really matter for the 1-2hrs of dimming we do a day. I do, however, have a problem with setting the max using PWM... the fact that we don't 'see' the on/off cycle, doesn't mean that other organisms don't mind it. No science to back this up, just me.
My concern is also the organisms and their possible ability to sense or see the switching frequency, though the 60Hz flicker of fluorescents does not appear to be a problem.

My reasons for building the dimming drivers are only partly sunrise/sunset. I had hoped to use them to be able to color tune or color shift the fixture throughout the day, or permanently.

To answer your question, yes, you can have a 0-1.24V voltage or just a pot on Iadj while PWMing the EN pin. I think it is just an on/off switch for the IC so it should be independent from the analog adjustment.
That is kind of what I read as well. That said, if it is an "on off" switch, then the output is switched on and off as well, with the only averaging being done by the inductor, more indication that in PWM in mode, the OUTPUT is PWM as well.

Thoughts?
 
I don't have a full understanding of the operating principles behind the LM3409, but I can tell you this- It appears from the drivers that I've built that Analog dimming can be used in conjunction with PWM dimming at the same time. I built my drivers to output 3,000ma at 52 volts, but I'm able to dial down the current to 2,000ma to safely drive a particular BridgeLux led array. I followed the diagram in the spec sheet and connected a 250k ohm trimmer pot to the Iadj pin. I use it to dial in the maximum current and use the PWM signal from my arduino to dim from there.
 
That is pretty much what I was after... so I can continue with my project using this driver :)

Still very curious about the output waveform
 
I would imagine the input to the logic unit was a DAC, and thus the 250 steps. Maybe worth an email to National.
Page 9 of the datasheet has a diagram of the peak current control circuit. To me it looks like a simple comparator that turns on/off an input of the logic unit. Nothing more than that:
"The voltage across RSNS (VSNS) is compared to the adjustable current sense threshold (VCST) and Q1 is turned off when VSNS exceeds VCST..."

The Iadj voltage just changes where that comparator turns off.

I did sent TI an email about the 250:1 range, so I'll report back when they answer.

In other words, the driver acts like a true current source with variable current, or can drive the leds via PWM (or appearnatly a combination of both.

Yep, that's how I understand it as well.

My reasons for building the dimming drivers are only partly sunrise/sunset. I had hoped to use them to be able to color tune or color shift the fixture throughout the day, or permanently.
Yep, that is quite useful. I'm building my new fixture with all kinds of colored LEDs, so it should be fun :).

That is kind of what I read as well. That said, if it is an "on off" switch, then the output is switched on and off as well, with the only averaging being done by the inductor, more indication that in PWM in mode, the OUTPUT is PWM as well.

Thoughts?
Absolutely, if you are PWMing the EN pin, the output is indeed PWM, unlike the Meanwells as kcress described earlier.

...

'bout time I get a proper scope, anyone heard of OWON? The owon sds7102 looks really tempting with that 10Meg sample memory...
 
Lets see a lot has gone on here today.

1)
kcress said:
This is why the analog input can only dim the output over a smaller range than the PWM.

Bean said:
It is my understanding from the datasheet that both methods can dim over the FULL range, it just a question of resolution.

You're correct. My choice of wording for that sentence was not the best. By range I meant the range of dimming values(10,000:1) not the overall range of brightness .

2) 3409: Yes the analog input can set the MAX and the PWM can apply to that set current.

3) It's very easy to see 256 steps of dimming in a tank. 512 would probably be very hard to see. I'm running 1024 and can see no steps what-so-ever.

4) I would not hesitate to run PWM at a frequency greater than 100Hz having no concern with the wildlife. There's no reason I can think of for them to have a higher frequency eyeball than us. They have the same brain/muscle/physical response limitations and likely the same functional need for integration to allow seeing poor light. But that's just my opinion.

5) tera; I've NEVER heard of Owon. I have heard of Rigol and have been considering the Rigol DS1102E.

My problem is that I need an isolated scope for at least half of my work. I have a Tektronix that is but the numbskulls at Tek have ignored that genre of scopes now for a decade. Instead they are wasting their time on scopes that I see selling for more than half a million dollars each. :headwallblue:
 
Why no one use zetex led driver? I use it. I use it zxld1362/zxld1366 for under 1A application. If u want turn or dim the led driver the only method is use pwm. zetex led driver is very easy to design and use. If u wand driver 12 led in series by 60V dc u only need 1 zxld1366, 1 coil, 2 caps and 1 current sense resistor. The pcb can be very small and easy soldering them.....
 
I have old tektronix 2235, or 2213, honestly can't remeber if it is 60 or 100 meg. I don't use it very often. I would love storage scope but just can't justify the cost.
 
Why no one use zetex led driver? I use it. I use it zxld1362/zxld1366 for under 1A application. If u want turn or dim the led driver the only method is use pwm. zetex led driver is very easy to design and use. If u wand driver 12 led in series by 60V dc u only need 1 zxld1366, 1 coil, 2 caps and 1 current sense resistor. The pcb can be very small and easy soldering them.....

The ZXLD1370 or newer ZXLD1371 appear similar to the lm3409, but I have not fully read the datasheets.
 
The ZXLD1370 or newer ZXLD1371 appear similar to the lm3409, but I have not fully read the datasheets.

ZXLD 1362/ZXLD1366 has internal MOSFET, and ZXLD1370/ZXLD1371 need extrnal add a MOSFET. if u need a led driver 1A or under zxld1362/zxld1366 is enough, but if u need driver over 1A then ZXLD 1370/ZXLD1371.

long long times ago i use national lm3404..... but it current sense is hard to find. so i choose zxld1362/zxld1366.....
 
Back
Top