Go Down

Topic: Turning a simple 3w led w/arduino (Read 2760 times) previous topic - next topic


Apr 27, 2013, 03:17 pm Last Edit: Apr 27, 2013, 03:21 pm by skuller Reason: 1
Hello guys:

My name is Steve and I am new to arduino, I am really amazed about what the possibilities are with this controller!

So I wanted to just turn on and off a 3w led star with arduino, but I am not able to find the solution here in the forum, so I decided to post the inquiry.

This is the way I am lighting this 3w Cree led right now, I am using an LM317t as a driver, with a 1,8ohm x1w resistor, to send 700ma to the led at 3v.


The lm317t will use 3v and the led another 3v, so I decided to use a Power Supply of 6v.
The circuit is tested and works perfectly, but now I want to turn it on and off with this driver and with the Arduino.

I have the Arduino Mega 1280.
With some lines of code I want to be able to turn it on and off, is it possible?
Where should I plug the arduino in this circuit?

Also, Is it possible to fade on and off this led with another really simple circuit and this LM317t using pwm ?

Thank you in advance!



Apr 27, 2013, 07:55 pm Last Edit: Apr 27, 2013, 07:57 pm by Headroom Reason: 1
Hi Steve,

Welcome to the Forum. Switching a 3w high brightness LED with a linear regulator works but is not recommended. LEDs are constant current devices and that's not really the purpose linear regulators are made for. They also tend to get pretty hot and may require heat sinking.
Also, if you have not mounted a heat sink to your 3W LED now would be a good time!

You cannot switch a 3W LED directly with the Arduino as the pins on the Arduino cannot supply that much current, which is usually in the 350 - 700 mA range.

If you've not found the answer here on the forum then I'd encourage you to search a bit more as this topic has been discussed many, many times.

BTW The best, most efficient way to drive high brightness LED and being able to fade them is a switched constant current power supply that allows PWM control.



Thank you Headroom for the reply!

-Yes, everything is mounted on their heatsinks.
-As you can see on the picture, I have an external power supply, just for the led, that can provide 700 ma.
-I was told the LM317t fully support PWM.

Anyone knows if there is a simple way to connect all these to the arduino and provide PWM to fade the 3w led?



Well, this would be simple and inexpensive and you can drive it with PWM directly from one of the Arduino PWM pins:


Only caveat is that you definitely need a 6V power supply because the PT4115 chip on this driver has  5V under voltage lockout. Otherwise I have used three of these and they work fine.



There are lots of devices out there, particularly logic-level MOSFETS, that will directly take Arduino PWM outputs and drive high-power LEDs.

Although I haven't used this one, I may in the future...

THis implies that you have soldering skills though. Otherwise there are many LED drivers out there. Just be certain to choose one with "logic-level" inputs, meaning that it will work directly with the TTL PWM signals from Arduino and not need level-shifting interface circuitry.


Yes, I saw there are a lot of pwm interfaces and drivers out there..
Actually I was thinking of using the LM317t since I already have a lot of those transistors..

If anyone used the lm317t as a driver with pwm it will be a lot of help to know how must be connected.


The 317 will work as a current source but is not directly PWM-switchable without additional components. This thread discusses some options...


I think the circuit with the transistor shutting off the ADJ pin will allow for a low-power transistor since it's only gating the high current output of the regulator. Uses a few more components but looks to be a better design (unless you're building a lot of them and looking for lowest parts count). THe other circuit will have large currents through the transistor and need a beefier heat-sinked transistor.

Go Up