mobile Octows2811 project/advice

Status
Not open for further replies.

Ukiah

New member
Hey Guys. I have an idea for a project but need a whole lot of advice. I'm a beginner in pretty much every aspect but am a quick learner and have been trying to teach myself as much as possible. Here is the basic rundown of my idea: I want a relatively small RGB led matrix that is completely mobile and battery pack powered. The unique part of it is that it will be an irregular shape (I'll go over this later), I want it to be able to play/display simple animations, I need the leds to be as tightly packed as I can get them, and they'll be mounted to a curved surface. All I have right now is an arduino so I've been playing around with color cycles with that but a friend of mine pointed me to the Octows2811 library as a solution. My basic idea is to have the display look something like this:


********************
********************
_******************_
_******************_
__****************__
__****************__
__****************__
_******************_
_******************_
********************
********************

That's sort of a crude example obviously but hopefully you get the idea. My original idea was to just solder individual RGB leds as closely together as I could get them but I can see the advantages of using strips. I think the final project will have no more than 500 leds. My question is do you guys think Octows2811 is the best solution? Or does anyone know of a different resource for this type/scale of project? Being able to display animations is a huge part of the project so that's a must, as well as being ultra portable/something I can carry on my body. Any ideas? Thank you all for your input!!
 
"Best" is hard to answer, but yes I think OctoWS2811 could be part of your solution because it's easy to use and fast. Depending on how the physical layout works you'll probably have to do some kind of pixel location computation (or even just a look-up table) to translate X,Y(Z?) coordinates into pixel strip locations but that's a problem you'll only have to solve once.

Regarding soldering LEDs yourself vs using premade strips, it will really depend on your actual physical design. There's a couple strips out there now with 144 LEDs per meter on eBay, Aliexpress, etc. - here's one from Adafruit: http://www.adafruit.com/products/1507; if you can make the premade strips work then I'd do that just to simplify things.

Does "animations" mean blasting predrawn bitmaps out to the pixels or do you mean computing cubic splines on the fly? For the former you can just add memory if the Teensy 3's 128K isn't enough, either a SPI Flash chip or SD card reader; for the latter it will really depend on how much computation you need to do and how many frames per second you need.

Finally, you're going to have to think about power. Do you need to be able to drive all 500 LEDs at full brightness for 8 hours? That's probably two car batteries. Or is 1/4 max brightness with only 20% pixels lit at a time and a 2 hour runtime OK? A pair of these http://www.amazon.com/EZOPower-Capa...Blackberry/dp/B0097EHRDI/ref=pd_sim_sbs_cps_3 would work for that.

Good luck!
 
+1 to potatotron's suggestion of a lookup table. I build the lookup table based on rules to work around my particular asymmetrical layout quirks (HVAC register prevents some rows from being complete, one strip was installed in reverse orientation, etc). So all that ugliness lives in a separate buildLedIdxMap() function and only gets called once. Then I can call draw(ledLookup[someIdx], color);

I love the speed of OctoWS2811 (I'm at over 1300 LED's per teensy and it's working great). I can't give much advice re: power consumption, but these LED's are surprisingly thirsty in that regard, so definitely run the numbers there (as potatotron did to arrive at 20% pixels lit -> 2-hour runtime) before-hand.
 
Firstly, thank you both so much. This is all extremely helpful even if I don't understand half of it yet :) Those strips from Adafruit actually look perfect, I hadn't seen any strips that tightly packed yet, and since being thin will also be a concern those look perfect. As far as animations go I mean anything from scrolling color fields to complex video feeds. Probably mostly the former, I don't expect to be building a video screen, it being "pixel art" is part of the idea anyway. My ideal situation would be to have something built where I could have it all hooked up to bluetooth then have some sort of simple iphone app where I can push a certain animation and it'll send it to the matrix. That being said I'm not really thinking that far ahead at this point. In terms of brightness I'll definitely never need/want these things at full brightness for any stretch of time, 1/4 should be more than enough, but I'm thinking that most of the screen will probably be lit at any given time depending on the animation being displayed/what sort of color density we're talking about. And yeah two hours should be more than enough per charge.

The link to those strips says because of the timing needing they're best suited for an arduino, this might be a stupid question but can OctoWS2811 be used on an arduino/on strips this dense? Basically the whole idea of this project is to have a mask made of an led matrix, so it'll be about the size of my face and all the components will have to be wearable, so the extremely small size of the teensy would be nice but I could use something bigger if I had to.

Again thanks for the help guys, you're making me even more excited for a project I was already pretty excited for. Keep the ideas flowing and I'll go find out what a look-up table is :)
 
