0

PWM of WS2812 5050 RGB LED with Integrated Driver Chip's
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

PWM of WS2812 5050 RGB LED with Integrated Driver Chip's

by lucs on Wed Jul 03, 2013 2:23 am

Hello,

I'm a light painter. Will the new WS2812 5050 RGB LED with Integrated Driver Chip's support a PWM rate of at least 5kHZ.

I do like these new chips because I like the very compact form factor and it would open more roads for much compacter devices. Currently, I'm using the 12mm Diffused Thin Digital RGB LED Pixels (Strand of 25) - WS2801. They extremely nicely to program, but looking from the side, there is a lot of loss of light (and certainly color) information. There 12mm LEDs are a bit big, but they get the job done. I also need to tell you that my devices are moving rather quickly (between 80 and 200 rpm and I would like to go further).

I see that the communication speed is mentioned (800 kHz) but I miss the PWM frequency, or is it the same? Then, I'm puzzled with the rating of FPS (at a certain place I've read 50 FPS)? Perhaps an oversight on my part.

Further more some additional information: I'm working with the Arduino Nano and Mini at 16MHz. I use about 10 LED's per device.

And now I do hope I have not overlooked a question already covering this same topic. Then please refer me to that link.

Kind regards,

Luc
Belgium
lucs
 
Posts: 12
Joined: Tue May 28, 2013 12:42 pm

Re: PWM of WS2812 5050 RGB LED with Integrated Driver Chip's

by pburgess on Wed Jul 03, 2013 1:46 pm

Hi Luc,

The refresh rate is mentioned somewhere in the datasheet as "no less than 400 Hz." With 8-bit brightness, that would put the PWM clock somewhere around 100 KHz. As mentioned in another thread, the data rate can be much higher than this, but it's not clear if the next PWM cycle starts immediately upon latching (resetting PWM in progress), or if latched data is held until the start of the next cycle (400 Hz). I've used different LED drivers that work either way, and the datasheet for the WS2812 doesn't mention which situation applies.

pburgess
 
Posts: 4023
Joined: Sun Oct 26, 2008 2:29 am

Re: PWM of WS2812 5050 RGB LED with Integrated Driver Chip's

by lucs on Tue Sep 17, 2013 4:21 am

Hello,

Sorry for the late reaction, I had some other priority projects. Now I have, at last, again some time to go back to my POV night photography project.

Thank you for your answer, but I rest confused. Could you please explain how you derived the PWM frequency (100kHz) from the refresh rate ('not less then 400Hz').

So, before ordering the 144 LED string, to which I'm appealed a lot, I would like to be100% assured the PWM frequency is higher that 5kHz (as imposed by my project objectives).

Kind regards,

Luc
lucs
 
Posts: 12
Joined: Tue May 28, 2013 12:42 pm

Re: PWM of WS2812 5050 RGB LED with Integrated Driver Chip's

by adafruit_support_bill on Tue Sep 17, 2013 6:26 am

Could you please explain how you derived the PWM frequency (100kHz) from the refresh rate ('not less then 400Hz').

With 8 bits of brightness, the PWM period must be divisible into at least 255 steps. 400KHz * 255 = 102KHz.

adafruit_support_bill
 
Posts: 74337
Joined: Sat Feb 07, 2009 10:11 am

Re: PWM of WS2812 5050 RGB LED with Integrated Driver Chip's

by lucs on Wed Oct 23, 2013 10:25 am

Hello,

I just connected 9 led of a "144 led strip" to an Arduino Mega as a test. I used the strandtest code as listed below:

As a light painter I am disappointed with the first results. Even with hand movement you can clearly notice flicker with the eye. On a photograph it is all too noticable. This should not happen with a PWM frequency of about 100kHz as mentioned twice above. On your website you mention that the leds are very suitable for lightpainting.

Therefore I'm hoping I'm just doing something wrong somewhere. Perhaps I'm overseeing something.

Can you give me advice on how to proceed.


Kind regards,

Luc
#include <Adafruit_NeoPixel.h>

#define PIN 51

// Parameter 1 = number of pixels in strip
// Parameter 2 = pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
// NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
// NEO_KHZ400 400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
// NEO_GRB Pixels are wired for GRB bitstream (most NeoPixel products)
// NEO_RGB Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
Adafruit_NeoPixel strip = Adafruit_NeoPixel(9, PIN, NEO_GRB + NEO_KHZ800);

void setup() {
strip.begin();
strip.show(); // Initialize all pixels to 'off'
}

void loop() {
// Some example procedures showing how to display to the pixels:
// colorWipe(strip.Color(255, 0, 0), 10250); // Red
colorWipe(strip.Color(0, 255, 255), 0); // Green
// colorWipe(strip.Color(0, 0, 255), 10250); // Blue
// rainbow(20);
// rainbowCycle(20);
}.
lucs
 
Posts: 12
Joined: Tue May 28, 2013 12:42 pm

