Results 1 to 14 of 14

Thread: WS2812B compatible with OctoWS2811 library?

  1. #1
    Junior Member
    Join Date
    May 2013
    Posts
    5

    WS2812B compatible with OctoWS2811 library?

    Anyone know if the new WS2812B strips, from Ray Wu, are compatible with the WS2811 chipset? Meaning should they work out of the box with the brilliant OctoWS2811 library? Apparently this WS2812B chip is an upgraded version of the WS2811. Here are some comments I've found about what's changed with this new version...

    http://doityourselfchristmas.com/for...598#post270598
    http://doityourselfchristmas.com/for...611#post272611

    Note: on this category page for WS2812B products, Ray Wu has four different listings for DMX to SPI products, two of which are listed as ws2801 compatible and two others for ws2811. This leads me to believe that the ws2812B chips are compatible, though I'm also confused as that seems to indicate that the ws2811 and ws2810 are not... so.. huh.

    Side note: this is interesting -> http://www.aliexpress.com/store/prod...825283258.html
    Last edited by featherodd; 06-25-2013 at 08:59 PM.

  2. #2
    Junior Member
    Join Date
    May 2013
    Posts
    5
    It looks like the WS2812 is simply an LED with the WS2811 driver chip built right in(reference), also used in Adafruit's NeoPixel strips. The WS2812B is an upgraded version of the WS2812 LED. This pdf outlines the differences between the two: 4pin opposed to 6, reverse power protection and better overall design that yields higher brightness LEDs, better heat dissipation and better color uniformity. (ref: WS2812 datasheet / WS2812B datasheet)
    Last edited by featherodd; 06-26-2013 at 01:41 AM.

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    4,514
    TL;DR = Odds are good the WS2812B will "just work".


    I've been told the WS2811 means a chip and WS2812 means the LED with the chip mounted inside the LED housing. So what I've normally been calling WS2811 LED strips are really WS2812. I actually heard this from Adafruit a few months ago, so it seems pretty reliable.

    At first, from reading those descriptions, it seemed the WS2812 and WS2812B are exactly the same electronics, just a different LED package optimized for LED strip layout.

    But then I compared the datasheets and noticed the timing parameters T0H, T1H, T0L and T1L are different.

    However, my gut feeling is still these are very likely exactly the same electronics. I believe the WS2812 datasheet numbers are simply wrong. First of all, TH+TL is supposed to equal 1.25 us. However, T0L+T0H is 1.15 us, and T1L+T1H is 1.3 us. Sloppy!

    In writing OctoWS2811, I did a LOT of experimenting with the timing. The waveforms OctoWS2811 actually outputs are actually pretty similar to the WS2812B datasheet. Someday I write a lengthy post about my thoughts on WS2811 timings, but right now I'm going to just focus on other work...

  4. #4
    Senior Member
    Join Date
    Jun 2013
    Location
    Orange County California
    Posts
    123
    This is an old thread but I haven't seen anyone else respond so I thought I'd reply for posterity -- I've got an array of 8x48 WS2812Bs running through OctoWS2811 and everything is working as expected.

  5. #5
    Junior Member
    Join Date
    Sep 2013
    Location
    Shenzhen China
    Posts
    1
    Hope all of us have a good day!

    This is Spring from shenzhen Worldsemi Technology Co.,Ltd.Thank you for your suooprt!

    Since you are familiar with our products.Hope we can have good cooperation in th future!

    We are professional manufacturer of LED full color strip,LED point light,LED modules,LED control

    system,DMX related products,LED driver IC of WS2801,WS2811,WS2812,WS2812B series,etc.

    We have strong R&D team,can provide the full dimensional technical support with you,OEM&ODM are all welcome!

  6. #6
    Junior Member
    Join Date
    Dec 2013
    Location
    Minnesota
    Posts
    14
    I have a few WS2812B strips (Thank you Ray Wu!). The Simple Red, Green Blue code works fine, I'm getting some flickering running in high-speed mode (800khz) It is more prominent later in my chain, usually at or after pixel 60 (120px in the chain), and more evident when I'm using blended colors like orange or pink in the demo sketch.

    My strips are very smooth running at 400khz though. I do think there are subtle issues with timing, but I don't have access to an oscilloscope at the moment to debug the timings. I think that the 137hz that Is theoretically possible with the low speed mode (400khz) will work for my project 120pixels 30s + 50s = 3.65ms = 274fps or 137fps

    Also for reference the Adafruit NeoPixel library with an Arduino Uno works well at 800khz with my strips.



    WS2811 (http://www.adafruit.com/datasheets/WS2811.pdf):
    T0H 0 code,high voltage time 0.5 s 150ns
    T1H 1 code,high voltage time 1.2 s 150ns
    T0L 0 code,low voltage time 2.0 s 150ns
    T1L 1 code,low voltage time 1.3 s 150ns
    RES low voltage time Above 50s

    WS2811 high speed mode:
    T0H 0 code,high voltage time 0.25 s 150ns
    T1H 1 code,high voltage time 0.6 s 150ns
    T0L 0 code,low voltage time 1.0 s 150ns
    T1L 1 code,low voltage time 0.65 s 150ns
    RES low voltage time Above 50s


    WS2812 (http://www.adafruit.com/datasheets/WS2812.pdf):
    T0H 0 code ,high voltage time 0.35s 150ns
    T1H 1 code ,high voltage time 0.7s 150ns
    T0L 0 code , low voltage time 0.8s 150ns
    T1L 1 code ,low voltage time 0.6s 150ns
    RES low voltage time Above 50s


    WS2812B (http://www.mikrocontroller.net/attac...liminary.pdf):
    T0H 0 code ,high voltage time 0.4s 150ns
    T1H 1 code ,high voltage time 0.8s 150ns
    T0L 0 code , low voltage time 0.85s 150ns
    T1L 1 code ,low voltage time 0.45s 150ns
    RES low voltage time Above 50s


    I don't really understand it but this PDF (http://www.rgb-123.com/files/WS2812B_VS_WS2812.pdf) expands slightly on the 'internal signal reshaping aplification circuit'.

    Anyone have some better settings that work better for the WS2812Bs at 800KHZ?
    #define WS2811_TIMING_T0H 60
    #define WS2811_TIMING_T1H 176

    (BTW, good job on the Library!)

  7. #7
    Are you sure it's a timing issue? I ask because after fixing a variety of flicker issues in my ~4500 LED setup, I still have a couple stubborn strips that flicker under certain circumstances, including the pinkish range of colors in the rainbow demo, just as you describe.

    My experience (so far) has been that the primary sources of flicker have been:
    • grounding issues of many types:
      • I had better luck powering the teensies off USB but still grounding the teensy to the GND of the supply powering the strips
      • in some cases, grounding DOUT at the "far" end of the strips to the teensy GND helped. However, in just as many cases, it also made things much worse! In all cases, it turned out that something else was the actual root cause, and grounding DOUT was just changing which strips were exhibiting symptoms.
      • grounding was never an issue if I was only using one power supply
    • low voltage issues caused by distance between PSU and strips (the 2812B seems to tolerate MUCH lower voltages than 2811 and 2812, as over 1/3 of my strips are flicker-free even at 3.9V)
    • signal strength and quality (cleaned up by adding 74HCT245 transceiver and 100 Ohm resisters on its output pins)


    My wife got me a Rigol scope as an early xmas gift and assuming I can figure out how to use it, I hope to do some deeper diagnosis this weekend. If I find anything I'll certainly post back and let you know. In the mean-time, you may find that

  8. #8
    Junior Member
    Join Date
    Dec 2013
    Location
    Minnesota
    Posts
    14
    Quote Originally Posted by ColinHarrington View Post
    Anyone have some better settings that work better for the WS2812Bs at 800KHZ?
    #define WS2811_TIMING_T0H 60
    #define WS2811_TIMING_T1H 176
    I played around with different values, I was able to get a little less flicker, but I haven't eliminated it yet :-/ Oh and it was easy to get more flickering too.

    I'm guessing that configuring those timing pieces is only one piece of the puzzle.

    I noted that the colors seemed to shift a little bit down the chain like the overall timing got misaligned.

  9. #9
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    4,514
    I would not recommend changing the default timing. Of course, you probably won't damage anything. It's simply not a productive path to follow.

    If you're getting intermittent problems part way down a long strip, and especially problems that change depending on the colors or number of LEDs on, you've almost certainly got a grounding problem, perhaps power supply issues too?

    Part of the issue is the lower 3.3V signal. The WS2811 logic threshold can be close to 3 volts, so there's very little extra voltage margin for noise. If the ground shifts (and the delta in ground voltage changes with color/power), that shifts the voltages those WS2811's are seeing.

    Arduino Uno outputs a 5 volt signal, so there's a lot more margin for voltage drops that cause the signal to be read differently. Uno also can only output a single signal, so cross coupling from the other 7 signals is not an issue.

    Using a 74HCT245 buffer almost always helps. Getting the signal up to 5 volts buys you a lot of resilience to problems. Adding 100 ohm resistors between the '245 output pins and the wires also helps.

    Bigger and shorter wires for power and ground also help. Of course, there's a point of diminishing returns. One simple test is to turn all your LEDs on fully white. Measure the DC voltage right at the power supply, then at the inputs to the LED strips, and then at the outputs. Each will be lower, because wires have finite resistance. A good goal is at least 4.9 volts at the power supply, at least 4.8 volts at the input to the LED strip, and no less than 4.6 volts at the output. If you measure less than 4.5 volts anywhere, you're technically running those WS2811 chips under their rated voltage for proper operation.

    You may be tempted to increase the voltage. DO NOT. First, if you're using 3.3 volt signals, more voltage will scale up the WS2811's logic high threshold, giving you less noise margin. It also causes more heating in the LED packages, since the current remains the same. If you have the LEDs inside water-resistant silicone tubing, they can get very hot. Bigger & shorter wires are the solution to voltage loss issues.

  10. #10
    Quote Originally Posted by ColinHarrington View Post

    I noted that the colors seemed to shift a little bit down the chain like the overall timing got misaligned.
    Ahh.. if you're seeing color shift on later pixels I'm almost positive you've got power issues. If you display full-white and you see that later LEDs are a "warmer" color temperature, then that's because the red LED has lower power requirements than blue or green. The color shift is because the later LEDs are power-starved. This would also introduce flicker at the end of the strip.

    At 120 LED's per chain, you'll definitely need to apply power at both ends if you aren't already.

  11. #11
    Junior Member
    Join Date
    Dec 2013
    Location
    Minnesota
    Posts
    14
    Quote Originally Posted by tetsuo View Post
    At 120 LED's per chain, you'll definitely need to apply power at both ends if you aren't already.
    Awesome, I was planning on doing this in the final mounting anyway!

  12. #12
    Junior Member
    Join Date
    Dec 2013
    Location
    Minnesota
    Posts
    14
    Quote Originally Posted by PaulStoffregen View Post
    Part of the issue is the lower 3.3V signal. The WS2811 logic threshold can be close to 3 volts, so there's very little extra voltage margin for noise. If the ground shifts (and the delta in ground voltage changes with color/power), that shifts the voltages those WS2811's are seeing.

    Arduino Uno outputs a 5 volt signal, so there's a lot more margin for voltage drops that cause the signal to be read differently. Uno also can only output a single signal, so cross coupling from the other 7 signals is not an issue.

    Using a 74HCT245 buffer almost always helps. Getting the signal up to 5 volts buys you a lot of resilience to problems. Adding 100 ohm resistors between the '245 output pins and the wires also helps.
    I've actually picked up the buffer chip and am using it, also 220 ohm resistors.
    Here are some pictures of my board: https://plus.google.com/+ColinHarrin...ts/4bzKkb6FYjJ


    Quote Originally Posted by PaulStoffregen View Post
    Bigger and shorter wires for power and ground also help. Of course, there's a point of diminishing returns. One simple test is to turn all your LEDs on fully white. Measure the DC voltage right at the power supply, then at the inputs to the LED strips, and then at the outputs. Each will be lower, because wires have finite resistance. A good goal is at least 4.9 volts at the power supply, at least 4.8 volts at the input to the LED strip, and no less than 4.6 volts at the output. If you measure less than 4.5 volts anywhere, you're technically running those WS2811 chips under their rated voltage for proper operation.

    You may be tempted to increase the voltage. DO NOT. First, if you're using 3.3 volt signals, more voltage will scale up the WS2811's logic high threshold, giving you less noise margin. It also causes more heating in the LED packages, since the current remains the same. If you have the LEDs inside water-resistant silicone tubing, they can get very hot. Bigger & shorter wires are the solution to voltage loss issues.
    I've picked up some heavier wire for the final mounting. I've acquired 2x 26a Meanwell 5v power supplies that I'm using. Thank you for the input/output threshold numbers!

  13. #13
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    4,514
    Quote Originally Posted by ColinHarrington View Post
    I've actually picked up the buffer chip and am using it, also 220 ohm resistors.
    The resistors go between the buffer chip and the long wires, not between the Teensy and buffer chip.

  14. #14
    Junior Member
    Join Date
    Dec 2013
    Location
    Minnesota
    Posts
    14
    Quote Originally Posted by PaulStoffregen View Post
    The resistors go between the buffer chip and the long wires, not between the Teensy and buffer chip.
    Thanks for the tip :-) Putting the resistors after the buffer chip makes sense to me now. With my setup I've tried 220, 440 and 470 ohms. 440 seems to be the best at this point until I can get my hands on an Oscilloscope. I have a barely noticeable occasional flicker with the 470ohm resistors at 800khz (fast mode) and am still going to fine tune this.

    Another source of flicker:
    I bought the Silicone covered LED strips. In order to solder them I had to remove some of the silicone. I did this with an Xacto knife. A few of the strips I had scratched into the surface of the LED strip causing some apparent attenuation that flickered strangely on downstream pixels. This was made worse when I touched the Aluminum housing. I like the effect that I get with the silicone, but I think I'd get the covered or bare versions next time.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •