Hi,
I want to ramp up the brightness of a 10M led strip. I initially used pwm, but sometimes noticed a slight flicker. So I thought if I just used analogWrite going from 0 to 255 over 20 mins that would gradually increase the voltage. Instead of rapid on, offs that pwm uses. Am I correct in that?
This is my code:
int led = 3;
void setup() {
// put your setup code here, to run once:
pinMode(led, OUTPUT);
for(int i=0;i<255; i++){
analogWrite(led, i);
delay(4700);
}
analogWrite(led, 0);
delay(1000);
analogWrite(led, 255);
}
void loop() {
// put your main code here, to run repeatedly:
}
My next problem is I'm using a TIP120 that I just had lying around. I have the base connected to output pin 3 of arduino, Collector to the ground of the led striplight, and emmiter connected to the ground of the arduino, and ground of 12v power supply. 12v is going straight from power supply to led striplight.
I have no resistors or diodes in place. Do I need any?
Is there something better to use than a TIP120, because I have noticed it heats up alot, plus there is a 2v drop across it which means led's dont get to full brightness.
Hope someone can advise the best way to do this.
Cheers,
Damien.