Bear in mind that a Teensy 3.0 is much more powerful than an Arduino Uno. Lets see:
  • Uno is an 8 bit AVR, Teensy 3.0 is a 32-bit Arm, this means the Uno often times has to do several instructions to do the same thing the Arm does in one;
  • Uno runs at 16 Mhz clock speed, Teensy 3.0 runs at 48 or 96 Mhz;
  • Uno has 32k flash memory for programs, Teensy 3.0 has 128k (note due to the different architecture, it isn't a 1-to-1 comparison);
  • Uno has 2k of SRAM, Teensy 3.0 has 16k -- if you are running light streams like the neopixels, you tend to need 3 bytes of SRAM for each light that you support, so you can support more lights on a Teensy 3.0;
  • The Teensy 3.0 has Paul tuning the libraries and infrastructure, the Uno has presumably talented people in Italy, but performance doesn't seem to get much attention in release notes.
  • On the Teensy 3.0, you can run OctoWS2811 :cool:

Now, the one area that the Due (the Arduino Arm) does beat the Teensy 3.0, is the Due has 96k of SRAM, so if you were trying to support more than 4,000 lights on a single box, perhaps you would need to go to the Due.
 
Last edited:
The link to those strips says because of the timing needing they're best suited for an arduino, this might be a stupid question but can OctoWS2811 be used on an arduino/on strips this dense?

Well sure THEY say that…

Kidding aside what Adafruit means is that you need to send data to the WS2812 chips (that's what's inside those LED pixels) at a very specific timing. With an Arduino (any Arduino) you can do this pretty easily because you have 100% control over what the MCU does. Other boards like the Raspberry Pi run something like Linux or another preemptive multitasking operating system where it becomes hard/impossible to guarantee your LED update code won't get suspended for a few ms while the OS does other stuff, which screws up the timing.

There's several libraries that support the WS2812s, e.g. Adafruit's Neopixel, and as far as I know at least one version works on every Arduino except the new Tres. I've used Neopixel with 32 WS2812s connected to a barebones ATMega328 running on the internal 8Mhz clock, and it works fine.

No non-Teensy3 Arduino (or anything else) is going to update the LEDs faster than any of the others; the LED clock runs at 800 Khz so they'll all update the same. With the Teensy3/OctoWS2811, however, you've got 8 lines sending data simultaneously so in the time it takes a regular Arduino to update 125 LEDs the Teensy3 can do 1000.

What I'd probably do for complex video feeds is use a PC to pull out the bitmaps, mangle them into OctoWS2811 displayMemory data blocks, write that data to a SD card, plug that card into a reader on a Teensy3, then use code like this:

1. Read next bitmap from SD card
2. Copy that bitmap to displayMemory
3. Call leds.show() to blink the lights
4. Wait ~1/30th of a second
5. Repeat

If I needed something more real-timey (e.g. LEDs reacting to music or Twitter etc.) I'd connect a WiFi module to my Teensy3 and listen on a UDP port for data & copy it to displayMemory / calls leds.show() when it receives packets, and use a Python etc. script on a laptop to generate and transmit the data.

Finally, don't underestimate the fact that blinky lights are neat by themselves. Just doing something like drawing random circles, squares, and triangles in random colors can look pretty fancy. It's easy to bolt Adafruit's GFX library on top of OctoWS2811 and get cool effects with most of the hard work already done.
 
the Uno has presumably talented people in Italy, but performance doesn't seem to get much attention in release notes.

When it comes to fast Arduino or Arduino-like libraries for driving many LED strips, I believe nearly all the development so far as been done by three Americans: Phil Burgess, Daniel Garcia, and me. We might soon be joined by Trammel Hudson from New York. As far as I know, no similar libraries have been published by anyone in Italy or anywhere in Europe.

For a very large number of LEDs (1000+), there are currently 3 fast solutions: OctoWS2811 for WS2811/WS2812, and Phil's FTDI-to-parallel & my serial-to-parallel programs for LPD8806. Trammel is reportedly working on something new?

If you want the animation to be done on the microcontroller, without a PC or Mac (or RPi or BBB) connected, OctoWS2811 is probably the only viable solution right now. Phil's FTDI thing and my serial2parallel hack are only for streaming from USB to 8 parallel strips of the LPD8806, which can handle fast clock rates. They can't generate the animations locally.

Arduino Due could, in theory, do these sorts of things. But so far, nobody has written a library like OctoWS2811 for Due. Arduino Due does have a DMA controller which might be up to the task (maybe?), but it's completely different than the one in Teensy 3.0.
 
Last edited:
I'm building something similar, and power is a big concern of mine. I've previously used 12v non-addressable ribbon with 600 LEDs, which can be driven direct from 3x 18650 batteries (e.g. http://dx.com/p/rechargeable-3-7v-2400mah-18650-li-ion-battery-w-protection-board-blue-2-pcs-226352)

The WS2811 ribbon is 5v, and Paul said in another thread (which I now can't find!), they do need to be driven above 4v to be reliable. I'm probably going to use 12 (yeah, 12!) batteries wired up 6x2 with this - http://www.hobbyking.com/hobbyking/...v_2_12s_sbec_w_selectable_voltage_output.html - as the regulator.

I haven't built this yet, so am open to other suggestions, but that's the best way I can think of doing i
 
Status
Not open for further replies.
Back
Top