Buy Magic Mushrooms
Magic Mushroom Gummies Best Amanita Muscaria Gummies

LEDscape

 Uncategorized  Add comments
Jul 272013
 

LEDscape test

Are you building a giant LED display for your hackerspace or Burning Man and need a way to control multiple kilometers of LED strips? Are you tired of running massive USB hubs of Teensys for each row? Then you might be interested in my LEDscape code for the BeagleBone Black to drive up to 500 meters of WS2811 RGB LED strips at 30fps.

On the Teensy 3, Paul’s OctoWS2811 makes very clever use of three DMA engines to generate the bit-train for the WS2811 LED strips, but only supports up to eight strips. Beth’s FadeCandy improves on Paul’s work and has a great frame rate with beautiful interpolation (and a custom USB protocol to pump pixels fast enough to keep up with the frame rate), but the temporal dithering and expanded colorspace features run into frame rate and memory limitations at strips beyond 64 pixels.

The BeagleBone Black has far more memory than the embedded AVRs (512MB versus 16KB) and the AM335x ARM Cortex-A8 has a killer feature: two built in PRU (“Programmable Realtime Units”). These are embedded real-time microcontrollers built into the ARM core with full DMA to main memory and control over all of the IO pins. This afternoon I hacked up a quick proof of concept in PRU assembly that use one of the units to drive 32 of the WS2811 strips at full speed with zero CPU load and easy double-buffering of the image. The best parts of writing for the ARM instead of the AVR is that there aren’t any issues with running out of memory for image processing and there is built-in ethernet for OSC or other visualization libraries.


The drawback to the BeagleBone is that the 3.3V signals won’t travel very far for large scale displays. Matt Mets (of Blinkiverse and Blinkitape kickstarter) and I are designing a “cape” to add 32 RS485 drivers to translate them to differential signals for longer runs. Add in art-net support and it will be part of an awesome DMX/VJ system.

 Posted by at 11:39 pm

  23 Responses to “LEDscape”

Comments (20) Pingbacks (3)
  1. Finally

  2. I SO WANT THIS!. 32 channel rs 485. mmmm telescope control 🙂

  3. This is awesome. I’ve got your code running on my beagle bone, and driving some WS2812s, but I’m new to EE, and I’m curious what you’re doing with the resistor in the image on this post. It seems that you’re using it to bring the 3.3v logic up to 5v, somehow…

  4. I’m curious how fast the BeagleBone Black boots from no power to LED functionality. Can you time yours for me next time you get a chance?

    • It takes about 28 seconds from plugging in the usb cable (used for both power and network data) to outputting data to the LEDs. This is with no optimization of the boot-up sequence or any tweaks for speed. I’d love to make it faster.

  5. Would a simple logic converter to bring the voltage up to 5v be fine? They’re used for many other BBB projects.

  6. I can’t figure out from the code of a teensy is needed or not – can I run light sequences with ~250 WS2811 pixels from a beaglebone standalone (i.e. no pc or teensy or anything else required – once the software’s uploaded of course!) or does it need a teensy/pc permanently connected?

  7. Nice! I’ve been hunting for a WS2812B solution for a LED array of 40 wide x 32 high. The artnet solutions aren’t quite big enough, and I haven’t gotten the tpm2.net stuff to work on Arduino w/ ethernet yet. I found 3 free applications for driving these LED arrays (PixelController from Pixel Invaders, Glediator, and Jinx!) Each has it’s own advantages and disadvantages, and supported hardware.

    I really think artnet and dmx universes is not the way to be doing this LED stuff, but it’s what the existing software seems to support. The Tpm2.net and generic UDP style protocols of PixelInvaders looks a bit promising, and I think the UDP protocol is supported by the Python script PixelPi (Which cannot drive the WS2812B due to timing inaccuracies?)

  8. Is the LED Controller cape available now? If not is it possible to get a beta board and provide testing/feedback? I and those in my Hacker Space would love to try this out.

  9. Adding my Twitter handle as a way to get a hold of me if any of the below is possible: @chicagowayvito:disqus
    Is the LED Controller cape available now? If not is it possible to get a beta board and provide testing/feedback? I and those in my Hacker Space would love to try this out.

  10. It looks like this is taking up almost all the GPIOs on the Beagle.
    Is it possible to just use a couple pins for LEDScape and leave the others free ?
    I’m not trying to drive a huge array, just a Lightring/strip of 24-60 WS2812s.
    This would clear up some cabling clutter and save me from having to use a Teensy, but I need to be able to use at least 2 UARTs for serial comm to other devices that are part of the project.

  11. Would this code work with the new Pocket BeagleBone?

  12. What ever happened to this project. Was a cape ever made for the BBB?

  13. Hey,

    Aim: Control WS2812B LED strip (5 LED) on Beaglebone Balck (Data Pin = P8_10).

    I have BeagleBone Black and WS2812B Led Strip of 5Leds. i am trying to find code in c for that. but all the source library is written for the AVR board.

    How I got my solution?

    Thank you.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)