Offline
Newbie
Karma: 0
Posts: 23
|
 |
« on: December 02, 2012, 10:32:34 am » |
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-stripsWhen 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
|
|
|
|
|
Logged
|
|
|
|
|
Eugene, Oregon
Offline
Sr. Member
Karma: 8
Posts: 387
|
 |
« Reply #1 on: December 02, 2012, 12:03:01 pm » |
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, ...)
|
|
|
|
|
Logged
|
|
|
|
|
United Kingdom
Offline
Faraday Member
Karma: 130
Posts: 4644
|
 |
« Reply #2 on: December 02, 2012, 12:31:30 pm » |
The standard Arduino PWM frequency is 488Hz, which is high enough to avoid visible flickering.
|
|
|
|
|
Logged
|
Formal verification of safety-critical software, software development, and electronic design and prototyping. http://www.eschertech.com
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 271
Posts: 25419
Solder is electric glue
|
 |
« Reply #3 on: December 02, 2012, 12:34:24 pm » |
Most beginners forget to connect the ground of the 12V power supply to the ground of the arduino.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 23
|
 |
« Reply #4 on: December 08, 2012, 05:12:38 am » |
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
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 271
Posts: 25419
Solder is electric glue
|
 |
« Reply #5 on: December 08, 2012, 01:12:10 pm » |
If you do it right with the right components you should not see any flicker.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 23
|
 |
« Reply #6 on: December 10, 2012, 06:29:46 am » |
Mike can you also tell me which are the right components?
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 271
Posts: 25419
Solder is electric glue
|
 |
« Reply #7 on: December 10, 2012, 05:47:44 pm » |
The components mentioned in the artical and not a subistitute that you think might work.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Edison Member
Karma: 114
Posts: 2205
|
 |
« Reply #8 on: December 11, 2012, 06:21:06 am » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 271
Posts: 25419
Solder is electric glue
|
 |
« Reply #9 on: December 11, 2012, 06:23:57 am » |
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?
|
|
|
|
|
Logged
|
|
|
|
|
Albany, NY
Offline
Newbie
Karma: 0
Posts: 21
|
 |
« Reply #10 on: December 11, 2012, 07:37:11 pm » |
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
|
|
|
|
|
Logged
|
|
|
|
|
Valencia, Spain
Offline
Edison Member
Karma: 65
Posts: 2231
|
 |
« Reply #11 on: December 12, 2012, 06:49:32 am » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Albany, NY
Offline
Newbie
Karma: 0
Posts: 21
|
 |
« Reply #12 on: December 12, 2012, 02:05:40 pm » |
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
|
|
|
|
|
Logged
|
|
|
|
|
Albany, NY
Offline
Newbie
Karma: 0
Posts: 21
|
 |
« Reply #13 on: December 13, 2012, 07:38:00 pm » |
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
|
|
|
|
|
Logged
|
|
|
|
|
|