Highest number of WS2812 LEDs Uno can drive?

Say if I had 20m of WS2812 LED strip, each with 60 leds/m (so 1200 leds in total), would the Arduino Uno struggle to drive this?

Power isn't going to be an issue - I will use one of those 20A led driver supplys. I will probably buy them in strips of 5m and run them like this:


so every new strip will be connected to the supply, which runs parallel to the strips.

Will I be able to get these running smoothly?

DreamingInsanity:
Say if I had 20m of WS2812 LED strip, each with 60 leds/m (so 1200 leds in total), would the Arduino Uno struggle to drive this?

Yes.

DreamingInsanity:
Power isn't going to be an issue

Wanna bet?

1200 LEDs at 60 mA each full brightness is 72 Amps. That would be four of your 20 A supplies.

DreamingInsanity:
I will use one of those 20A led driver supplies. I will probably buy them in strips of 5m and run them like this:


so every new strip will be connected to the supply, which runs parallel to the strips.

You will need to connect the power to both ends of each 5 M strip and every metre along the strip. A clear error in your diagram is that you must connect the grounds from one strip to another wherever the data goes from one to the next and you should have the series resistor and supply capacitor at the input wherever it is feeding into a new power section given that you will use four supplies, one for each 5 M strip.

DreamingInsanity:
Will I be able to get these running smoothly?

Maybe one UNO per 5 M strip - I think 300 LEDs is supposed to be manageable but can be corrected on that. :astonished:

Nanos are more practical than UNOs but exactly the same specifications. :roll_eyes:

Each LED will need 3 bytes of ram (dynamic memory) in the arduino. 1200 would require 3600 bytes, almost twice the amount available in an Uno. This assumes you are running a 5 volt LED strip, the 12 volt and 24 volt strips have multiple LEDs per WS2812 controller, and will require less ram.

david_2018:
This assumes you are running a 5 volt LED strip, the 12 volt and 24 volt strips have multiple LEDs per WS2812 controller, and will require less ram.

WS2812(b) LEDs are 5 V.

The WS2811 chip can drive three (or more?) LEDs in series.

An AdaFruit itsy bitsy M0 may be of interest. It has a chip with 32K ram memory, but most boards with a chip of this type are 3.3V instead of 5V and have problems driving ws2812 leds. However, the itsy bitsy has a special pin which boosts the signal to 5V so you don't need a separate chip or module for that.

I have a similar Question. Looks like the Adafruit ItsyBitsy M4 should have the memory and still have the Vhi for 5v data output. I am planning on a 7 X 5 meter = 1,050 LEDs.

I will drive mine with a 5V 20A 100W AC to DC Power Supply. I plan on putting a 1000uF capcaitor in each time I drop new power, and will have a 470 Ohm resistor in the data feed before the first LED.

Power supply: https://www.amazon.com/gp/product/B06XK2DDW4/ref=crt_ewc_title_dp_2?ie=UTF8&psc=1&smid=AA0YO4F2UD50F

lights: https://www.amazon.com/gp/product/B00ZHB9M6A/ref=crt_ewc_title_dp_1?ie=UTF8&psc=1&smid=AA0YO4F2UD50F

controller: https://www.amazon.com/Adafruit-ItsyBitsy-Express-Featuring-ATSAMD51/dp/B07KV2Y6LM/ref=sr_1_3?keywords=Adafruit+ItsyBitsy+M4&qid=1573507274&sr=8-3

capacitor: https://www.amazon.com/Nichicon-1000uf-Capacitor-Radial-Leads/dp/B01DYJEHZ2/ref=sr_1_3?crid=1YM26HRA5E7N0&keywords=1000uf+6.3v+capacitor&qid=1573507309&sprefix=1000uf%2Caps%2C218&sr=8-3

Resistor: ??? TBD

If you want to control an infinite number of LEDs with a UNO, you can't use the Adafruit library nor FastLEDs as they allocate 3 or 4 bytes per pixel to represent the strip in memory.

HOWEVER you can use a library that can write on the fly the data to the pixels if you can do that with simple math, timing is limited (rainbow, simple color pattern etc.). For example I wrote FAB_LED on GitHub that allows you to do just that with an UNO or any other AVR microcontroller at 16MHz.

What is the purpose of the LED's?
The reason I am asking is I'm working on a similar project using (6) 20-30m sections at 30led/m and one controller, thats 5400 LED's. Someone here pointed me to the ESP32 and it fit the bill for my project because you need a lot of memory with 3 bytes/led. Downside is you may or may not need a high speed level shifter because the esp32 is 3.3v

As for the power, I will be tapping in a 20a PSU that will supply (6) 5m sections with power, but wait! That's 54 amps at full brightness!

