Go Down

Topic: Set frequency for white LED strip (Read 175 times) previous topic - next topic

rdaglia

Hi all,

I am new to arduino and I am looking for some help setting frequency of a strip of white LEDs. The LEDs are for lighting a demonstration. I am looking to set the frequency of the LEDs to a frequency of either 40 or 80 Hz. I currently have a simple code, posted below, that does not have any effect on the LED strip. Is  there any hardware I need for this to happen, or do I need new code? I currently using an IRFZ44N transistor and am not sure if I am using it right or if I need it at all.

void setup() {               
 // initialize the digital pin as an output.
 // Pin 13 has an LED connected on most Arduino boards:
 pinMode(12, OUTPUT);   
}

void loop() {
 digitalWrite(12, HIGH);   // set the LED on
 delay(100);              // wait for a second
 digitalWrite(12, LOW);    // set the LED off
 delay(100);              // wait for a second
}


AWOL

Code: [Select]
delay(100);              // wait for a secondOne of those statements is incorrect.
"Pete, it's a fool (who) looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.
I speak for myself, not Arduino.

knut_ny

That transistor isnt the right choice
Use a 'logic level' one..
Ny

Grumpy_Mike

Quote
I am looking for some help setting frequency of a strip of white LEDs.
Why? What advantage is there in flashing a strip faster than the eye can see? The result is only a half brightness strip, is that what you want?

rdaglia

I understand that 80 Hz is faster than what the eye can see, I am vibrating a silicone oil bath at 80 Hz and I wanted to make the viewing better. Vibrating the bath can cause droplets to bounce on the surface at this frequency. When I use 40 Hz it makes the droplets bounce appear better to the eye.


PaulRB

#6
Apr 15, 2019, 11:25 pm Last Edit: Apr 15, 2019, 11:30 pm by PaulRB
So basically you are making a stroboscope.

I agree with knut_ny, you need a logic level MOSFET such as irl540 or stp16nf06l. Otherwise you may not get full brightness and overheating of the MOSFET could occur.

Also, I'm not sure that a white led strip is the best choice. White LEDs contain phosphors which glow white in response to a UV led embedded inside them. The speed at which the phosphors respond to the led switching on and off may be slow and ruin the effect. With a stroboscope, you want the light flashes to be as short and intense as possible. An RGB strip, producing "white" light, may be a better solution. The red, green and blue LEDs in the strip contain no phosphors, so are able to switch on and off instantly.

Go Up