Problems with 3w Luxeon LED and PWM

Hi all,

I am busy working on a circuit that uses pin 5 PWM output on my Arduino with Atmega328.

I have the PWM output running to a FET with logic level gate drive. Its on resistance is also very low.

The idea I had was to set the PWM to 25% for example. My input voltage is 12V so the load should see 3V.
The reason I did this was to remove the need for a resistor in series with the LED.
I know that my resolution is greatly reduced by doing this but it is not a problem.

The FET is connected as follows:

Pin5 from arduino directly to the gate of the FET. The drain goes to the negative leg of the LED and the source is connected to ground. The positive leg of the LED is connected to the 12V.

When testing I also used a 5ohm load and I measure my 3V across it with a multimeter.
If however I removed the resistors and use the LED instead I measure somewhere around 4-5V and the current is way to high.

I have been thinking that maybe the PWM frequency needs to be higher?

Thanks in advance for any help

The resistors are needed to limit the current, which changes as the LED's temperature changes.

To drive one you really need to use a constant current driver. Do a search on Google as there are a number of example circuits out there. It's also a question that comes up regularly in these forums, so theres lots of info here that will help you.

Without using the current limiting resistors in your current setup, you run the risk of damaging both the LED and Arduino.

The idea I had was to set the PWM to 25% for example. My input voltage is 12V so the load should see 3V.

The load will see 0V or (very nearly) 12V, whatever the PWM duty cycle.

Okay, so if I do the following it should work:

I will run the LED off 12V being switched through the FET. But I will run from 0-100% duty cycle with the correct resistors calculated for 12V in series with the LED.
I will pick resistors slightly bigger than the calculated values to be on the safe side.

I am looking into a constant current source, however time is not on my side at the moment.

Thanks for the help

You can buy constant current drivers for these led's - have a look ebay.

They aren't normally expensive, only £3 - £4

A 3W LED (I'll assume a volt drop of say 3.5V for white LED) on a 12V supply needs a minimum current limiting resistor of 10 ohms. 5 ohms is way too small and will rapidly fry/damage the device. You can play safe and use 15 ohms. Ignore the PWM aspect and design the circuit to work correctly when switched permanently on. PWM certainly doesn't control the voltage or the current, it controls the average current and thus average power. The circuit has to run properly at full current/power in order to work.

Unless you guarantee to always run the PWM at a low duty cycle you'll need proper heat-sinking on the LED.

The current-limiting resistor (if 10 ohms) needs to be rated at 9W or more, note.

[ This is a very inefficient way to power an LED since you waste 8.5 volts. PWM cannot help with this inefficiency, running the LED from 5V would be much better - but as you have 12V you'll have to waste a lot of power in a series resistor or a linear regulator - only a switchmode regulator can improve matters (or running several LEDs in series off the 12V). ]

Thanks for the help!
I obviously wasn't thinking to clearly when I came up with this idea...
Anyway I have order a LED DCDC converter with PWM dimming so hopefully it will be here before this project has to be finished...
Otherwise its the wasteful way of resistors.

Just to be clear if I use a 1w luxeon that has a 2.85 forward voltage @ 350mA and I purchased a 350mA LED DCDC converter then I need no series resistors and the converter will always provide the correct current?

Thanks again

I need no series resistors and the converter will always provide the correct current?

If the DC / DC converter has a constant current output then no other form of current limiting will be needed. However most DC / DC converters produce a constant voltage and so you will need some form of current limiting.

Also it is not a good idea to use a 350mA capable converter at 350mA, always give yourself at least 20% margin in reserve for greater life and less failures.