Well, the scope of my project is one that will never light up more than 100-200 LED's at a time between all 6 strips of 30m. So worse case is I'm lighting up all 200 on one section (12a). Some LED strips come with a pig-tail coming out which is easy to solder in a 1000uF cap which I believe is recommended.

The Ov will be common but the +5v will be separate for each section to keep switching power supplies from fighting each other.

O7: I had a similar issue, but I found a tip on one of the multitude of YouTube videos that eliminates the need for a level shifter. Use a sacrificial LED from your strip or string:

RGB-LED-String-Extension.jpg

I haven't tried a longer data cable yet, but I am driving 251 LEDs (four 50-led strings, plus one sacrificial led).

On the current draw. Measure it. I am using a 12V, 15A PSU, and I put an Ammeter in-line with the + wire to the LEDs. On my five WS2811 strings of 50 LEDs (251 total), all white and full brightness is only drawing a bit under 2 Amps. (Likely because it is a 12 Vole string. double the voltage, half the current.)

The "rule of thumb" of 60mA per LED segment would say 12 Amps for white at a brightness of 255, but to my surprise, the measured current draw was much less. More to my surprise, White was not higher, as expected.

Here are my results:

Here is my test sketch. I am still learning how to use the fastLED.h library, so if anyone sees a problem with my code, I would appreciate feedback.

/*
  FirstLight.ino
  (modified)
*/

#include <FastLED.h>

#define NUM_LEDS 201
#define DATA_PIN D1
#define BRIGHTNESS 48
#define LED_TYPE WS2811
#define COLOR_ORDER RGB
#define FRAMES_PER_SECOND  120

// Set up the block of memory that will be used for storing and manipulating the led data:
// This is an array of leds.  One item for each led in your strip.
CRGB leds[NUM_LEDS];

#define sceneDelay 2000   // Delay between scenes
#define pixelDelay 10     // Delay between pixels


// =========================== setup() ===========================
// Set up the leds and tell the controller about them
void setup() {
 Serial.begin(115200);
 Serial.println();
 Serial.println(F("Ready"));

 // sanity check delay - allows reprogramming if accidently blowing power w/leds
 delay(2000);

 // This tells the library that there's a strand of WS2811's on pin DATA_PIN,
 // and those leds will use the led array leds, and there are NUM_LEDS of them.
 FastLED.addLeds<WS2811, DATA_PIN, RGB>(leds, NUM_LEDS);
 FastLED.setBrightness(BRIGHTNESS);

 // Start with all LEDs off.
 fill_solid(leds, NUM_LEDS, CRGB::Black);        // All OFF

}




// =================== loop() ===================
void loop() {

 fill_solid( leds, NUM_LEDS, CRGB::Red);
 FastLED.show();
 delay(sceneDelay);

 fill_solid( leds, NUM_LEDS, CRGB::Green);
 FastLED.show();
 delay(sceneDelay);

 fill_solid( leds, NUM_LEDS, CRGB::Blue);
 FastLED.show();
 delay(sceneDelay);

 fill_solid( leds, NUM_LEDS, CRGB::White);
 FastLED.show();
 delay(sceneDelay);

 fill_solid( leds, NUM_LEDS, CRGB::Black);
 FastLED.show();
 delay(sceneDelay);

}

I saw that idea in my research, although it is kind of "level shifting" I think of it more like a signal booster to combat the voltage drop across longer sections at 3.3v and boost it to 5v, your first "sacrifice" LED still must be able to take in a 3.3v input or it won't pass the data along. Using a level shifting transistor or similar with a low gate voltage 1.7v etc I feel would be more reliable.

There are probably several "clones" of ws2812 from different Chinese manufacturers. This page shows they can vary widely in their maximum current

07gtimyfast:
I saw that idea in my research, although it is kind of "level shifting" I think of it more like a signal booster to combat the voltage drop across longer sections at 3.3v and boost it to 5v, your first "sacrifice" LED still must be able to take in a 3.3v input or it won't pass the data along. Using a level shifting transistor or similar with a low gate voltage 1.7v etc I feel would be more reliable.

Correct, but a transistor or FET only "pulls" in one direction, you need a resistor to pull the output in the other.

This is why CMOS was invented - it drives equally strongly - and thus rapidly - in either direction.

The gates in a 74HCT14 are specifically designed to perform this particular level shifting and you only need a single component (can be SMD), so it makes far more sense to use that.

sonyhome:
For example I wrote FAB_LED on GitHub

Link?

mvm

Hi
The subject is a bit old but FYI the number of LEDs is not an issue if you use the Microdevt development tool kit from www.kw-net.com
This micro-controller tool kit allows to use a fixed-sized array for a few LEDs and can reply the pattern stored in that array to an infinite number of LEDs.

I hope that helps.
BR

But it would simply repeat the pattern of the first 300 or so LEDs.

If that is what you want ... :roll_eyes: