DIY LED driver for reef lighting

Keith, are you referencing the so-called SEPIC (i.e. two inductors) topology? The NCP3066 could be configured like that but I hadn't taken that route in my earlier effort. theatrus took that route with his microcontroller-brained LM3404 design and that particular chip is looking really appealing right now.

Surveying chips right now. And still scratching my head over functionality. I like to keep things modular/expandable so I'm trying to decide if it makes sense to put fan control and/or moonlight control on an LED driver, or if they should be a separate PCB. I'm wondering if we'd want something you may only want one of (fan/moonlight control) on a PCB with something you may want different amounts of (LED control).
 
I'm thinking about a slightly different tangent. I'd like to put an I2C "front end" on one of these drivers for dimming control. I'd like to do it in the simplest way possible (i.e. I don't want to embed a microcontroller on the board!). Anyone have any thoughts?

One possibility that I'm not QUITE sure about would be to borrow fishman's concept of putting a pot on the Rset pin, but use a digital pot with an I2C interface. I'm thinking of this because I'm coming up with very little in terms of a simple I2C PWM chip to dim via the EN pin, meanwhile it looks like there are I2C digital pots out there that are dirt dirt simple and cheap. One thing I'm not sure about is the current rating required for this sort of purpose - most digital pots have a very very low current limit on their "wiper" pin.
 
Yes a SEPIC will do it or I believe some B-B controllers have full dimming.

As for I2C I think your only option is a local micro if you can't use a digital pot. Wait.. You could use an I2C DAC too.

Yes, put the other options on the boards too. You don't actually have to stuff them! But they're there if someone needs them. 24V will already be on the board so certainly the 10V dimming and 12V fan supplies should be carved out of that 24V.
 
I found what I was looking for. The DS1050 from Maxim is an I2C chip with one PWM output and it even has hardware address pins so you can have several on the same network. Perfect - one of these can be slapped in front of a CAT4101 (or any other PWM LED driver) to turn it into an I2C-dimmable driver.

I don't think I'm going to follow through with the new switching reg design after all, at least not right now. theatrus's design is probably about what I would have come up with so it seems like the "gap" I thought there was isn't actually there. I've got a few other projects I want to work on right now anyways. Stay tuned. :)
 
Nice find DWZM! This should prove useful even beyond the LED driver. Unfortunately, it doesn't look like they provide it in a PDIP package.
 
Last edited:
For those the have it working what wil dawn and dusk look like with only 31 steps (instead of 255). The DS1050 only has 5 bits of resolution for the PWM.
 
Good catch. How well can you see below a 3% increase/decrease?

13. The DS1050 is a 5-bit PWM. The output duty cycles of the device range from 0% to 100% in step
sizes of 3.125%. The “Set PWM Duty Cycle 100%” allows the PWM output to be set to full-on.
 
FWIW I'm currently dimming with a Typhon, which I've dumbed-down to step in 100 increments - so I'm already below a standard Arduino's 8 bit resolution, and it looks fine. If you're watching when a step happens you can certainly see it, but it's not a huge jump. I agree that the 5-bit resolution on this part is not ideal but for my intended application (which is NOT dimming "main" lights on a fish tank to simulate sunrise/sunset in this particular case) it will actually be higher resolution than I need.

The package for this part is indeed TINY but certainly not unmanageable IMHO.
 
Yeah, I've seen that - if I needed 16 channels I'd probably use one of those, but that's an even more insane package. Same pin pitch but eleventybillion more pins so it's easier to mess up (IME). Plus like you said they're hard to get.
 
Good catch. How well can you see below a 3% increase/decrease?
You can increase the (effective) resolution by staggering the PWM increases. IE, if you have 5 LED chains, instead of incrementing the PWM by one on all of them simultaneously, you round-robin and increase just one (just do it more frequently). That would give you 155 (5*31) steps in your ramp, instead of 31.

EDIT - and you'd only be using something like this if you had more PWMs than the Arduino (or whatever other controller you were using) had. In which case the software "fix" is almost zero cost.
 
Just wondering. There are probably a millions ways around this.
- have multiple CAT4101s driving the same chain and alternately turn them up.
- have a small step and a big step. Every time the small step is about to wrap increase the big step by one.
- Maybe you could have the controller alternate a value for a while. Write X% then write X=Y % then X, then X=Y for a second or 2.
Not sure any of it is needed though.
 
kcress, I beleive that is a yes and no. You won't notice if you close your eyes and some adjusts it and then open them, But I bileive (and DWZM confirms above) that if you are starting at it you will notice a 1 partin 100. Unless the arduino does not make a smoth step from one level to th next and that is what he is seeing.
 
Interesting... I bet you're correct. I believe it's if someone continually turns down a light you'll say, "I see a change" once a 50% change occurs. But I guess a step change IS noticeable.
 
I will concur. If I'm watching when it makes a discrete 1/100 change, I can see it. If I look away, I bet it would take many steps at that resolution.

At any rate, as I mentioned above, for my individual project, it's kind of a moot point, since I only need 27 steps. :)

I *am* interested in the general application of this concept though - putting an I2C front end on one or more of these drivers. The other approach I thought of was to put an I2C digital potentiometer in series with Rset (yes, despite all my comments about how I think it's a bad idea to put a pot in series with Rset) but I can't find a digital pot that even comes close to the current capacity. I'm guessing there are other ways you could do this (standard issue DtoA converter? op amp on a digital pot?) but I'm left scratching my head...
 
I could be wrong DWZM, but isn't the voltage for RSet at 1.2V, therefore the current is minimal.

I have been thinking about using a digital pot instead of PWM, just never got very far with it........ Is efficiency better to change the current instead of varying the mark:space ratio of PWM. Plus, would the lifespan of the LED be lengthened by not switching high currents, but more of a constant current.....

Ian
 
Yeah, unless I'm reading the datasheet wrong, there is a 400 to 1 ratio for LED/RSET. That should put the current around 2.5mA when the LED current is a full 1A. Voltage should never exceed 1.23v.
 
Dustin, some of the digital pots I've looked at have separate Vcc and GND connections, discrete from the two or three "pot" connections, so the operating voltage for the IC is supplied separately from the voltage through the potentiometer. So you'd supply the IC with GND, 5v, SDA, and SCL and then connect two of the three potentiometer terminals into the Rset trace.

The devices I've looked at have current limits in the 1mA - 2mA range, so despite the low current we'd be at or near the limit. I may just go ahead and try it anyways, to see how it works.

Part of my frustration here is that Analog Devices seems like the best manufacturer for digital pots, but Mouser doesn't carry Analog Devices products. :mad: Mouser has good prices on everything else I need so I don't want to go make a digi-key order for one 50 cent part...
 
Back
Top