Resistor 2W with LEDs

I’m working on a fish tank light assembly using Arduino. I have the design and the code written already, but had a question regarding a resistor in my circuit.

There will be 3 banks of LEDs on the light: one bank of 4 blue LEDs; one bank of blue LEDs; and one bank of red. The blue and white banks will take 12V each from the 12V supply, so no problem there.

The problem arises with the red bank- it only takes 7.2V to run it, so I need to use a resistor. The resistor must be able to dissipate 2W at 16Ohms, and I have no experience working with resistors above 1/4W. Will this resistor need to be heat-sunk? Or is it designed to dissipate the heat well enough?

Also, even though the full 12V will be used in the blue & white banks, should I still use a 1 Ohm 2W resistor?

It should also be said that the circuit will be in a standard radioshack project enclosure.

I attached the circuit schematic as a JPEG.

Thanks!!

The resistor must be able to dissipate 2W at 16Ohms, and I have no experience working with resistors above 1/4W. Will this resistor need to be heat-sunk? Or is it designed to dissipate the heat well enough?

A two watt resistor would be able to dissipate 2 watts in normal applications, however it's kind of good standard engineering practice to bump up the wattage rating to the next available wattage size as running any component at it's 100% rating is not recommended for best reliability purposes.

Heat sinking a power resistor is possible but it's not usually done in that standard cylinder form factor of most resistors does not lend itself to simple mounting AND good heat transfer.

A two watt resistor would be able to dissipate 2 watts in normal applications, however it's kind of good standard engineering practice to bump up the wattage rating to the next available wattage size as running any component at it's 100% rating is not recommended for best reliability purposes.

Good tip. The total power dissipated is about 1.8W. What safety factor would you use then? Like would a 3W resistor be more suitable?

Heat sinking a power resistor is possible but it's not usually done in that standard cylinder form factor of most resistors does not lend itself to simple mounting AND good heat transfer.

If you were building this, what solution would you use to drop the excess voltage?

If you were building this, what solution would you use to drop the excess voltage?

I would add two more red LEDs, and refigure the resistor value. The extra LEDs will drop more voltage, and if you have the same current, the wattage of the resistor can be lowered appreciably. If that makes the reds too bright, raise the resistor value to lower the current. Worst case, you can paint a couple of the red LEDs.

That circuit will not work. The pot has to pass all the current through it. Have you any idea what sort of pot that would take? It is more like the dimers I used to use in the theater. The problem is the power dissipation of that pot is going to be very big, especially when it is close to the end spot. You are better making a variable power supply with an LM317.

Even so what you actually need is a constant current supply.

So, to expand on what Mike has pointed out, you always have to control the current in each of the LED channels. I was going to suggest using three LM317s in their current limiting configuration to control the three LED channels, but they specify a drop-out voltage that would require you to lose four volts.

Nevertheless by using current drivers, you need no other regulation at all, the LEDs can be sourced directly from the unregulated 12, 16 or whatever voltage you have. There are other ways to current regulate with less than 1V "dropout". The power dissipation would then be in the regulator IC or control transistor, which needs to have a heatsink. In any case, you will need (substantially) more than 12V to power four white LEDs in series. 12V LED strips use three LEDs in series.

Using a microcontroller and given that you have limited the "on" current, you can of course then control the brightness using PWM. You do not need timers to do it; it can quite easily be done in code.

Thanks for all the replies!

I would add two more red LEDs, and refigure the resistor value.

Not a bad idea. The idea was to save cost, since the nightlight does not need to be that bright, but by adding a couple extra would only cost a couple bucks and could easily be dimmed enough to make it "realistic."

Have you any idea what sort of pot that would take? It is more like the dimers I used to use in the theater.

I had no idea. I'm not too familiar with potentiometers, but wanted an easy way to dim the lights at any time manually without changing the program. Thanks for the tip.

You are better making a variable power supply with an LM317.

So, to expand on what Mike has pointed out, you always have to control the current in each of the LED channels. I was going to suggest using three LM317s in their current limiting configuration to control the three LED channels, but they specify a drop-out voltage that would require you to lose four volts.

I'll have to do some research on them. (between midterm exams!)

I was going to suggest using three LM317s in their current limiting configuration to control the three LED channels, but they specify a drop-out voltage that would require you to lose four volts.

I could instead make 4 channels, that way I could drop a few volts and still be okay. My power supply only has a max output of 12V at 14A, so I can't really bump up the voltage. I do, however, have plenty of current available for more parallel LED channels.

That circuit will not work. The pot has to pass all the current through it.

If I simply took out the pot and abandoned the dimming capability, what would be the point of failure in the circuit?

Nevertheless by using current drivers, you need no other regulation at all, the LEDs can be sourced directly from the unregulated 12, 16 or whatever voltage you have.

Which kind of current driver are you suggesting, if not the LM317? I remember a bit about current sources from my circuits class, but mostly that they were difficult to perfect and they don’t “exist” like a voltage source.

I’m uploading an updated circuit diagram, with 4 LED channels instead of 3. I’ve added a red LED to the night channel and changed the white/blue channels to 3 each. I haven’t added resistors to regulate these yet, because the LM317 “should” drop the source voltage on the top node to ~9VDC…correct me if I’m wrong.

If I simply took out the pot and abandoned the dimming capability, what would be the point of failure in the circuit?

The fact that there is no mechanism for limiting the current through the LEDs would cause them to melt.

Which kind of current driver are you suggesting,

Constant current drivers.

but mostly that they were difficult to perfect and they don't "exist" like a voltage source.

Rubbish.

Just google:- constant current schematic

Grumpy_Mike:
Just google:-
constant current schematic

I did supply the (a) link …

The fact that there is no mechanism for limiting the current through the LEDs would cause them to melt.

True, but if I included appropriate resistors, wouldn’t the current be limited because of them?

If I also used a separate LM7812 for each channel, wouldn’t that effectively separate the heat generated into 4 different areas, each heat-sunk to dissipate the generated heat? (See attached updated circuit schematic)

Or should I just concede and admit that using the LM7812’s will not work?

Also, will the LM317 solution produce less heat?

True, but if I included appropriate resistors, wouldn't the current be limited because of them?

To some extent but not sufficiently. What happens with an power LED is that the forward voltage changes with temperature, the hotter they get the lower the forward voltage gets and so the more current they pass and so the hotter they get. This is called thermal run away.

If I also used a separate LM7812 for each channel, wouldn't that effectively separate the heat generated into 4 different areas,

Yes but the LEDs get hot as well.

Also, will the LM317 solution produce less heat?

No but it will be in the better place, the regulator.

Thanks for your patience, Mike.

I’ve drawn up a new schematic using the LM317 as a current regulator. I used a 4 Ohm 2W resistor with each LM317 to create a constant current of ~350mA. The voltage drop should be sufficient in each of the channels.

I have two questions now:

  1. Have I configured the LM317 circuit correctly to control it with PWM using the ATTiny85? Or will the PWM be ineffective because of the constant current capability of the new circuit?

  2. Will there also be power dissipated in the TIP120 transistor?

can you post a link to the data sheet for the LEDs ?

using 350mA per unit, 3v drop, 4 LEDs in series with 12V power supply total current is 350mA

http://led.linear1.org/led.wiz

shows 12V supply 5 LEDs with 2.4v drop. and a 1 ohms 1/4 watt resistor.

  1. Have I configured the LM317 circuit correctly to control it with PWM using the ATTiny85?

Yes that looks OK.

. Will there also be power dissipated in the TIP120 transistor?

Yes you bet. The TOP120 is a darlington so it will have about 2V across it when it is fully saturated. At 350mA this gives you a power dissipation of 2 * 0.35 = 0.7W

Also that LED hung straight off the 12V supply is going to melt.