Re: PWM of WS2812 5050 RGB LED with Integrated Driver Chip's

by EternalCore on Wed Oct 23, 2013 1:39 pm

lucs wrote:Hello,

I just connected 9 led of a "144 led strip" to an Arduino Mega as a test. I used the strandtest code as listed below:

As a light painter I am disappointed with the first results. Even with hand movement you can clearly notice flicker with the eye. On a photograph it is all too noticable. This should not happen with a PWM frequency of about 100kHz as mentioned twice above. On your website you mention that the leds are very suitable for lightpainting.

Therefore I'm hoping I'm just doing something wrong somewhere. Perhaps I'm overseeing something.

Can you give me advice on how to proceed.


Kind regards,

Luc
Code: Select all | TOGGLE FULL SIZE
#include <Adafruit_NeoPixel.h>

#define PIN 51

// Parameter 1 = number of pixels in strip
// Parameter 2 = pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
//   NEO_KHZ800  800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
//   NEO_KHZ400  400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
//   NEO_GRB     Pixels are wired for GRB bitstream (most NeoPixel products)
//   NEO_RGB     Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
Adafruit_NeoPixel strip = Adafruit_NeoPixel(9, PIN, NEO_GRB + NEO_KHZ800);

void setup() {
  strip.begin();
  strip.show(); // Initialize all pixels to 'off'
}

void loop() {
  // Some example procedures showing how to display to the pixels:
 // colorWipe(strip.Color(255, 0, 0), 10250); // Red
  colorWipe(strip.Color(0, 255, 255), 0); // Green
//  colorWipe(strip.Color(0, 0, 255), 10250); // Blue
//  rainbow(20);
//  rainbowCycle(20);
}
.

Make sure you have your Neopixels wired up like this:
Image
Source: http://learn.adafruit.com/adafruit-neop ... no-library
Things I've Made Here:
1.[101-Help]~12v -> 5v 1.5A Regulated Power For NeoPixels.: http://goo.gl/uMXuk7
2.[Example]NeoPixel Strip Scrolling Cylon Eye!: http://goo.gl/4RzWQQ
EternalCore
 
Posts: 239
Joined: Tue Jul 30, 2013 3:57 pm
Location: Canada

Re: PWM of WS2812 5050 RGB LED with Integrated Driver Chip's

by lucs on Wed Oct 23, 2013 4:34 pm

Hello,

I did as you suggested, (as well on the UNO as on the MEGA) pin 6 is a PWM port. But the anoying flickring behaviour remains the same.

Moreover, and I don't know how much the difference would be, your scheme refers to another LEDstrand with WS2811 chips and not the 144 ledstrip with WS2812 (as mentionned above);

So, unfortunately, the filckering has not disappeared.

Do you have other suggestions?


Kind regards,

Luc
lucs
 
Posts: 12
Joined: Tue May 28, 2013 12:42 pm

Re: PWM of WS2812 5050 RGB LED with Integrated Driver Chip's

by EternalCore on Wed Oct 23, 2013 7:57 pm

lucs wrote:Hello,

I did as you suggested, (as well on the UNO as on the MEGA) pin 6 is a PWM port. But the anoying flickring behaviour remains the same.

Moreover, and I don't know how much the difference would be, your scheme refers to another LEDstrand with WS2811 chips and not the 144 ledstrip with WS2812 (as mentionned above);

So, unfortunately, the filckering has not disappeared.

Do you have other suggestions?


Kind regards,

Luc

Wrong, That's the Official Adafruit Wiring Schematic and it's for ALL the NeoPixel Strips; And in that picture the strip has WS2812 Led Pixels but the 144 Strip has WS2812B pixels. So there is NO WS2811 IC's anywhere as none of the NeoPixels use WS2811 IC's.

Can you post a video on the flickering?.
Things I've Made Here:
1.[101-Help]~12v -> 5v 1.5A Regulated Power For NeoPixels.: http://goo.gl/uMXuk7
2.[Example]NeoPixel Strip Scrolling Cylon Eye!: http://goo.gl/4RzWQQ
EternalCore
 
Posts: 239
Joined: Tue Jul 30, 2013 3:57 pm
Location: Canada

Re: PWM of WS2812 5050 RGB LED with Integrated Driver Chip's

by lucs on Thu Oct 24, 2013 1:59 am

Dear Sir,

Resulting from my research on the internet:

See the Chinese 'Gree-led'-site: WS2811RGB: 6 pins, see the strip on your reference to the Adafruit website: 6 pins (no need to repost your own reference)
See the Chinese 'Gree-led'- site WS2812B : 4 pins; see the 144 strip on the adafruit website : 4 pins . I attached a picture from the Adafruit website for your reference.

Anyway, this side-discussion does not help. A video will not demonstrate the issue; it is a long exposure picture that will (see attachement).

I remain open for all suggestions.

Kind regards,

Luc Seyen
Attachments
WS2812 4 pins.png
WS2812 4 pins.png (310.36 KiB) Viewed 6350 times
Flicker WS2812.jpg
Flicker WS2812.jpg (351.77 KiB) Viewed 6350 times
lucs
 
