OctoWS2811 Portable Project Questions

Status
Not open for further replies.

doubly

New member
I'm looking to do a small portable WS2812 2D Display powered by battery and am planning on controlling it with a Teensy 3 using OctoWS2811.
I have a few questions:


1. It says that LED Strips can be shorter than the max size strip in the array, and I see how that works (wasted memory but proper display effect). But can I have the shorter strips start further across the row?

Example:
0-29 LEDs in the first strip (max strip size),
then only 5 LEDs in the second strip but its first LED starts at position 45 instead of 30 (so that 30-44 are ignored/not present).

2. I see video can be streamed from a computer, but can it be played back from an SD Card breakout?

3. Can the Adafruit_GFX library be used with OctoWS2811 like it can with the Adafruit_NeoPixel library, and if not what is the best way to code visuals with OctoWS2811? (Assuming no computer connection during playback)

4. Where should I purchase 74HCT245? Do I understand correctly that I need to connect 220ohm resistors to the T3, then the resistors to the 74HCT245, and then the 74HCT245 to the LED Strip to get 5v with clean logic?

5. Can you recommend a battery solution for this project (assuming less than 120 LEDs).


Thanks in advance to anyone that can take the time to help me make this project a reality!
 
1. It says that LED Strips can be shorter than the max size strip in the array, and I see how that works (wasted memory but proper display effect). But can I have the shorter strips start further across the row?

No. It simply doesn't work that way.

2. I see video can be streamed from a computer, but can it be played back from an SD Card breakout?

I believe this could be done, if the correct raw data format were stored on the card. The SD library may only be fast enough if you read in 512 byte chunks. So code would likely be needed to read 512 bytes at a time and keep the leftovers for the next frame. Simple, but at extra step.

The general theme here is... hasn't been done yet. Ought to be possible, but you'd be the first, so you'll have to write all the SD side stuff, including some sort of utility to format and store the file on the card.

3. Can the Adafruit_GFX library be used with OctoWS2811 like it can with the Adafruit_NeoPixel library, and if not what is the best way to code visuals with OctoWS2811? (Assuming no computer connection during playback)

I'm not sure. I really don't know enough about Adafruit_GFX.

Again, this is a case of 2 well established libraries that do most of the difficult stuff for you, but definitely a DIY element of stuff you need to do to make them work together.

4. Where should I purchase 74HCT245?

If you're in the USA, Digikey is probably the easiest.

Do I understand correctly that I need to connect 220ohm resistors to the T3, then the resistors to the 74HCT245, and then the 74HCT245 to the LED Strip to get 5v with clean logic?

If the wires between Teensy and the '245 are short, no resistors are needed.

Using 100 ohm resistors at the outputs of the '245 might be a good idea. It depends mostly on the length and quality of the wires you use between the '245 and LED strips.

5. Can you recommend a battery solution for this project (assuming less than 120 LEDs).

A really big one, if you want it to run for any substantial length of time. The LEDs use a lot of current.
 
3. Can the Adafruit_GFX library be used with OctoWS2811 like it can with the Adafruit_NeoPixel library, and if not what is the best way to code visuals with OctoWS2811? (Assuming no computer connection during playback)

I just checked it out and I think it would be pretty easy to glue Adafruit_GFX together with OctoWS2811. It looks like Adafruit_GFX does higher-level stuff like draw circles and text, and relies on a user-supplied function

virtual void drawPixel(int16_t x, int16_t y, uint16_t color)

to do the actual pixel-setting. It shouldn't be that hard to write something that converts X,Y coordinates into the strip pixel number that OctoWS2811 wants; you could even use a look-up table if your layout is weird.

The only other thing I see is that the Adafruit_GFX library uses color as a 16 bit value -- I'd recommend doing a global search & replace to make this a 32 bit value so you can access the full 24 bits each WS2811 LED can do.

4. Where should I purchase 74HCT245? Do I understand correctly that I need to connect 220ohm resistors to the T3, then the resistors to the 74HCT245, and then the 74HCT245 to the LED Strip to get 5v with clean logic?

Your mileage may vary, but I haven't had any issues with my 288 LED setup using just 220 ohm resistors, no 74hc245 at all. It may be a bigger problem with longer strips but for 120 LEDs (8 strips of 15?) I think you'd be fine. I don't think you can damage anything by connecting Teensy pin -> 220 ohm R -> LED strip, so you could try it without the 74hc245 and if you have issues, add one later.

5. Can you recommend a battery solution for this project (assuming less than 120 LEDs).

Assume each LED is on at 1/3 brightness. Peak usage of a WS2811 is .25 watts = 50 mA @ 5V, so round up and 20 mA per LED. 120 LEDs @ 20 mA is 2.4 Amps. Battery sizing is always voodoo to me but this calculator

http://www.batterystuff.com/kb/tools/calculator-sizing-a-battery-to-a-load.html

says to run them 4 hours you'd need a 24 Amp-hour battery so my guess is you're looking at something at least the size of a motorcycle battery.

Good luck!
 
The problem with #1 (in my case) could be overcome by orienting each strip as columns instead of rows. I don't see this as an option for LED_LAYOUT. Is that something I could add to OctoWS2811?

Sounds like overall, I should be able to achieve what I want. Thanks for the quick and informative responses!
 
.... orienting each strip as columns instead of rows. I don't see this as an option for LED_LAYOUT. Is that something I could add to OctoWS2811?

The code is open source, so really the question of whether you can add it is really a question of whether your own personal coding skills are up to the task?

OctoWS2811's frame buffer uses an unusual format, necessitated by the hardware design. Each byte contains 1 bit of color for 8 different LEDs. The first 24 bytes contain the color for the first LEDs on each strip. For example, if you wanted to change the color on the 2nd LED of the 4th strip, you would change the 4th bit in 24 consecutive bytes starting at an offset of 24 into the frame buffer.

The library comes with a function that does this, using X and Y coordinates to address the LEDs, with the assumption the strips are arranged horizontally. Maybe you can just modify that code. It might even be as simple as swapping Y and X. This algorithm is also built into the movie2serial program, which isn't an issue for your project, but if the library were ever to officially support vertical strips, that code would need to be updated too.
 
@doubly, is this thread dead? regarding battery power for ws2811, I am using 120 ws2811 leds powered from 4 AAA rechargeable batteries. (I need a small form factor for battery space) Regular rechargeable AAA couldn't pump out the Amps. I got hold of some Ni-Mh rated at 2700mA each (what they really i don't know). These run the Leds displaying bmp images via POV (not white whole time) and run the SD card constantly reading bmp files. The setup also runs well on Maplin 4 x AA rechargeable batteries rated at 2000mAh each. I haven't done a full discharge test, but they generally go for between half an hour and an hour depending on the images I am using.

you could possibly rig up a set of these.

mortonkopf
 
Status
Not open for further replies.
Back
Top