Hi everybody, Two-fold question: I've got 8 NeoPixel strips of 3 pixels each,

Hi everybody,

Two-fold question: I’ve got 8 NeoPixel strips of 3 pixels each, all on their own PWM pins. I’ve put part of the ColorPalette sketch into the MultipleStripsInOneArray sketch. All the latest software. All on a Mega.

It is doing mostly what I want as long as I don’t run more than 4 of the strips. As soon as I try to load 5 or more in the sketch, all the colors just turn to green and blue. If I only run 4 or less, I get the full rainbow.

#include “FastLED.h”

#define NUM_STRIPS 8
#define NUM_LEDS_PER_STRIP 3
#define NUM_LEDS NUM_LEDS_PER_STRIP * NUM_STRIPS
#define BRIGHTNESS 64
#define LED_TYPE WS2811
#define COLOR_ORDER GRB

CRGB leds[NUM_STRIPS * NUM_LEDS_PER_STRIP];

CRGBPalette16 currentPalette;
TBlendType currentBlending;

#define UPDATES_PER_SECOND 100

void setup() {

FastLED.addLeds<NEOPIXEL, 2>(leds, 0, NUM_LEDS_PER_STRIP);

FastLED.addLeds<NEOPIXEL, 3>(leds, NUM_LEDS_PER_STRIP, NUM_LEDS_PER_STRIP);

FastLED.addLeds<NEOPIXEL, 4>(leds, 2 * NUM_LEDS_PER_STRIP, NUM_LEDS_PER_STRIP);

FastLED.addLeds<NEOPIXEL, 5>(leds, 3 * NUM_LEDS_PER_STRIP, NUM_LEDS_PER_STRIP);

delay( 3000 ); // power-up safety delay
FastLED.addLeds<LED_TYPE, COLOR_ORDER>(leds, NUM_LEDS).setCorrection( TypicalLEDStrip );
FastLED.setBrightness( BRIGHTNESS );

currentPalette = RainbowColors_p;
currentBlending = BLEND;

}

void loop() {

static uint8_t startIndex = 0;
startIndex = startIndex + 1; /* motion speed */

FillLEDsFromPaletteColors( startIndex);

FastLED.show();
FastLED.delay(833 / UPDATES_PER_SECOND); // Scroll speed in milliseconds
}

void FillLEDsFromPaletteColors( uint8_t colorIndex)
{
uint8_t brightness = 255;

for( int i = 0; i <3; i++) {
leds[i] = ColorFromPalette( currentPalette, colorIndex, brightness, currentBlending);
colorIndex += 8; // Color segment size
}
for(int i = 3; i < NUM_LEDS-1; i++) {
leds[i] = ColorFromPalette( currentPalette, colorIndex, brightness, currentBlending);
colorIndex += 8; // Color segment size
}
}

The above works, but if I add:

FastLED.addLeds<NEOPIXEL, 8>(leds, 4 * NUM_LEDS_PER_STRIP, NUM_LEDS_PER_STRIP);

FastLED.addLeds<NEOPIXEL, 9>(leds, 5 * NUM_LEDS_PER_STRIP, NUM_LEDS_PER_STRIP);

FastLED.addLeds<NEOPIXEL, 10>(leds, 6 * NUM_LEDS_PER_STRIP, NUM_LEDS_PER_STRIP);

FastLED.addLeds<NEOPIXEL, 11>(leds, 7 * NUM_LEDS_PER_STRIP, NUM_LEDS_PER_STRIP);

It goes all green and blue.

Anyone know what gives?

Thanks.

As a follow up, my end goal is to make each strip act like each pixel does now. As in, one entire strip would be all the exact same shade of green, the next strip would be blue, then purple, and so on.

Am I on the right track for that, or should I be using a different array?

Hello, I have your sketch running on my setup kindof OK !!
I have one led not being written to.

I know that pixel works with my other sketch !

Note that I have also NEOPIXELs 16 strips of 25 LEDs each) and a MEGA and also setup with multiple pins (just not the same as you!)

@Bob_Jacobs Ok found why I got one LED not working…

Change line from…

for(int i = 3; i < NUM_LEDS-1; i++) {

to…

for(int i = 3; i < NUM_LEDS; i++) {

Otherwise your sketch is OK !!!

My guess is you have a PSU problem !

@JP_Roy

Thanks for fixing that dark pixel! I forgot to even ask about that.

I’ve tried multiple power supplies both for the Arduino and the NeoPixels. I’ve even tried a 5v 10a power supply for the LEDs just in case I was somehow undersupplying. I still can’t get more than 4 strips to display anything other than green and blue.

I appreciate you putting the time and effort in, though.
Thank you!

5 strips with 3 LEDs each = 15 LEDs @ 60ma each = 900ma
Is this running from USB?

I’ve been running the NeoPixels on a 5v, 2a supply. I threw my 10a on just because it was handy, after the suggestion to try a different supply.

The Arduino is usually running off USB, but I have tried it with a 12v, 500ma supply.

I’m not running the NeoPixel power through the Arduino at all. Only ground, naturally.

@Bob_Jacobs You should be able to run so few off the USB I think !

Have you tried swapping strips around ?

You may be dealing with a shorted strip ??

@JP_Roy If I change configurations I can get each strip to light up in the proper fashion, just no more than 4 at any given time.

I’ve got two sets of 4, wired in parallel. So I have two power lines and two ground lines for the 8 strips. I have been running them to a common power supply on a breadboard. I just ran them to two separate supplies, but still got the issue.

I would say it is a wiring issue, but I can get say two strips from bank A and two from bank B to light up in the proper fashion. Just never more than 4 at once.

I’m quite confused.

@Bob_Jacobs So you confirm that you have eliminated the possibility of a flaky strip.

I am also very puzzled by your problem !?

With a MEGA, I was able to get 34 separate pins working in parallel to light-up the 34 separate branches of may 2014 Xmas tree. So the MEGA can definitely do it !

And I have loaded your sketch and got it working with the exception that I used different output pins. It seems unlikely but, have you tried selecting different output pins on your MEGA ?

Can you post a short video of the problem ?

Yeah, all strips work individually or in groups less than 4. I can even load something as basic as the FastLED MultipleStripsInOneArray sketch, which is runs a red dot through multiple strips while all other pixels are black.
I plug in all 8 of my pins and the black turns to green, and the red dot becomes yellow.

I’ve been using 8 pins between 2 and 13, with some variation. I can’t seem to identify why it goes wrong. It doesn’t matter which four strips I use.

I’ll try to get a short video for you.

@JP_Roy I threw the videos up as a new post as I couldn’t get them in the comments here.

Thanks for all your effort and time.