You could get away with just using a couple of transistors (and a sense resistor) and basically make your own regulator.. but it would be more work than an ln317 in current regulation mode.

cjdelphi: You could get away with just using a couple of transistors (and a sense resistor) and basically make your own regulator.. but it would be more work than an lm317 in current regulation mode.

But a lot less voltage drop. That is of course what I was suggesting before. I like the second circuit with the bias resistor controlled by the Arduino as it is much more precise than the third, but I think you are going to need something heftier (and with a heatsink) than a BC547 to feed the LEDs (and 1k rather than 10k or 4k7).

Note that these current sources work perfectly well with PWM - no switching delay as they are inherently kept out of saturation.

And just to reiterate - using a current source for the LEDs, you do not need to feed them from a voltage regulator.

Yes you bet. The TOP120 is a darlington so it will have about 2V across it when it is fully saturated. At 350mA this gives you a power dissipation of 2 * 0.35 = 0.7W

I'm going to have a hell of a lot of heatsinks in this circuit. So much for fitting this in a small project box!

Also, will I have to use a separate TIP120 for each channel so they don't overheat?

Also that LED hung straight off the 12V supply is going to melt.

The LED is built into the switch, like this one: http://i599.photobucket.com/albums/tt74/autoecaraccessories/Led%20Bulb/Led%20Strip/SWITCH%20WITH%20LED/TOGGLESWITCH2red.jpg. It has a built in resistor.

You could get away with just using a couple of transistors (and a sense resistor) and basically make your own regulator.. but it would be more work than an LM317 in current regulation mode.

I'm definitely open to suggestions; however, I'd like the circuit to be as small as possible, and generate as little heat as possible. The main circuit will live in an enclosure and the LEDs will be attached to an aluminum plate.

That is of course what I was suggesting before. I like the second circuit with the bias resistor controlled by the Arduino as it is much more precise than the third, but I think you are going to need something heftier (and with a heatsink) than a BC547 to feed the LEDs (and 1k rather than 10k or 4k7).

What would you suggest in lieu of a BC547? So essentially the 12V supply would come in at the top, and the Arduino would come in via the 1k resistor? So the second circuit shown would eliminate the LM317s and the TIP120s?

And just to reiterate - using a current source for the LEDs, you do not need to feed them from a voltage regulator.

So again, the LM317/7812s would go away. That would benefit the desired compactness of the final circuit.

There is an even easier way.... but you take a bit of a risk as there's no current regulation.

Simply using 1 transistor per string of LED's, you'd bias the transistor with the right resistor value on it's base, and leave out the resistor between the collector and emitter, eg a 2n2222 npn (800ma rating) what (i and probably I alone) i'd do is place different resistor values on the base until you get 1/3rd or so the target current... once you hit your 100/200/300ma mark (just use a multimeter if you wish to test it) use the same resistor value on each of the transistors.

Cons - current is not regulated, heat will make the current rise, so the trick is to get it roughly 1/3rd of the max current rating, so when the heat does rise, the LED will get brighter but it should hopefully stay within your max range.

Pros. only 1 transistor and only 1 resistor, and cheap.

The better the heatsink, the less likely current will fluctuate with heat, for example i use the same method for 10watt RGB's and it works flawlessly all day every day, i have had it working with 3watt RGB's too but the smaller the LED, the more noticeable the effects.

ie.. winter time, the LED is not as bright, in the summer time, it's 30% or so brighter.

But as pointed out, using a sense resistor, you can accurately measure the current and alter the current accordingly via PWM.

You are going to generate the same amount of heat with any linear regulator method. If you want to reduce the heat then you have to use a switching regulator, there are a lot harder to make because you need a good layout on a PCB to keep the circuit stable.

And just to reiterate - using a current source for the LEDs, you do not need to feed them from a voltage regulator.

I think you are misunderstanding this statement.

So again, the LM317/7812s would go away.

No, you replace it with all those transistors that generate a constant current supply.

I would not endorse the advice given by cjdelphi