LED Mapping

    Feb 26 2014 | 2:05 pm
    Hey all,
    I have been working on a project for awhile called Möbius. It's a LED installation in the form of a mobius lemniscate (infinity symbol). Here's a video of it in action.
    Now we're adding to the functionality and we're installing WS2811 (individually addressable LEDs) along the edges, which adds about 700 RGB values that have to be generated. Unfortunately, I'm not a very good programmer and don't really know how to approach sampling this many pixels.
    In order to show what I mean, I attached a picture of the LEDs in the installation. The cyan LED stripes are the LEDs that are currently installed and already implemented in Max using the 'getcell' message. The orange lines are the new LEDs that will installed.
    I know that I could make a very long, thin matrix and use jit.iter to spit out RGB values but then the physical relationships would be gone (i.e. mapping). Does anybody have a solution to this short of using 100s of 'getcell' messages?
    I hope I'm making myself clear…
    Greetings from Vienna, stefan

    • Feb 26 2014 | 10:43 pm
      You don't say how you are controlling the lights - DMX or Arduino? And where are you sampling the pixels from?
      I found that I couldn't drive more than about 100 pixels at a decent frame rate using jit.iter
      I'm not sure if the bottleneck could've been avoided by adjusting some settings somewhere but I ended up Syphoning into a Processing sketch.
      I switched to a Teensy as it has a greater bandwidth but sure there are other solutions.
    • Feb 27 2014 | 1:41 am
      I'm controlling the lights with DMX.
      I'm using David Butler's nifty imp.dmx external which outputs ArtNet to an Enttec ODE. From there the DMX goes to a few led dimmers.
      I'm still looking for hardware solutions. The TinyPix looks quite cool http://www.holidaycoro.com/DMX-to-SPI-Smart-Pixel-Decoder-Controller-p/611.htm
      Would you recommend the Teensy? Is it DMX compatible?
    • Feb 27 2014 | 2:28 am
      I use a Teensy 3 and output data via USB serial using one jit.spill for each plane and combining the whole frame as a list using mxj List.Multiplex It's blazing fast... The Teensy 3 is really one of the greatest microcontrollers out there. You can also output dmx with the teensy but it's an un necessary step in my opinion... I also made a midi to dmx box using the teensy: https://github.com/natcl/dmx_midi
    • Feb 27 2014 | 3:35 pm
      Now correct me if I'm wrong but my reservations about the Teensy is that it is USB based, which means the length of cables is limited. Also, is it possible to chain multiple Teensy's (Teensies?) together?
    • Feb 27 2014 | 3:40 pm
      It is indeed USB but there are several ways of dealing with that. You could have the Teensy near the computer and run a CAT5 cable to the leds for data. You can not "daisy-chain" like say firewire but the OctoWS2811 library has a sync feature where you can sync multiple teensies together for large projects. keep in mind a single teensy 3.1 can control around 3000-4000 leds...
    • Feb 27 2014 | 6:58 pm
      There's also a board coming that will ease the process of using ethernet cable: http://forum.pjrc.com/threads/25021-Series-resistor-HCT245-Adafruit?p=41358&viewfull=1#post41358
    • Mar 02 2014 | 4:12 pm
      Wow, the more I read about the Teensy, the more impressed I am. Thanks for the links.
      Could you maybe post the code you used for the USB serial output? How many LEDs were you controlling? I realized that I will be controlling 938 pixels, which is doable with a single Teensy 3.0, correct? Is there something like the OctoWS2811 library for Max?
    • Mar 02 2014 | 7:47 pm
      Yes you'll be able to drive 938 leds using multiple pins. The more pins you use the faster the refresh rate will be. You can check the code I used here: https://github.com/natcl/piano_des_rues It was driving around 160 leds I think. You might hit a bottleneck with the mxm list.Multiplex object, someone on the teensy forum used a special version of the serial object to get around this, i'll try to find the post. The basic Idea is to send a full frame worth of information to the serial object. The Teensy's serial speed is not limited to 115200, it can go up to 12mbps so the actual rate of the serial object in max doesn't affect transfer speed.
    • Jun 27 2014 | 3:19 pm
      Thanks for the help Nat. Did you ever find the post on the Teensy forum? I couldn't find it. It seems that the serial object has trouble sending a frame that has more than 1024 values (341 pixels).
    • Apr 29 2015 | 2:02 pm
      Hi Nat,
      I'm a bit confused. What was the role of the teensy in this project? Was it outputting to cat5 ? I'm curious about doing a serial USB to DMX using the teensy3.1
    • Apr 29 2015 | 2:18 pm
      Hello, The Teensy was controlling the leds directly over serial usb. I also made a usb midi to dmx box that could be easily converted to usb serial: https://github.com/natcl/dmx_midi The refresh gets slow above 128 channels though due to a limitation of the DmxSimple library used.
      You can also check this code which controls led strips directly from Max: https://github.com/natcl/MaxLedStrips
    • Jan 26 2016 | 4:11 pm
      HI Nathanaël and others > You might hit a bottleneck with the mxm list.Multiplex object, someone on the teensy forum used a special version of the serial object to get around this, i’ll try to find the post. I'd be interested to know more about this "special version" of the serial object, as I'm having issues to send big lists (over 1024) to the canonical serial object... (I've just reported about this here: https://cycling74.com/forums/sending-long-messages-to-the-serial-object/)
      Any hint ?
      Thanks in advance,