Can't Get More Than 381 LEDs To Light

Hi, I am working on a project to light 600 addressable LED lights, 4 strings of 150 lights each using a Nano. I have all the lights connected together and I am injecting power into the beginning of each of the 4 strips using a 5V 60A power supply. The nano is powered separately for now but I did connect the ground of the power supply and Nano to have a common ground. Nothing lights up or works when I set the number of LEDs to 600but found through trial and error that things seem to work up to 381 LEDs, if I define my program with anything more than that nothing lights up. Any ideas on what to check? Does the data line have a limit or need to be injected or amplified? I have worked on a smaller LED light project before but this is the first that requires an external power supply. Thanks in advance for any help.


Are you using the FastLED library? That requires an array with 3 bytes for each LED. 381 x 3 = 1143 bytes of the 2048 bytes of the Nano SRAM. What does it say in the console window, when you compile, about memory usage?

NeoPixel library should use the same but due to dynamic memory allocation the IDE does not report on it.

You’d think the limitation would be listed on their github page, right?

600 LEDs would requires 1800 bytes of RAM, that might just barely work on a nano if you can severely limit any other RAM usage, but since you cannot run more than 381 your RAM usage is clearly too high already.

Is the hardware correct? How much current do the LEDs take? Is 5V correct for the LEDs you are using?

Ok, so when I was first planning this project I did keep coming across things about memory requirements for LEDS, but what threw me off is that the console always reports the same memory usage (see image) no matter what I set my NUMLEDS to:

The 1143 bytes that groundFungus calculated is really close to the 1285 remaining dynamic memory so maybe that is the issue and the IDE can't account for that dynamic memory in advance?
I do have Mega board coming today with a lot more memory so if that works then it is just a memory problem. Thanks

Typical addressable LEDs use about 60mA maximum per pixel, with 600 pixels that would be 36 amps, so the 5V 60A supply should be sufficient. Would be best to inject the power at both ends of each strip, and possibly at intervals within each strip, but OP does not appear to be having a problem with the 381 LEDs, indicating the first full strip is getting sufficient power.

But why did you buy Mega and not Due? same money but lots more power, or any other 32 bit boards. You can tell that I’m not a fan of Mega because I find it a waste price wise

You have way too much going on in that code to be able to drive 600 LEDs with a nano (unless you are doing something odd like always driving all the LEDs in the same color). The Mega should have no problem.

The compiler will not report the ram usage for the LEDs using Adafruit_NeoPixel, that library allocates the memory at run-time and the compiler only reports memory usage it can determine when compiling the code.

Please don't pictures of text, just post the text.

600 LEDs @ 3 bytes per LED + 763 bytes = ? % of 2048 bytes of RAM.

I am still pretty new so not familiar with all the different board options. The Mega is a clone so the price isn't bad. I will look into the Due though.

I suggest you look up the whole range of available boards

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.