Go Down

Topic: RGB LED flickering (Read 3569 times) previous topic - next topic

Hi,

I am controlling an RGB LED strip using  PWM Pins 9,10,11 according based on this tutorial:
http://learn.adafruit.com/rgb-led-strips
When I dim the light the LEDs start flickering. Shouldn't the the PWM frequency be high enough so that i cant see the flickering?
Does anyone knows the  the standard frequency of PWM? Should I manipulate the PWM frequency?

Tanks in advance

Hippynerd

Its kinda hard to tell what is happening and not. It sounds like maybe you are trying to run the whole strip of LEDs off the arduino, which sounds like too much current for the arduino, but then again, its hard to say from here.

If you can include more details (like show us the entire circuit, including power supply, how many LEDs, which type of arduino you are using, ...)
https://sites.google.com/site/rgbledcubes

dc42

The standard Arduino PWM frequency is 488Hz, which is high enough to avoid visible flickering.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Grumpy_Mike

Most beginners forget to connect the ground of the 12V power supply to the ground of the arduino.

I use an Arduino "compatibel" to the Nano 328. I am using mosfets so the LEDs strip current does not flow over the arduino and the ground and the +12V supply are the same for the arduino and the LED Strip. The wiring is identical to the tutorial:http://learn.adafruit.com/rgb-led-strips/usage

Grumpy_Mike

If you do it right with the right components you should not see any flicker.

Mike can you also tell me which are the right components?

Grumpy_Mike

The components mentioned in the artical and not a subistitute that you think might work.

dhenry

Quote
Shouldn't the the PWM frequency be high enough so that i cant see the flickering?


Your eyes do get better at preceiving flickering at low brightness. What you observe could be due to that.

Grumpy_Mike

What do you actually mean by flickering?
Is it perceivable looking directly at the light?
Or is it that you want to see no flicker as you rapidly scan your eyes across the field of view that contains the lights?

Sathi

Hi lukeskymuh, I believe I might be encountering the same issue as you. The flickering I encounter is when the leds are dimmed to a low pwm value, they flicker in a way a candle flame does right before it goes out. Not like a refresh rate problem. I thought it was my hardware but I realize now I am not encountering the problem when I set the pwm to a fixed value, or strobe it with a simple loop. Turns out, the only time I can get this flicker to happen is when running that color swirl code form adafruit which you linked to. We have different hardware setups, but we are using that same bit of code. Do you have the flicker when setting the pwm to a value of 10 or when doing a simple pwm increase loop on the leds?

-Sathi

fungus


Hi lukeskymuh, I believe I might be encountering the same issue as you. The flickering I encounter is when the leds are dimmed to a low pwm value, they flicker in a way a candle flame does right before it goes out. Not like a refresh rate problem. I thought it was my hardware but I realize now I am not encountering the problem when I set the pwm to a fixed value, or strobe it with a simple loop. Turns out, the only time I can get this flicker to happen is when running that color swirl code form adafruit which you linked to.


What TLC library is that using? It's definitely possible to cause flicker by not controlling the chip properly.
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Sathi

No where in the thread was the TLC mentioned, yet you guessed that I might be using it? I am indeed. Is this a known issue? When I get home I will check what version of the library I have. Thanks.

-Sathi

Sathi

I am using the Tlc5940_r014_2 library. I am pretty sure it is the newest one from the google code page at:

http://code.google.com/p/tlc5940arduino/downloads/detail?name=Tlc5940_r014_2.zip&can=2&q=

Not sure what the deal is, but I can generate all sorts of weird artifacts based on different code parameters. If I increase
the pwm values at a slow rate, the leds increase in brightness in pulsating sort of pattern, like they are breathing. At faster speeds things look smooth. But I can't get it to fade slowly from one color to the next in a smooth manner. Especially at low
pwm values where they have that strange candle light like flicker. I'll avoid hijacking this guys thread and make a new topic on this I can't get it worked out. Thanks.

-Sathi

Go Up