Forum Rule: Always post complete source code & details to reproduce any issue!
Page 1 of 2 1 2 LastLast
Results 1 to 25 of 26

Thread: quick question: Teensyduino/OctoWS2811 and Cat 6; What's the max recomended length

  1. #1

    quick question: Teensyduino/OctoWS2811 and Cat 6; What's the max recomended length

    Folks,

    The parts should all arrive this week, the coding has begun and I'm excited. And i have many small (and large) questions. Here's a small one; For my configuration (792 ws2811 pixels in 33, 24 pixel strands, Teensy/Octo, 350W/70 ps) what's the maximum length Cat6 cable I can use before I'll see significant signal deterioration?

    I've been planning to use 25ft Cat6/Octo port in order to keep controls far away from display and now I'm wondering if this makes sense. Anyone?

    mb

  2. #2
    Senior Member
    Join Date
    Jan 2013
    Posts
    966
    Short answer: keep it as short as possible. 25 feet is asking for trouble!

  3. #3
    Senior Member
    Join Date
    Sep 2013
    Location
    Hamburg, Germany
    Posts
    891
    Quote Originally Posted by mummyboy View Post
    keep controls far away from display
    What do you mean by "controls"? If you need some buttons far away from the display, separate the user input from the controller that generates the signals for the LED strips.

  4. #4
    By 'controls' I mean all electronics sans LEDs. Thanks for the thoughts- remoting the dials and switches may be a viable slution. mb.

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,796
    I've only tested up to 7 feet, and by "tested", I merely tried it and saw the LEDs working, which is far from any sort of rigorous test.

    I would agree that 25 feet is asking for trouble. But it might work. If you try different lengths, please let us know the results?

    Regarding a system design where parts need to be separated by a long distance, by far the best (but not the cheapest) approach involves using 2 microcontrollers communicating by RS485 signals. That of course requires a second Teensy, and a pair of RS-485 chips to transmit and receive the signal. RS485 is extremely robust, capable of driving about 4000 feet of a proper cable with proper termination resistors, or at least several hundred feet of ordinary cable without perfect impedance matched termination. This approach does require more complexity too, for one side to read all the controls and send the data with Serial1, and the other side to receive it.

    There are lots of other ways. Generally, it's not a good idea to connect a long wire directly to any microcontroller pin. It's just asking for trouble to expose those sensitive pins like that. But several people have done it, sometimes with little or no extra protection, sometimes with series resistors, voltage spike clamping diodes, or other stuff. There's always trade-offs for cost vs reliability, so if you're on a tight budget and you can carefully control where the wires run and limit their opportunity to cause harm to the Teensy, maybe a cheap approach can work.

    But if this is some sort of DJ equipment that'll be hauled around and set up at shows, or worse yet, some sort of interactive art installation where unskilled people will operate the controls, a little extra investment to make things robust is probably money well spent.

  6. #6
    Quote Originally Posted by PaulStoffregen View Post
    I would agree that 25 feet is asking for trouble. But it might work. If you try different lengths, please let us know the results?

    There are lots of other ways. Generally, it's not a good idea to connect a long wire directly to any microcontroller pin. It's just asking for trouble to expose those sensitive pins like that.
    Is the implication that the increased resistance of the long wire may create a voltage spike? In actuality I have no requirement for long wires or remote controls. It's simply that when i purchased the cat6 the cost for 50ft was nearly the same as the cost for 10ft so i figured I'd use the extra length in this way.

    From what your saying I should simply reduce the wire length and reduce my risk?

    Mb

  7. #7
    Senior Member
    Join Date
    Jan 2013
    Posts
    966
    No the implication is not the icreased resistance but capacitance of the cable. With increased capacitance the nice sharp edges of the input signal arrive somewhat ronded off/degraded at the end. Also at the cable ends there is some signal reflection. To counteract these reflections, impedance matched resistors or also called termination resistors are placed directly at the cable ends. In this case on the on the OctoWS pins.

  8. #8
    Should I add termination resistors regardless, or is it unnecessary if the wires are kept minimal size? If required, what values are appropriate? And what pins would they be used on for, switches? pots? power? all?

    thanks

    mb

  9. #9
    Senior Member
    Join Date
    Jan 2013
    Posts
    966
    I'd get the Teensy 3.1 OctoWS2811 Adaptor that has all that stuff on board already. Of course it has RJ45 sockets installed already so that would not work with the bulk CAT5 cable that you've purchased.
    Still, I'd buy some cheap preconfigured Ethernet cable at twice the needed length and cut it in half. Stripping the insulation off and soldering Ethernet cable can be a PITA. The insulation used on ethernet cable shrinks/melts quickly when touched with a soldering iron so you've got to be quick. Thats where the pre-configured RJ45 plugs help !

    If you don't want to do that, the termination resistors on the said adapter are 100ohm and go directly onto the 4 pins used by the OctoWS library (or so I believe).

  10. #10
    Yes, thanks. I already have the Octo and 50ft of Cat6. mb

  11. #11
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,796
    I have a pair 50 ft cables, purchased months ago, for no reason other than testing the Octo28 adaptor with long wires. Sadly, I'm always too busy with tons of other stuff to really investigate things like this.

    At the moment, my LEDs are on loan to a DJ for a festival. When they come back, maybe I'll give those long cables a try.... while also converting OctoWS2811 to the new DMAChannel stuff.

  12. #12
    Junior Member
    Join Date
    Feb 2015
    Posts
    9

    Question Now this is weird

    Quote Originally Posted by PaulStoffregen View Post
    I have a pair 50 ft cables, purchased months ago, for no reason other than testing the Octo28 adaptor with long wires. Sadly, I'm always too busy with tons of other stuff to really investigate things like this.

    At the moment, my LEDs are on loan to a DJ for a festival. When they come back, maybe I'll give those long cables a try.... while also converting OctoWS2811 to the new DMAChannel stuff.
    Hi,

    Did you have any luck?

    I tried to connect a string of 2m of WS2812b LEDS (two 1m sections of 144 leds/m) to an OctoWS2811 via a roughly 20m length of CAT5e cable (for data - power is local to the string, ground is looped back to the Octo) and, as expected, it didn't work.

    But here is the really interesting part.... if I put that cable between the two 1m sections of WS2812, then it worked fine. In fact, I've tried up to 55m (180 feet) of cable without the slightest problem (to be really silly, I even mixed the UTP and some lightweight figure 8 speaker cable!). To be clear, configuration is:

    Octo -> 1m WS2812 strip -> 55m (180 feet) cable -> 1m WS2812 strip

    Power supplies local to the strips, common ground (0v) cable joining all entities

    This has worked for several hours so far without the slightest glitch.

    Has anyone else ever tried this?

    Next thing to try - single LED adjacent to the Octo, and use that as a 'long line' driver. Also longer lengths of cabling, and driving multiple strips

  13. #13
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,796
    You're using the octo adaptor board, right? This isn't a Teensy pin with 3V signal directly driving the cable, is it?

  14. #14
    Junior Member
    Join Date
    Feb 2015
    Posts
    9
    Quote Originally Posted by PaulStoffregen View Post
    You're using the octo adaptor board, right? This isn't a Teensy pin with 3V signal directly driving the cable, is it?
    Hi - thanks for the quick response!!

    Yes - an OctoWS2811 adaptor board.

  15. #15
    Did anyone have any luck with this? I may need to run a project where the furthest connection starts 7.5m away. Really don't want to rack up any more expense...before I start...

    I would be using an Octo adaptor board if that helps.

  16. #16
    Junior Member
    Join Date
    Feb 2015
    Posts
    9

    Yes, it works :)

    Quote Originally Posted by andrewgardner View Post
    Did anyone have any luck with this? I may need to run a project where the furthest connection starts 7.5m away. Really don't want to rack up any more expense...before I start...

    I would be using an Octo adaptor board if that helps.
    Hi,

    So, what I ended up doing is using the OctoWS2811 board to drive a single WS2812b pixel (per channel) adjacent to the board (so 8 pixels on a strip board illuminating the Teensy & Pi driving that), and then running 8 channels from that to the installation. Driving just over 2,500 WS2812b pixels broken into 8 identical sections in a string over 18 meters long (using 144 pixel / meter strips). Run from the controller to furthest pixel is over 25m of cable.

    Works flawlessly for days at a time at over 100 updates per second.

    You shouldn't have any problems at all! .... assuming you've got adequate power supplies, all common grounding / 0v, decent code, etc

    I've subsequently stopped using level shifters (ie what the Octo board has) for most of my projects as I can achieve the same outcome by offsetting the controller power supply with two diodes (see my video at https://www.youtube.com/watch?v=letCT3vq8V4). Of course I still use the Octo board for more complex / permanent installations, as it's just a really nice way to mount the Teensy and makes connection via RJ45 really straightforward.

    Hope that helps!

  17. #17
    Thanks heaps for the detailed explanation mate! I see from the vid you're an Aussie - I'm up here in Townsville, Queensland. Might sound silly but it's been rare for me to see Aussie input on this stuff so much.

    So if I am interpreting correctly, I would just cut a single LED and add it really close to the Octo and then run my UTP (which would have to now be stripped right back) from there to my first pixel on the snake? Would that "buffer" pixel require power?

    Here's the rough idea of the project at hand:

    8 banks of 6 rows at 2.5m running ws2812 150 LED/s per meter.

    Would I be pushing my luck for an image on how you would wire that (or even just one "bank"/channel) off the octo? Just a quick sketch would be so appreciated although I fully respect that people are busy and no pressure if not.

    The next thing is that would mean there would be a "dead" pixel at the end of each snake line right? Or do you just add the extra pixel somewhere in your code to counteract that?

    I will post my code later if that helps.

  18. #18
    Junior Member
    Join Date
    Feb 2015
    Posts
    9
    Quote Originally Posted by andrewgardner View Post
    Thanks heaps for the detailed explanation mate!
    No worries mate

    So if I am interpreting correctly, I would just cut a single LED and add it really close to the Octo and then run my UTP (which would have to now be stripped right back) from there to my first pixel on the snake? Would that "buffer" pixel require power?
    Yes, and yes. Each pixel buffers & regenerates the signal to the next pixel, and requires power to do so.

    8 banks of 6 rows at 2.5m running ws2812 150 LED/s per meter.
    Didn't realise they made 150 LEDs/m strips. The densest I ever got was 144 L/m. In fact, I just checked and can still only find 144 L/m strips. What strips are you getting that give you 150 L/m?

    You'll need to be really careful of a couple of things in order for this to work:
    1. Power -- each LED takes something like 34mA (when full on -- 'white' RGB:255:255:255). Not much, but multiply this by 144 and that's 5A / 25Watts per meter (even more at 150 L/m)! These LED strips tend to have very skinny power rails, and so they really struggle to carry that for much more than a meter or two without noticeable dimming and heating. This means you'll need to cut the positive rail (at most) every couple of meters to inject power using a fairly heavy gauge wire.
      Furthermore, total current draw for a big installation can be huge. Just trying to work out your total LED string length - is each bank 2.5m, or each row? If bank, then you've got 8 x 2.5 = 20m of LEDS in total which is about 100 Amps / 500 Watts of power at full welly. If each row is 2.5m, then you've got 120m of LEDs which is 600 Amps / 3000 Watts of power.
      Ummmm... that's huuuuge! What power supplies are you using?
      Approach with caution either way.
      Also, strongly recommend that each LED string power feed also be fused as otherwise you've got a major fire danger
      Aaaaand - corollary -- cooling. LEDs don't like getting hot. How are you planning on mounting and cooling them?
    2. Bank length & timing -- What libraries will you be using to drive this? Are you using FastLED, Neopixel, just Octo, Fadecandy, or other...?? What sort of effects are you expecting to render? It takes approx 5ms per meter to update 144 LEDs. Sounds fast, right? Well, consider an effect where you have some sort of soft palette background colour for all LEDS, with a strong foreground colour which zips along from one end of the string to the other. If that foreground colour needs to go from pixel to pixel, and you want it to travel the length of a bank (2.5m) in 1 second, then you need (144 x 2.5 =) 360 updates (frames) per second. Unfortunately, at 5ms per meter, the best you can hope for is about 80 frames per second. Time to rethink that effect...
      It's actually not such a huuuuge issue (though will stop FastLED from doing temporal dithering) as there are many workarounds / alternatives to creating effects -- but you'll at least need to be aware of this sort of constraint....


    In fact, if this is your first project of this nature, then I strongly recommend you just buy yourself a Teensy, OctoWS2811, a couple of meters of LEDs, and a PSU, and do a bit of a proof of concept / prototype. Get everything nutted out fully before going the whole hog. Then, when you're ready to proceed, buy another Teensy, Octo etc for the production unit, and keep on using the test bench for prototyping & testing...

    Would I be pushing my luck for an image on how you would wire that (or even just one "bank"/channel) off the octo? Just a quick sketch would be so appreciated although I fully respect that people are busy and no pressure if not.
    Octo --- "buffer" pixel ------------------------------------------------------- rest of pixels

    --- equals +/- power and data. Assuming 8 banks of 2.5m, then for each bank cut the positive line at the first of the 'rest of pixels' and half way along, and feed 5v power in half way along the strip or in both ends, whichever is easier. Don't forget the fuses! If feeding 2.5m bank of 144 L/m, each half requires a max of (1.25 x 5 =) 6.25A at full welly. M205 Ceramic 6.3A slow blow fuse (https://www.jaycar.com.au/m205-cerma...-6-3a/p/SF2119) should be fine for that.

    Also, don't forget to cut the USB power pad on the Octo if you're ever planning on plugging your computer in whilst powering the Teensy from the LED (or other) PSU!


    The next thing is that would mean there would be a "dead" pixel at the end of each snake line right? Or do you just add the extra pixel somewhere in your code to counteract that?
    Nope, no 'dead' pixels unless you want it. You address every single pixel & so get to decide what it does. Your code doesn't know or care about the length of wire between pixels.

    The only constraint (unless you want really tricky code) is to make each bank the same number of pixels.

    In my setup I have three logical 'sections' of LEDs which I render effects to. One section is the 8 pixels which illuminate the Pi / Teensy / Octo (these map to physical pixel numbers 0, 342, 684, 1026, 1368, 1710, 2052, & 2394), one section illuminates a separate smaller recessed section of the room (mapping to pixels 1 through to 856 - skipping, of course, pixels 342 and 684), and the third bank is the larger approx 16.5m run (pixels 857 through to 2,735). In one option of my code I render three different effects (one for each logical section), and then map these out to the single array which represents the entire string, which then gets chopped into 8 banks by the library and gets streamed out.

    it's amazing how much work the Teensy can actually do thanks to the Octo library's DMA magic coupled with the genius of the FastLED library!

    I will post my code later if that helps.
    Up to you...

  19. #19
    Hey MrFusion.

    Wow! Thanks again for the detailed reply - that's incredible.

    I have made a display before - here's a link: https://docs.google.com/uc?id=0B6w4d...xport=download so I am pretty confident with it all just thought I might run into issues with the distance.

    Now, I will have to apologise, I was rushing home to my 6 week old son who got his injections yesterday afternoon and was not thinking straight at all! I got the 30/m and mixed up with the 150/5m reel figures messed up in my rush!

    So it would be 6 lengths at 2.5 meters long at 30 leds per meter x the 8 outputs on the octo. So 3600 pixels all up. So sorry to waste your time with the confusion.

    I'm not on my normal PC but this is some of the original code that my friend Chris Rees made up running 10 Universe's over E1.31 https://gist.github.com/mrrees/d4ab8...d8b4f69d8105ec

    And I think I get what you're saying about the patching - essentially just move everything down one pixel or leave a gap in the patching where those pixels sit at the start of each snake line.

    As for the build. I am thinking of building 8 timber frames and mounting the LED strips on them with PSUs and all that on each frame so then I can hang them on our stage (1 on each side where it's black and 6 "banks" along the top with all the strips facing the audience and a small angle down towards the triple wide projector screen) - This video might help make a little more sense https://www.facebook.com/shoutconf/p...388538/?type=3

    Now the reality is that I'm kinda on a budget if I get approval so will have to do everything as cheap as possible but still solid enough to last a year or two.

    Oh and I will just inject power at the start of each 2.5 meter strip with cheap 1.5 or 2 mm mains wiring from bunnings because the DC runs will be so short being that each "bank" will have it's own PSU so close.

    Hope that makes sense and thanks again for all your help.

    Cheers,
    Andrew

  20. #20
    Sorry - that was just a photo - here's a video of us using our current screen during our friday night youth service:

    https://www.facebook.com/shoutyth/vi...6323467416518/

  21. #21
    Junior Member
    Join Date
    Feb 2015
    Posts
    9
    Quote Originally Posted by andrewgardner View Post
    Wow! Thanks again for the detailed reply - that's incredible.
    You're welcome.

    I have made a display before - here's a link: https://docs.google.com/uc?id=0B6w4d...xport=download so I am pretty confident with it all just thought I might run into issues with the distance.
    Looks great. What pixels are you using (can you send me a link please)? I'm relieved that this isn't your first rodeo as it's a reasonably big & complex project. Difficult to get right, robust, reliable, etc. Especially if it has to survive a couple of years.

    Now, I will have to apologise, I was rushing home to my 6 week old son who got his injections yesterday afternoon and was not thinking straight at all! I got the 30/m and mixed up with the 150/5m reel figures messed up in my rush!
    All good.

    So it would be 6 lengths at 2.5 meters long at 30 leds per meter x the 8 outputs on the octo. So 3600 pixels all up. So sorry to waste your time with the confusion.
    No worries

    I'm not on my normal PC but this is some of the original code that my friend Chris Rees made up running 10 Universe's over E1.31 https://gist.github.com/mrrees/d4ab8...d8b4f69d8105ec

    And I think I get what you're saying about the patching - essentially just move everything down one pixel or leave a gap in the patching where those pixels sit at the start of each snake line.
    Ahhh... so you're not generating the effects on the Teensy, just streaming them via E1.31. Nice. On that sort of setup you should also be able to stream (some very low res) video.

    In this case I probably wouldn't get around the buffer pixels by messing with patching etc. I'd 'hide' the buffers in code on the Teensy. That way your effects generator just sees 8 banks of six strings of LED snakes which is bog standard. Depends on what software you're using -- but should be much easier. You can also use the buffer pixels as status etc indication for the Teensy (ie turn green when it sees an E1.31 stream, orange if the stream doesn't match the pixel config, red if stream corrupt, etc).

    Had a quick squiz at the sample code. Presume you'll be just streaming the E1.31 over USB serial to the Teensey. In that case FastLED is probably a waste of time in this setup as you should be able to drive the pixels directly with the Octo library. I'd only use FastLED if you were generating effects on the Teensy (which isn't a bad idea... just a lot more code )

    As for the build. I am thinking of building 8 timber frames and mounting the LED strips on them with PSUs and all that on each frame so then I can hang them on our stage (1 on each side where it's black and 6 "banks" along the top with all the strips facing the audience and a small angle down towards the triple wide projector screen)... Oh and I will just inject power at the start of each 2.5 meter strip with cheap 1.5 or 2 mm mains wiring from bunnings because the DC runs will be so short being that each "bank" will have it's own PSU so close.
    If you hang the PSU on the back of the frame, then a bit of Bunnings 2.5mm building wire would be perfect. Injecting power at the beginning & end of every 2.5 meter strip would be ideal to minimise voltage drop and heating (so, feed power (+ and -) into both ends of each strip, teeing in the middle strips ie: |-----T-----T-----T----T----T-----| ). Would be a bit concerned about overheating the LEDS themselves (especially if you're driving at full welly the whole time) -- but depends on the pixel strips you're using. Might be an idea to mount the strips on a piece of aluminium flat bar (eg https://www.aluminiumwarehouse.com.a...rice&order=ASC) and then mount that on the timber.

    Hope that makes sense and thanks again for all your help.
    Yep.

    Good luck.

    Cheers.

  22. #22
    Junior Member
    Join Date
    Feb 2015
    Posts
    9

    What pixels?

    Quote Originally Posted by andrewgardner View Post
    Sorry - that was just a photo - here's a video of us using our current screen during our friday night youth service:

    https://www.facebook.com/shoutyth/vi...6323467416518/

    Hi,

    What pixels are you using? Could you send me a link please?

    Thanks!

  23. #23
    Yeah we run it over a network - it's pretty legit.


    I ordered them from here. Cost was approx $2k + got hit a bit a customs.

    http://www.shiji-led.com/ - they were the 26mm 12v ones with the ws2811 chip in them. Not the cheapest but out of 1650 I only had one that was a little faulty where the blue wouldn't turn off fully.

    I am looking at slowing down on the project a bit. I would love to scale it up for our next community Christmas carols and do a 10,560 pixel display although considering we are a church / non-for-profit I am limited in funds. Might sound like a stupid questions but do you know of any sites that are into crowd funding for projects like this? It would be 64 universe of data all up and approx 586 amp at 5v so really cool.

  24. #24

  25. #25
    Junior Member
    Join Date
    Feb 2015
    Posts
    9
    Quote Originally Posted by andrewgardner View Post
    Ahhh. Nice. Thanks.

    Guess you don't need to worry much about them overheating as there's not much you can do about it!

    Sorry, don't know of any sites specifically crowd funding these sorts of projects, but guess you could try GoFundMe or similar.

    For bigger displays (eg your 10k+ size projects) I'm guessing you'd use multiple Teensys in order to avoid issues with update lag of longer strings...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •