Let's Make Robots!

PWM-ing a 3W 750ma Luxeon LED


Ever Needed a bright light source for your Robotic Projects.

This Walkthrough will guide you through two Versions.

Version 1 :- Discreet PWM driver, with dimmer control.

Version 2 :- Arduino High speed PWM driver.

 There is quite a range of Luxeon Leds to choose from - however they seem to come in 350mA or 750mA versions.

 

 

 

 

 

 

 


My Project uses a 3W High-Power White LED 130LM version

 

 

 

 

 

 

 

The Leds heat up quite a bit at full current so a Heatsink is advised. 

I used an old CPU heatsink, which i customised.

 






 

 

 

I also bought a sample pack of lenses that fit over the LED, which produces wide or narrow beams etcetc.

 

 

 

 

 

 

 The Best way to drive them is by using a constant current source.

I used a 750mA Constant Current module from Here

I choose this as its reasonable priced and i could not have made at this cost.....

....Plus its PWM enabled - meaning you can adjust the duty cycle to Dim and control the LED.

 

 

 

 

 

 

 

 

 


Version 1 :- Manual PWM LED Control using a LM324 and Variable resistor.


To Drive to the PWM circuit manually i opted for a discreet componant design.

The LM324 opamp can be easily driven from 3V - 32V .... it also lends its self well to PWM.

caution :-  if you plan to use a supply voltage over 6V then you will have to limit the

                pwm signal voltage level to the PWM module otherwise you will upset or kill the input pin.

 

 

 

 

 

 

 

 

 

 

 

 

 

The + LED Supply can be anywhere between 6 - 25 Volts

 


Version 2 :- Arduino Luxeon LED PWM Control


 The supplied code is a High speed PWM generator -

(the normal servo PWM signal is too slow and flickers the LED)

 

 

 

 

 

 

 

 

 

 

 


// Arduino Highspeed PWM code

// Code_ing Ramps the PWM up&Down (Bright-Dim cycle)

void setup()
{
pinMode(3, OUTPUT);

pinMode(11, OUTPUT);

  }
void loop()
{
   for (int i=255; i >= 0; i--){
      OCR2B = i;
      delay(10);
  
  TCCR2A = _BV(COM2A1) | _BV(COM2B1) | _BV(WGM21) | _BV(WGM20);
  TCCR2B = _BV(CS22);
  OCR2A = 0;
  }
   for (int i=0; i <= 255; i++){
      OCR2B = i;
      delay(5);
     
  TCCR2A = _BV(COM2A1) | _BV(COM2B1) | _BV(WGM21) | _BV(WGM20);
  TCCR2B = _BV(CS22);
  OCR2A = 0;
}
}


 


Here is my final circuit (Version1) Hacked and shoehorned into a Bicycle Lamp case_ing.

 

 

 

 

 

 Not much space to spare.

Still have to workout where to mount the "Beam/Dim Control".

 I might even mount it on my bikes "Cow Horns"

 

 

 

 

 

 

 

 

 

 

Op-Amps Rule.........(Pwm circuit)

 

 

 

 

 

 

 

 

 

 

 

I plumped on installing 2*3W Luxeons into the Bicycle casing.

 

I choose a Wide Beam and a Narrow Beam Lens.

This gives very good light coverage.

My next version will have a barebone arduino installed.

 

 

 

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
DutchBot's picture

The Gee makes me Happee!

Haven't been doing a lot of hobby stuff recently but this just made my day when it comes to the nano-reef project. I already kind of looked into controlling the high power leds and was leaning towards relay's to switch things on and off. These led drivers/controllers are so much cooler as you can dim them oposite to just flick things on and off!

I ordered a bunch straight away. Thanks G. Great tip!

Gareth's picture

Hold your horses on the opamp - i have thrown it out and i am using an 08M ..... 10 times better......will post ......err soon....

DutchBot's picture

No worries there, I'll be using the robot control board or the picaxe (not sure yet) as it has to control several solenoid valves and some measuring thingy's also (if if, first the lights and my sun tracker for roundabout bob). I'm stuffed with plans for the winter, will be posting stuff soon again :)

rik's picture
Heating up a heat sink?
Gareth's picture

In the back of my brain i saw "Jaimie" bending aluminium with a welding machine - i Guess my blow torch was no match for the darn efficient heatsink plus .......the heat slurping vice clamping it.

Any ideas greatly accepted (buying cheap heatsinks does not count).....

TeleFox's picture
Maybe when you clamp the heatsink you could put a few layers of baking/grease paper between the heatsink and the inside of the vice, or some other kind of thermally insulating material.
Dude! This Music Rulez! Great to listen to on a "Sick" day. Who sings like this? It's the Soundtrack to Life!
Gareth's picture

Pythagorus switch (4min12sec into the clip) i have been unable to locate the exact source :-(

OddBot's picture
I'm surprised though that you would waste an arduino to control it
Gareth's picture

Hehe, thats only for show, and for those who would be using it as part of a project.

My 2nd build plan is to use a barebone arduino - or a Atmega "componants flying in the air" system.

Yes i could use a  pic but i have no experience as yet (dash looks like i have to start pic-ing) - it needs only one PWM out and an analoge pot input for potentiometer