LED strip length on Teensy 3.1

Status
Not open for further replies.
Hey there! I'm considering building a large LED setup for stage use for video. I was hoping to sit a computer near the teensy 3.1's, and just running signal + power to the stage. What's the maximum number of LED strips that I could place on a single line where I could safely achieve realtime video playback? I saw the following note:

"Driving 8 LED strips simultaneously allows each strip to be only 1/8th the length. All LEDs update 8X faster than driving only a single long strip. 1000 LEDs can be updated in 3.8 ms, which allows a theoretical update rate of 240 Hz."

But those measurements neglect to have all axis labeled ;-) Is the 3.8ms measurement when they're in parallel from different pin-outs, or 1 long strip in series from 1 pin-out? I'm trying to run as few cables to stage as possible.
Thanks so much,
Brian
 
Your max string length will be determined by teensy RAM, while your max theoretical framerate will be: 1000000 / ((1.25 * 3 * NUM_LEDS_PER_LONGEST_STRIP) + 50). [that's 1 second / 1.25 microseconds per bit * 3 bits per channel * number of leds plus the 50ns latch time]

Also keep in mind that the memory isn't handled separately on a per-strip basis. So if you have two 1000-LED strips, you'll be using just as much memory as if you were using 8 1000-LED strips. I don't have the source code handy, but I think you're looking at 3 bytes per LED * max_strip_len * 8 (plus more if you're double buffering).

What's your target framerate?
 
I'm trying to run as few cables to stage as possible.

Power delivery is always a big challenge in these large scale LED projects.

It's hard to know specifically what you're planning, but I can tell you one thing that absolutely will not work: only 3 conductors run 15+ feet with thousands of LEDs connected on the end.

Suppose you're targeting 2000 LEDs, similar to the 1920 I used in the OctoWS2811 demo. That's a pretty minimal (low res) number for video. Each LED uses between 0.8 to 50 mA. When they're all on fully white, the current is approx 100 amps. When they're all off, the current is about 1.6 amps. That's a massive change. Your power wiring needs to be designed so the voltage stays above 4.5V at all the LEDs. The strips themselves don't conduct so great, which means most of that voltage loss budget is used up on the strip. You need short, heavy gauge wires to carry the 5V power to the strips. On the demo, I used 32 pairs of #22 wire, approx 16 inches long.

The other critically important cable issue is changes in ground voltage between Teensy and the LED strips. If this gets to be too much, you'll get unreliable communication which manifests itself as portions of your display flickering. The signals from the pins on Teensy aren't meant to drive long cables. Adding series resistors helps. Using a 3 to 5V buffer and series resistors really helps. But even that isn't meant for long cables. If there's significant voltage change along the ground wires between the GND pin on Teensy and the GND pin on the LED strip, you'll have all sorts of frustrating problems.

It's much easier to design these things well from the beginning. Once it's built and especially after it's installed somewhere, correcting these types of problems is quite time consuming.
 
Power delivery is always a big challenge in these large scale LED projects.
..
If there's significant voltage change along the ground wires between the GND pin on Teensy and the GND pin on the LED strip, you'll have all sorts of frustrating problems.

This man speaks the truth.
 
I'm considering releasing an OctoWS2811 adaptor board, with the 74HCT245, 100 ohm resistors, and the output as 2 RJ-45 jacks. A prototype has already been ordered through OSH Park.

The idea is to use a CAT6 ethernet cable, cut into halves, with 4 signals on each cable. CAT6 has excellent signal properties and well controlled 100 ohm impedance, so the cable will exactly match the resistors on the board.

The other half of this idea is that CAT6 cable will naturally encourage a good wiring style, where you run the power supplies directly to the LED strips and the data from Teensy also to the strips. They meet at the inputs to the strips. That way, signals from Teensy to the LEDs hopefully don't have huge ground currents flowing.

I also really need to add more info on the OctoWS2811 page about designing the power delivery. It's by far the biggest cause of trouble for people building big LED projects. Hopefully better docs and an adaptor that works with easily available CAT6 cables will help make these projects easier and more reliable for everyone.
 
I'm considering releasing an OctoWS2811 adaptor board, with the 74HCT245, 100 ohm resistors, and the output as 2 RJ-45 jacks. A prototype has already been ordered through OSH Park.

Paul: that sounds pretty great- I think what you're proposing is rather than have simply 8 pin-outs on the teensy for signal output to LEDs, it's just 2 ethernet jacks. that's awesome. I want that.

When I used some LED curtain (made in china) on the road a couple years ago, I could daisy-chain the signal from a black box sitting near the computer, to the first video panel, and then to the next panel, via ethernet. Then each panel could take standard edison plugs for power - this was super handy. We always had to be concerned about huge loops of power cabling sitting on top of signal cables. But, yea, some more info about power delivery would be great.

Alternatively, what if I used usb to ethernet adapters, and ran ethernet lines from the computer to stage, and the teensy's were placed near the LED strips?
This way, I could break out the LED strips to multiple pin-outs. I wonder how I would go about distributing the sync connection in this kind of situation. (although I read on some other threads that the sync pin caused more headache than it's worth, and for this use case, precise timing between LED strips isn't a dealbreaker.)

tetsuo said:
Your max string length will be determined by teensy RAM, while your max theoretical framerate will be: 1000000 / ((1.25 * 3 * NUM_LEDS_PER_LONGEST_STRIP) + 50). [that's 1 second / 1.25 microseconds per bit * 3 bits per channel * number of leds plus the 50ns latch time

tetsuo: 60 fps is my target - and it would appear that with the formula provided, near-240 theoretical fps was with 1000 led-per-strip.

Thanks so much for the assistance. Your help is invaluable.
 
Last edited:
tetsuo: 60 fps is my target - and it would appear that with the formula provided, near-240 theoretical fps was with 1000 led-per-strip.

Thanks so much for the assistance. Your help is invaluable.

Ack! Sorry! My formula write-up was too hasty and I had 3 (number of bytes) where I should have had 24 (number of bits). That should have been:
1000000 / ((1.25 * 24 * NUM_LEDS_PER_LONGEST_STRIP) + 50

The framerate Paul quoted was with 1000 LEDs total, not per strip. 1000 per strip isn't possible w/ the Teensy 3.0 due to memory constraints, but if it were (as it perhaps is on the T3.1?), your theoretical max FPS (without double-buffering) would be:

1000000 / (1.25 * 24 * 1000 + 50) = ~33 fps
 
Ack! Sorry! My formula write-up was too hasty and I had 3 (number of bytes) where I should have had 24 (number of bits).

No worries. If I go the route where I'm splitting out the signal 4 ways from each teensy by sticking the teensy's not too far from the strips, the theoretical framerate looks ok. 250 pixels per pinout is looking at ~132 fps. And, if I can get my hands on that adapter board Paul is suggesting, I'd only need a single RJ-45 breakout per teensy, which I could wire to an ethernet switch.

I mocked up a quick proposal system design here, minus the power delivery, as i'm still not sure the best way to do that. Please do me a favor and take a look and let me know where I'm crazy:
systemdesign01.jpg


Now here's an important question for Paul or whoever- this system relies on the fact that usb over ethernet extenders will work well on stage. Are there potential issues to powering the Teensy's via that route? they appear to output 5v standard USB from spec sheets listed, but I just wanted to mention it. I've used them before for large scale installations powering Kinects, but never on stage, although I've heard from other people that it's worked for them. I guess if I had to, I could cut the pin and power the teensy's separately via 5v adapters?

This method avoids using DMX and ethernet shields, which sounds super great to me, and avoids potential latency issues.
 
Now here's an important question for Paul or whoever- this system relies on the fact that usb over ethernet extenders will work well on stage. Are there potential issues to powering the Teensy's via that route? they appear to output 5v standard USB from spec sheets listed, but I just wanted to mention it.

PJRC doesn't make or sell that USB extender product, and I have not personally used it, so I really can't comment.

I can't even comment on what the spec sheet says, since you didn't specify the make & model or provide a link to the product or its specs.
 
They say 300 mA, but it's not clear if they deliver 300 mA to the device at the end of the wire, or it they need 300 mA for their own operation. You'll have to ask ioGear, though I'd be amazed if you managed to get anyone to respond with a competent answer.

Teensy needs about 40 mA.

One possible issue I see is a lot of wiring and connects between Teensy and the LED strips. That might work, but even if you use 74HCT245 buffers, those are logic signals not meant to be transmitted a long distance. I'd suggest mounting the Teensy, power supplies, and USB extenders to the display. Then just run power and the ethernet cable right to the display.
 
that one I just ninja-edit/posted says:

Power — Local unit: not required for normal operation
Available at remote unit: 5 VDC @ 3 amp provides 4 x 500 mA for devices
 
Paul: the LED strips are intended to be modular and placed in architecturally-interesting ways around the stage- this means that each strip could at maximum, potentially be 20 feet from the Teensy. What is a 'Long Distance' in laymans terms? In the above diagram, I was suggesting that they be relatively close to the strips, but not < 2 feet or whatever.
 
I've been able to get reliable behavior with up to 20' of CAT6 between a single teensy and a pair of 168-pixel strips. Power was over a combination of 4AWG (14') and 16AWG. If the teensy+power are isolated from one-another, then you can probably stretch it further for the data (power, not so much... unless you want to run multiple 0/1AWG garden hose sized cables).

For me, the problems came from introducing multiple power supplies and high variance of cable length(both power and data). This created inconsistent voltage and ground across strips as well as a varying gap between the low-current data and high-current strips (e.g., at high brightness, strip dips down to 4.6 volts while data is still at 5.1); this left me playing a long and frustrating game of whack-a-mole tweaking grounding/wiring schemes, resistor values, separate regulation for +5V on the 74HCT245's, altering strip lengths, etc. The shorter and more consistent your cable lengths, the easier of a time you'll have.

[edit] To clarify: Paul's suggestion of USB and 120V to each modular display and putting the teensy and 5V PSU as close to the strips as possible addresses ALL of the challenges I faced and I can attest to how much easier your life will be if this option is viable for you.[/edit]
 
Last edited:
I really need to add another section on the OctoWS2811 page about these wiring issues.....

Thanks for taking the time to write about your experience. It's rare when we get to hear how problems were solved. Hopefully over the long term we can help people doing new projects avoid these tough problems.
 
I've been able to get reliable behavior with up to 20' of CAT6 between a single teensy and a pair of 168-pixel strips. Power was over a combination of 4AWG (14') and 16AWG. If the teensy+power are isolated from one-another, then you can probably stretch it further for the data (power, not so much... unless you want to run multiple 0/1AWG garden hose sized cables).

Thanks for sharing your experiences, tetsuo. i think we're going to have to isolate signal + power- in theatres such things can be tricky with so many wires from lighting, sound, stage power, etc everywhere. So 4AWG cabling at 14 feet was your solution for power- from what kind of power source were you coming from?

For me, the problems came from introducing multiple power supplies and high variance of cable length(both power and data).

So, if I understand correctly, to avoid grounding issues you're using a single power supply for both 168-pixel strips? Hrm.
That would get complicated if I needed to use a dozen teensy's and run a dozen cables to stage just to avoid grounding issues between power supplies. What if I ran 3 120v lines to stage like you mention, and then at each modular strip, attached a 5v10amp adapter? so basically, each strip of 250pixels would have something like one of these strapped to it:http://www.adafruit.com/products/658 - That way, for each teensy with 4 strips attached on 4 pin-outs, i'd just break out an edison plug 4 ways, to 4 PSUs. It would mean the low voltage power lines would be super short. Unsure if using multiple power supplies causes issues there, or if it's only in conjunction with varying cable lengths as you mention.

To rephrase- in this way, each led 'module' would be powered independently, and receive signal on that cat6- and would be convenient in that it simply had a rj45 receptacle and an edison plug.
 
So 4AWG cabling at 14 feet was your solution for power- from what kind of power source were you coming from? ...



So, if I understand correctly, to avoid grounding issues you're using a single power supply for both 168-pixel strips? Hrm.

Actually, no. I have 6 MeanWell SP-320-5 ~300W PSUs. I just did testing w/ a single PSU and pair of strips so I could see if my max cable length (plus a few feet) was going to work OK. I was having so many problems at once, I had to simplify and test that scenario as a sanity check. (BTW, getting an oscope took all of the guesswork out - I'd probably never have sorted things out w/o it). Anyway, my point was that it's possible to put a lot of distance between the teensy and the strips and still have it work (assuming you're using best practices there - good cable, impedance matching, transceiver for 5V data out, etc), but if a second power supply or a variance in data cable lengths is introduced for that same teensy, things start to get tricky.


brianchasalow said:
That would get complicated if I needed to use a dozen teensy's and run a dozen cables to stage just to avoid grounding issues between power supplies. What if I ran 3 120v lines to stage like you mention, and then at each modular strip, attached a 5v10amp adapter? so basically, each strip of 250pixels would have something like one of these strapped to it:http://www.adafruit.com/products/658 - That way, for each teensy with 4 strips attached on 4 pin-outs, i'd just break out an edison plug 4 ways, to 4 PSUs. It would mean the low voltage power lines would be super short. Unsure if using multiple power supplies causes issues there, or if it's only in conjunction with varying cable lengths as you mention.

To rephrase- in this way, each led 'module' would be powered independently, and receive signal on that cat6- and would be convenient in that it simply had a rj45 receptacle and an edison plug.

The more PSU's you have per teensy, the more chances you have for ground potential differences that will cause problems. What I'd considered (but never tested) as one possible solution was to use optocouplers to truly isolate the strips from the teensies. I was planning on placing them at the far end of each CAT6 cable (which carries 4 strips' worth of data and GND back to the teensy). That would make the solution more "power source agnotistic". Be warned.. while I'm fairly confident it would have been a great solution, I'm also a hardware newbie who's talking out of his ass a bit here :D
 
CAT cable extender+breakout boards for Arduino:
http://smartgreenhouse.org/index.php/products/accessories/catkit-long-distance-connectivity

Patch shield for Arduino (uses ethernet cable):
http://www.adafruit.com/products/256

These type of things can also be used for sensor boxes in greenhouses, controlling automated irrigation in the backyard garden etc.

CATkit seems weird company wise. Would love to see a clone.

Abra stocks the CATkit supposedly:
http://www.abra-electronics.com/products/SGH%2dCSP-CATkit-&-Kitten-Starter-Pack.html
 
Status
Not open for further replies.
Back
Top