Am having Trouble Setting up ws2811's on a strip.

Am having Trouble Setting up ws2811’s on a strip. The Sample code Shows weird flickering. I am very new to this and Arduino and have no idea what might causes this.
I simply typed the following lines:

#include “FastSPI_LED2.h”
#define NUM_LEDS 60
CRGB leds[NUM_LEDS];
void setup() {
delay(2000);

LEDS.setBrightness(64);

 LEDS.addLeds<WS2811, 11>(leds, NUM_LEDS);

}
void loop() {
LEDS.showColor(CRGB::Red);
}
This is the result:
Also note that the first LED is not on.

What kind of power supply are you using to drive the LEDs? With 60 LEDs you’ll potentially need > 3.6 Amps.

Um … something doesn’t make sense (or I haven’t had enough wine yet) but your code is supposed to set the strip to full red. Yet your picture shows a pattern of magenta, yellow, cyan … Is there any chance you can capture an actual video clip? And also, what Tod mentioned above. At 60 LED, all red, that’s roughly 60 x 20mA = 1.2A (Tod’s number is from adding all three channels together), although since you’re lowering the brightness by 4, that’s only 300mA consumption. Still. You want to power them separately with a common ground to the controller.

On the bottom it says:
3-12V (I used 4.5V because the next higher one is 6V and the LEDs Need 5)
max 1.5A(9VA)

If it says up to 12V, that means you can safely feed it up to 12V, regardless of what the LEDs need. It would indicate that the manufacturer put components in place to clamp the voltage needed for the LEDs and drivers. Possibly a simple zener like on the LPD8806 strip that I have.

The max 1.5A is somewhat puzzling. Max based on what? Length? Amount of LEDs on?

No, you miss understand me.
I bought a Strip and I have a power supply that is neither from the same manufacturer nor made essentially for LED’s. I’ll post the Video and a Picture of the power supply

The power supply doesn’t need to be either of those. As long as it can provide a voltage anywhere between 3-12V and a sufficient amount of current, you’re fine.

So if those values you gave above are the power supply, go ahead and boost it up to 6V (or even 9V). If it can only provide up to 1.5A, you’re going to need another one. Try an old computer power supply, use the 5V rail. Those things provide a wallop of current.

Actually, at 1.5A, you should be able to get no more than two channels lit at full brightness say red and green, red and blue, or green and blue. Or all three at 1/4 brightness (so at a level = 64). But certainly raise the voltage.

i’ll upload the vid tomorrow thank you so far

Something else to try is to slow the dataRate down. Look at the other sample lines in the example sketch.

dataRate is only meaningful for SPI based chipsets (LPD8806, WS2801) - chipsets like the ws2811, tm1809, etc… don’t use the data rate.

My experience with multi-voltage power supplies is that when they say they put out a max of 1.5A, that’s at one of the voltages, but at other voltages, the amperage output will be even lower, so my suspicion is that the power supply isn’t quite enough.

Also - I have sometimes found that the ws2811 needs to be grounded at the other end.

Actually, that raises an interesting possibility - if you are using a separate power supply for the leds, you should be running two grounds to the led strip, one from the power supply, and one ground from the controller. I have found that not supplying a ground the the controller as well can mess up the data output.

I have the LEDs connected to the power supply ( + & - ) and the controller runs over USB. So they both should have their own gnd.
You say the power supply might not be “strong” enough for that much LEDs, so just using a few of them should work by setting NUM_LEDs to let’s say 20.
another thing that I’m not quite sure about is the circuit I’m using in order to safe the Arduino. I’m using an opto-coupler and a transistor but I already asked other people about it and they say I did it right. Video is following

You need to connect the controller ground to the strip ground. Failing to do that will cause all kinds of fun issues with the strip. Take an extra piece of wire and tie the controller ground to the ground on the power supply driving the LEDs.

I tried it, but the result is even worse. The first few LEDs seem to randomly choose a Color when reconnecting the ground. But what I really wonder is why the pattern is always the same.

OK, let’s rewind here. How exactly do you have the strip connected to the controller. What controller is it? And just to be sure, you are absolutely sure this is a WS2811/12 strip, yes?

I wasted half a day not getting the ground connection correct, symtoms looked very similar from what i can see in your picture, have a look at this for how to connect ground: http://learn.adafruit.com/digital-led-strip/wiring

Ok, I’ll put some pictures together, gimme a sec

Wait - where are you using an opto-coupler and transistor? The WS2811 and friends are very sensitive to the incoming signal - most people wire the data pin from their arduino directly to data on the ws2811 strip (as well as ground from arduino to ground on the strip, in addition to ground from power to ground on the strip).

This is why I asked for details on how things are wired up. Not sure why there’s a need for a coupler here but then I can’t guess his setup …

A schematic would be very helpful here.