Looking for advice to control 6000 leds

Status
Not open for further replies.

alex37

Member
I'm working on a project that involves multiple strips of ws2815 (12v of ws2813 version). It's kind of an art project. The leds will be mounted around round windows, 54 total windows. I'm looking to animate using Fastled library, preferably with over 60fps. Is a single teensy4.0 going to be enough or should I be using octo2811 with multiple units like 3.2 or 3.6 or maybe octo with teensy 4.0 (although I have not found anyone discussing compatibility).
For starters I'm adding an IR receiver for control but in the future looking to implement wifi.
What would be suitable setup for this project?
Any advice is greatly appreciated.
 
I would probably approach it with multiple Octos and CANbus between the Teensy3.2 units. That lets you work it in chunks and then add/subtract more 8x blocks as needed. I tend to use a lot more of these cheap hardware units and keep them lightly loaded and simple. You could also use a low end RF chip like the RFM69 or nRF24L01 to communicate between the Teensy 3.2 units.

You could also use something like an ESP32 for the LED controllers and have built-in Wifi...
 
Appreciate your feedback Chris. I have worked with single board and fastleds but can't imagine how it works with multiple ones connected thru CANbus. Is everything will be controlled from one board as I will be able to work with full array of 6000 leds in one code?
Also how many leds can each of 8 octo ports can handle? Is it better to do it on teensy3.5 considering it goes with 5v and can power octo2811?


I would probably approach it with multiple Octos and CANbus between the Teensy3.2 units. That lets you work it in chunks and then add/subtract more 8x blocks as needed. I tend to use a lot more of these cheap hardware units and keep them lightly loaded and simple. You could also use a low end RF chip like the RFM69 or nRF24L01 to communicate between the Teensy 3.2 units.

You could also use something like an ESP32 for the LED controllers and have built-in Wifi...
 
Well if you used the segmented approach you could have a master node on the CANbus network and say 10x Teensy 3.2s controlling 600 LEDs each in 8x strings of 75 LEDs - or however you wanted to break it up. The master would send CANbus messages to tell the actual LED controllers what to do. This wouldn't work fast enough for video or anything like that but for art effects and even for music sync CANbus should be fast enough.

That way you could dedicate one fast CPU like the Teensy4.0 to interface with the outside, calculate the effects and send the commands to the string controller Teensy3.2 units. The 3.2s just listen to the CANbus for messages addressed to them and do their thing with their locally attached LEDs. They can also report back their health and status on the CANbus periodically. All the other string controllers ignore messages to the others and the master just has to listen for those heartbeat messages which can be sent much more slowly say once per second or something. Or each string controller 3.2 might have its own local sensors say in front of each window or something and announce to the entire network the status of the local sensors so the entire system can react appropriately.

This may seem more complex but each node is simpler and all the 3.2 nodes are just duplicates so you could go to 500 windows if you wanted by just adding more 3.2 units and extending the three CANbus wires.

So just start with the whichever master you like to read the music, sensors or whatever initiates the effects and communicate with one Teensy3.2 with an Octo with a few LEDs. You don't need to spring for the full setup until it works. Once that is working, you are basically done. Just add a lot more of the hardware parts and the software is already there. If one node drops off or shorts out or whatever, the rest keep going and the master can notify you of the missing heartbeat from the broken node.

Anyway that's how I would do it. I'm sure you can use a powerful processor like the 4.0 and do it all with one unit but if that unit goes out your entire system is out or if a few LEDs in your 6000 long string go out you could lose the entire display. It always comes down to a bunch of tradeoffs between complexity, cost, robustness and development time. Since hardware is cheap compared to my time I tend to use a lot of simple hardware elements rather than one super complex all-in-one unit.
 
Thx for such a detailed explanation Chris. I see your point with this simple setup. It's really flexible and any number of leds can be added.

I'm wondering about the single unit controlling everything though. 600mhz should be enough processing power for calculation so all that needs to be done is to make sure that there's enough timing. 1 led takes 30us to update. So 1,000,000 / 30 = 33,333 updates can be done. If we take refresh rate of 60, 33,333 / 60 = 555.555 leds per second. So theoretically one pin can control 555 leds with 60 FPS. From what I've researched about parallel output (https://github.com/FastLED/FastLED/wiki/Parallel-Output), teensy 4.0 supports up 16 way output. So even if I put a little less, say 400 leds per pin that would be 400x16 = 6400 leds. Am I understading it correctly?
The only inconvenience I see is that according to drivers each pin must have the same amount of leds.
I'm planning to order several spare teensy4 units and make nice connections so in case it goes out it will take a minute to replace.
Am I missing something in the calculations?
 
The Octo adapter page has some comments on numbers of LEDs that can be controlled.

https://www.pjrc.com/store/octo28_adaptor.html

