Leds colors flickering

Hello everyone, it’s my first project with Arduino

I have a strip of leds ws2812 12V that I connect to my pin number 6 , I have a 2200 uF 25V capcacitor and I thought it would fix the problem of the leds flickering but it has not.

My basic code for now would have the leds turn on white and not any other color,

#include <FastLED.h>

#define num_leds 60
#define pin 6
#define brightness 120   // can set 0-255
#define sensitivity 5     // can set 0-10, recommended at 5

CRGB leds[num_leds];

void setup() {
  FastLED.addLeds<WS2811, pin, GRB>(leds, num_leds);
  FastLED.setBrightness(brightness);
}

void loop() {

   for (int z = num_leds; z > 0; z--) {
    leds[z] =  CRGB::White ;;
  }
  FastLED.show();
  delay(3000); 
}

My Schematic are attached as a png to this post and would look someting like that without the resistor yet (could it be the source of the problem ?)

The main problem is that other colors come and go (purple, yellow, blue ) when my script is supposed to display white and only white light


Seems to be a chunk missing! :astonished:

12 V on the 5 V line isn't so great either!

!

Paul__B:


Seems to be a chunk missing! :astonished:

12 V on the 5 V line isn't so great either!

Sorry Paul B it's a schematic I got from another post and thougth I would use because it looked like what I was trying to do.

My Led strip is indeed 12V and connected to a 12V outlet, for the chunk missing I removed because from the instructions I had I was no supposed to use the 5V and the arduino gnd.

I do have common ground though

ws2812 12V

ws2812 is 5V not 12V. Are you certain it is ws2812?

FastLED.addLeds<WS2811

Your code says ws2811. These are often 12V

@PaulRB

The WS2812's I have are all 5 volt and listed as such too !

Bob.

PaulRB:
ws2812 is 5V not 12V. Are you certain it is ws2812?

FastLED.addLeds<WS2811

Your code says ws2811. These are often 12V

Yes sorry I am doing this project with a partner and it is indeed Ws2811 12V, (he is the one who bought the led strip)

How long is the strip? I am working with WS2811 (12V) Strings and when the voltage on the far-end is below 6V, I start to get flickering and inconsistent colors.

SteveMann:
How long is the strip? I am working with WS2811 (12V) Strings and when the voltage on the far-end is below 6V, I start to get flickering and inconsistent colors.

Quite long, I usually work with the whole strip but only light about 60 or so in my script, Are the 200+ not being lit still draining volts ?

A very little, yes. When not lit, they consume around 1mA each. So 200 not lit is equivalent to 6 or 7 lit at max brightness white.

ballscrewbob:
The WS2812's I have are all 5 volt and listed as such too !

Mine too, Bob. What point are you making?

without the resistor yet (could it be the source of the problem ?)

Yes, it could be. One of the things that resistor does is help protect the data signal from errors caused by reflections/echoes in the signal.