WS2812B 144 led/metre support

I’m using 3 strips of WS2812B addressable LEDs in my PC build - all controlled via a single BlinkStick device, and powered by a dedicated +5V rail from the PC PSU.

These strips are broken into 3 sections:

Section 1 (R Channel) 60 led/m - 27 led strip - approx. max. 1.35A draw.
Section 2 (G Channel) 144 led/m - 51 led strip (in 3 parts) - approx. max. 2.55A draw.
Section 3 (B Channel) 144 led/m - 52 led strip (in 3 parts) - approx. max. 2.6A draw.

And … I’m having some very strange behaviour!

Section 1 is working absolutely fine.

Section 2 - works If I send Red or Green colour only, if I send combined I get Red only. Blue doesn’t work at all!

Section 3 - is working fine but only for the first part. The joints in this part look sound, so it would strange if this were an issue.

These are connected to a Corsair RM750 PSU, which has a max load of 25A on the 5V rail, so “dodgy power supply” can pretty much be eliminated here.

I’m at a loss. Has anybody witnessed similar behavour running off a PC power supply? How can I fix this?! Help!!

The only time I’ve seen this type of issue is when power supply wasn’t capable of supplying enough power to the LEDs, but your PSU seems solid.

Did you try to swap section and see if the behavior is the same?

Would you be able to provide schematics of how you connected everything together?

What software are you using to control BlinkStick?

Hi arvydas, thanks for the reply - I’ll play with the setup tonight and see if I can get any results from switching channels / PSU.

The schematics are pretty simple, I have a common ground (also connected to the blink stick) and then a shared +5V pin from the PSU going directly to each strip, and then the control signal from each strip goes to R/G/B on the stick. I’ve written my own software controller using the C# libraries, and I’m conscious of sending commands in “blocks” rather than individually as I know this has caused issues in the past with the WS2812B strips for another user of this forum.

Are you using this library to control BlinkStick?

Yeah that’s the one!

Okay, I’ve now tried with a new PSU (Cooler Master 700W) there’s nothing else connected to this PSU, it’s being used purely for the LEDs, and still getting the same issue.

No matter what channel I connect the LEDs to, they keep their behaviour - i.e. section 2 only works with R/G when connected to any channel (R/G/B), and section 3 only lights up 1/3 no matter where it’s connected…Seems very strange?

Would you be able to post a code sample you are sending to the LEDs?

I’m effectively doing:

    public byte[] CreateByteArray(Color color) {
        byte[] data = new byte[3];
        Array.Resize(ref data, LEDCount * 3);
        for (int i = 0; i < LEDCount; i++)
        {
            data.SetColour(i, color);
        }
        return data;
    }

Where “SetColour” is an extension of a Byte Array:

public static void SetColour(this byte[] data, int index, Color color) {
    data[index * 3] = color.G;
    data[(index * 3) + 1] = color.R;
    data[(index * 3) + 2] = color.B;
}

This is then consumed like:

BlinkStick.SetColors(Channel, CreateByteArray(newColour));

Hope this helps! It’s hard to post a full sample as everything is heavility object-oriented.

Hey arvydas,

Any news?

Here’s a video demonstrating the issue with section 3:

Really eager to get this all up and running so I can put the project to bed, so if you have any ideas please let me know :smile:

Cheers,
Dan

Okay, got some more (hopefully useful!) information.

I’ve now written a stand alone LED tester, the code is just:

namespace LEDTester
{
using System;
using BlinkStickDotNet;
using System.Drawing;
class Program
{
    static void Main(string[] args)
    {

        byte[] TestChannels = new byte[] { 0, 1, 2 };

        Console.WriteLine("Connecting to BlinkStick device...");

        BlinkStick device = BlinkStick.FindFirst();
       
        if (device == null)
        {
            Console.WriteLine("ERROR: Could not find device.");
        }
        else 
        {
            device.SetMode(2);
            WriteGreenText(String.Format("Connected to device '{0}'" + Environment.NewLine, device.Serial));
            if (device.OpenDevice())
            {
                Console.WriteLine("Turning off LEDs on all channels");
                foreach (byte channel in TestChannels)
                {
                    Console.Write("Channel" + channel + "...");
                    device.SetColors(channel, CreateByteColourArray(Color.Black));
                    Console.Write(" OK" + Environment.NewLine);
                }
                foreach (byte channel in TestChannels)
                {
                    Console.WriteLine(Environment.NewLine + "Testing Channel" + channel + " ... ");
                    WriteGreenText("Test #1 Solid Colour Test.");
                    Color[] Test = new Color[] { Color.Red, Color.Green, Color.Blue, Color.White };
                    foreach (Color ToTest in Test) {
                        Console.Write(ToTest.ToString() + " ");
                        device.SetColors(channel, CreateByteColourArray(ToTest));
                        System.Threading.Thread.Sleep(2000);
                    }
                    WriteGreenText(Environment.NewLine + "All Colours tested.");
                    device.SetColors(channel, CreateByteColourArray(Color.Black));
                    WriteGreenText("Test #2 Single Colour Pixel Test.");
                    foreach (Color ToTest in Test)
                    {
                        Console.Write(ToTest.ToString() + " ");
                        for (int f = 0; f < 64; f++) {
                            Console.Write(f + ",");
                            device.SetColors(channel, CreateByteColourArray(ToTest, f));
                            System.Threading.Thread.Sleep(100);
                        }

                        Console.Write(Environment.NewLine);
                    }

                    WriteGreenText(Environment.NewLine + "All Colours tested.");
                    device.SetColors(channel, CreateByteColourArray(Color.Black));
                    System.Threading.Thread.Sleep(1000);
                }

            }
            else {
                Console.WriteLine("ERROR: Could not open device.");
            }
            
        }

        Console.ReadLine();
    }
    static void WriteGreenText(string info) {
        Console.ForegroundColor = ConsoleColor.Green;
        Console.WriteLine(info);
        Console.ResetColor();
    }
    static byte[] CreateByteColourArray(Color color, int SingleColourPixel = -1) {
        int NumLEDs = 64;
        byte[] data = new byte[3 * NumLEDs];
        for (int c = 0; c < NumLEDs * 3; c+=3)
        {
            if (SingleColourPixel == -1)
            {
                data[c] = color.G;
                data[c + 1] = color.R;
                data[c + 2] = color.B;
            }
            else {
                byte n = 0;
                data[c] = (c / 3) == SingleColourPixel ? color.G : n;
                data[c + 1] = (c / 3)== SingleColourPixel ? color.R : n;
                data[c  + 2] = (c / 3) == SingleColourPixel ? color.B : n;
            } 
        }
        return data;
    }
}
}

if I run this on my system I get the following results:


(sorry for rubbish quality. hope you can make it out!

If you’d like me to test anything else please let me know.

1 Like

I just ran your code on my test system with 8x8 LED matrices and I didn’t notice any issues so the code seems to be correct. Are you absolutely sure that the connections on the LED strips are OK? It does seem that BlinkStick does not send the color to the strips where you have cut them. Have you isolated the connections to make sure that they do not touch the case? Also when you soldered the connection, did you make sure that the IN-OUT sequence is correct?

the ws2812b led·s blue color chip is broken,
change the leds, they may work again,