Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 8 of 8

Thread: Library for multiple strips of SK6812 RGBW leds

  1. #1
    Junior Member
    Join Date
    Dec 2018
    Posts
    11

    Library for multiple strips of SK6812 RGBW leds

    Can anyone recommend a library that can power 8 - 10 strips of SK6812 RBGW LEDs? It is in a residential application so the Warm White is aesthetically important. I have prototyped with the NeoPixel library, but that can only power 1 strip. Here are the specs of the physical project:
    LEDs SK6812 in RBGW
    58 meters
    10 strips (I could bring the number of distinct strips down if that is a limitation)
    3487 leds (this is approximate because I have not done the final install)
    The specific leds are these: https://www.aliexpress.com/item/32878136317.html

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    23,743
    Maybe use Teensy 4.1 and 8 instances of WS2812Serial.

    OctoWS2811 currently only supports RGB.

  3. #3
    Junior Member
    Join Date
    Dec 2018
    Posts
    11
    I have been able to nail down a single instance of WS2812Serial, but how can I run multiple? Is that even possible with the Arduino setup, loop framework?

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    23,743
    Multiple instances of WS2812Serial are possible. Just make sure each is assigned to a pin that's actually a unique port.

    Just yesterday I finally added RGBW support to OctoWS2811. On Teensy 4.x, you can use any group of pins, even if more or less than 8. So OctoWS2811 could probably now meet your needs, if you grab the latest code from github. Or wait about a week for 1.54-beta6 if you want an easy installer.

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    23,743
    Just to explain a bit further, to use multiple instances of WS2812Serial, at the top of your program would do something like this:

    Code:
    const int numled1 = 50;
    const int pin1 = 1;
    byte drawingMemory1[numled*4];         //  4 bytes per LED for RGBW
    DMAMEM byte displayMemory1[numled*16]; // 16 bytes per LED for RGBW
    WS2812Serial leds1(numled1, displayMemory1, drawingMemory1, pin1, WS2812_GRBW);
    
    const int numled2 = 80;
    const int pin2 = 8;
    byte drawingMemory2[numled*4];         //  4 bytes per LED for RGBW
    DMAMEM byte displayMemory2[numled*16]; // 16 bytes per LED for RGBW
    WS2812Serial leds2(numled2, displayMemory2, drawingMemory2, pin2, WS2812_GRBW);
    
    const int numled3 = 45;
    const int pin3 = 14;
    byte drawingMemory3[numled*4];         //  4 bytes per LED for RGBW
    DMAMEM byte displayMemory3[numled*16]; // 16 bytes per LED for RGBW
    WS2812Serial leds3(numled3, displayMemory3, drawingMemory3, pin3, WS2812_GRBW);
    Hopefully this is not too difficult to understand. Just duplicate all the instance info for each LED strip. You must assign a unique serial pin to each instance, so each uses its own hardware resources.

    Then in setup:

    Code:
    void setup() {
      leds1.begin();
      leds2.begin();
      leds3.begin();
    }
    As you change the LEDs, you can call each instance's show() function when you want it to update. Because show() is non-blocking, if you call them all like this:

    Code:
    void loop() {
      // draw something
      leds1.show();
      leds2.show();
      leds3.show();
      delay(33); // approx 30 Hz refresh rate
    }
    All 3 will transmit data at the same time.

  6. #6
    Junior Member
    Join Date
    Dec 2018
    Posts
    11
    Thank you for taking the time to explain it to me. I did see the latest commit to OctoWS2811, git cloned it to my Arduino library and successfully tested it on a single strip of SK6812 RGBW. Tomorrow I will test it on multiple strips and adjust the number of strips. I'll let you know how that goes. LMK if there is anything specific you would like me to test.

  7. #7
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    23,743
    Curious to hear how it goes. You very well may be the 2nd person in the whole world to try the brand new RGBW code.

    I ran many tests here, but all were focused on testing the software rather than building a real LED project.

  8. #8
    Junior Member
    Join Date
    Dec 2018
    Posts
    11
    Thanks for the update to Octo, Paul. I have been able to drive up to 8 RGBW strips with 240 leds each. I have found that there is a limit on the number of strips at 8 (only with 4 channel, 3 channel, eg RBG, works great with all the front side digital PWM pins flashing), which I carefully wrote up here: https://forum.pjrc.com/threads/65940...hen-using-GRBW
    I am continuing on my journey, but I will need 12 strips due to the physical constraints of the strip location. I am currently researching solutions or alternatives. I would love to know if that limitation has an easy fix or if that is going to be the limit for the foreseeable future.

Posting Permissions

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