Hey, I'm working towards a small lighting system using FastLED on a Teensy 3.2.

Hey, I’m working towards a small lighting system using FastLED on a Teensy 3.2.

It will use (up to) 6 strips of WS2812B LEDs, with each strip having 48 or 96 LEDs. It also needs to have six PWM outputs to support two analog RGB strips. Additionally, I need 2 or 3 digital inputs, 1 analog input, 3 digital outputs, and a much shorter chain of WS2812B’s for a few button panel indicators (see my earlier posts about those modified pushbuttons :wink: ).

I know this sounds like quite a lot to shove on a single Teensy but it is doable. Here is my current list:

  • 14-19(A0-A5): WS2812B main strips
  • 3-5, 20-22(A6-A8): PWM for analog strips
  • 6, 11, 12: Digital inputs
  • 23(A9): Analog input
  • 7-9: Digital outputs
  • 10: Indicator WS2812B

A few pins could possibly be swapped around but I have found this to give a good layout for the adapter PCB I’ve designed for this system.

Now I came here to ask, is there some way I could achieve this sort of stuff while utilizing parallel output? Additionally, what sort of speed/framerate could I expect to get by writing out one strip at a time? (Assuming 288 or 576 WS2812B LEDs across 6 strips, on a Teensy 3.2)

PS: Using more than one board for this job is not really a viable option with my space constraints.

For parallel output of six strips you’d need to either use 15,22,23,9,10,13 or 2,14,7,8,6,20 (and if you want the indicator written out as part of the parallel output then it’d be either 11 or 21 respectively) - and that’s pretty much non-negotiable.

It takes 30us to write out a single led’s worth of data not in parallel - so six strips of 48 would take 8.6ms to write out, while in parallel it would only be 1.44ms.

@Daniel_Garcia Looks like for my needs I’ll be going with 15,22,23,etc. Now, I see on the OctoWS2811 page on PJRC that I need to free up 3,4,15,16 and maybe 12. How would this work with the PORTC pins?

For PortC you aren’t going to be using octows2811 (which is port d) - so don’t go by what’s on that page. Have you looked at https://github.com/FastLED/FastLED/wiki/Parallel-Output yet?

@Daniel_Garcia Oh my goodness, I misread somewhere that OctoWS2811 was required for parallel output! Okay I guess that simplifies things a lot. Looking again I guess my plan will work smoothly from here. So I’ve learned several things here - firstly that I should read everything at least enough times that I can recite it, secondly that I’ll be looking at a theoretical maximum of 694fps… On that matter, do WS2812B’s also complain over 400-500fps like '2811s or can they be driven slightly faster (not by a considerable amount of course)?

No, you can’t update them more than 400hz without problems. FastLED has some rate limiting code in place to help with this.

@Daniel_Garcia When you say ‘to help’, do I still have to explicitly ensure that I don’t call show at more than 400hz or can I just let it run as fast as I can receive and process pixel data?

For ws2811’s and friends, show ensures that a minimum of 2.5ms have passed since you last called show (and it will wait/delay of you call it too quickly to cap you at 400hz)

@Daniel_Garcia Ah that’s good thanks for the info! (Back to designing PCBs :confused: )