0

Is there any limitation to connecting more strips?

I plan to create for my temple Ganpati Street Lighting LED Decoration - Full HD Ahmednagar Mh India

Watch this video and give me some ideas and suggestions.

2
  • In principle you can connect one strip per digital pin, but that looks like a huge amount of data to stream out of an Arduino. Even a Mega would likely be short of flash and RAM. Commented May 7, 2017 at 9:49
  • you could use a bunch of $2 pro-minis, software serial controlled by a mega.
    – dandavis
    Commented May 8, 2017 at 4:31

3 Answers 3

3

There are three factors to consider when driving strings of these LEDs from an Arduino:

  1. How much memory the Arduino has - each LED takes at least 3 bytes of RAM (possibly more depending on the library implementation). (An Uno could probably just manage 500 at most)
  2. How long it takes to send the data over the wire - the more LEDs you have in a chain the longer each update takes and the slower your animations run.
  3. How you power such a huge number of LEDs efficiently. You won't just plug them into the 5V pin of the Arduino that's for sure.

Note that the arrangement you link to most likely isn't a single small microcontroller controlling the whole lot. Instead it is much more likely each individual strip has a single controller and those controllers are all networked together (probably through RS-485 or CAN) to a master controller (probably a PC) to send instructions to them all.

1

Majenko is totally right (as always).

But as an alternative solution, you could opt for SPI-based LEDstrips. They're not bound to specific timings and thus:

  1. You can "generate"/stream colors. You can let your Arduino calculate the next color and send it directly. In this way, you'll only need RAM for one pixel at the time. For the length, you're now only limited to the time it takes to update a strip.
  2. Sending of data in SPI is done in hardware and can thus be done by hardware, while your software focusses on the next job/pixel. (So you also don't need to calculate the whole strip at once, before sending)
  3. Often, you can send "pixels" much faster, by simply increasing your SPI clock. I'm not sure what the limit will be here, check the ledstrip datasheets.

Also, if you're going to push the limit of Arduino, why not use better hardware? The Teensy 3.2 is often used for ledstrip projects, since it has 64K ram and 256K flash and can run at 96Mhz (not sure about the SPI speed). Have a look at fastled and octows as well.

You should split up this project, to make it scalable. Try to make one "row" of it and start adding more rows (with individual controllers and power).

I agree with Majenko on using RS485 or CAN to connect/command/sync these different rows.

4
  • I think the SPI trick only works when you combined it with DMA.
    – Gerben
    Commented May 7, 2017 at 13:59
  • @Gerben, you've got SPI-controlled LEDstrips, they can handle "waiting" between LED's, since you can effectively "halt" them by not toggling the clock line. Also, I believe hardware SPI has a "SPI Serial Transfer Complete" interrupt and an 8-bit shift register, so after starting the transfer, you do have some "free time" before it had been completely written, but I'm not sure if it's significant. (But if you start the next transfer a little later, it won't matter for spi-strips, since their timing isn't arbitrary but based on the spi-clock you generatie yourself)
    – aaa
    Commented May 13, 2017 at 6:48
  • But this question was specifically about ws2812s which don't have an SPI like interface.
    – Gerben
    Commented May 13, 2017 at 6:52
  • You've got a point there! But I wanted to give an alternative option, choosing the right hardware/interfacing can overcome having to solve everything in software/making it more efficient. If spi-ledstrips are too expensive (or simply want to use WS2812’s, Majenko's answer is better but the options are more limited.
    – aaa
    Commented May 13, 2017 at 7:37
1

I have worked with setups similar to this. Arduino is limited as mentioned by Majenko.

If you like the Arduino platform I recommend you look into the Teensy based controllers. They are 32 bit based and have more memory and are optimized to handle LED projects like this. Best of all, it uses the Arduino IDE with numerous libraries. The Teensy would need to be paired with a Network adapter, so you could use sACN E1.31 and use software like Jinx to create the effects you're wanting to do.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.