High Power LED Dimming Q's

Ok Disclaimer - Total noob to micro controllers, but i have some basic understanding of electronics theory so I’m not attacking something that is way over my head. And I have some basic programming knowledge from a while back, plus I’ve been looking for a project to get me back into it for a while now.

I am aiming to control 60-90 LEDs broken into 3 groups.

Group 1: 20-30x 1W (~3.2v @ 350mA) Cool White LEDs
Group 2: 20-30x 1W (~3.2v @ 350mA) Warm White LEDs
Group 3: 20-30x 3W (~3.6v @ 700mA) Blue LEDs

I have an Arduino Dumilanove that I borrowed from a friend to prototype with, and I’ve ordered 20 of each LED that I intend to use so I can do some testing.

My goal is to have dimming control from 0-100% for each group using PWM from the Arduino.
I have been looking at constant current drivers on ebay that support PWM (ie http://www.ebay.ca/itm/350539542188?ssPageName=STRK:MEWAX:IT&_trksid=p3984.m1423.l2649) and using a few of them in parallel, perhaps on a 36V power supply. But reading on here many people are suggesting using a CAT4101 chip for constant current driven PWM LED dimming? I looked at a spec sheet and it looks like it’ll work for me since it peaks at 1A, I’d have to break up the groups into a few strings in each since its < 25V (same as the drivers i’ve found online @ < 36V ). Also, it appears to be a SMD chip, and I’m looking to use through-hole components since i don’t really have the means to do SMD just yet.

The other option that I looked at, was using a large transistor to do the dimming - i used a 2n222a and a couple small LEDs to do some testing on a breadboard and it seems to work - any reason it wouldn’t scale to a high power led if i was to use a larger transistor (ie http://www.digikey.com - Part 497-7169-5-ND - I can’t figure out how to link directly to it, sorry.)?? I’ve done some current calculations and resistance calcs so I realize i’d have to break the groups up into strings and use some sort of 2W resistor or something to current limit, depending on my source voltage and string size… etc etc.

This is an aquarium lighting project, and i’ve searched and googled and i think i just need a push in one direction or the other as to which way to go - what do you all think? I’m going into mental melt down mode with the searching, i’ve got 3 windows open on my 24" lcd and i’m still scrolling left/right in the tabs lol.

The end goal is to use a RTC unit to control a sunrise/sunset/lunar kind of automated light cycle, and tie it all in with a temperature and PH monitor for the tank, all interfaced with a LCD and possibly keypad for programming/setting time/etc. maybe even get onto an Ethernet shield one day… but now I’m getting ahead of myself.

Oh Follow up Q - Can you set the PWM frequency on the arduino outputs? I saw someone talking about you could set it at 3khz or 16khz or something… or did i misunderstand something?

If you put LED's in series you need more voltage. If you put them in parallel you need more current (and more current limiting resistors).

This online calculator will suggest a circuit based on your LED's parameter and the supply voltage:


For example if you want to run 30 Cool White LED's on 12v it suggests 10 parallel strings of three LED's, each string with a 7.5Ohm resistor. The total current is 3.5 A which is well within the 5A limit of a TO220 transistor. If you switch to 20V your get five parallel strings of six LED's, each string with a 2.4 Ohm resistor. The current drops to 1.75 A.

Thanks for the reply - the question i have relates more to dimming using PWM signals as opposed to how to properly power them.

I've done a pile of calculations for a pile of configurations (using ledcalculator.com of course) and have a good idea of how i'd like to connect them, but the method of dimming becomes the issue that may determine how many strings of how many LEDs I end up using.

Any input on the best/simplest/cost effective way for me to achieve the dimming functions?

You said you planned to use PWM to dim them. That just leaves you needing a way to turn them on and off. Typically you would use an NPN transistor and base resistor to switch the voltage and current. Alternatively you can use an N-channel MOSFET which will have lower ON resistance and generate less heat. A logic-level MOSFET Gate can connect to an Arduino output directly.

I know you stated you were NOT looking on info to drive them..

but wanted to posted these two good led/resistor calcs.

single and for led arrays:



I dunno if I’d discount the idea of using the CAT4101 too quickly. The nice thing about that chip is that it sets an absolute limit on the current that will pass through it – unlike what would happen with a circuit you built yourself with a transistor/FET that would rely on you not messing up the programming and setting too much on time. I understand you’re afraid of SMD soldering but really it’s quite easy even for an amateur; you can find a lot of videos on Youtube showing how it’s done with a soldering iron.

Poking around I noticed that there’s already an Eagle schematic for this:
For $10 at iTead or Seeedstudio you could have 10 of these boards made up. There’s only 12 components per board and you could even convert those resistors and capacitors to through-hole if you wanted to.

@johnwasser - Do you have any suggestions on a part? I'd be dealing with either 24V or 36V power supply and a max current of only a few amps per Group. another friend of mine suggested a MOSFET as well but I didn't get any more details than that. How much of a difference are we talking about with the internal Vdrop across a FET vs Transistor? Sorry, I'm really quite new to FETs and using them - any links or part suggestions would be greatly appreciated.

@chagrin - the CAT4101 chips seem like they're kind of pricey compared to a simple FET or Transistor - Aside from the human error/calculation issues you mentioned is there another reason to go that route? I found them on digikey at about $3.36/ea, so seems like a pricey route to go since i'd have to get boards made and such. Now pricey is relative, since we're still only talking small money. But is there a solid reason to go one way or the other? ie, better dimming in low levels or more stable voltages at the LEDs?

I'm not terribly optimistic about my SMD soldering skills, but I'm not totally against trying - I enjoy conquering new skills. I just want to make an informed decision about which route to go.

I'm going to dig through those board sketches and such later tonight, for now I gotta go help a friend with a broken car...

Thanks for the input so far!

If you buy the CAT4101 directly from onsemi.com (need to register) you can get them at $1.92/ea plus $8.00 shipping.

Either the transistor option or CAT4101 option will give you accurate dimming; with the transistor it might take a bit more testing to find the best range. The only advantage I see with the CAT4101 is that you can set the maximum current on it and in that respect never worry about blowing out your LEDs -- but then that's a huge advantage.

When you're looking for a FET one of your first things to look for is the gate to source threshold voltage (Vgs(th)). This tells you how many volts you need to start to turn it on. When you find a good candidate that has a Vgs(th) around 1V then you need to dig into the datasheet and find the graph that shows Vgs vs. amperage; at the 5V that the Arduino puts out you want the graph showing that it's putting out somewhere near its max amperage. This tells you that the mosfet is in its "saturation" range and thus will generate less internal heat. Granted, at 250ma I don't think heat will be much of an issue for you.

Beyond that Vgs consideration you just need to look for the obvious peak voltage limit, total current, and package style. If you're looking for an example I would offer the IRL2703.

Fantastic info Chagrin, thank you. The saturation stuff is what i needed to know about...

I will look into it some more and make my decision.


Xplode: Fantastic info Chagrin, thank you. The saturation stuff is what i needed to know about...

"Logic-Level MOSFET" roughly translates to "MOSFET that saturates at a gate voltage of 5V or less".

Yes, I realize this now - Its been a while since i did electronics calculations. Touched on it a bit in my Electrician training, but not really any designing stuff.

Thanks johnwasser. I knew when I was looking at the FETs and High Current BJTs that I was missing a key part of what i needed to be interpreting in the charts.

Chagrin: Poking around I noticed that there's already an Eagle schematic for this: http://code.google.com/p/hpled/downloads/detail?name=CAT4101_triple1_0.zip&can=2&q= For $10 at iTead or Seeedstudio you could have 10 of these boards made up. There's only 12 components per board and you could even convert those resistors and capacitors to through-hole if you wanted to.

I can't open that file - i installed a copy of Eagle and it says its not a valid file? I also registered with onsemi to look at ordering the chips, but they're out of stock... boo... Anyway - am I doing something wrong with Eagle? will the freeware version work for it?

The stock at Onsemi.com (which was actually sold through avnet.com) was quantity 550 when I posted earlier. Eeesh.

For the Eagle files the freeware version will work. I created a new folder in my Eagle projects directory and dropped the .brd and .sch file into it, then opened Eagle, then opening either the .brd or .sch will open both.

Got it working - thanks.

Looking at it, I'd like to make some changes like add a 5V regulator (ie 7805) onto the board. I'm thinking a passive mod, just add the 3 pad holes so I can solder it in on the first board, and then jumper 3 or 4 boards together to control all the channels.. Just gotta figure out how to use Eagle now...

I was poking around onSemi and figured out they have sample units for shipping, so I'm going to order a 10pc sample set of the CAT4101 chip (~$15) so I can try them out. I like the idea of a constant current driver being in charge instead of just a transistor. Overall, I think i'm going to have to put out about the same money either way, so might as well do it right.

Thanks for the help so far guys - I'll post up details/updates/etc as i work through it all in case it helps someone else in the future.