Since the Octo library uses DMA I think you can get 8x strips with full capacity for timing on each strip. The Teensy4.0 has lots more of all the limiting resources so probably LED timing will be your limiting factor. But it will be a very large number of LEDs I think. Your biggest pain may be power supplies for all of these 20mA LED elements. It adds up fast. POV is your friend.

Best of luck with your project. Post updates here if you please so we can see its awesomeness in action when you get it done.
 
ws2815 led strips are 12v tolerant and I'm using 2 12v 80a PSUs. 6 16awg cables, 3 from each PSU. From each 16awg cable I have 20awg cables running to every 220-250 leds, with a single 16awg cable load not going over 15-17amps. Teensy will be powered separately. Though I do need to convert a signal 3.3v from teensy4 to 5v for strips. Any suggestion how can I do that in most efficient way?

Also, is there a way to be able to have different length strips on each of 16 pins with parallel output? Maybe changing some drivers code?
 
I also have to connect each strip PSU's ground which is 12v to teensy VIN ground which can handle only up to 5.5v. Is it ok to do it directly or I need some step up/down converters?
 
I also have to connect each strip PSU's ground which is 12v to teensy VIN ground which can handle only up to 5.5v. Is it ok to do it directly or I need some step up/down converters?

Teensy 4 VIN must be limited to 3.6 to 5.5V as it : " can handle only up to 5.5v "
 
I also have to connect each strip PSU's ground which is 12v to teensy VIN ground which can handle only up to 5.5v. Is it ok to do it directly or I need some step up/down converters?

Ground should never be anything above 0v, that being said connecting the PSU ground to Teensy ground is not an issue and can be directly connected as long as you haven't shorted anything that's causing ground to be 12v.
 
17A is a lot for 16AWG wire. Just saying.

You need a level shifter to convert from 3.3V to 5V. The Octo has a good example. Look at how that circuit works and use 2x of those chips to get 16 lines. Don't know if you can do DMA on 16 Teensy3.2 outputs...
 
My mistake regarding 16wg, I'm actually using 1.5mm wires, which has a cross sectional diameter of 2mm2, which is around 14awg, so should be fine. Also I'm not planning to use full capacity at all LEDs on white.
I'm ordering 3 pieces of teensy4.0 (2 spares) and 2 single direction level shifters from 3.3v to 5v for signal lines.

Does teensy4.0 support DMA with parallel output on 16 ports?


17A is a lot for 16AWG wire. Just saying.

You need a level shifter to convert from 3.3V to 5V. The Octo has a good example. Look at how that circuit works and use 2x of those chips to get 16 lines. Don't know if you can do DMA on 16 Teensy3.2 outputs...
 
Can anyone recommend a good uni-directional level shifter? All I can see in stores are bi-directional ones and I don't really want to use those to avoid any feedback interference from LEDs.
 
74HCT245 is usually the best choice for level shifting 3.3V to 5V.

Avoid the bidirectional circuits, especially the type using 1 mosfet and 2 resistors. Those are terrible for WS2812 signals.
 
Any buffer style chip can be used for uni direction level shifting, octal buffers are pretty common and I’ve used them for level shifting. Just power them with 5v and I believe most of them have high level signals around 2.7v with 5v power so the Teensy’s 3.3v signals will trigger it.
 
Also I believe T4.0 isn’t yet supported with the OctoWS2811 library and as the name suggests it is only for 8 pins which are hard coded into the library, so you would either have to port the library or just stick with FastLED until the library is updated then you could use both libraries for the maximum speed possible.
 
Yes two of those should be fine, those are the same model that are on the OctoWS2811 adapter so you can guarantee that they will work.
 
There’s no way to specify the number of LEDs per pin, but if you just start the object with the max LEDs that one pin has there’s nothing stopping you from using less LEDs on the other pins. You just have to make sure that what ever is drawing to the LEDs isn’t trying to update LEDs that aren’t there, it won’t cause any problems if you do try to do that because of the nature of the shift registers, just know that nothing will happen if you try to write to an address that doesn’t have an LED. Of course the simplest option is to just keep the number of LEDs per pin as close as possible, I can’t think of any reason that would benefit from having a varying number of LEDs per pin.
 
So all I need is couple of those for 16 way out?

Buying chips on Aliexpress is risky. Usually it works, but sometimes you will get counterfeits or inferior quality parts. Often the Chinese companies who manufacture these parts on behalf of the major brand names will sell batches that failed quality testing to other Chinese dealers who resell them on Aliexpress and other sires in China.

For this sort of part, buying the genuine Texas Instruments chip from a reputable distributor is only slightly more expensive.

https://www.digikey.com/product-detail/en/texas-instruments/SN74HCT245N/296-1612-5-ND
 
Status
Not open for further replies.
Back
Top