Login | Register 
FEATURES
APPLICATIONS
DOWNLOADS
EDUCATION
BLOG
WIKI
FORUM
STORE

Hitting bottleneck controlling close to 4,000 LEDs !

General discussion about anything TouchDesigner

Re: Hitting bottleneck controlling close to 4,000 LEDs !

Postby K5Doom » Fri Feb 13, 2015 12:22 pm

Thanks! I have no problem going DIY as I have an engineering background ;)

I'll probably build something similar in the near future, thank for the info it really helps! I'll post updates when I have something to show!
K5Doom
 
Posts: 7
Joined: Mon Aug 11, 2014 3:04 pm
Location: Montréal, Québec, Canada

Re: Hitting bottleneck controlling close to 4,000 LEDs !

Postby lucasm » Fri Jun 05, 2015 5:23 pm

Update time!

I wanted to drop back in here and put out some updated info on driving led's with TD, over serial to teensy. I had a few pieces of mis information from before and there's been a few updates on fastLED octows2811 librarys over the months that make things faster!

Current figures:

- TD 60 fps
- Serial over usb (for multiple teensys use a multi-tt hub)
- Teensy 3.1 running a fastLED/OCTOws2811 mixture (more on this below if you're curious)
- 3,680 ws28xx leds per teensy 3.1 (460 per pin) also @ 60 fps

Dependancies: (also attached for conveniance)
Arduino Libraries:
https://github.com/FastLED/FastLED/tree/FastLED3.1 -attached-
https://github.com/PaulStoffregen/OctoWS2811 -attached-
https://www.pjrc.com/teensy/teensyduino.html (addon for arduino IDE)

Arduino sketch:
-attached-

Touch Designer Barebones example
-attached-


Notes:

You can scale this solution by adding more teensys running the same code to the mix. I have not reached an upper limit but haven't tested it too much yet, but I imagine at least 3 or 4 teensy's total could be done with out dipping below 60 fps, perhaps more.

Eventually the USB host card will reach it's max, and / or TD will choke on sending that much data out via serial, but i've found that with the modifications the dev's helped put forward in this thread you will probably hit a hardware wall before a software wall !

For those integrating this into already complex / heavy networks, it may be wise to offload the communication part to another touch designer process and use a sharedMem chop or spout in/out to offload that work and keep speeds up!

A little info on why / how the led counts have increased with this solution:

The reason the octows2811 library works so damn fast is due to the r/g/b data being formatted in a special way that the teensy's DMA engine can push out natively, so no bit banging, which means hardware can do it's thing on 8 strips in parallel. However! The .setPixel() command used previously has been somewhat slow, so Daniel Garcia at fastLED has written some backend code that does that translation much faster using some of fastLED's code.

more info:
https://plus.google.com/communities/109127054924227823508/s/octows2811Demo
https://github.com/FastLED/FastLED/wiki/Parallel-Output

I've been researching pixel controllers and various software / hardware configurations, and have not found anything like this before. Paul, Daniel, and everyone at Derivative have made this a painless and extremely elegant (and cost effective!) way of building / controlling custom led art, displays etc.

Thank you for that :) Hope this helps some of you looking for a solution and missing bits and pieces of how to make it all work.

Lucas
Attachments
OctoWS2811.zip
octows2811 arduino library
(171.1 KiB) Downloaded 279 times
FastLED3_1.zip
fastLED arduino library
(249.8 KiB) Downloaded 287 times
ledPixelController_460.zip
arduino pixel controller sketch
(832 Bytes) Downloaded 454 times
ws2811-12-12b_DrivingSolution_BareBones.1.toe
TD barebones led test program
(5.74 KiB) Downloaded 571 times
User avatar
lucasm
 
Posts: 222
Joined: Sat Apr 28, 2012 7:55 pm
Location: Dallas, TX

Re: Hitting bottleneck controlling close to 4,000 LEDs !

Postby lucasm » Sun Jun 14, 2015 5:37 pm

@SCare

that issue was a thing of the past, check out the latest TD file I attached, working example should have everything you need to get going.
User avatar
lucasm
 
Posts: 222
Joined: Sat Apr 28, 2012 7:55 pm
Location: Dallas, TX

Re: Hitting bottleneck controlling close to 4,000 LEDs !

Postby mpinner » Fri Jun 26, 2015 4:19 pm

@lucasm
thanks for providing the detailed example and recount of your experience.

im currently evaluating teensy serial vs beagle opc and mostly trying to get the fastest framerate possible with 1000s of leds.

is there a reason you used fastled instead of paul's octows2811 library directly?
mpinner
 
Posts: 2
Joined: Wed Feb 19, 2014 8:48 pm

Re: Hitting bottleneck controlling close to 4,000 LEDs !

Postby lucasm » Tue Jul 07, 2015 10:32 pm

Let us know what you find out!

Yeah the devs on fast led wrote some code that allows fast led to prep the drawing buffer of the octows library faster than the built in .setpixel() command can. Which effectively merges the best part of both libraries.

I elaborated a bit on my update a couple posts back on this page.
User avatar
lucasm
 
Posts: 222
Joined: Sat Apr 28, 2012 7:55 pm
Location: Dallas, TX

Re: Hitting bottleneck controlling close to 4,000 LEDs !

Postby mabrodeur » Fri Dec 11, 2015 9:52 am

Hi!

Thanks lucasm for this nice solution.
On my side I can't send the data by serial. Do you know how I could convert your code to work over udp?

Thanks a lot
mabrodeur
 
Posts: 1
Joined: Fri Oct 17, 2014 9:36 am

Re: Hitting bottleneck controlling close to 4,000 LEDs !

Postby lucasm » Fri Dec 18, 2015 7:11 pm

create a udp Out node, and an execute DAT (if you want to execute every frame), and in the execute dat you'll need to get the contents of a chop channel and assign it to a python list.

Then to send that byte array/list through the UDP out node you'd need something like this (replacing the psuedo names with your UDP node name, and python list respectively.)

name_of_Python_Byte_Array = name_of_chop[channel_indicie].vals
op("UDP_out_node_name").sendBytes(*name_Of_Python_Byte_Array)

NOTE: the " * " sign is neccesary, it's called the splat operator I believe, it basically takes a list and breaks it's contents down into separate arguments which is what .sendBytes likes (correct me if I have this wrong!)
User avatar
lucasm
 
Posts: 222
Joined: Sat Apr 28, 2012 7:55 pm
Location: Dallas, TX

Re: Hitting bottleneck controlling close to 4,000 LEDs !

Postby jasonhaggerty » Fri Dec 30, 2016 8:29 am

Bit of a late comer to this awesome post, but I just wanted to say thank you! :D :D
jasonhaggerty
 
Posts: 4
Joined: Thu Oct 02, 2014 6:55 am

Re: Hitting bottleneck controlling close to 4,000 LEDs !

Postby guggmann » Mon May 14, 2018 8:37 am

hey, first of all thanks for the great stuff!
i'm quite new to td and i'm using a macbook pro... and somehow this patch doesn't work there.
i think the serial is sending some strange things. On a windows machine everything works just fine.
Does anybody know if there is any difference in the serial output?
guggmann
 
Posts: 3
Joined: Wed Dec 27, 2017 7:23 am

Re: Hitting bottleneck controlling close to 4,000 LEDs !

Postby rob » Thu May 17, 2018 12:02 pm

We've just made a fix to the MAC serial library which was cutting off messages longer than 1K in length.
Look for it in builds 2018.22930 and later.
Cheers
User avatar
rob
Staff
 
Posts: 1513
Joined: Tue Nov 13, 2007 1:14 am

PreviousNext

Return to General TouchDesigner Discussion

Who is online

Users browsing this forum: Google [Bot] and 4 guests