Dimming/fading a 50w ebay LED with PWM
hey everyone,
so i'm trying dim led (see attached pics).
i have circuit set illustrated led doesn't fade. driver makes loud buzzing noise when using under 255 pwm, light output stays same. i've tried 220ohm , 1kohm resistor on base same results.
here code i'm using test, i'm sure hardware issue.
this same circuit worked fine on led strip have.
any suggestions?
thanks,
-raul
so i'm trying dim led (see attached pics).
i have circuit set illustrated led doesn't fade. driver makes loud buzzing noise when using under 255 pwm, light output stays same. i've tried 220ohm , 1kohm resistor on base same results.
here code i'm using test, i'm sure hardware issue.
this same circuit worked fine on led strip have.
any suggestions?
thanks,
-raul
code: [select]
int ledone = 9; // pin led attached to
int brightness = 55; // how bright led is
int fadeamount = 1; // how many points fade led by
void setup() {
pinmode(ledone, output);
}
// loop routine runs on , on again forever:
void loop() {
// set brightness of pin 9:
analogwrite(ledone, brightness);
// change brightness next time through loop:
brightness = brightness + fadeamount;
if (brightness == 255){
delay(5000);
}
// reverse direction of fading @ ends of fade:
if (brightness == 55 || brightness == 255) {
fadeamount = -fadeamount ;
}
// wait 30 milliseconds see dimming effect
delay(100);
}
that weird. .
all can think of transistor under full saturation, i'd stick 10k on base of transistor , try.
all can think of transistor under full saturation, i'd stick 10k on base of transistor , try.
Arduino Forum > Using Arduino > Project Guidance > Dimming/fading a 50w ebay LED with PWM
arduino
Comments
Post a Comment