Weird issues at controlling leds

Hi,

I have noticed some issues by controlling leds

I have a matrix of leds 9*7, see the pic bellow

Here is the code i’m executing.

#include <FastLED.h>

//TEENSY 2.0 PINS
#define DATA_PIN 2
#define CLOCK_PIN 1

#define NUM_LEDS 63
CRGB leds[NUM_LEDS];

void led_set_color_strip( int Red, int Green, int Blue )
{
  int i;
  for ( i=0 ; i<NUM_LEDS ; i+=1)
  {
    leds[i] = CRGB( Red, Green, Blue), delay(100), FastLED.show();
    leds[i] = CRGB( Red, Green, Blue)            , FastLED.clear();
  }
}

void setup() 
{
  // put your setup code here, to run once:
  FastLED.addLeds<WS2801, RBG>(leds, NUM_LEDS);
  led_set_color_strip(0,0,255);

}

void loop() 
{
  // put your main code here, to run repeatedly:

}

I go throught all led, turning them on then off one by one. Working.

Now if i want all the led to be turned on at the same times, will not work. Colors are not respected, it flashes, and not all the leds are lighted up, it stops like half the way maybe less, depends in matter fact, its pretty random.

#include <FastLED.h>

//TEENSY 2.0 PINS
#define DATA_PIN 2
#define CLOCK_PIN 1

#define NUM_LEDS 63
CRGB leds[NUM_LEDS];

void led_set_color_strip( int Red, int Green, int Blue )
{
  int i;
  for ( i=0 ; i<NUM_LEDS ; i+=1)
  {
    leds[i] = CRGB( Red, Green, Blue), delay(100), FastLED.show();
    //leds[i] = CRGB( Red, Green, Blue)            , FastLED.clear();
  }
}

void setup() 
{
  // put your setup code here, to run once:
  FastLED.addLeds<WS2801, RBG>(leds, NUM_LEDS);
  led_set_color_strip(0,0,255);

}

void loop() 
{
  // put your main code here, to run repeatedly:

}

What do you think the problem could be ?
-The PSU is 5V 8A so should manage 63 LEDS easy.
-Wiring problem

Kind regards.

Have you got a large capacitor across the strip's supply? Does it have a common ground to the Arduino? Have you got a seriese resistor in the strip's data line? Lack of one or more of these things can give you this trouble.

Try:

void led_set_color_strip( int Red, int Green, int Blue )
{
  int i;
  for ( i=0 ; i<NUM_LEDS ; i+=1)
  {
    leds[i] = CRGB( Red, Green, Blue);
  }
  FastLED.show();
}

Only 18/63 LEDs are lighting up =(

As Mike mentioned: is your cct. similar to this?

anonymousse37: Only 18/63 LEDs are lighting up =(

Which 18?

I mean the first 18/63 leds.

Yes except i do not have the resistance nor the capacitor.

It might be the problem ?

My ambilight was working with 150 Leds and i never had this issue. No resistance, no capacitor.

Does it feet ? https://www.amazon.fr/gp/product/B00GONYALM/ref=ox_sc_act_title_1?smid=A368I6KXHKTBPA&psc=1 https://www.amazon.fr/gp/product/B01JU9T2NW/ref=ox_sc_act_title_2?smid=A2Q05A87W9HIAW&psc=1

Any idea what i require to fix properly the teensy 2.0 to a breadboard ? https://www.amazon.fr/Neuftech%C2%AE-Breadboard-Solderless-Compatible-puissance/dp/B00QV7NXCS/ref=sr_1_5?ie=UTF8&qid=1494878124&sr=8-5&keywords=breadboard

Thank you for your help.

anonymousse37: My ambilight was working with 150 Leds and i never had this issue. No resistance, no capacitor.

Maybe you were lucky before. There is no point wasting time trying find other causes of your problems until you have added the cap and resistor.

anonymousse37: Does it feet ?

Feet?

Please read the "please read" post to find out how to post links correctly on this forum.

anonymousse37: Any idea what i require to fix properly the teensy 2.0 to a breadboard ?

Solder some pcb header pins to the teensy.

Meant fit not feet xD I tried to solder once and i burnt the teensy's pcb =) What tools should i use to do so ? Maybe my soldering tools were inapropriates.

Like this.

I use a 1mm tip on a temp controlled iron and 0.5mm solder wire.

humm well done. Do you the "english name" for the "pin strips" i have to search for ? I dont have this anymore and i need to buy some more xD

Like I said, "PCB Header Pins"

oh my bad ty

Hi,

Where can i compute the right values for the resistance and the capacitor since its working on 5V DC, 63 Ws2801 LEDS in series = 2.709 A ?

Kind regards.

63 Ws2801 LEDS in series

Really?

If you had 63 LEDs in series each one taking 20mA the whole lot would take, well, 20mA. However with 2.0 Volts across each LED then you would need 126 Volts at least.

What i was asking is how i get the right value in Ohm for the resistance and Farads for the capacitor according to my setup ?

The exact values are not critical. For the resistor, perhaps 220R or 330R. Anything from 100R to 1K should be fine. For the cap, because you have 63 leds, I would use at least 470uF, preferably 1000uF.

OK thank you mate. Gonna buy the resistance and capacitor tomorrow and sould be delivered tomorrow aswell for the breadboard. Hope it gonna fix it.

Is the resistance only required for the DI line cuz on WS2801 there is a DI line too ?

Please re-phrase your question.

Only one resistor is needed...