Posts: 12
Joined: Tue May 28, 2013 12:42 pm

Re: PWM of WS2812 5050 RGB LED with Integrated Driver Chip's

by adafruit_support_bill on Thu Oct 24, 2013 6:24 am

@EternalCore - the question is about PWM refresh rate - not connections. The OP's is able to control the strips.

@lucs - I will refer this to our neopixel experts.

adafruit_support_bill
 
Posts: 74337
Joined: Sat Feb 07, 2009 10:11 am

Re: PWM of WS2812 5050 RGB LED with Integrated Driver Chip's

by EternalCore on Thu Oct 24, 2013 10:04 am

lucs wrote:Dear Sir,

Resulting from my research on the internet:

See the Chinese 'Gree-led'-site: WS2811RGB: 6 pins, see the strip on your reference to the Adafruit website: 6 pins (no need to repost your own reference)
See the Chinese 'Gree-led'- site WS2812B : 4 pins; see the 144 strip on the adafruit website : 4 pins . I attached a picture from the Adafruit website for your reference.

Anyway, this side-discussion does not help. A video will not demonstrate the issue; it is a long exposure picture that will (see attachement).

I remain open for all suggestions.

Kind regards,

Luc Seyen

Again WRONG Here's the Datasheets for proof:
NeoPixel Strip 60 1m - WS2812 Datasheet: http://www.adafruit.com/datasheets/WS2812.pdf
NeoPixel Strip 144 1m - WS2812B Datasheet: http://www.mikrocontroller.net/attachme ... minary.pdf

Also We can't tell what the issue is with a picture like that.... A video is required to understand what you are trying to describe.

adafruit_support_bill wrote:@EternalCore - the question is about PWM refresh rate - not connections. The OP's is able to control the strips.

@adafruit_support_bill: I know But I found out with testing the strips that if the grounds aren't connected properly or you have a bad ground wire and or if you have a bad solder connection, it causes delay flickering with the PWM... So connections can affect the pwm speeds.
Things I've Made Here:
1.[101-Help]~12v -> 5v 1.5A Regulated Power For NeoPixels.: http://goo.gl/uMXuk7
2.[Example]NeoPixel Strip Scrolling Cylon Eye!: http://goo.gl/4RzWQQ
EternalCore
 
Posts: 239
Joined: Tue Jul 30, 2013 3:57 pm
Location: Canada

Re: PWM of WS2812 5050 RGB LED with Integrated Driver Chip's

by pburgess on Thu Oct 24, 2013 11:49 am

The refresh rate on all WS281XX LEDs/drivers is around 400 Hz. This is sufficient for "slow" light painting (e.g. walking speed). A light diffuser (such as white acrylic) may help make the PWM dots less visible. Another option is to use only 0% or 100% duty cycles in color selection, but this limits the palette to 8 colors (black (off) included).

For persistence-of-vision and fast light painting rigs, LPD8806 strips or TLC5947-driven LEDs are recommended. These have a refresh rate of 4 KHz -- 10x that of NeoPixels. At very high speeds the same tricks may be required (diffused LEDs, reduced color palette). Beyond that you'd have to custom implement something.

pburgess
 
Posts: 4023
Joined: Sun Oct 26, 2008 2:29 am

Re: PWM of WS2812 5050 RGB LED with Integrated Driver Chip's

by lucs on Thu Oct 24, 2013 2:01 pm

Hello,

Sorry to hear this, certainly after being confirmed two (2) times that the PWM frequency was 100 kHz or 102 kHz (see beginning questions and answers).
It is a pity though; I think the concept really has great potential for specific miniature custom made devices.



Kind regards,

Luc
lucs
 
Posts: 12
Joined: Tue May 28, 2013 12:42 pm

Re: PWM of WS2812 5050 RGB LED with Integrated Driver Chip's

by pburgess on Thu Oct 24, 2013 11:41 pm

We're confusing the semantics of "frequency." I'd interpreted this as PWM clock, which is going to be 255x the PWM interval (for 8-bit brightness as with NeoPixels).

pburgess
 
Posts: 4023
Joined: Sun Oct 26, 2008 2:29 am

Re: PWM of WS2812 5050 RGB LED with Integrated Driver Chip's

by Amardes on Thu Jul 20, 2017 5:27 am

Hi there,
I have exactly the same problem of flickering display in POV.
LED used Ws2812B with freeduino nano
Constructed a 14 LED strip myself and driving it with neopixel arduino library.
I just want to paint 14 color Changing circles
I believe , the driving frequency is 400 KHz
What should be my rpm of the motor to show a non broken complete circle of light?
I am using bldc motor and driving it with not less than 5000 rpm..will post a video tonight...please help..

Amardes
 
Posts: 1
Joined: Thu Jul 20, 2017 5:20 am

Please be positive and constructive with your questions and comments.