PDA

View Full Version : WS2811 on Teensy 3.0 using FastSPI_LED library



Pages : [1] 2

Wozzy
01-11-2013, 12:47 PM
Hello Everyone,

First, I'll introduce myself: I'm Bob W., I'm new to using the Teensy, C and Arduino IDE, although I have been playing around with PIC microcontrollers programming under PICBASIC for a few years now.

Secondly, I'd like to thank Paul, for all his efforts and the amazing amount of excellent work he has put into the Teensy and supporting his customers.

I just received a Teensy 3.0 and was amazed how easy it was to get it going... I was successfully modifying Blinky within 30 minutes of unpacking it. I compare that to probably a week or more before I was able to figure out how to successfully program my first PIC chip. I also purchased one of the PJRC Micro SD Card Adaptors.

I have a few light strips that I have been playing with, both LPD8806 and WS2811 types.
I've been successful in operating the LPD8806 strip on the T3 using the Adafruit LPD8806 library compiled in the Arduino IDE.
I also had both light strips working on the PIC, however the WS2811 required so much attention from the PIC processor, there was nothing left so I could only do rudimentary light patterns.

I've tried to run both strip types using the FastSPI_LED library, but have been unsuccessful. I suspect it's due to the high clock speed of the Teensy 3.0. I have loaded the latest versions of all the software and everything compiles successfully, but get only junk on the light outputs. The same wiring setup works with LDP8806 library however.

My ultimate goal is to operate the WS2811 strip and be able to read various color patterns from the SD card and control all of this from an android phone using bluetooth. This leads to my questions.

1) Has anyone successfully operated a WS2811 RGB light strip using the FastSPI_LED library on the Teensy 3.0?
If so could you please share any tips for setting up the clock speeds correctly.

2) Considering that the WS2811 has no clock, CS or MISO, is there any way I can share the SPI port, or will I need to bitbang one of them?

I prefer the WS2811 strip over the LPD8806 because it's narrower, and has a higher LED density.

Thanks for any help getting me up and running, and I promise to share what I learn.

cmason
01-11-2013, 06:12 PM
I spent some time playing with these LEDs (http://www.aliexpress.com/store/product/5050-SMD-RGB-LED-with-built-in-WS2811-IC/701799_656558600.html) which have an integrated WS2811 controller. (Thanks to Ward Ramsdell from Dorkbot for spotting me a few of them to play with.)

I could get it to light up and even change color a bit but I never felt like I got the full spectrum of color out of it. I assumed this was some timing issue. I know there have been some fixes to the teensy SPI stuff since then. The code I used was something like:



uint8_t *leds;
uint8_t count = 1;
FastSPI_LED.setLeds(count);
FastSPI_LED.setChipset(FastSPI_LED.SPI_WS2811);
FastSPI_LED.setPin(11);

FastSPI_LED.init();
leds = (uint8_t*)FastSPI_LED.getRGBData();
for (int i = 0; i < count*3; ++i) leds[i] = 0;
FastSPI_LED.start();
while(1) {
for (int i = 0; i < count*3; ++i) {
if (leds[i] < 255) {
leds[i]++;
break;
} else {
if (i == count*3-1) {
for(int j = 0; j < count * 3; ++j) leds[j] = 0;
}
}
}
FastSPI_LED.setDirty();
FastSPI_LED.show();
delay(100);
}



I haven't gotten back to it. Please do let us know if you get this to work. I'm pretty psyched for that integrated LED/controller; it's like $0.14/ea not including shipping.

mjlynch712
01-11-2013, 08:30 PM
Hi, I'm surprisingly similar to yourself. Used PICs for a few years, first go at arduino, using ws2811 (ws2812) led strips with teensy and bluetooth control. I plan to build a matrix for use on a top hat, with animations stored on an SD card. I ordered both the teensy 2 and teensy 3 along with SD adapter. I emailed Paul about it and he said if you're using around 200 LEDs use the teensy 2 as the fastspi does not yet support the single pin protocol on the teensy 3.
Also, the sd adapter only fits nicely on the teensy 2. Since I want all electronics inside the hat, the teensy 2 is ideal. However I can't seem to get the fastspi testleds sketch to compile. I read there is a patch but I'm not entirely sure how to apply it.
I also spoke to Frollard (Jamie) about the teensy 3 and SD card and he encountered issues with running the SD card and led strip at high speeds sue to library issues. He had to use a signal transistor for accessing the SD card or the the LED strip
I plan to stick with the teensy 2 once I get the patch applied and use the bluetooth module through the UART pins. I'm looking at the MIT app inventor beta for designing my android application as it seems rather easy to use

Hope this has been of some help if any. I'm currently busy at the moment, so I haven't had a chance to play around with anything yet

dgarcia42
01-12-2013, 05:17 AM
Hi! I'm currently working on a rewrite of the FastSPI_LED library, in part to make it more easily portable to arduino variants (like the teensy 2.0/3.0) as well as other arduino platforms. So far, I've only done SPI support for the teensy 3.0 platform (and that's up there) - the TM180X and ws281x family of chips require very very specific timings - and the different clock speeds mess with those, so I haven't done them yet. I'm hoping to have the rewrite done and up by the end of the month.

mjlynch712
01-12-2013, 06:12 AM
Great, hopefully I should have more free time round then. Look forward to playing around with it. Will the FastSPI library be able to work with an SD card, or will there be problems even if a PWM pin is used for the LED strip?

dgarcia42
01-12-2013, 06:48 AM
Great, hopefully I should have more free time round then. Look forward to playing around with it. Will the FastSPI library be able to work with an SD card, or will there be problems even if a PWM pin is used for the LED strip?

For strips that are SPI based (ws2801, LPD8806, etc...) - the problem with something like the SD card, which is also SPI based is that you need a way to determine which thing will receive SPI data. It's a little bit of a misnomber to say that the ws2801 and lpd8806 and friends are "SPI" - as they only use the clock/data lines from SPI, they don't use the channel select line. As part of the re-write, i'm going to add support for defining a channel select pin to use when using SPI - though you will have to do some hardware to fake that out (short version - something that sits between the MOSI pin and the leds that only lets data through when the chosen channel select pin is high). The other thing the rewrite is going to have is support for software-based SPI so that you can use other pins for SPI based chipsets, freeing up the main SPI system for things like the SD card.

Wozzy
01-12-2013, 03:40 PM
I assumed this was some timing issue. I know there have been some fixes to the teensy SPI stuff since then. The code I used was something like:

I played around with your code. it's very similar to mine, and saw no real difference.
I tried adjusting several of the parameters listed in the FastSPI_LED.h file, but it didn't really change anything.
I suspect the higher clock speed (24, 49, 96MHz vs 16MHz) is the real issue.
I'm still too new to C programming and also to understanding the Freescale manual (which is very different from a Microchip PIC manual) to be able to make these kinds of changes.
Thanks for your help.

Wozzy
01-12-2013, 03:50 PM
Hi! I'm currently working on a rewrite of the FastSPI_LED library,... the TM180X and ws281x family of chips require very very specific timings

First off, thanks Dan, for all of your efforts in creating the FastSPI_RGB library.
I'm glad to hear that your are working on an updated version of the library. From my rambling around on the web, I can see that a lot of people are using it.

As for the timings on the WS2811 chips, I was able to successfully operate a 60 LED strip of WS2811 LEDs from a 48Mhz 8 bit PIC chip, but only the most rudimentry patterns.
The PIC had only an 8 bit SPI buffer, and no DMA so it required almost all of the processor, just to feed the SPI buffer.

It was the wider path, and DMA features that led me to the Teensy 3.0... Now I just need to figure out how to use those features.

Thanks Again

Wozzy
01-12-2013, 04:21 PM
I plan to stick with the teensy 2 once I get the patch applied and use the bluetooth module through the UART pins. I'm looking at the MIT app inventor beta for designing my android application as it seems rather easy to use

I've use MIT App Inventor to create several apps, but not yet for the bluetooth. For simple stuff and trouble shooting, I have used Bluetooth SPP (https://play.google.com/store/apps/details?id=mobi.dzs.android.BluetoothSPP) by Jerry Li successfully. I'm using a JY-MCU BT-Board V1.05

Good Luck with the Top Hat, I'd really love to see some project photos when done... Perhaps you can include a few bright white LEDs embedded in the rim near the front, to use as headlights at night. I made a baseball cap with 10 x 100mA white LEDS embedded in the rim and it's amazing that you can walk about without the need for any lights, but your field of view is always perfectly illuminated.

Wozzy
01-12-2013, 04:41 PM
The other thing the rewrite is going to have is support for software-based SPI so that you can use other pins for SPI based chipsets, freeing up the main SPI system for things like the SD card.

That's a great idea, to give some flexibility.
If it's not really using the Hardware SPI, then the ability to change the pins, will allow other peripherals to be used.

PaulStoffregen
01-12-2013, 10:39 PM
I actually ordered four WS2811-based LED strips over a month ago... which arrived only days ago.

Now that beta 11 is published, maybe this is a good time to see if I can quickly put together some code to drive them?

charliewallace
01-12-2013, 11:54 PM
Thanks to Dan for updating the library!!!! much gratitude. I was hesitating to adopt the teensy3.0 because of reported problems with controlling the NeoPixel (ws2801) LED strip. So I'm delaying my mobius clock project for a bit while things develop.

Will your new library work with the Arduino Due?

mjlynch712
01-13-2013, 12:48 AM
Hi, these are actually known as WS2812 LED strips, since they have the WS2811 IC built within the 5050 SMD LED. In some case they are advertised with WS2811 (WS2801) and no mention of WS2812. I assume it's cause people search those terms. Here is the datasheet (http://www.nooelec.com/files/WS2812.pdf) for this strip. It's just those LEDs with their own capacitor across the voltage rails. World-semi seem to make all these WSXXXX devices.

Hi Charlie, I noticed Adafruit always rename their LED strips and pixels. Also, you can get the strips elsewhere for around $50 per reel (4-5m) with free shipping. Also you can get them with a black flexi PCB. I plan to take a black marker to my strips around the LEDs and contacts, so when off they aren't too noticeable against a black background.

Wozzy
01-13-2013, 02:53 AM
I actually ordered four WS2811-based LED strips over a month ago... which arrived only days ago.
Now that beta 11 is published, maybe this is a good time to see if I can quickly put together some code to drive them?

Oh for me that's great news...If anyone can really get this right, you can.


Here's what I know about the WS2811 light strip timing.
The light strip wants an 800 kHz bit stream or 1.25uSec per pulse width. (a few strips are wired for 400 kHz)
If you break each bit up into FIVE 0.250uSec segments, then the bits can be represented as follows:
1 = 11110
0 = 10000
The strip wants a stream of Bytes with 3 Bytes per RGBLED times the number of RGBLEDs per strip without pausing
A low pause of 50 ms, causes the chips to latch, display the values latched, and get ready to receive the next data stream.
The acceptable timing error is +/- 150nS

I've heard, but never verified: That all the WS2811 really cares about is the line state 650nSec after the start of the first high pulse.
If this is true, then it would be possible to break each bit up into FOUR 0.3125uSec segments, then the Bits can be represented as follows
1 = 1110
0 = 1000
This could greatly simplify and speed up the processing.

I've attached a sketch of the timings below:
144

The WS2811 really doesn't use SPI, though I think most people go that route, because due to the high bit rates, the SPI can offload a little of work on the CPU by sending one or two bytes at a time.
An ideal solution, would use an ordinary digital I/O pin, this would allow flexibility, allow the use of SPI for an SD card interface (with DMA), and possibly allow driving multiple light strips on different pins.

Thanks,
Bob Wozniak

PaulStoffregen
01-13-2013, 03:09 AM
Here's my first attempt.

I tested by checking the waveforms on a scope, and driving 2 LEDs. The strip has 20 total.... would do something more interesting, but Robin & I are going out for dinner. Will look at this more tomorrow (hopefully doing something more interesting).

Hopefully this code ought to be easy to build upon?



#define WS2811_PIN 2
#define NUMLED 2

unsigned char pixels[NUMLED*3];

void setup(void)
{
pinMode(WS2811_PIN, OUTPUT);
digitalWrite(WS2811_PIN, LOW);

pixels[0] = 0xFF; // LED #1 - red
pixels[1] = 0xFF; // LED #1 - blue
pixels[2] = 0xFF; // LED #1 - green
pixels[3] = 0xCF; // LED #2 - red
pixels[4] = 0x00; // LED #2 - blue
pixels[5] = 0x8F; // LED #2 - green
}

void loop()
{
ws2811();
delay(10);
}




#if F_CPU == 96000000
#define DELAY_T0H 3
#define DELAY_T0L 23
#define DELAY_T1H 12
#define DELAY_T1L 13
#elif F_CPU == 48000000
#define DELAY_T0H 1
#define DELAY_T0L 13
#define DELAY_T1H 7
#define DELAY_T1L 7
#elif F_CPU == 24000000
#error "24 MHz not supported, use 48 or 96 MHz"
#endif

static inline void delayShort(uint32_t) __attribute__((always_inline, unused));
static inline void delayShort(uint32_t num)
{
asm volatile(
"L_%=_delayMicroseconds:" "\n\t"
"subs %0, #1" "\n\t"
"bne L_%=_delayMicroseconds" "\n"
: "+r" (num) :
);
}

void ws2811() {
noInterrupts();
for (unsigned char *p = pixels; p < pixels + sizeof(pixels); p++) {
unsigned char n = *p;
for (int mask = 0x80; mask; mask >>= 1) {
if (n & mask) {
digitalWriteFast(WS2811_PIN, HIGH);
delayShort(DELAY_T1H);
digitalWriteFast(WS2811_PIN, LOW);
delayShort(DELAY_T1L);
} else {
digitalWriteFast(WS2811_PIN, HIGH);
delayShort(DELAY_T0H);
digitalWriteFast(WS2811_PIN, LOW);
delayShort(DELAY_T0L);
}
}
}
interrupts();
delayMicroseconds(50);
}

cmason
01-13-2013, 07:04 AM
So, can someone help double check my math here on the timing for using SPI?

This diagram (from here (http://www.aliexpress.com/store/product/5050-SMD-RGB-LED-with-built-in-WS2811-IC/701799_656558600.html)):

145

shows 1.25us cycle. I think what happens with these chips is that in the middle of the cycle, it samples the line; if high 1 is registered, if low 0. Does this agree with what others have read/observed?

The clock rate for the DSPI is described on page 971 of the reference manual: SCK baud rate = (fSYS/PBR) x [(1+DBR)/BR]

I was thinking it might be convenient to represent one bit to the 2811 as 8 SPI bits (one byte) as this makes the math convenient.

1.25 us / 8 = 156.25 ns per SPI bit.

At 48 Mhz with a clock divider of 8 would give an error of ~10 ns. This is about 60 LEDS given the tolerance of 600ns.

(1 / 48 Mhz) * 8 = 166.66 ns.

At 96 Mhz, a prescaler of 5 (PBR=0b10) and a divisor of 3 (BR=6 or 0b0010 according to table 43-34, and DBR=1), gives 156.25 ns per bit and 8 bits would give 1.25 us:

96,000,000 / 5 * (2 / 6) = 6,400,000 = 156.25ns * 8 = 1.25 us.


To send : We'd write:
+---------+---------+---------+---------+---------+---------+---------+---------+
0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 |
+-- 0.15--+-- 0.15--+-- 0.15--+-- 0.15--+-- 0.15--+-- 0.15--+-- 0.15--+-- 0.15--+
(excuse the ascii art.)


Am I reading the description of the clock rate calculation correctly?

So, I'm thinking of using



FCPU=960000000
and
DBR = 1 LSBFE=1 PBR = 0b10 BR = 0b0010
SPI0_CTAR0 = (1 << 31) | (1 << 24) | (0b10 << 22) | 0b0010;


Does this make sense? Is there some better timing option?

Thanks,

-c

mjlynch712
01-13-2013, 12:26 PM
I used the WS2811 strips with a chipKIT UNO32 using Brian Chojnowski's code from here (http://myroundpeg.blogspot.co.uk/2012/12/driving-ws2811-base-led-strips-with.html) It may be helpful to some

PaulStoffregen
01-13-2013, 01:01 PM
I've added Teensy 3.0 support to Adafruit's NeoPixel library. Here's the modified copy:

https://github.com/PaulStoffregen/Adafruit_NeoPixel/archive/master.zip

https://github.com/PaulStoffregen/Adafruit_NeoPixel

So far, I've only tested on a strip of 20 LEDs. Please let me know how this works on your LEDs?

Wozzy
01-13-2013, 05:21 PM
I love how fast the chinese light strip manufacturers are raising the bar on the WS2811 light strips.
It seems like only a few months ago, 30 LED's per meter was the best you could get for addressable light strips.

The WS2811 light strips I currently have are GreeLed GE60RGB2811C which are 60 LEDs/m on white flexible circuit and IP67 waterproof silicone sleeve.

I see that they now have a new product with 68 LEDs/m GE68RGB2811x which is available in black or white, water proof or non water proof.
Here's a Link: GE68RGB2811 (http://www.gree-leds.com/productshow.asp?ArticleID=Y0YY52S0YX)

By the way, GreeLed also has an LPD8806 based strip with 52 LED/m if you prefer that type. I have one of these also.

If I can get these WS2811 strips working well on my Teensy 3.0 soon, I'd consider setting up a group buy on some of the 68LED/m rolls.
They come in 5M reels.

PS. I'm not affiliated with GreeLed in any way.
I'm just a customer that's satisfied with their product.

PaulStoffregen
01-13-2013, 05:44 PM
I have a plan for a library that will drive 8 strips simultaneously, using DMA so the CPU isn't tied up bit-bashing the waveform. That will allow it to generate animations or communicate by USB or serial while also updating the LEDs. The idea is to support up to 2000 LEDs with double buffering or 4000 LEDs with single buffering, at 60 Hz update rate.

At this point, it's in the planning phase......

Wozzy
01-13-2013, 06:38 PM
I have a plan for a library that will drive 8 strips simultaneously, using DMA so the CPU isn't tied up bit-bashing the waveform. That will allow it to generate animations or communicate by USB or serial while also updating the LEDs. The idea is to support up to 2000 LEDs with double buffering or 4000 LEDs with single buffering, at 60 Hz update rate.

At this point, it's in the planning phase......

I really can't wait to see that...

So the good news for me is that I've had first light with my 60LED/m WS2811 light strips!
Here's a photo of the first light.
146

After reloading the Teensy 3.0 Beta11 (http://forum.pjrc.com/threads/15773-Teensy-3-0-Beta11-Software?p=18486&viewfull=1#post18486) software, and reshuffling some stuff around on my hard disks.

I downloaded the modified Teensy3.0 Adafruit Neopixel Library (https://github.com/PaulStoffregen/Adafruit_NeoPixel/archive/master.zip)

It compiled and ran perfectly first try.
I'm already creating new patterns, and working on my bluetooth interface.
Thanks Paul...Your awesome!

PaulStoffregen
01-13-2013, 07:13 PM
Glad it's working. Adafruit has merged the code to their official version. :)

mjlynch712
01-13-2013, 07:16 PM
Works with Teensy 2 as well, running 240 leds with beta 11
147

Great work, thank you

Wozzy
01-14-2013, 12:09 PM
I have two different light strips, one is based on LPD8806 chips, and the other is based on WS2811s which are integral with the RGB-LEDs.

I've been using the LPD8806 strip for some time, but only yesterday got the WS2811 strip to work.
Now that I can reliably control the WS2811 strips, I notice that when it's set to pure white (255,255,255) that there is quite a bit of variation in perceived color of the individual LEDs
Some appear slightly pinkish, and others appear slightly bluish and greenish. I can also notice it when set to orange.

On my LPD2811 based strip, they all appear identical in color.

I'll try and capture this in a photo this afternoon, but I've found that these strips are difficult to photograph accurately.
But it looks a little like this:
148

I'm wondering if this has to do with the binning of the LEDs on this particular light strip, or if it's an issue with WS2811 in general.

Does anyone else see this in their WS2811 based strips?

PaulStoffregen
01-14-2013, 12:37 PM
Considering how cheaply these LED strips are made in China, it seems pretty amazing any of them have good color balance.

The only "strip" (actually 4 of them) I have are actually a cluster of 6 LEDs for each WS2811, inside a plastic housing with a translucent white dome on top. They run on 12 volts. Earlier today Robin and I had a conversation about how PJRC might need to buy a lot of LEDs (thousands).... of course only for software compatibility testing!!! ;)

Wozzy
01-14-2013, 12:45 PM
I'd hate the thought of having to apply a correction curve for each individual LED.

mjlynch712
01-14-2013, 06:59 PM
I noticed that mine went slightly yellow towards the end of the strip, but I put that down to the current limit of my laptop USB. I need to get out my old power supply to see if it changes anything :)

PaulStoffregen
01-14-2013, 07:50 PM
I noticed that mine went slightly yellow towards the end of the strip

Perhaps the 5 volt power is something like 4.2 or even 3.5 volts near the end of the strip? Those wires are tiny, and towards the beginning of the strip the current is quite high. The blue LED needs more voltage than the red and green, so if you're suffering from a voltage drop, you'd expect to see yellow tint. It's easy to just connect the power at both ends and see if the yellow tint problem goes away?

Wozzy
01-15-2013, 01:58 AM
Perhaps the 5 volt power is something like 4.2 or even 3.5 volts near the end of the strip? Those wires are tiny, and towards the beginning of the strip the current is quite high. The blue LED needs more voltage than the red and green, so if you're suffering from a voltage drop, you'd expect to see yellow tint. It's easy to just connect the power at both ends and see if the yellow tint problem goes away?

So in playing around with the WS2811 strip tonight I realized that this is exactly what was causing my color tint problems.
The wall wart that I was powering the LED strip was limiting the current at 700ma
The manufacturer claims that the strip is 18w/m or 60ma/pixel at full brightness.
This would be a total current draw of 3.6A for a 1 meter, 60 LED/m, 5V strip.
I hooked a 1 meter strip to a lab power supply to see what I could get.
At around 0.9A, the tint disappeared when the strip was set to white, and the pixels all appeared to be a consistent pure white...Yay.
I hooked both ends of the 1m strip up to the power supply, and at 5.0V the strip only drew 1.22A
I got daring, and over drove the strip to 5.5V and the strip drew 1.46A...Well below the manufacturers claims.
This was as high as I dared go, and noticed that after about 10 minutes of color cycling, the LEDs felt slightly warm to the touch.
5.5 V would probably be too high if the light strip was left on Full White (255,255,255) for any length of time without cooling.
There was a noticeable brightness difference between 5.0 and 5.5V.
In the end, I'll probably set up to drive my full project at 5.3V, with power hookups at a minimum of 1 per meter.

Now I'm getting excited about those 68 LED/m strips!

cmason
01-15-2013, 06:05 AM
I see that they now have a new product with 68 LEDs/m GE68RGB2811x which is available in black or white, water proof or non water proof.
Here's a Link: GE68RGB2811 (http://www.gree-leds.com/productshow.asp?ArticleID=Y0YY52S0YX)


I don't see any prices there, but these folks have 4-5m strips of 60 LEDs/m for ~$12 per meter, and strips of 30 LEDs/M for ~ $7/m:

http://www.aliexpress.com/store/product/4m-WS2811-LED-digital-strip-60leds-m-with-60pcs-WS2811-built-in-tthe-5050-smd-rgb/701799_633124138.html
http://www.aliexpress.com/store/product/5m-WS2811-LED-digital-strip-60leds-m-with-30pcs-WS2811-built-in-the-5050-smd-rgb/701799_653641294.html

I just ordered some from them, no other connection.

-c

mjlynch712
01-15-2013, 06:15 AM
I inquired about the LED strips from Gree LED and they said
GE68RGB2811A Non-waterproof $14.00/m
GE68RGB2811C IP67 waterproof $14.50/m
And it was $25.16 shipping to the UK via DHL

The strips I currently have came from here (http://www.aliexpress.com/item/BLACK-PCB-4m-WS2811-LED-digital-strip-60leds-m-with-60pcs-WS2811-built-in-the-5050/700420597.htmll)

I have no connection to any of these companies

IpsissimusMarr
01-15-2013, 04:14 PM
I attempted to modify FastSPI myself last November for the WS2811 but was never able to get it fully stable on the Teensy2 because of the tight timings on the order of 1-2 clock cycles. Later I found a nice article about the ICs and a handy way to run them:
Driving the WS2811 at 800KHz with a 16MHz AVR (http://bleaklow.com/2012/12/02/driving_the_ws2811_at_800khz_with_a_16mhz_avr.html )

PaulStoffregen
01-15-2013, 04:47 PM
I tested FastSPI_LED on a Teensy 2.0 using a strip of 20 WS2811. It worked perfectly.

I did have to make one tiny edit (http://forum.pjrc.com/threads/14535-Teensy-3-0-Beta10-Software?p=17942&viewfull=1#post17942) to get it to compile, but no substantial changes were necessary.

ploveday
01-16-2013, 04:33 AM
A possible workaround for lack of CS on these would be to change the SPI DOUT Mux - so have your SD card on pin 11 for DOUT, say, then the LED strip on pin 7, and switch the Mux as needed. You'll have to make sure the GPIO of the DOUT pin used for the LEDs is in a harmless state when it's switched away from SPI (output high, I suppose?)

Just make sure you're not doing something with both devices at once.

- Peter

Madox
01-16-2013, 11:08 AM
Oh hi, I'm very late to the thread but I've been using the Teensy 3.0 on the WS2811 integrated LED strips for a while.

I *just* posted up random pics and videos, but I've had it for a while now. I am using a modified FastSPI library with corrected timings for the chips. The array is 720 LEDs, so no problem with many LEDs. The Update rate can be still pretty respectable even with many LEDs.

Videos and pics here :

http://www.madox.net/blog/2013/01/16/project-sneak-peek-and-procrastination/

virtualdave
01-16-2013, 05:35 PM
Nice work, Madox. Can you share a few more details? On your website you mention a controller board that sat between the t3 and leds, and would love to know what changes you made to the FastSPI library to make it work with the WS2811 chips.

Thanks!
David

Madox
01-16-2013, 07:43 PM
Hi David,

The T3 is connected directly to the LEDs and drive's the LEDs. It receives data from the USB until a 720*3 byte buffer is filled then draws that onto the LEDs.

Since the FastSPI uses NOPs, work can't be done while the data is being sent to the LEDs - this is similar to Paul's code above. I'm interested in the DMA code but I really don't need it for my application.

From memory the "TM1809" is the similar chip in the FastSPI library and you need to change the number of NOPs the library calls. The LEDs with the integrated WS2811s only work off 800 kHz AFAIK.

I'm using FastSPI with a Teensy 3.0 at 48Mhz. My timings are :-
LO ON Time - NOP12 - 250ns
LO OFF Time - NOP48 - 1000ns
Hi ON Time - NOP28 - 600ns
Hi OFF Time - NOP32 - 650ns

In hindsight, I should have dropped 1 NOP operation from each but it seems to work :)

Paul's timings from his NeoPixel post above seems to be completely different but that might be relying the 'trick' or quirk someone else mentioned. I pulled my timings off the datasheet.

I had some luck driving the WS2811s using 'SPI' too. At 3.2Mhz each bit can be stuffed into a nibble and driven out that way.
Lo On - 1 312.5
Lo Off - 3 937.5
Hi On - 2 625
Hi Off - 2 625
The timings end up within spec and working as well and a bit nibble means you need 12 bytes for every pixel you want to draw though...

virtualdave
01-17-2013, 03:14 PM
Hi Madox,
Thanks for the detailed info.

I'm a bit new to the inner workings of the teensy (and all micros for that matter) and am trying to learn (one of my resolutions this year). I need help with a couple terms that have come up in this thread:
NOP = ?
DMA = ? (something that was mentioned earlier in this thread)

I've seen DMA support mentioned in other threads/forums as something that should give us LED bliss once solved, but am clearly in the dark (so to speak) on what it is referring to.

Thanks in advance for the guidance!

David

Wozzy
01-17-2013, 06:16 PM
Dave,

Admittedly, I have very poor assembly language skills, But a NOP is machine specific Assembly language for "No Operation" It's essentially a pause to skip one instruction cycle. It's period is dependent on the chips oscillator frequency, and the number of clock tics per instruction.

DMA is "Direct Memory Access" DMA allows the peripherals of a chip to directly access memory, without the need of the core processor. For example, if the Hardware SPI module in the Freescale Microcontroller can read and stream out an array of data directly from the EEPROM, or better yet, a Micro-SD card, it can then be run as a background process that allows the core processor to do other work simultaneously.

For controlling RGB LED light-strips, This could be very useful for allowing one to push complex lighting patterns at high frame-rates , while allowing the processor freedom to calculate new patterns, or read sensors and react to inputs.

virtualdave
01-17-2013, 06:49 PM
Brilliant. I am now enlightened ;) Thank you!

Now I just wish I knew more to help the efforts in making a DMA version of the library or a softSPI library. Those WS2811 + 5050 RGB LED's are pretty sexy, but I too have the same issue wrt multiple devices attached to the SPI chain (in my case a wireless radio). I'm certainly happy to beta-test if that's a help.

Thanks again!
David

PaulStoffregen
01-17-2013, 07:54 PM
Now I just wish I knew more to help the efforts in making a DMA version of the library or a softSPI library.


My idea, which I'm planning to actually work on after publishing beta 12, involves using 3 DMA channels triggered by the edges from a pair of PWM signals. It may be possible to trigger the DMA channels using a the PIT and PDB timers, but for a first attempt I going to go the simpler (and observable on an oscilloscope) route that will consume a few pins.

The PWM will be 800 kHz on pins 3 and 4, which are controlled by the same timer. Both pins go high at the same instant. Pin 3 will stay high for 250 ns (the WS2811 waveform of sending all zero bits), and pin 4 will stay high for 600 ns (the WS2811 waveform of sending all one bits).

The rising edge of pin 3 will trigger DMA channel 0. That channel will be configured to read a fixed location and write a fixed location. The read will be a byte in memory containing 0xFF. The write will be the low 8 bits of I/O port D (which is pins 2, 5, 6, 7, 8, 14, 20 and 21).

The falling edge of pin 3 will trigger DMA channel 1. That channel will read an incrementing location (the RGB image data) and write to a fixed location (port D). For each bit that's 0, the WS2811 will see a 0 write, because the previously written 1 will change to 0 at this point 250 ns later. For each bit that's 1, the pin will remain a 1.

The falling edge of pin 4 will trigger DMA channel 2. That will be configured like channel 0, except the memory will contain 0x00. For the bits that remained high, they'll go low at the correct 600 ns timing so the WS2811 sees a 1 bit. For the bits that went low earlier, they'll remain low.

This scheme should allow a large buffer to stream 8 strips of WS2811 LEDs without any CPU overhead. Of course, each 1250 ns, three single-byte DMA transfers occur, taking 6 bus cycles plug probably a few more for bus arbitration. During the 1250 ns period, the internal bus has 60 cycles available, so the DMA will consume about 10-15% of the available bus bandwidth. Fortunately, the chip has a switched mux matrix, and the RAM has 2 separate busses (one for the low half, another for the high half), so this activity should have minimal impact on code execution because separate buses are used, and if the RGB pixel buffer is placed in the lower half of RAM, it should have minimal impact on the CPU's access to the stack (the other thing that matters for code performance).

At least that's my crazy plan.

There are a couple minor details about triggering on those edges, which will involve jumping certain pins together. The RGB buffer will also have a somewhat strange layout, where each byte in RAM is actually a single bit for 8 different LEDs. A little crafty code can abstract that away for simple animation running on the chip. For people who want to stream video from a PC, they'll probably need to pre-arrange their data before transmitting it over the USB.

I'm also considering a double buffering scheme to allow smooth animation.....

PaulStoffregen
01-17-2013, 08:17 PM
One possible problem with DMA, might be latency to gain access to the bus. My understanding is 2 things could initiate lengthy bus busy times... the CPUs interrupt entry/exit which stacks several registers automatically, and the various instructions that read/write/push/pop many registers. In theory, a single ARM instruction can write or read all the registers to/from RAM. I'm pretty sure the processor implements that as a single bus access, which the DMA engine would (probably) need to wait until the transfer is finished. The WS2811 wants pretty tight timing, so that might be too much latency?

In practice, that sort of activity probably only happens to the stack. If it does become a problem, it may impose a limit of placing the pixel buffer in the unused portion of the lower half of RAM (which has a separate bus). The USB buffers are also located down there, so not all of that memory is available for pixels. The memory issues might limit this scheme to a maximum of approx 2000 LEDs.

ploveday
01-17-2013, 10:00 PM
Hah, I love it :)

Hmm now I'm wondering if a circular buffer could be filled fast enough from SD to keep up with the ~800k/sec needed. Certainly I can get approx double that from an SD card on Teensy3, when sequential reading from a file. But it would rely on not getting any slowdowns, like fragmented data or anything.. and of course then there's the extra bus overhead to deal with.

Even still... :)

- Peter

PaulStoffregen
01-17-2013, 10:23 PM
Updating 2000 LEDs this way takes only 7.5 ms. Even if reading 6000 bytes from the SD card took twice that long, you'd still achieve a 60 Hz update rate.

ploveday
01-17-2013, 10:58 PM
Indeed, though if you could fill the buffer fast enough to keep up during the refresh, you could do more than 2000 LEDs.

Not that I actually have an application for this, or can really justify buying >2000 LEDs. But hey :)

- Peter

charliewallace
01-19-2013, 06:52 AM
those strips look great but when I google them, I don't find a way to order easily. Looks like they expect huge volume orders. Suggestions?

thanks
Charlie

Madox
01-19-2013, 12:13 PM
Hi Charlie,

I've bought mine from http://www.aliexpress.com/snapshot/208341398.html [Snapshot of my order].
Works out to be $14/m delivered to Australia, presumably cheaper to US etc.

Wozzy
01-19-2013, 04:46 PM
Charlie,

GreeLED definatly does not make it easy to purchase their product..
The only way is to get a quote via email, then send them a western union money order, or arrange a direct money transfer.
While I know of several people that have successfully purchased from them, this type of transaction makes most people very nervous.

If anyone knows of a supplier or reseller that carries GreeLED, let me know

hunter
01-20-2013, 03:11 PM
Updating 2000 LEDs this way takes only 7.5 ms. Even if reading 6000 bytes from the SD card took twice that long, you'd still achieve a 60 Hz update rate.

Hmm... So around 30ms for 8000? If so that's fast enough. I'm doing a 128x64 Video wall and had written off the WS2811's thinking one could never get that kind of speed.

PaulStoffregen
01-20-2013, 03:36 PM
Hmm... So around 30ms for 8000? If so that's fast enough. I'm doing a 128x64 Video wall and had written off the WS2811's thinking one could never get that kind of speed.

You'll need Teensy++ 3.0 for 8000, because Teensy 3.0 doesn't have enough RAM. Or in the near term before T3++ comes out, four Teensy 3s would be the best plan.

Of course, this all depends on software the doesn't exist yet..... but I will be working on it soon.....

neep
01-21-2013, 10:28 AM
I just found this thread and it got me very excited! My project is a pair of LED staffs that should also be able to do POV, so fast refresh is required. When I initially researched what LED strip to get, I was still using only Arduinos at 16MHz and I read that the timing wouldn't be accurate enough for the WS2811 strips. So I went with a WS2801 + FastSPI which works great, but as I don't have that much space on the staff I now only get 8 pixels per side (3 strands of 8 separated by 120 degrees to make it visible from every direction). Having double that density would be much prettier of course. I now have a Teensy 3.0, and reading the above makes me confident I should be able to drive a WS2811 strip, so I'm going to try for that.

I also would like to be able to drive an SD reader (the one from PJRC) *and* a WS2811 strip at the same time, somehow. Would it be an idea to have an SD adapter that connects to I2C, instead? Okay, that is for another thread.

Also for another thread I suppose is whether I would be okay with about 1200mAh for driving 96 (3 x 16 x 2) WS2811 driven LEDs + a Teensy 3? I wouldn't be running this at full power, and I really only need about 2 hours worth of charge.

PaulStoffregen
01-21-2013, 11:38 AM
The WS2811 takes 30 microseconds per LED. Nothing can change that, because it's the fundamental timing of the WS2811 protocol.

You can connect all 3 strands of 8 LEDs to the same pin, so they always update together. It will always take 240 us, which should be plenty fast enough for human persistence of vision.

The DMA-based approach, when/if it exists, will update 8 strips simultaneously. You could run a wire to each pixel, thereby having 8 strips of 1 LEDs (3 connected in parallel on each pin). That would update in only 30 us. Nothing can change the fact that WS2811 takes 30 us/led, but updating 8 simultaneously cuts the time to one eighth.

neep
01-21-2013, 12:18 PM
That is a great idea. I wonder if I can already do this with the strands of 2801s that I have now, which are basically wired in one long strip, with some logic in the code to make groups of 3 LEDs around the staff appear as one pixel. But your method is much more efficient of course.

So actually I have 16 pixels now for the whole staff, so it would be 6 strands in total, 3 on each side. The thing is that I want to reduce wiring as much as possible, so having everything in one long bus is ideal, but doing this in parallel will actually not add more wiring, AIUI.
I feel almost silly for not having thought of this before. Do you think it's possible with the WS2801, so I can try rewiring this already? So with the WS2811, I would end up with 16 pixels per side, 32 for the whole staff. That's a huge improvement in resolution for POV.

And how do you reckon the speed of the WS2811 compares to the WS2801?

As for DMA and running a wire to every pixel, that is out of the question for this project, as I don't have the space and weight allowance to do so. They LEDs must remain in serial, or have these parallel strands, but still addressed in serial.

Thanks, this is a very helpful thing you suggested, if I understand it correctly.

neep
01-21-2013, 04:09 PM
The WS2811 takes 30 microseconds per LED.

Just to confirm my math is okay here. So for 32 pixels on my staff I'd be looking at a total update time of 960 microseconds, so that would translate to about 1000 fps for the whole strip, correct? That's still really fast, and plenty fast enough for POV indeed.

I just ordered a WS2811 strip, here: http://www.aliexpress.com/snapshot/213649978.html

They also have non waterproof ones, these are the ones with simple IP65 casing that is easy to take off. The non waterproof ones are slightly cheaper.

PaulStoffregen
01-22-2013, 04:21 PM
I have some exciting news to share. The last couple days I've been fiddling with using 3 DMA channels to synthesize the WS2811 waveform.

179

In this test, the top waveform is 800 kHz 20% (WS2811's low bits) and the middle is 800 kHz 48% (WS2811's high bits). The bottom waveform is generated by 3 DMA channels, triggered from the edges of the top 2 waveforms.

Each DMA channel writes a single byte (0xFF) to the register that toggles 8 pins. As you can see, there is considerable latency from each DMA trigger event to the actual update. Fortunately, it's very consistent. I've been reading the datasheet over and over the last couple days... upon each request, the DMA controller takes several cycles to transfer the 32 byte transfer parameters from a small register file into the actual DMA engine. They optimized it to move data at incredible speed (96 MHz = 192 Mbyte/sec memory-to-memory using bursts of 32 bit bus cycles), so this application where a single 8 bit data move happens on each transfer is obviously not well optimized, but it is working nicely.

The scope is set to 5 seconds of persistence. The main thing I'm investigating now is the variance of the DMA response latency. During these tests, I have a loop() function sending strings with Serial.print() as fast as the USB will go. The USB has its own DMA controller to send the packets, and of course the CPU does a memory to memory copy, both of which compete for bus arbitration with the DMA synthesizing the waveform.

Here's a zoomed in view that really shows the latency variation, which becomes jitter on the WS2811 waveforms.

180

The waveform only changes at most 42 ns, which is exactly 4 cycles of the 96 MHz clock. Luckily, the errors do not accumulate... each of the 3 transitions has a jitter of 0 to +42 ns. The WS2811 datasheet says the timing specs are +/- 75 ns, so this seems to be very good news for the feasibility of synthesizing correct WS2811 waveforms while the CPU and USB are active doing other work.

One caveat is the DMA is only accessing the lower half of memory. My first test versions will target supporting about 1000 LEDs, and I believe it'll be possible to expand to about 2000, maybe 2500 LEDs. I do not believe it will be feasible to locate any portion of the LED frame buffer in the upper half of memory, where the CPU core ties the bus up for many cycles when entering and leaving interrupt routines. We'll have to wait for Teensy++ 3.0 later this year to support more LEDs.

PaulStoffregen
01-22-2013, 05:13 PM
I just ordered 1920 LEDs.... eight 4 meter 60 LED/M strips (http://www.aliexpress.com/item/4m-WS2811-LED-digital-strip-60leds-m-with-60pcs-WS2811-built-in-the-5050-smd-rgb/638374848.html)

virtualdave
01-22-2013, 05:19 PM
Me too!
I ordered 4 strips + 4 lots of the individual LEDs w/ WS2811. I must say the process was pretty painless (so far). Paid last Friday and FedEx says they'll be here this Friday (same distributor/manufacturer Paul (and others) have used).
Thanks for your continued work on this, Paul!!
David

Wozzy
01-22-2013, 07:36 PM
OK... I'm going to order 20 meters of the 68LED/meter GE68RGB2811C (http://www.gree-leds.com/productshow.asp?ArticleID=Y0YY52S0YX) strips from Gree-LED.
I'll let you know how it goes.

UPDATE: I Received the Lightstrips fromGreeLED.... Here's a timeline with details of my order for 20m of WS2811 Light strips from Gree-LED

Jan 22, 3:30PM -Emailed sales@gree-led.com to inquire about price and availability of 4 x 5m spools (20m) of GE68RGB2811C + shipping to USA
I also inquired about payment options including: Bank Transfer, Western Union, Credit Card, PayPal.
Jan 22, 7:45PM -Britney responded, The unit price is $14.50/m + $36.90 for shipping. Total: $326.90.
Currently only payment options were Bank Transfer or Western Union. She said that they were working on a PayPal option.
Jan 22, 9:20PM -Setup Western union account online, then setup payment to Gree-LED choose the WUPay option which has a $10.00 service fee.
Jan 22, 9:30PM -Setup BillPay account at my bank online, and chose WUpay as one of the payees, Then sent a payment WuPay for $336.90.

Jan 23, 9:30PM -Received an email notice from WuPay that the funds had been received from my Bank
Jan 23, 11:24PM -Received an email notice from WuPay that the funds were available to GreeLED.
Jan 23, 11:03PM -Britney emailed me that they had received the funds
Jan 23, 11:39PM -Received an email notice from WuPay that the funds were picked up by GreeLED

Jan 24, 10:42PM -Britney emailed me with a DHL Tracking Number.

Jan 25, 10:47PM -Picked up by DHL in Hong Kong.
Jan 26, 5:41AM -Departed HongKong
Jan 27, 9:47PM -Arrived Cincinnati
Jan 27, 8:24PM -Departed Cincinnati
Jan 28, 7:20AM -Arrived Philadelphia
Jan 28, 10:30AM -Delivery attempted - recipient not home
Jan 29, 1:08AM -Delivered - Signed for by : SIG ON FILE

Please note I was pretty nervous about using this payment method.
While it worked well for me, I'm not endorsing GreeLED, or Western Union. or saying it will work for you.

PaulStoffregen
01-22-2013, 08:54 PM
Progress.........

181

PaulStoffregen
01-22-2013, 11:04 PM
I'm trying to think of a name for a library capable of driving thousands of WS2811s.....

Anyone have any ideas?

ZTiK.nl
01-22-2013, 11:16 PM
Thousands you say?
'UnlimitLED'

Wozzy
01-23-2013, 01:42 AM
Bling_Bling_RGB

LightSpeed_RGB

PaulStoffregen
01-23-2013, 01:26 PM
I'm leaning towards "Octo" something, maybe OctoWS2811, or Octo2811, or OctoLedStrip.....

I'm also looking for maybe 2 or 3 good beta testers. There's 3 requirements:

1: actually own 8 WS2811 LED strips & a Teensy 3.0
2: must have time to beta test, write about the results, and take a photo or video
3: keep the code & info confidential until official release (about 1-2 weeks)

If you're interested in beta testing, please email me directly, paul@pjrc.com.

Tom Porter
01-24-2013, 09:42 AM
Wozzy,

We just order 4 spools WS2811 (68leds/m) led strip from gree-leds.com and they arrived in under 4 days.

maybe i can second this. seems they a ebay distributor http://stores.ebay.com/Insomnia-Lighting/LPD8806-LED-Strips-/_i.html?_fsub=3397711012.

Tom

neep
01-24-2013, 10:20 AM
Aliexpress won't take my payments anymore, and they appear very slow / difficult to communicate with about getting my card verified. They want copies of my ID and card statements. Not sure I trust them. Anyone know another place to get WS2811 strips from at a decent price?

Edit: the seller is okay with me using Paypal instead. So if you have trouble as well, ask them for that. They are officially not allowed to do this, by Aliexpress, and they don't get as much discount on the courier charge, but if you're in a hurry...

Madox
01-24-2013, 02:24 PM
Just as a warning/advice to new people buying the WS2811s...

Please be aware that the strips get 'extremely warm', especially if you run them at full brightness. Since the control IC + LED + resistors are all in the same package, heat dissipation is kind of restricted and the strip can get quite warm/hot. Be mindful of this for your applications especially if you're putting them in an sealed enclosure.

neep
01-24-2013, 02:28 PM
Madox that is good to know. I'm working on a LED toy that will feature these. Currently I have 2801s in it, but I try not to run them anywhere near full brightness as I only have 1200mAh to burn. I'll have 96 LEDs, 48 on each side. I do have them sit on an aluminium rod in the middle, so that should help with the heat dissipation. However I will have to build an enclosure around these to have the toy be weather proof. Plus it looks much better with some opaque shielding, I find. Less blinding, too.

hunter
01-24-2013, 07:21 PM
I ordered 5 meters of a 64LED per meter (http://www.aliexpress.com/item/5m-WS2811-LED-digital-strip-64leds-m-with-64pcs-WS2811-built-in-the-5050-smd-rgb/700438964.html) WS2811 strip a few days ago. Can't wait to test this puppy out.

neep
01-24-2013, 08:44 PM
I ordered 5 meters of a 64LED per meter (http://www.aliexpress.com/item/5m-WS2811-LED-digital-strip-64leds-m-with-64pcs-WS2811-built-in-the-5050-smd-rgb/700438964.html) WS2811 strip a few days ago. Can't wait to test this puppy out.

I'm confused now. It says: "64pcs 5050 RGB LED With 60pcs WS28IC inside to drive 64 pixels".

So how can it have 64 LEDs whilst there are only 60 controllers, per meter?

On the surface, it does look a bit different from what I ordered: http://www.aliexpress.com/snapshot/213954944.html

Can anyone shed some light on this?

raydee
01-25-2013, 01:09 PM
Hi everyone,

stepped into this coming from Arduino and driving a ws2811 strip. I Just ordered a Teensy 3.0 to get some more calculation power for realtime matrix content.
Now that I have read a bit further I am wondering whether I need a level shifter to drive Din on the LED strip or not. Does the ws2811 also work with 3.3V logic level?

Wozzy
01-25-2013, 01:40 PM
The WS2811 strips I'm currently using are being driven directly from the Teensy3.0 Pin6 without the need for a level shifter.
I am however using an external 5V power supply with the ground tied to the teensy.

raydee
01-25-2013, 01:56 PM
The WS2811 strips I'm currently using are being driven directly from the Teensy3.0 Pin6 without the need for a level shifter.
I am however using an external 5V power supply with the ground tied to the teensy.

Thanks for the prompt response Woozy! I will also have a seperate power source for the strip and the Teensy, so I suppose it should be fine here too.

hunter
01-25-2013, 04:39 PM
I'm confused now. It says: "64pcs 5050 RGB LED With 60pcs WS28IC inside to drive 64 pixels".

So how can it have 64 LEDs whilst there are only 60 controllers, per meter?

On the surface, it does look a bit different from what I ordered: http://www.aliexpress.com/snapshot/213954944.html

Can anyone shed some light on this?

Just read the title. It says 64 w/ 64 inside. Not sure how different it is from the 60 per meter, but my guess is they are almost the same.

jfenwick
01-28-2013, 02:31 AM
I'm really new to serial ports and USB CDC so I'm still kind of feeling my way around here...

I'm interested in reproducing the work of Madox.
He says he sends the data over USB.

Can I just check whether Serial.available() > 0 to see if there's another byte, similar to Arduino?
When I do that, does it see the serial device as USB CDC?

Or do I need to use the more complex code from the examples here:
http://www.pjrc.com/teensy/usb_serial.html
If I need to use the more complex code from the examples here, why is that?
Is THIS how you create a USB CDC device and the Arduino Serial code does something different on Teensy?
Or does that equivalent Arduino code even work here?

The benchmarks on this page seem to say that the Teensy 2.0 can handle 901 kbytes/sec.
How much can the Teensy 3.0 handle?
There is no benchmark on this usb serial page for the Teensy 3.0.
The Makefile seems to not even contain a version for the Teesny 3.0.
My concern there is that if I need the USB Serial code to create a USB CDC device, and there is no Teensy 3.0 specific example, how can I do it?

If I'm able to do this using either method, can I use something like pySerial to send the data to the Teensy 3.0?
If so, is there a max baud rate I can set it to? Am I restricted to 115200 or can I set it higher?

Swift Curse
01-28-2013, 03:34 AM
not sure if this is relevant but i have
(2) 5 meter rolls of 36 led/m and 36 (ws2801) Ic 36/m at 5v per reel.

Using a teensy 2.0 and can run various light patterns. color changing, sold color, light beam. without many problems except that when both 5 meter rolls are connected the teensy is a little low on the power side. I have the teensy 3.0 i just haven't had time to hook it up with them.

PaulStoffregen
01-28-2013, 12:50 PM
I did some signal quality testing, to come up with a recommended source impedance. Luckily, a higher bandwidth scope is on temporary lone at the moment, so it's easy to see the transmission line effects. :)

Here's how the signal looks after 12 inches of wire connected directly to the Teensy 3.0 pin, and a 12 inch ground wire located about 1-2 inches away from the signal wire. This is measured right at the WS2811 input, both the scope probe tip and ground.

194

Here's the exact same wires, but with a 220 ohm resistor between the Teensy 3.0 pin and the wire going to the LEDs. Again, this measurement is the signal arriving very close to the WS2811 input.

195

If a tightly twisted pair of wires were used, a 100 ohm resistor might be more appropriate. But I believe this wiring setup is pretty typical of how many people will probably connect their LED projects.

neep
01-28-2013, 12:58 PM
I didn't consider using any resistors for my setup which is WS2801 currently. Should I put some between DOUT / SCK and the strip?

raydee
01-28-2013, 02:18 PM
If I read the (minimal) ws2811 reference / spec sheet correctly, doesn't the chip act as a signal repeater / reshaper on the DI line? If so the signal quality should only matter up to the first chip in the line, isn't it?

Built in signal reshaping circuit,after wave reshaping to the next driver, ensure wave-form distortion not accumulate.
Maybe you could wire up the scope to the DI-out of a chip and compare it to DI-in...

PaulStoffregen
01-28-2013, 05:08 PM
If I read the (minimal) ws2811 reference / spec sheet correctly, doesn't the chip act as a signal repeater / reshaper on the DI line? If so the signal quality should only matter up to the first chip in the line, isn't it?


Yes. It does create a new copy of the signal between each LED. This signal quality issue is indeed only to the first chip on the strip.

However, as you can see, it's pretty significant. I had some LEDs update incorrectly using the 3.3 volt signal without a resistor. With a 5 volt signal, the spikes and ringing is probably even worse, but there's more noise margin because 5 volts isn't nearly as close to the chip's switching threshold.



Maybe you could wire up the scope to the DI-out of a chip and compare it to DI-in...

I did this. Actually, I looked at the signal after 10 LEDs. It is indeed a new signal, even with slightly different timing. The chip appears to trigger on the rising edge of the waveform, but otherwise do everything based on one-shot timers inside the chip.

PaulStoffregen
01-28-2013, 05:10 PM
Also, in additional to dramatically improving the signal quality, a 220 ohm resistor also gives some degree of protection from destroying the Teensy if the 3.3 volt signal line accidentally touches one of the 5 volt power lines.

redredgroovy
01-29-2013, 05:28 AM
Also, in additional to dramatically improving the signal quality, a 220 ohm resistor also gives some degree of protection from destroying the Teensy if the 3.3 volt signal line accidentally touches one of the 5 volt power lines.

Thanks for this insight! I've been trying to drive a WS2811 strip with 240 LEDs using a Teensy 3.0, and the errant behavior was making me pull my hair out. I was about to revert to a board with 5v logic, but throwing a 220 ohm resistor on the signal line immediately solved my issue.

Wozzy
02-03-2013, 01:02 AM
I received my 20m of GreeLed GE68RGB2811C 68 Pixel/meter WS2811 light strips the other day and have had a chance to play with them a little.

They are very bright, and dense, with a pixel pitch of 0.58in or 14.7mm.

They can use a lot of power (over 4 Amps/meter at 255,255,255) so I had to purchase a power supply. I ordered this one: AliExpress 5V 70A (http://www.aliexpress.com/item/350W-Dual-Output-Switching-Power-Supply-88-264VAC-input-5V-350W-output-CE-and-ROHS-approved/289599937.html) from Ray Wu
Until that arrives, I can't fire them all up at once.

Here's a closeup photo with the silicone waterproofing removed:
219
Click for a larger image ....... Samsung Galaxy S3

Also, here's a video that I made that show the strips in action: WS2811 YouTube Video (http://youtu.be/kwVMjNMzJ-k)

I updated my earlier post (http://forum.pjrc.com/threads/15620-WS2811-on-Teensy-3-0-using-FastSPI_LED-library?p=19987&viewfull=1#post19987) with order details and a time line because these are ordered directly from the manufacturer for $14.50/meter + air freight.

Unfortunately one of the 5 m rolls was damaged and had a a few defective pixels. I was able to cut out the 5 defective pixels, and salvage the rest of the strip, but it's cut up into 5 short segments.
I contacted Britney in sales about this. She was profusely apologetic, and will send me a replacement.

Update: So now GreeLed saying that they will ship the replacement only after I return the defective roll to them in China. They are not offering to pay for the return shipping!

Update2: Greeled Just contacted me and said that there's no need to return the defective 5m light strip. They will replace it for me at no charge.

neep
02-03-2013, 01:14 AM
Very nice! And thanks for the video. I really enjoyed that "trip" ;-)

I'm going to order a roll of these myself in a month or so, as I currently don't have the time to play with them. But I can't wait to get these into my LED staffs, as I'm getting bored already with just 8 pixels per staff end for POV. I should be able to get 16 with these, and have some extra space for logic and wiring.

virtualdave
02-03-2013, 05:04 AM
Not to create a GreeLED vs. Ray @ Aliexpress battle :)

but one thing to note, if you wish to customize your LED spacing without needing to design/build your own pcb with decoupling cap, and keep the flexibility...the LEDs I ordered had a slightly different configuration between LEDs than the GreeLEDs.

220

I basically cut from the left edge of the left set of pads to the right edge of the right set of pads, soldered the pads together, and voila! ~12mm spacing, or 83 LEDs/m for those keeping score. Obviously a bit of work on my end, but wasn't too painful, actually. And maintained most of its flexibility. Definitely a bonus.

Ray mentioned he could do custom spacing...would love to get this down to 10mm spacing. I'll update if I hear anything promising.

Cheers,
David

Madox
02-03-2013, 05:26 AM
virtualdave - you can also buy the LEDs themselves from Ray and put them on your on flex PCB/PCB :) Not much cheaper than the strips, but handy if you're doing a custom project.

virtualdave
02-03-2013, 05:37 AM
and i'm currently sitting on 500 leds and 500 decoupling caps wondering how to do that. no idea how to go about designing/ordering flex pcb. as long as I bill myself out to myself at $.20/hr, I'm thinking it still comes out cheaper to snip the strips myself? ;)

Any pointer on where to look for making your own flex pcb?

Wozzy
02-03-2013, 07:07 PM
I noticed that the strips have no flexibility at all in the lateral direction. If you want any lateral curvature, I have found that you need to cut and resolder with the correct curvature. Has anyone else found a better way?

neep
02-04-2013, 10:54 PM
Hi! I'm currently working on a rewrite of the FastSPI_LED library, in part to make it more easily portable to arduino variants (like the teensy 2.0/3.0) as well as other arduino platforms. [...] I'm hoping to have the rewrite done and up by the end of the month.

I've just gotten my first WS2811 based LED strip in (60 LEDs/m) and I totally love it, as it works just wonderful with the adapted Adafruit_NeoPixel library.

However, my LED staffs I have more or less physically ready now are based on the WS2801 strips, which I want to replace with the 2811 now, so I'll have 16 pixels instead of 8 per side of the staff, or even more. This will get POV to really become something to look at. My code is currently based on your FastSPI lib, so I can't wait to be able to use the same lib for the WS2811s.

I also had some fun with an SD adapter that hooks onto the SPI bus (the one PJRC sells). I got this working, but once I init the card, FastSPI for the WS2801 becomes really slow in comparison to what it was before, and many of the POV and related effects I wrote algorithms for no longer look cool when swinging the staff. I implemented a cable select functioning by setting one of the pins high and low, connecting to an NPN transistor to interrupt the clock signal to the 2801 strip. Was planning to do the same for the data line on the 2811, but if somehow accessing anything else on the bus is screwing with the FastSPI speed, then it's not going to work for me. I'm now thinking perhaps to upload images using bluetooth, in run-time.

Anyway, thanks for your great work, and looking forward to the version that includes WS2811 support, like a lot of folks here probably ;-)

*EDIT* I now see Paul made a version of the FastSPI lib available with some changes for the 2811. Going to give that a spin. I should have read this thread better...

PaulStoffregen
02-05-2013, 02:43 AM
Here's a few quick photos of the test setup I'm building for the new library.....

223

222

224

225

Wozzy
02-05-2013, 02:41 PM
Here's a few quick photos of the test setup I'm building for the new library.....

Paul is up to something....

Paul, I hope you've got some sun glasses.
And don't forget your anti-seizure medication. :-)
I can't wait to see a video of that test setup in operation.

Robin
02-05-2013, 02:45 PM
Paul is up to something....


Paul is ALWAYS up to something. However, he does get a gleam in his eye when talking about this one.

BambooSam
02-05-2013, 05:48 PM
How many frame/second are you getting out of the WS2811?

Madox
02-05-2013, 07:17 PM
Here's a few quick photos of the test setup I'm building for the new library.....



Remember my warning ... if you turn all those LEDs on MAX and look at it ... your eyes WILL hurt :)

PaulStoffregen
02-05-2013, 08:21 PM
How many frame/second are you getting out of the WS2811?

I've been working with pacing the updates to the video frame rate, which is either 30 or 60 Hz. For that array (60 by 32 LEDs) Two Teensy 3.0 boards are used, one for each half of the array. I've been working on a sync signal, so they can sync their update even if there USB has some latency delivering the data. The frame sync allows any number of Teensy 3.0 boards to be used, so you can grow the array to incredibly large sizes by adding another Teensy 3.0 for each 1000 LEDs. Beyond about 20 Teensy boards, you'd need USB 3.0 hubs or multiple USB 2.0 cards and hubs, but with USB bandwidth, it's meant to scale to almost any size. So with the sync feature, the update rate is 30 or 60 Hz.

However, if you program it to update at maximum speed, not using the sync signal, the two Teensy 3.0 boards using the new library can update that entire array at 274 Hz (each board is responsible for half of the array). The new library has double buffering and leaves the CPU free during those updates, so if your code is efficient enough to produce new images faster than 274 Hz, it will not slow the update rate.

However, updating at 60 Hz with the sync signal is probably better than 274 Hz without sync between the board.

virtualdave
02-07-2013, 07:24 AM
Hi all,
For those that have been playing with these LEDs, has anyone noticed that these draw a current even if the LEDs are off? I'm trying to figure out if this is actually what I'm seeing or some other issue. I'm seeing ~1mA/pixel. Is the ws2811 clip always "on"?
Thanks,
David

neep
02-08-2013, 10:17 PM
virtualdave: I see 190mA to my 240 LED strip when all the lights are off. So not quite 1mA per pixel, but definitely some current.

virtualdave
02-08-2013, 10:36 PM
Paul is seeing something similar as well. Good to know. Yeah, looks like it's about 0.8mA/pixel. I've now added a little p-channel mosfet circuit so I can shut all power to the LEDs when they aren't being used. That extra current adds up pretty quickly, and gets to be a bit painful if trying to do some work under battery power!

Cheers,
David

deltaentropy
02-15-2013, 05:51 AM
Hey, I'm pretty much a total noob to microcontrollers and LED's but I decided to jump into the deep end with the teensy 3 and WS2811 pixel modules. When I first got them to turn on using the fastspi library, the colors seemed really washed out and the LED's never went completely off. I was banging my head against the wall when I tried lowering the clock speed to 24mhz. All of a sudden, nice clear colors. Washed out at 48 and 96 mhz. Can anyone tell me why?

dgarcia42
02-15-2013, 06:33 AM
Hey, I'm pretty much a total noob to microcontrollers and LED's but I decided to jump into the deep end with the teensy 3 and WS2811 pixel modules. When I first got them to turn on using the fastspi library, the colors seemed really washed out and the LED's never went completely off. I was banging my head against the wall when I tried lowering the clock speed to 24mhz. All of a sudden, nice clear colors. Washed out at 48 and 96 mhz. Can anyone tell me why?

The ws2811 has some pretty precise timing requirements and the code in the current version of the FastSPI_LED library was tuned for 16Mhz - I suspect at 24Mhz it was "close enough" to give you something close to working, but at the higher speeds it was definitely way out of spec.

In the next couple weeks i'll be releasing a new version (ground up rewrite) of the FastSPI_LED library that, among other things, will tune itself for chips like the ws2811 and tm1809 based on the clock speed of the processor you are building for, vs. needing to hand adjust timing when the clock speeds change. This should also speed up supporting variations on this style of chipset.

Qumefox
02-15-2013, 04:14 PM
Isn't Paul working on a WS2811 library using DMA as well?

deltaentropy
02-15-2013, 05:35 PM
Thanks for the prompt reply, and thanks again for taking it upon yourself to create the libraries. As long as its updated by Burningman I'll be smiling.

PaulStoffregen
02-15-2013, 09:05 PM
Yes, the high performance library is currently in private beta testing.

The testing has taken a little longer than I had originally hoped, but the good news is some bugs and usability problems have been fixed. I believe you'll be much happier with it, when released, than would have been the case without all this testing.

I'm planning on releasing on Feb 25. It will be announced first on this thread, and then on a couple major blog sites. I really do not like vaporware, and lately some major sites carried articles about completely untested WS2811 ideas.... so I'm trying to keep this stuff a bit quiet until release.

Follow this thread if you want to hear about it the moment it's available.

voidptr
02-17-2013, 01:25 AM
I'm confused now. It says: "64pcs 5050 RGB LED With 60pcs WS28IC inside to drive 64 pixels".

So how can it have 64 LEDs whilst there are only 60 controllers, per meter?

On the surface, it does look a bit different from what I ordered: http://www.aliexpress.com/snapshot/213954944.html

Can anyone shed some light on this?

Pretty sure that this is just a copy/paste error from the original 60 pixel strips. If you look carefully at the pictures, you can see that the new 64 LED strip has condensed the cut-point pads into a single pad, so if you want to split the strips, you have to cut down the copper, instead of between the pads as before. Honestly, I don't think the extra four pixels is worth the almost five dollars/meter mark-up.

PaulStoffregen
02-17-2013, 11:50 AM
I purchased 1920 of the cheapest LEDs from Ray Wu on Alibaba. I should have bought some spares. It turns out a few of the pixels have trouble. My best guess is they overheat. When it stops working, all the subsequent pixels after it in the strip stop getting data.

The power supplies, which came from a USA-based EBay seller (reselling the same cheap stuff from Alibaba merchants) have a trim pot to adjust the voltage. The default was 5.2V. When I reduced it to 4.8, 2 of the 3 "bad" pixels got better. One still stops working after about 2 hours, the other seems pretty happy at 4.8V. However, the worst pixel stops working within minutes, even at 4.8.

Those power supplies also had trouble. They were designed for a 120 / 240 volt switch, but the 3 I received had the switch missing. They worked at light loads, but beyond about 5 amps, they lost regulation and output only 4 volts. I did not test with heavier loads. Instead, I opened all 3 and soldered a wire at the empty place where the switch should have been.

The obvious point is these cheapest no-name products sometimes have pretty substantial quality problems. Then again, if you're building a very large LED project, the savings is so much that it may be worth the hassle. Just be sure to buy a few spares..... I did not, but should have.

voidptr
02-17-2013, 01:29 PM
I purchased 1920 of the cheapest LEDs from Ray Wu on Alibaba. I should have bought some spares. It turns out a few of the pixels have trouble. My best guess is they overheat. When it stops working, all the subsequent pixels after it in the strip stop getting data.

The power supplies, which came from a USA-based EBay seller (reselling the same cheap stuff from Alibaba merchants) have a trim pot to adjust the voltage. The default was 5.2V. When I reduced it to 4.8, 2 of the 3 "bad" pixels got better. One still stops working after about 2 hours, the other seems pretty happy at 4.8V. However, the worst pixel stops working within minutes, even at 4.8.

Those power supplies also had trouble. They were designed for a 120 / 240 volt switch, but the 3 I received had the switch missing. They worked at light loads, but beyond about 5 amps, they lost regulation and output only 4 volts. I did not test with heavier loads. Instead, I opened all 3 and soldered a wire at the empty place where the switch should have been.

The obvious point is these cheapest no-name products sometimes have pretty substantial quality problems. Then again, if you're building a very large LED project, the savings is so much that it may be worth the hassle. Just be sure to buy a few spares..... I did not, but should have.

You can cut out the offending pixels and solder the strip back together.

Wozzy
02-17-2013, 02:48 PM
I had similar issues and had to cut out the bad pixels. This problem was limited to only one of the rolls that I purchased.
Fortunately for me the supplier is replacing the roll.

I suspect that most users of these lightstrips aren't providing enough current to push the strips to their maximum design specifications.
A typical 60 pixel/meter strip, at full white (255,255,255), draws more than 3.5 Amps per meter... Way more than your average wall wart can provide.

I guess Burn-in testing may be apropriate for critical, or or inaccessable projects.

BTW, Has anyone figured out how to get long lengths back in their silicone jackets after repairing the waterproof models?

Paul, I can send you a few spares to use as replacement pixels if you'd like.

voidptr
02-17-2013, 02:57 PM
BTW, Has anyone figured out how to get long lengths back in their silicone jackets after repairing the waterproof models?


You just sort-of wiggle it in. You gently grip the jacket by the edges, and let the thing hang vertically. Then, pinching the strip between the lights, you just slide it in. If you get stuck, pull out a little and wiggle it, then try sliding it in again. Another approach to consider (I haven't had to do this, so YMMV), is to attach a string to the end of the lights, thread that through the jacket (with a long stick or something), then pull the lights through.

Wozzy
02-18-2013, 03:31 AM
Mine must be a tighter fit... I can only wiggle them in about 25cm before they bind and kink.
I'll try the string idea...or maybe solder a long wire.
thanks

virtualdave
02-18-2013, 04:12 AM
Solder a wire to the strip and "fish" it through? Might work?!?!

dgarcia42
02-19-2013, 06:00 AM
As mentioned/promised - preview release of the FastSPI_LED2 library - most of my testing over the past week was on the teensy 3! http://waitingforbigo.com/2013/02/19/fastspi_led2_preview_release/

deltaentropy
02-19-2013, 08:21 AM
http://24.media.tumblr.com/tumblr_m22bfe9txl1qa10uwo1_500.png

Wozzy
02-19-2013, 12:57 PM
preview release of the FastSPI_LED2 library - http://waitingforbigo.com/2013/02/19/fastspi_led2_preview_release/

This is what started this thread in the first place.

I look forward to trying out the new FastSPI_LED2 (http://code.google.com/p/fastspi/downloads/detail?name=FastSPI_LED2.Preview.20130218.zip&can=2&q=) library when I get home tonight.

Also... I see that you are working on a new FastPIN (http://waitingforbigo.com/2013/02/19/introducing-fastpin-the-low-level-heart-of-fastspi_led2/) library.
This project sounds very interesting to me and should have an application in an upcoming project of mine.

Many thanks for all of your efforts.

dgarcia42
02-19-2013, 05:01 PM
Wozzy, the FastPIN and FastSPI pieces are part of FastSPI_LED2 - and if you use just the Pin or the SPI parts, the other parts aren't included/compiled in. (Well, that isn't, strictly speaking, entirely true - if you use just the FastSPI (non-led) part, then some of the Pin code is compiled in as well, since they build on each other). So, you get one, you get all three.

Right now the Pin/SPI libraries are output only (courtesy of the focus on the led library). However, my plan is to make them also work with input ASAP (though, in practice, that might be a few weeks - I have a diving trip i'm going on next week!)

PaulStoffregen
02-25-2013, 04:55 AM
Finally, OctoWS2811 is released.

http://www.pjrc.com/teensy/td_libs_OctoWS2811.html

hunter
02-25-2013, 06:53 AM
Thank you Paul!!!

Wozzy
02-25-2013, 12:38 PM
Finally, OctoWS2811 is released. http://www.pjrc.com/teensy/td_libs_OctoWS2811.html

I was fortunate to be one of the Beta testers. So I've had a chance to try this out already.
The OctoWS2811 library (http://www.pjrc.com/teensy/td_libs_OctoWS2811.html), really allows terrific performance of the ws2811 Light strips, and never skips an LED.

Here's a YouTube Video (http://youtu.be/kBIOLT8ym8A) I made which shows some of its capability.

PaulStoffregen
02-25-2013, 02:58 PM
That was fast.... Hack-a-Day carried a story about OctoWS2811 this morning, only 6 hours after I sent them a message.

ohararp
02-25-2013, 06:41 PM
I just saw your writeup via Hackaday. Great stuff. I am actually working on some custom 8x8, 16x16, and 24x24 pcb boards. All the matrices will have 12.5 mm spacing in x-y direction. I have been wanting to put together a 128x64 led matrix (5’x2.5’) in size for awhile now. Power managment is key with these leds. I also plan on offering these matrices for sale at some point. Anyways, I wanted to say great work on your libraries. I had been wanting to implement a “parallel” type output for a bit.

Looks like I am going to have to get some teensy's on order! In the meantime here's a prototype of the 8x8 board https://vine.co/v/bna0mTg9ZZ3

exco
02-26-2013, 12:08 PM
Wow. Absolutely great work, PaulStoffregen.

I was playing with a teensy 2.0 and some ws2811 led's for a few days (which ended up working thanks to Alan's code over here. (http://bleaklow.com/2012/12/02/driving_the_ws2811_at_800khz_with_a_16mhz_avr.html ))

Now I read about your library on hackaday I will be getting "some" teensy 3.0's. You state "Any number of Teensy 3.0 boards may be used to support large LED arrays." ... so how many is any?
Have you done some calculations as to what's the maximum number of led's you can drive - keeping in mind other bottlenecks as USB and a sensible framerate (100fps for fast animations?).

Qumefox
02-26-2013, 04:59 PM
From looking at the library code, and what little I know about it, I think your wallet will be the primary limiting factor in the number of teensy3's/LED's in your project, and after that, would be USB bus bandwidth, which can be worked around by adding more root USB ports to the host machine. Also, if memory serves me right, I think in one of his previous posts he stated that ram was the primary factor limiting the number of LED's a single teensy3 could address. Right now he states it's about 1000 per teensy3.

PaulStoffregen
02-26-2013, 07:06 PM
As you scale up to an extremely large LED array, eventually a few technical problems will come into play.... other than the obvious issues of material cost, huge power requirements, and the sheer number of hours needed to build the system.

USB bandwidth is the main technical issue. With 30 Hz video, each Teensy gets 180 kbytes/sec, and if you play a 60 Hz progressive video, it’s 360 kbytes/sec. Teensy 3.0 can easily handle these speeds, because each runs completely separate, other than listening for the frame sync pulse. The main reason for the 1000 LEDs per Teensy guideline is so each board can easily accomplish its job with plenty of timing margin, even if there is some extra USB latency. If there is scheduling latency of other temporary software lag on the computer (eg, Java's garbage collection), and then it transmits one or more frames too rapidly, the timing margin greatly improves the whole system's robustness. The USB bandwidth plus timing margin is main reason for the 1000 LEDs per Teensy guideline. In theory, you might be able to connect more than 1000 and maybe still be ok, but at $19 each compared to at least a couple hundred dollars for the LEDs, you really will not save much connecting more LEDs per Teensy. I personally test OctoWS2811 with 960 LEDs connected to each Teensy, so I highly recommend you follow the 1000 LEDs per Teensy guideline for best performance and compatibility.

Somewhere around 20 to 40 Teensys, the total data flow is going to become a substantial part of USB 2.0 bandwidth. You probably want to keep the total under half of USB’s capacity. You might need USB 3.0, or add extra USB 2.0 cards. Typically all the USB 2.0 ports on a computer share the same 480 Mbit/sec bandwidth.

You must use good quality USB hubs. Beware of single-TT USB HUBs. They will cause problems. Only Multi-TT hubs properly share bandwidth. A USB "TT" is the Transaction Translator (basically a buffer memory and some logic) which converts between USB speeds. Sadly, very few hubs actually say which type they are... the marketing is all based on size, shape & color. But there are indeed 2 types of USB hubs and it does make a dramatic difference for a system like this. You can check which type a HUB actually is with Linux's "lsusb -v" or Windows 7's device manager.

http://www.pjrc.com/teensy/td_flightsim_4.png


If the display is incredibly large (more than 8 meters wide) and you have Teensy 3.0s located on both the left and right sides, USB cable lengths might become an issue? You might need to locate the PC in the center behind the display and run 2 long cables to a hub on each side, or perhaps a hierarchy of USB hubs on each side? Especially if using USB 3.0 to the first tier, and perhaps USB 2.0 in the 2nd tier, and then those hubs driving the Teensy boards, be aware of the USB cable lengths and use good quality cables.

Another issue is transmitting the frame sync signal. At some point, perhaps even as few as 8 boards, you’ll probably need to use a 50 to 100 ohm resistor on the frame sync pin. This is more a function of the physical wire you use. Using a good quality cable like CAT5 twisted pair with the ground and frame sync on a pair will help. If the wire runs a different path than the ground (as I did in this 1920 LED demo), the signal can get ringing and other transmission line effects.

At huge sizes, the you’ll probably need to add buffer chips to transmit the frame sync pulse to each group of other boards. This too is pretty easily solved. However, with only a wire, it doesn’t matter which board is the master sending the pulse and which others receive it. That makes things very easy, where you can just plug the boards in any order and no worry which ones get assigned to which device names or com port numbers. If you add unidirectional buffer chips like a 74HC245, then it’ll become important to make sure the intended board is the master. The first board in the list in movie2serial’s setup() is the master. You’ll just need to make sure the port corresponding to the board with those buffers is listed first.

A really good, but perhaps overly conservative approach to the frame sync would involve using RS-485 on a twisted pair cable. Still, if you're connecting over $10000 in LEDs, this might be worth considering. The digital pins from Teensy 3.0, and even buffer chips like a 74HC245, aren't meant to drive really long cables. RS-485 signals are designed for fast performance over thousands of feet of cable. You would need to make 1 driver board and a receiver board for each Teensy, so this is adds quite a bit of work, but it automatically handles this next issue...

At the incredible amount of current consumed by tens of thousands of LEDs, another possible issue you may face is differences in the ground potential. For example, a system using 40 Teensy 3.0s would be driving approx 40000 LEDs, which could consume about 2000 amps of current at 5 volts when all are driving fully white. Obviously you'll locate many power supplies as close as possible to the strips they power. You'll use #22 to #18 wire between the power supplies and the LEDs (a 1 meter strip of 60 draws up to 3 amps). But it's important to keep in mind the whole system's grounding. When we draw schematics, we put ground symbols all over the place and assume they're all at exactly the same potential. But in reality, electrons flow through metal that have non-zero resistance. Certainly you should measure both AC and DC voltage between "ground" at distant locations as the LEDs change power usage. You may need to add extra ground wires to keep the whole system at the same ground potential, or within 100 to 200 mV, so the USB can work.

The huge power requirements should be obvious, but just to mention it again, 40000 LEDs using 80% efficient power supplies (which hopefully have inrush limiting and active power factor correction) will draw about 52 amps at 240 volts AC. This much power would normally be supplied by a 3-phase service, where you'd probably run the many power supplies in 3 groups at 208 or 277 volts, depending on the type of service.

The final problem, which I doubt would ever be an issue on any modern computer, might be lack of CPU time to process the original video material into the many streams for each board. The code might need to be rewritten in C. However, running on a MacBook Air (certainly not the fastest machine), the 1920 LED demo was using 8% CPU time. I didn’t investigate the CPU usage in detail, but it was approximately the same just running without sending to any boards, so most of that 8% is probably the video decode, screen updates, or other stuff Java and Processing are doing to play the video. Still, each Teensy needs some CPU time on the machine sending the video, so as you scale up, keep an eye on how much of your computer's resources the software is using.

These limits come into play for extremely large displays, probably involving over $10000 in LEDs. If you use OctoWS2811 for such an awesome project, you really must send me photos!!!

nevetsokyeron
02-27-2013, 12:08 AM
Wow. This is great stuff. I wish I understood more about how it all works.

How hard will it be to port this library to other LED strips? (like the LPD8806 or others). Is there a way to abstract the output or is it very specific to the WS2811s?

The reason I ask - I have access to some LED panels from a now out-of-business company that did video walls and other big LED installations. The LED panels are 256 RGBs on a 15x15 inch frame (one 16x16 grid per panel).

With the help of a friend I have the AdafruitGFX library ported to these panels and I can make basic animations or push images from an SD card.

The past 2 days I put together a patch in MAX to push video to my Teensy3 and then use SPI out to the LED panels..., but I'm seeing the frame rate suffer as I add more LEDs.

Thus - I'm looking for more efficient solutions to move the data

Here's a video I made last night with 6 panels (32 x 48 pixels) = 1536 pixels
http://www.youtube.com/watch?v=t0tQTypWuBc

PaulStoffregen
02-27-2013, 08:04 AM
How hard will it be to port this library to other LED strips? (like the LPD8806 or others). Is there a way to abstract the output or is it very specific to the WS2811s?


OctoWS2811 is very specific to driving exactly 8 strips the WS2811, thus the name "OctoWS2811".

About a year ago, I wrote a program for streaming video to LPD8806 strips. Well, at least the Teensy side. It only converts incoming USB to 8 bit parallel output (the data is never stored into Teensy's RAM), so you can't build a stand-alone program like with OctoWS2811. This LPD8806 stuff was never turned into a nice, well documented library, but at least a couple people used it for very large LED projects. Here's some links for you:

http://forums.adafruit.com/viewtopic.php?f=47&t=25854&p=143049#p143049

http://www.dorkbotpdx.org/blog/armatronix/led_video_wall

http://hackrockcity.org/post/24363042425/domestar-may-2012-domestar-appeared-on-the

The OctoWS2811 approach might be able to work for LPD8806 strips, with the DMA code redesigned. But that would take quite a lot of work. Since the WS2811 is now much less expensive and therefore much more popular than the LPD8806, it seems unlikely OctoLPD8806 will ever be written. But the code at those links above is real and as you can see from the video wall and Domestar, it definitely does work.

nevetsokyeron
02-27-2013, 08:34 PM
Thanks Paul... I looked at domestar stuff awhile back and I'm looking over the other links now.

FWIW - I'm trying to see what I can accomplish with these crazy LED panels I have so I'm looking to find techniques I can borrow from existing code. The serial2parallel code you posted in that forum link might be pointing me in the right direction.

Cheers!

exco
02-28-2013, 11:24 AM
Really thorough answer to my question

^^ Thanks a lot.
Well it looks like there could be a project coming my way for building a whole LED wall. I'll take all your advice into consideration and will of course let you know how it goes - if it happens.

ohararp
03-05-2013, 02:02 AM
Wozzy, how did you generate the fonts in this video? http://www.youtube.com/watch?v=kBIOLT8ym8A

Wozzy
03-05-2013, 02:19 AM
The fonts are being displayed with the video display feature of the OctoWS2811 LED library.
I used an old copy of Adobe Premiere To create an extremely high aspect ratio video file.
I then Used the Credits Roll text feature to add the text. I saved the file as an mpeg.
The reason the text scrolls so smoothly is because it is being aliased as it moves from one pixel to the next.
However the speckalation is due to artifacts from the video compression and rescaling.

ohararp
03-05-2013, 02:23 AM
Wozzy, nice trick using Adobe. I hard coded this http://www.youtube.com/watch?v=VSL2bRITrd8 in just a single color and was gonna lose my my mind if I was gonna do 3 colors on a uProcessor! Thanks for sharing!

davepc
03-22-2013, 09:23 PM
I've being following this thread with interest. Thanks to Paul and others for sharing your experience.

I'm building a mark II LED costume. First version used an arduino uno, analog 300 waterproof 5050 RGB SMD Strip and my own shift registers circuit. (http://www.youtube.com/watch?v=keVk7orBRHU).
It is for at night at festivals, battery powered, so I never used it full white or full power and was able to keep the current under 1A

Just wondering what the extra overhead for a Teensy 3.0 and WS2811 is. Could someone who has a set give me approximate current for say 600 (or whatever you have) WS2811 with Teensy at RGB 64,64,0

Thanks
Dave

dgarcia42
03-22-2013, 10:00 PM
I have a clock that's currently running off of a 1Amp USB charger that has 216 ws2811 leds and is using a teensy 3.0, and don't appear to be having any power issues with it. (Also, I should note - these are 5v ws2811's)

nyarlathotep
03-26-2013, 02:10 AM
Finally, OctoWS2811 is released.

http://www.pjrc.com/teensy/td_libs_OctoWS2811.html

Thank you so much for posting this detailed description!

You mentioned that "When the LED is off, the WS2811 chip consumes approximately 0.9 mA of current. For battery powered LEDs, this current can easily drain the battery" and described a circuit to deactivate the LEDs. I suppose this is deactivating the LEDs completely, not simply pulling down the control temporarily.

No way to simply cut the WS2811s power consumption without deactivating all the LEDs on the strip?

virtualdave
03-26-2013, 07:54 AM
Hi nyarlathotep,

As fas as I know there is no way to separate out the power for the LED's from the power for the driver embedded in each LED. The circuit shown cuts off all power to the strip when the LEDs are not in use.

David

PaulStoffregen
03-26-2013, 09:53 AM
The OctoWS2811 page (http://www.pjrc.com/teensy/td_libs_OctoWS2811.html) has a section about this. Scroll down to "WS2811 Idle Power".

Unfortunately, the WS2811 does not have many features. It was obviously designed for minimum cost.

nyarlathotep
03-26-2013, 06:01 PM
Alright cool, maybe I'll just unplug the larger strip sets at times. I'm doing an outfit for festivals so it needs to both put on a show at times and provide safety illumination for an extended periods, but I don't need this part automated.

I'll maybe modify the library to use ten or twelve control lines instead of eight, whatever minimizes the wasted memory from using different lengths strips, which depends upon my final layout. So I've two more questions :

(1) Any recommendations for which additional pins to use first? I haven't completely figured out how I'm controlling this yet, so perhaps I'll avoid the SPI pins in case I want them for bluetooth. If I wind up using IR then seemingly most pins work.

(2) Any suggestions for a version of the 74HCT245 with more than eight lines? Just use two I suppose?

Thanks again for writing the library and posting the how-to!

deltaentropy
03-26-2013, 07:27 PM
Hey I want to thank all the contributors thus far, I'm still having trouble with my pixels and in troubleshooting I tried another strip from an independent source. It worked perfectly, indicating something is wrong, either I have defective pixels or they use another control standard. Can anyone recommend a LED forum where people might be able to help troubleshoot the pixels now that I have the microcontroller figured out?

dgarcia42
03-26-2013, 07:41 PM
I have heard reports of people getting ws2811 strips where the timings were fairly different from what's spec'd - if you're using FastSPI_LED2 - you can go into the header file to see how the timing supports are defined:

template <uint8_t DATA_PIN>
class WS2811Controller800Mhz : public ClocklessController<DATA_PIN, NS(320), NS(320), NS(550)> {};

You can do something similar to define a new controller - and try juggling the timing numbers - the first number is the number of ns between raising the line high and where it gets dropped for a 0 bit. The second number is how much longer the line needs to be held high for a 1 bit, and then the third number is how long the low should be held for. So, the numbers above mean, roughly, that a 0 will be high for 320ns and low for 880ns, and a 1 will be high for 640ns and low for 550 - roughly.

ohararp
03-28-2013, 01:18 AM
Hey all, I just wanted to let you know my 16x16 rgb matrix pcbs are in! I have a little over 12000 WS2812s on reels waiting to be placed. I am combining these with some nice 300W = 60A x 5V power supplies and deans connectors to gang everything together. My order for a few Teensy 3.0s is finally in place as well. I am looking forward to getting this all up and running! Big challenge will be the actuall mounting of things. I am leaning towards MicroRax right now.

349

EDIT - I should clarify I still really wanna do a 128x64 display (8192). Gonna scale up from 32x16 (512) then 64x32 (2048).

PaulStoffregen
03-28-2013, 01:39 AM
12000 LEDs, FTW!!

Wozzy
03-28-2013, 08:21 PM
Hey all, I just wanted to let you know my 16x16 rgb matrix pcbs are in! I have a little over 12000 WS2812s on reels


**WOW** Please post photos and videos of your progress!

ohararp
03-30-2013, 04:23 PM
Paul, I recevied my teensies (2) and was getting started on coding some stuff up.

I was trying to understand the memory setup and was trying to figure out 2 things:

1. Why is the displayMemory an int array (2 bytes) versus a byte array (1 byte)?
2. Why is the ledsPerStrip Multiplied by 6? Seems like only 3 would be needed (3 bytes per pixel, 1 byte per color)


DMAMEM int displayMemory[ledsPerStrip*6];
int drawingMemory[ledsPerStrip*6];

Based on these memory requirements the max display size would be 64*32=2056 (~14.4K bytes of memory) using a 16x16 pixel set. Any help is appreciated. I'm just trying to better understand the memory setup.

PaulStoffregen
03-30-2013, 08:43 PM
1. Why is the displayMemory an int array (2 bytes) versus a byte array (1 byte)?


4 bytes, not 2. Teensy 3.0 is a 32 bit processor, so int is 32 bits. :)

OctoWS2811 requires the data to be 32 bit aligned. The compiler does that automatically with 32 bit data types. If it were char or byte, an attribute to specify memory alignment would be needed.



2. Why is the ledsPerStrip Multiplied by 6? Seems like only 3 would be needed (3 bytes per pixel, 1 byte per color)


Remember, ledsPerStrip is only 1/8th of the total number of LEDs. 6 ints at 4 bytes each is 24 bytes for each in ledsPerStrip, which results in 3 bytes per LED in the entire array.

DJ Namaste
04-09-2013, 08:14 PM
Can anyone point me to basic POV in Arduino? I am using the Teensy 3.0 and ws2811 and have the system set up and running. I would like to get some basic POV patterns running at random.

I have seen the tutorials where a PIC controller is used with LED's on individual pins but the LED strips seems like it is different, needing a library.

kelvinmead
04-09-2013, 08:55 PM
this does nothing to the thread, except to show appreciation, and to say woop! my teensy3.0's came in the post today!!

ohararp
04-10-2013, 05:41 PM
I was able to get my pick and place up and running and was able to assemble some of my 8x8 matrices in a 8x64 configuration. I am currently running an mBed and the Plasma Pattern in Paul's OctoWS2811 library. I am awaiting a breakout board for the Teensy and expect this to be running on Teensy without a problem. I am looking forward to getting some animations up and running like Wozzy.

369

I have one of Tautic's Color sensor (http://www.tautic.com/tcs34717-color-sensor-breakout-fundraiser-on-tindie-com) to determine the Lux output of these leds relative to the PWM register settings. I'll report back on these results. I happened on this based upon the Gamma correction that is part of the Plasma Example. Enabling the Gamma correction made the display much more "reactive".

I designed the displays to use HobbyKing Connector's XT60 in a series configuration. Using large power planes on the pcb coupled with 12AWG silicone wire keeps voltage drop to 0.15V from one end of the display to the next. I only implemented a single piece of Microrax in this picture, but am planning on building a larger frame or box for this display.

370

mhenstell
04-14-2013, 09:55 AM
Real late to the party here. We founded Blinkiverse as an offshoot of the HackRockCity Domestar project. (http://blinkiverse.com/domestar) We've got some good, working (if not polished) stuff for driving large amounts of the LPD8806 style strips:

https://github.com/blinkiverse/blinkyboard8
https://github.com/hackrockcity/domeTransmitter

We've fallen completely behind on the WS2811 while trying to finish up our LPD8806 projects, but we're working on catching up. This library looks amazing. Paul wrote the first proof of concept code that we used to get the Domestar working, and it looks like he's done it again with the WS2811. I look forward to testing this out when I get back to the office.

We don't have forums of our own yet, but feel free to reach out if you have any questions about driving large amounts of LPD8806. We'll have high-quality LPD8806 and WS2811 strips for sale in the near future as well.

Thanks for all the hard work, Paul!

nyarlathotep
04-14-2013, 01:17 PM
If I understand, the 74HCT245 picture (http://www.pjrc.com/teensy/td_libs_OctoWS2811_19.gif) in the OctoWS2811 page (http://www.pjrc.com/teensy/td_libs_OctoWS2811.html) has been labeled as part of the circuit diagram. So it describes OE be wired to ground and DIR wired to +5V.

I haven't gleaned much from the 74HCT245 datasheet (http://www.nxp.com/documents/data_sheet/74HC_HCT245.pdf) description that "[the] 74HCT245 features an output enable input (OE) for easy cascading and a send/receive input (DIR) for direction control. OE controls the outputs so that the buses are effectively isolated." but..

In the functional diagram on page 5 of the data sheet and your gif, if I read the little circles as nots and the top guys as and gates, then the seemingly proposed wiring sends +5V down the right hand central line and ground down the left hand central line. So I presume this means all the right hand triangles replace their incoming voltage while all the left side ones ignore their input. Am I reading all this correctly?

All the above is consistent with the fact that OctoWS2811.cpp calls only pinMode(..., OUTPUT); for those pins, of course. As an aside, I'm curious what one does with +5V inputs and outputs. If you wire up a 74HCT245 with +5V on Vcc and +3.3V from the Teensy's 3.3V out, does it translate signals going the other way back to the +3.3V? That's my loose reading of the functional diagram.

PaulStoffregen
04-14-2013, 01:39 PM
The '245 can be used in both directions. That's what those control signals do. But the WS2811 data is always in only one direction, so I recommend just wiring those signals to always use the '245 in only the way you need.

nyarlathotep
04-14-2013, 02:44 PM
Alright, I take it I read everything correctly, i.e. DIR to +5V and OE to GND, thanks! I'm curious how one sets the voltage for going back the other way, but obviously I've no need for that here.

PaulStoffregen
04-14-2013, 05:09 PM
I'm curious how one sets the voltage for going back the other way, but obviously I've no need for that here.

You don't. The 74HCT245 chip always output 5 volt signals, so it can really only be used with Teensy 3.0 in one direction.

That recommendation is for a specific use with OctoWS2811, and NOT as a general purpose chip to convert all types of signals in either direction. This chip can be used in more ways in other types of systems, but those uses just aren't workable here, which is the reason I recommended connecting the control signals a particular way.

I recommended to 74HCT245 chip for this particular use because it is well suited for this particular task, and 74HCT245 is a very common and inexpensive part.

There are lots of other chips which can be used in a variety of ways. Most of the ones which can be used in more ways with fewer limitations cost more and are not as readily available. Most people design cheaper chips into their products, so the cheaper less-functional parts are more readily available.

Wozzy
04-14-2013, 06:37 PM
Paul's EE knowledge is leaps and bounds beyond mine,
however I've been using 20m of GreeLED WS2811 lightstrips without voltage level-shifters and with only series resistors.
They have never skipped a single beat on the Teensy 3.0 using the OctoWS2811 library.

BambooSam
04-15-2013, 01:25 AM
I know OctoWS2811 is designed for multiple large led strips, but do you think it would be ok to use for just 28? I am experiencing a lot of weirdness and instability with both fastspi libraries, it seems that some leds trigger at different times ruining the POV effect. T3 @ 96mHz

dgarcia42
04-15-2013, 01:36 AM
Can you give me a few more details on the issues you're seeing w/ws2811 and the teensy 3 and fastspi? I'm currently working on trying to get the ws2811 timings solidified, the lack of solid docs are being a pain, but i'm narrowing things down.

Also - another thing to keep in mind - right now, the ws2811 code for both versions of the library halts interrupts, which means that, among other things, the clock stops running - so if you are using micros/millis to determine when to push frames, your timings are going to be off. I'm working on making it so that the library kicks the timers by the appropriate amount, but won't have that done for a little bit yet (my most immediate focus at the moment is cleaning up the teensy 3 SPI code and adding DMA).

BambooSam
04-15-2013, 03:18 AM
Well they display colors very well and correctly, but when I display a bitmap or pixelmap of say a square, or any straight line and take a photo of it with a camera it is very noticeable that they dont trigger exactly when they should. The straight line will not be even, some leds trigger correctly and the rest trigger what looks like 1-3 frames after they should, randomly. The accuracy will raise if I add in a delay after every LED.showRGB((byte*)leds, NUM_LEDS); but that isn't going to work considering the computations that are needed to process and automate the next frame.
And no I am not manually using any timers or any other libraries. I've been playing with the timing also and haven't found the sweet spot.
I very much appreciate your library, it is definitely working batter than any other one. Thank you dgarcia42!

dgarcia42
04-15-2013, 03:30 AM
what are you doing to determine what frame should be shown and when? If you're doing any checking of micros/millis values to determine what should get shown - then that's going to throw things off. I suspect this is more of an issue of when you are sending frames out - the ws2811's are a bit too simple to do things like, say, have individual leds show pixel values out of order.

Also - how many frames/second are you shooting for?

BambooSam
04-15-2013, 03:49 AM
I am just using a camera, not using anything that actually determines when leds trigger ect... I can post an image soon to show you an example if you would like.
But basically I am storing a pixel map into an array, say 28 (width) * 30 (height or frames), I run that into a for loop; once it displays the frame it then does some calculations for color automation ect... then right back in the for loop to display the next frame, very basic.

PaulStoffregen
04-15-2013, 08:32 AM
Each WS2811 LED takes 30 us. Using only 28 will cause FastSPI_LED to disable interrupts for approx 0.84 ms. That's less than the 1ms millis() update, so it shouldn't impact time keeping.

OctoWS2811 can be used for any number of LEDs, even just 1, though it's massively overkill for 1 LED! The downside of OctoWS2811 is it will use up 8 pins, and memory for 8 strips, even if you connect only 1 strip. Maybe that's ok for this project? You might as well give it a try.

You could also try Adafruit's Neopixel library. For the WS2811, it ought to be about the same as FastSPI_LED because the design is similar.

Odds are, all 3 libraries might give similar results. That would be a really strong indication you need a better design for when to send the updates. You might consider using an elapsedMicro (http://www.pjrc.com/teensy/td_timing.html) variable, rather than just a fixed delay. For example, something like this will update every 1.5 ms, even if interrupts consume CPU time.



elapsedMicros usec;

void loop() {
if (usec > 1500) {
usec = usec - 1500;
FastSPI_LED.show();
}
}

dgarcia42
04-15-2013, 05:19 PM
Paul - do microsecond timers also get disabled when interrupts are disabled on the teensy 3? They do on AVR. At 30 fps, a .84ms slip is 25ms/s, or 90s/hour, or 36 minutes/day.

PaulStoffregen
04-15-2013, 06:34 PM
They slip if interrupts are disabled long enough to miss the 1ms interrupt.

The microsecond resolution is computed by reading the value of the timer to see how far it is between 1ms intervals.

dgarcia42
04-15-2013, 06:42 PM
Right, but how is it counting the distance between 1ms intervals, is that tracking another firing timer/interrupt? (or is it a timer/counter that will fire/count even if interrupts are disabled?)

linuxgeek
04-15-2013, 08:14 PM
It sounds like you are concerned with drift, and compounded error of timing. Possibly a keyframe would be useful.
Maybe use an RTC to determine how many frames you should have at a certain time (like 5 minutes), and pad or eliminate frames.
Or measure the actual frames captured over say 5 minutes, and compute the actual frames/second (ie 29.97 instead of expected 30).

Mongoose
05-24-2013, 02:40 AM
Hello everyone, I have constructed a 56x119 ws 2811 screen and am using octo video example. I'm using 7 teensies to run the thing, each accounting for 8 strips of 119.

Unfortunately, only 5 of the 7 teensies seem to function. Which 5 are working does not seem consistent. Does anyone have any thoughts on what might be causing this?

A little more information.
-I am using a multi TT USB hub.
-I have added a 100 ohm resistor onto the sync pin.
-The screen is running off of 4 500 watt 5v power supplies.
-Each teensy is running 13% of the screen and I have verified that they are all correctly offset.

PaulStoffregen
05-24-2013, 12:56 PM
Unfortunately, only 5 of the 7 teensies seem to function. Which 5 are working does not seem consistent. Does anyone have any thoughts on what might be causing this?

Very difficult to know from only this 1 post.

Are you using Mac, Linux or Windows?

Do all 7 serial devices appear on the computer?

Are you running the Processing program? Is it printing any errors in the console panel?

Mongoose
05-24-2013, 02:38 PM
Very difficult to know from only this 1 post.

Are you using Mac, Linux or Windows?

Do all 7 serial devices appear on the computer?

Are you running the Processing program? Is it printing any errors in the console panel?

Thanks for the quick reply.

I am using windows 7, all 7 serial devices are recognized by the OS, and processing is running and reporting no errors. I added some command line outputs to verify that each teensy is connected and gave correct size/offset information. They all seem to do this correctly.

After a fair amount of trial and error, I noticed that my 7 port multi TT USB hub appears as a 3 port hub and a 4 port hub to the OS. The two failing teensies always seem to be connected to the three port component, so I am beginning to suspect that this is a hardware issue.

hunter
05-24-2013, 03:22 PM
Some quick advice:
1. Windows likes to change serial ports around for no reason. Make sure you check for this.
2. Have you tried threading out the teensy sends in processing? This way you'll be sending all 7 serial data streams at the same time.

Mongoose
05-24-2013, 03:34 PM
Yeah, I have noticed windows capacity to mix up com ports. I have had to change their names several dozen times now.

I have not tried threading the com sends but that does make a lot of sense. I've never dabbled with threading using processing but ill certainly give it a try.

hunter
05-24-2013, 04:00 PM
If you need help on the threading you can checkout my code HERE (https://github.com/hluisi/LEDWall/blob/master/processing/LEDWall/serial.pde). But be warned... it's ugly and far from done :P

hunter
05-24-2013, 04:24 PM
Fugly code is kinda my specialty. Have you tested it?

Everyday and then some... But it should be used as an example of threading that works (at least for what I'm doing). It's not plug-n-play or a library or anything like that.

Mongoose
05-24-2013, 04:31 PM
Fair enough. Thanks for the help.

PaulStoffregen
05-24-2013, 04:32 PM
Yeah, I have noticed windows capacity to mix up com ports. I have had to change their names several dozen times now.


Please upgrade to 1.14-rc2 (http://forum.pjrc.com/threads/23706-Teensyduino-1-14-Release-Candidate-2-Available). The permanent serial number is now used by the USB code, which really helps Windows with keeping the COM port assignments stable.

Mongoose
05-24-2013, 06:04 PM
Thanks for the tip. Renaming com ports was getting tedious.
Does anyone have any other thoughts as to how to get all the teensies to react? I was hoping I wouldnt have to heavily modify the video example to get 7 teensies working.

PaulStoffregen
05-24-2013, 06:24 PM
Definitely try swapping out that suspicious USB hub before chasing after software hacks!

Mongoose
05-24-2013, 07:48 PM
Definitely try swapping out that suspicious USB hub before chasing after software hacks!

In that case, can anyone recommend a specific model of usb hub? I bought this one specifically for this screen and it was advertised as meeting your requirements.

Also, I couldn't resist a quick hack so I tried threading the send commands. It didn't make anything noticeably worse but the issue remained.

PaulStoffregen
05-24-2013, 07:51 PM
Also, I couldn't resist a quick hack so I tried threading the send commands.

Nice! I hope you'll post that code. :-)

I have a 7 port hub here that works great. Admittedly, I've only used with with 4 devices. I tried to buy 2 more on Amazon recently (the picture looked identical), but the ones that arrived were completely different, not even similar in appearance. Amazon refunded and they're being returned... but I'm no closer to finding a source for that hub.

Mongoose
05-24-2013, 08:29 PM
Very frustrating. I guess ill keep searching.
When I view the properties of mine, it is identified as being two multi tt hubs and they consume very little bandwidth when the screen is running. The only reason I suspect the hub is because two of the three teensies running off of the three port hub fail. From what I can tell, its the one teensy with the lowest com port number that does manage to function on that hub.

linuxgeek
05-24-2013, 09:03 PM
I wonder if it's not worth just getting another identical 7 port hub, and move the 3 teensy3's to those same ports that are working.

Typically, I get a 7-port USB hubs with the highest rated wattage, but never use all 7. They usually falter at delivering the specified 500mA per port.

I wonder if 4 of your ports may be getting more power than the other 3.

If you have another 2 USB ports on your PC, you might want to try just plugging those 2 failing t3's into those ports.

Mongoose
05-24-2013, 09:13 PM
I've tried runing two of the suspect teensies directly from my machine's motherboard and typically even fewer teensies work. I had been assuming driving them all from one hub would be ideal but I do not know enough about USB communication protocols to be sure.

I wouldn't think power would be much of an issue since the teensies are not being powered off of USB but rather directly from the power supplies.

linuxgeek
05-24-2013, 09:30 PM
At the risk of having the blind leading the blind here... but you say your teensies have their own power supply? Is that going to be an issue with each teensy having possibly 2 different power sources (usb & power supply)?

scepterr
05-24-2013, 09:35 PM
Not sure if you guys have seen this, noticed somebody asking for docs earlier, http://www.insomnia.org/led/documentation/rgbsmdws2811.htmlhttp://www.insomnia.org/led/datasheets/WS2811.pdf

Mongoose
05-24-2013, 09:52 PM
At the risk of having the blind leading the blind here... but you say your teensies have their own power supply? Is that going to be an issue with each teensy having possibly 2 different power sources (usb & power supply)?

The teensies have been cut in a way that prevents power from traveling over the USB line. The teensies run off the same power supplies as the light strips. Only data goes through the usb lines.

linuxgeek
05-24-2013, 10:18 PM
You're running a Processing sketch?

I had horrible luck with RXTX serial, which I assume you are using. Really bad read performance (never tried write), and had some hardcoded delays that would cause problems.

Mongoose
05-25-2013, 05:34 PM
Hmm. I've tried a few different hubs and computers now with identical results. I'm thinking 7 teensies might just be too many in this configuration.

kouga001
05-27-2013, 01:54 PM
hi, I'm a little confused, is it possible, that the Teensy with OctoWS2811-Library be recognized and supported by software such as "Madrix" or "Glediator" on a Windows-PC? have just looked through, but only found the usage of movie2serial ... this will be no problem playing a prepared video file, but when we want to have some controllable light effects, the movie2serial seems to be more or less inconvenient? any good idea? thanks :D

Kurt
05-30-2013, 02:08 PM
Hello Paul (and everyone else here too!)- I signed up today to ask for some help with a WS2811 LED project and a particularly vexing problem. I am ok with tech in general but nowhere near the level of most of you here, so please bear with me. I purchased 16m of Gree LED 68 leds/meter / 5v300w power supply and a T1000s SPI SD controller, and using LED Edit software / Adobe Flash for color designs / programming.

I've installed the LEDs along a copper recess cove for my new front fence I just finished building at my house. The LEDs shine down from under the top cap recess and wash the fence with color. came out pretty cool. Dealing with Gree LED / Britney has been wonderful, and I would definitely recommend them as a source. communication was good and shipping was fast. Using western union was slightly unsettling but hey it is what it is- Gree is legit, prices are *awesome*.

Here's my layout:
just under 8 meters of LEDs on Right Fence.
just under 8 meters of LEDs on Left Fence.
This is one single channel of LEDs across both fences for 1055 total pixels (33 LEDs under 16m total), controlled by the T1000s
Right and Left Fences are located on either side of the house garage so the fences are about 40' apart.

T1000s controller and power supply is located near Right Fence - The T1000s controller DO goes to the first LED DI of the Right Fence. It's about 20' of 16 gauge wire from the controller to the first LED of Right Fence.
Last LED DO of Right Fence is connected to first LED DI of Left Fence by 40 feet of 12 gauge copper wire.
Power and ground runs for Left Fence are 12 gauge and about 50 feet to power supply.
I am getting an effective 5.0 volts at the Right Fence and 4.3v to the Left Fence with all LEDS powered on (as measured at the LED strip connections)

Here is my grief. The data signal is flaky going to the Left Fence LEDs. The entire left fence will not follow the data programs consistently. For example, if I put on a static warm white program that I had programmed to 50% dim level, the Right Fence is flawless and the Left Fence will be correctly dim, then flicker brighter, then go back to proper dim, etc every few seconds or so. Same with color programs, it is like the LEDs get the data signal and then lose it, get it back, lose it etc. but only at the Left Fence. The Right Fence is operating perfectly up to the last LED where it jumps DO over to the Left Fence DI.

Gree has been helpful but there is a bit of a language barrier so you know how that goes. I have a suspicion that the issue lies with the WS2811 design and that it is not capable of pushing the DO signal from the last LED WS2811 chip of the Right Fence over 40' of 12 gauge to the first LED WS2811 chip of the Left Fence. Either that or there is excessive noise in the signal. Funny thing is that if I increase the voltage to Right Fence LEDs to say 5.2v, the problem goes away and left fence operates fine.

Gree said I should consider buying one of their TTL/SPI data receivers and install it on the Left Fence side of the 40' interconnecting data wire , but I'm not sure if that will work.
Item: http://www.gree-leds.com/productshow.asp?ArticleID=Z4Z2U82539
Doc: https://www.box.com/s/3zrsgsif9qfbiq56vqrq

I'm thinking I may need to install a second T1000s controller and locate it near the Left Fence, but I'd really like to use a single controller. I don't think the issue is power voltage related since I can reduce the voltage of the Right Fence LEDs all the way down to 3.8 volts (using a DC-DC variable regulator) and it works fine with the data programs, it's just a bit dimmer (as expected). I had actually planned to run both fence LEDs at 4.3v using DC regulators (they'll never be running full bright anyway...these LEDs are BRIGHT! :D).

Any help on what I could try to resolve the data issue is sincerely appreciated. Here is a crude drawing of my layout, and my new fences:
519 520521

PaulStoffregen
05-30-2013, 11:06 PM
Here is my grief. The data signal is flaky going to the Left Fence LEDs. The entire left fence will not follow the data programs consistently.

This is almost certainly a signal quality problem.

Before I go any further, I just want to be clear... it seems you're not actually using any PJRC products, or even any 3rd party products running any code I've written?

With signal quality issues, you're really working blind without an oscilloscope. If you can borrow one (and someone who knows how to use it), the 'scope will show you the problems. It won't solve anything, but at least you'll be able to see how horrible the waveform looks and see if things you try make it better, have little effect, or even make it worse.

Usually larger gauge wire does not matter. Heavy conductors do matter for the power, and especially the ground line, but not the signal line.

The very best solution would probably be a RS422/485 transmitter at the end of the 1st strip, driving the signal down a twisted pair cable with a good quality shield, and received by another RS422/485 chip to drive the input to the other strip. Those chips run on 5 volts, so this is achievable with some building.

You might get close enough if you use a coax cable for the signal, and a series resistor between the 1st strip's output and the coax cable input. The resistor should be close to the coax cable rated impedance (eg, use a 49 ohm resistor if it's 50 ohm cable). I'm honestly not sure if it's best to ground the coax shield on the transmitting side or receiving side or both. You'll have to experiment. If you can get a scope, you'll be fiddling with good feedback. Otherwise, it's pretty much shooting in the dark.

Kurt
05-31-2013, 05:21 PM
Paul- Thanks very much for taking the time to reply. Not using any of your code or products, actually, I did not even know about them until Google led me to this thread. Interesting stuff and I'm glad to know there are other options available for running WS2811 strips. The biggest challenge I've found is with easily / quickly creating light patterns. I went with the T1000S controller since it uses LED Edit software for strip layout / data control, and Adobe Flash for the animated pattern designs. I already know Flash so (for me) it is easy to create or modify any sequence / color of lights needed. But it does have its limitations in that you cannot specifically target individual LEDs, it only looks at the total amount of pixels in the conntected strip and applies the design across them.

The tech side of me was definitely leaning towards a signal quality issue- Gree was telling me to use heavier cable on the data line but that did not make sense. I'll try some RG6 and Cat6 cable / do some testing. Worst case I'll just use a second t1000 controller and call it a day. Your post above with Oscope pics and use of a resistor to kill ringing is genious. I suppose though the Teensy is unique in that specfic ringing and use of the 220 ohm resistor to filter it out / would not apply to my situation.

Note that if I drive the last LED of the first fence strip to 5.1v or higher, the signal problem starts to go away at the other fence. If I drop the voltage to 5.0 or below, it comes back. Probably has to do with your comment on the higher voltage giving more leeway for a messy signal.

Wozzy
05-31-2013, 10:49 PM
Note that you can get several teensy 3.0s for the cost of a T1000 controller.
Then your only limited by your imagination....Just sayin'.
By the way beautiful workmanship on your fence project.

Kurt
05-31-2013, 11:55 PM
Wozzy- hey thanks bud. the fence started as a "weekend project" and turned into a "2 month" project. you know how that can go... ;p I just finished installing copper caps on the fence tops, which hang over the side of fence by 3" and provide a cove recess for the LED strips so they wash down the fence from the top recess. It looks pretty sick at night. :D I patina'd the copper so it is darker brown with some green / blue / silver streaks. came out quite good. amazing what you can do to copper in 5 hours with plain ol' salt, lemon juice and vinegar.

Yeh I see how reasonably priced the Teensy's are. Just now finding out about this method. I only paid like $24 for the T1000s controller, shipping was $30 but that covered the controller, 16 meters of 68led/m strips, pigtails, connectors, and a 5v 60a power supply. Would probaly run me $20 in shipping to order another T1000s by itself.

I have to admit that while I'm good in a lot of tech areas, programming and working with device assembly are not my strong suits. How are you creating your LED designs for your strips? I guess I went with the T1000 SD controller after discovering that I can make any flash animation in Flash > screen capture it with LED EDIT software and set dim level, export file to the SD card, then apply it to the LED strips. Once it's on the T1000 I can select from 16 different programs on the SD card, speed it up / slow it down, and update as needed. I only wish the T1000 had ethernet capability for online control, and ability to target individual LEDs or set them up in "groups". For me this seemed like a good simple start anyway... I'm going to look more into the Teensy and associated libraries and see where it can take me - changing the controller is not a big deal. I suppose my biggest need would be with easily creating lighting designs and getting them onto the strips.


-Kurt

Wozzy
06-01-2013, 03:01 AM
Kurt,
The Teensy3.0 can be programmed from within the arduino environment. It's very easy to learn... little kids, and even I are able to get a hang of it very quickly. It's mostly C progamming. Paul has made it very easy to install and get started with programming the Teensy with Arduino.

There are at least 3 open source libraries that operate the ws2811 light strips with Teensy3.0:
1) Paul's excellent OctoWS2811library
2) Daniel Garcia's Fastspi_LED library (And just released today, Fastspi_LED2)
3) Adafruit's Neopixel library

All have included example programs, and for me all compiled and worked on my GreeLed 68pixel/meter ws2811 light strips, first try.
The examples are quite easy to modify after only a little study to understand how they work.

Using a microcontroller like Teensy3.0, opens up many possibilities like light patterns that react to people walking by, sensor integration, bluetooth, smart phone control and network connectivity, .... like I said earlier, the only limit is your imagination.

Addtionally, PJRC has a microSD card interface, that could allow one to store and retrieve gigabytes worth of custom color patterns, although honestly, the Teensy3.0 is so blazingly fast that I just let it calculate the color patterns realtime.

You'll also find that this is a very helpful community, that is very supportive of newcomers (as long as they are willing to learn and at least try to solve problems) I suspect that once you realize the amazing potential of the Teensy, you'll be hooked, (like me) and see all kinds of uses for them in various projects

Kurt
06-01-2013, 03:16 AM
Cool- that does get me thinking. Ideally, I'd like to set up a year's worth of light programming and have it run on a scheduler / change the lights based on date- you know, change to pattern xxx at xmas, another at new year's eve, etc.. The T1000 is good for what it is, but rather limited in its scope of operation- the Teensy / arduino / libraries combo looks like the best bet to get things exactly as needed.

xuio
06-03-2013, 09:02 PM
It would be so aaawwweeesssoooommmeee if someone could port the firmware of this (http://www.kickstarter.com/projects/740956622/blinkytape-the-led-strip-reinvented) thing to support OctoWS2811. The code is available here: https://github.com/blinkiverse/BlinkyTape/tree/91f8a4fc58a2320a12818e66f470dd4c64d1c84e (in the firmware folder)

nyarlathotep
06-10-2013, 01:19 AM
I'll put a fuse on the 5V Vcc of the 74HCT245. Any thoughts on how much current should be drawn through that?

PaulStoffregen
06-10-2013, 09:07 AM
I'll put a fuse on the 5V Vcc of the 74HCT245. Any thoughts on how much current should be drawn through that?

Normally the 74HCT245 should need only a very small current. It should never be enough to blow even the smallest fuses.

If you haven't already, be sure to use a 0.1 uF capacitor across the '245 chip's power and ground pins. It's a good idea anyway to use power supply decoupling capacitors, but when there's a resistive or inductive element in the path (like a fuse) it's really important to have a capacitor so the chip has good power.

To protect the '245, I would use 8 series resistors, one for each output pin just like is done with direct connection to the Teensy3. If the outputs short, the resistors will help limit the current. They also do wonders for improving the signal quality if your wires are long between the '245 chip and the LED strip.

nyarlathotep
06-10-2013, 08:56 PM
Interesting, thanks! I've an assorted pack of capacitors for doing the IR anyways. And amusingly I've eight 220 ohm resistors with leads soldered on just sitting here all alone looking for a mission in life. :)

I'm not too worried about protecting the 74HCT245 really, after frying the one Teensy I tried to solder to directly, I used sockets for both the Teensy and the 74HCT245. I just figured the current going into the data lines on the LED strips should be fused. I've extra 500mA and 1A resettable fuses lying around.

I've placed in-line blade fuse holders (http://www.ebay.co.uk/itm/380600248961?var=650084841862&ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649) on the power for the LED strips, but presumably those chips are pretty robust against power fluctuations from all their neighbors, right?

PaulStoffregen
06-10-2013, 09:08 PM
500 mA fuses probably are not worth your time to install. It takes a lot of current to blow such a fuse. If that current were to flow through any of the pins, the chip would be utterly destroyed long before the fuse could blow!

nyarlathotep
06-11-2013, 01:55 PM
Alright, I'll just take your resistor advice and double check my soldering on the LED strips then.

I worried mostly because there will be control lines running between the strips fairly close to my feet, maybe I'll just make sure it's slightly higher off the ground and heat shrink the strip ends so the wire cannot so easily come lost and make a connection to the strip's power or ground.

nyarlathotep
06-14-2013, 10:52 PM
Any tips on soldering to and/or diagnosing the WS2811 strips? I'm frequently causing a short between VCC and GND when soldering to them. It might only be happening when I solder on the WS2811's side of the LED.

giorgio
06-20-2013, 06:44 PM
hey Paul and others - love this stuff. building a 5760 LED installation right now with ws2811 60m strips in 2 m sections, total of 960 LEDs per teensy. using independant power supplies pwer strip, 5a @ 5v. I have all the grounds for the power supplies connected at a single point next to the teensy, which is also connected to the same ground. i am using usb power instead of the strip power supply.

I have 2 issues: the first is that strip #1 is glitchy. it has some LEDs blinking white sometimes. I try wiggling the cables but it does not seem to affect the glitch. tried swapping the power supply with no change. haven't swapped the strips yet.

second issue is that after uploading new code, several strips, usually 1, 2, 7 & 8 do not work, just displaying a few static white LEDs on the first few of the strip. sometimes unplugging the power to that strip gets it going, and sometimes reseating the data connector does.

any thoughts on why this may be happening? should i power the teensy from the PSUs?? not sure why i would go either way on this except that they are already setup for usb power so I have done that for now. event is saturday so I am sweating a bit, but I still have 5 more of these setups to build today....

hunter
06-20-2013, 07:12 PM
The white LEDs could be a voltage issue. Does your power supply have a way to adjust the voltage? Try lowering it and see if that clears up the white LED problems. I'm running about 4.75v with 220 resistors on each signal line. If I go even the smallest bit over 5v the LEDs start turning white.

Bottom line... Be careful and test every part of your wall in small steps. Good luck :)

Henri
06-20-2013, 07:50 PM
Hi everyone,

I have recently become interested in working more with LEDs and strips and I was thrilled finding out all this amazing work that's been happening here. For an installation that I am currently working on we are planning on using strips of WS2811 as well and I am currently reviewing different pricing options from Ali as well as Gree suppliers. I will likely purchase the 68/m option as you guys had good things to say about them. During my search I did come across these 144/m (http://www.aliexpress.com/item/Free-Shipping-5M-WS2811-144LEDs-M-Built-in-IC-Digital-LED-IP20-Non-Waterproof-5050-SMD/925340873.html) ones which seems just insane. I doubt I will be using them, but would still like to know if anybody has any experience with them?

PaulStoffregen
06-20-2013, 10:03 PM
That photo sure doesn't look like LEDs packed so tightly to get 144 per meter. But someone recently did send me a photo of a densely packed strip where the LEDs were nearly touching each other. That one was only 1 meter long. This description says 5M, but given the photo is obviously wrong I'm not sure how much I'd believe any particular part of its specs.

One challenge with densely packed LEDs is the huge current draw. Well, that's an issue with them at lower densities. With the ones I bought (60/meter), with all the LEDs fully white I was seeing about 0.25 volt drop from one end of the strip to the other. It's easy to measure, just drive them to all white and then measure the voltage at both ends of the strip.

I was also losing about 0.04 volts on the wires between the power supplies and the inputs to the strips, using #22 wires about 18 inches long.

I'm not sure how much voltage loss is acceptable, but the WS2811 probably wants 4.5 volts to really work reliably. Remember, the loss changes with current and becomes nearly zero when the LEDs are off, so you can't simply increase the power supply voltage to compensate. Better wires really are needed.

You can apply power to both ends of a strip. Of course, you should use larger wire, like #18 or even #16, between the power supply at any strip that's not very close. Still, I would imagine if you powered a strip of 240 LEDs that way, if you turn then all on fully white, the ones near the middle would likely see about 0.5 volt less (based on my quick measurements of the particular strips I had.... yours might be different). If a strip is 5M long, that would be 720 LEDs! Amazing, but that's a awful lot of LEDs to have on a single strip that needs to conduct power to all of them!

Perhaps the folks making these 144/meter strips have very carefully considered these power delivery issues. Maybe their strips have a much lower resistance material? One could hope..... but the skeptic in me suspects it might be a problem. They might simply not be able to work with all the LEDs simultaneously conducting the maximum current.

If anyone does get one of these 144/meter strips, please turn the LEDs on fully white and make some quick voltage measurements?

Henri
06-20-2013, 10:26 PM
Hey Paul,

Thanks for the quick reply. Once I receive my batch I can surely take these measurements. I am not certain yet, but perhaps I will order just a meter of those 144/m to review your concerns. Do you happen to have a link to those similar, densly packed once you mentioned?

I was also wondering if the voltage drop couldn't be avoided by adding 5V every meter or would this be overkill? You were saying that you lost 0.04V with a #22 for such short distance? Any recommendations how to avoid this?

PaulStoffregen
06-20-2013, 10:30 PM
Do you happen to have a link to those similar, densly packed once you mentioned?


It was email only. I've already deleted it, sorry. Even when I delete messages quickly, my inbox still gets badly backlogged....



You were saying that you lost 0.04V with a #22 for such short distance? Any recommendations how to avoid this?

Bigger wire!

Henri
06-20-2013, 10:41 PM
Haha, yes. I assumed that. any thoughts regarding the '5V for every meter' thought I had?

giorgio
06-21-2013, 12:31 AM
this is what happens sometimes when i reboot or upload new code: (this is running the plasma example)
606
I guess they LEDs are not actually white, just quite bright.

PaulStoffregen
06-21-2013, 12:46 AM
Nice photo Giorgio!

If you have access to an oscilloscope, it might be good to look at the data signals and also the power lines for noise, oscillations, etc. Or if you don't have a scope, at least measure with a multimeter on both AC and DC.

At least one person had quite a lot of trouble from a PC power supply that would create massive noise and spikes on the 5V line output when it wasn't driving any power on the 12V output. I've seen small power supply too have quite a bit of trouble running over a wide range of currents, like these LED project do when the LEDs are all off to suddenly all bright. Clean power is pretty much essential for these projects. Sadly, there are a lot of poorly/cheaply designed power supplies in the world which probably work fine with their originally intended product that uses them in a specific way, but they can act badly when used in a much more demanding application like a big LED project.



any thoughts regarding the '5V for every meter' thought I had?

I think I'll be quite interested to hear how it goes, specifically the voltage measurements.

giorgio
06-21-2013, 01:19 AM
I'll pull out the old scope later tonight - until then I am building the other 5 sections :)

btw this is the power supply I am using: http://www.powergatellc.com/pdfs/GS40A.pdf

giorgio
06-21-2013, 05:45 AM
http://www.youtube.com/watch?v=-Ey0ihu0b3o

is a video of the strip glitching during the rainbow example - I am squeezing the data and ground extension cable coming from the teensy to get this glitching. It happens on its own during the plasma example but I couldn't really get it on video - this is hard enough to tell what's going on. it is back and forth btwn rainbow and glitching

ohararp
06-21-2013, 04:26 PM
This looks like a power supply issue. Seems like it's overcurrenting the power supply to me. Have tried swapping power supplies? Almost seems like there is a point where the leds may all turn on and then overwhelm the power supply. May adding some big storage caps would help/prevent a brownout type condition.

Quick Update: I am using a 60A power supply with this setup. It's a kids table with 6 panels of 16x16 leds in a 32x48 configuration. It has 1536 leds. It's pretty awesome, but as Paul says current and heat can quickly become an issue.

611

https://vines.s3.amazonaws.com/v/videos/AE7AE58E-6C40-4A70-8507-E678D0348615-379-0000002E8F5E346A_1.1.2.mp4?versionId=Lq6xgawc_Hv_h v2sRapYW__2HJQqBXzX

Henri
06-21-2013, 05:00 PM
This looks like a power supply issue. Seems like it's overcurrenting the power supply to me. Have tried swapping power supplies? Almost seems like there is a point where the leds may all turn on and then overwhelm the power supply. May adding some big storage caps would help/prevent a brownout type condition.

Quick Update: I am using a 60A power supply with this setup. It's a kids table with 6 panels of 16x16 leds in a 32x48 configuration. It has 1536 leds. It's pretty awesome, but as Paul says current and heat can quickly become an issue.

611

https://vines.s3.amazonaws.com/v/videos/AE7AE58E-6C40-4A70-8507-E678D0348615-379-0000002E8F5E346A_1.1.2.mp4?versionId=Lq6xgawc_Hv_h v2sRapYW__2HJQqBXzX

Automata ftw! Nice setup indeed. How long do you have this running at a time and how warm/hot does it get? Also where did you get your power supply? Would you recommend it?

Cheers.

giorgio
06-21-2013, 06:11 PM
i build a second panel identical to the first and even though half of one of the strips is burned out right now, this whole panel is working a lot better than the first one - no glitching, all strips come on when I load new code, etc.

to answer your question, i did swap the power supply and the issue stayed with the strip and did not follow the supply so I think it is something to do with the data line, especially since squeezing the data line exacerbates the issue. gonna swap out witha new data extension cable, re-heat the solder joints, and see where that gets me.

haven't had time to pull out the scope yet...

ohararp
06-21-2013, 06:29 PM
When testing out new boards I have noticed that some of the leds are just wonky. Usually I have to replace 1-2 for every 256 leds. That or you may want to touch up each of the led solder pads. A cold joint could definitely cause this problem.

---------------------------

The power supply I used is very similar to these on alibaba (http://www.aliexpress.com/item/Free-shipping-300W-5V-60A-Switching-Power-Supply-for-LED/925978342.html). I am planning to have these for sale very soon at www.rgb-123.com. They work really well. You have three circuits of 20A to get the full 60A output.

If you run the leds at full brightness the pcbs get pretty warm/hot. Production boards will have a min of 2 oz copper, right now these are for prototyping at 1 oz copper. Really though running the display beyond a brightness of 128 counts and more practically 64 counts. For the kids table I typically run them at 32 counts since the kids are pretty close to the lights. It really can't be underestimated how stinking bright these leds are.

612
Based on this curve there is a diminishing return in the light perceived by your eye beyond 125ish counts. I did a pretty big writeup at www.ohararp.com/blog on the light/color output of these leds.

giorgio
06-21-2013, 06:49 PM
When testing out new boards I have noticed that some of the leds are just wonky. Usually I have to replace 1-2 for every 256 leds.

which boards are you referring to?

Wozzy
06-21-2013, 07:51 PM
When testing out new boards I have noticed that some of the leds are just wonky.

I've noticed that they are quite sensitive to voltage drop-off. Both in their behavior, and in the hue at 255,255,255.
The Greeled 68/m strips need multiple power taps for a 5 meter length or they may misbehave, and not all the chips appear pure white.

ohararp
06-21-2013, 07:51 PM
These are boards that I have designed and have had fabbed. I buy the WS2812s in 1000 led reels and assemble the boards with my pick and place machine. The testing is during the functional check I do after the boards have been assembled.


The Greeled 68/m strips need multiple power taps for a 5 meter length or they may misbehave, and not all the chips appear pure white. Woz, I had a simlar problem. The difference in color is from the voltage drop from one end of the strip to the other. I am running 12AWG silicone wire between boards to avoid this. That and running 5V power in "parallel" to the boards/strips versus a series input is the way to go.

Wozzy
06-21-2013, 11:54 PM
That photo sure doesn't look like LEDs packed so tightly to get 144 per meter....
If anyone does get one of these 144/meter strips, please turn the LEDs on fully white and make some quick voltage measurements?

If you scroll down to nearly the bottom of the page, there is an image of a very densely packed ws2811 strip. It's interesting, because it looks like there are solder pads on the edge all along the sides...perhaps to allow additional power input.
According to the spec. a 5m reel will draw nearly 40 amps!

hunter
06-22-2013, 01:05 AM
The power supply I used is very similar to these on alibaba (http://www.aliexpress.com/item/Free-shipping-300W-5V-60A-Switching-Power-Supply-for-LED/925978342.html).



I'm using 10 of these power supplies (http://goo.gl/V3Kcs). So far they seem to be working perfectly.


**update
I should also note that I'm powering 160 LEDs per teensy pin from both sides. And I'm the pumping 60A of DC thru a 3"x2" prototype board I had printed at OSH Park. Here is a photo of it:
https://lh3.googleusercontent.com/-qWNv_xqQ8-Y/UY_5XB7s60I/AAAAAAAABFc/esUJZM-Ior0/w835-h626-no/20130511_iphone_0285.jpg

please note that the #18 wire shown the pic quickly got changed to #10 :) Other then that no heat issues with the board.

ohararp
06-22-2013, 04:16 PM
Hunter, cool board! A breakout board like this is next on my list. Good call on switching to the 10AWG. Got any pics of your led display?

hunter
06-22-2013, 05:23 PM
Hunter, cool board! A breakout board like this is next on my list. Good call on switching to the 10AWG. Got any pics of your led display?

I posted a few videos and some pics HERE.

Wozzy
06-22-2013, 05:31 PM
I'm using 10 of these power supplies (http://goo.gl/V3Kcs). So far they seem to be working perfectly.

That's the same ones I ordered... I am very pleased with Ray Wu's service, and with the 60A 5V power supplies so far.

giorgio
06-22-2013, 05:32 PM
ok so that glitching was from the resistors i used. i thought they were 220s but maybe not. i replaced a strip after it seemed the strip was the issue, but then 1,2, 7 and 8 were all not working properly. bypassing the resistors on 1 and 8 got all 4 back up and now i have 48 2m sections playing live video using my firewire camera as a capture card for the LZX video synth. pics and videos soon - off to install now. thanks for all y'alls help!!!

Bleugh
06-23-2013, 04:04 AM
Hmm,
144 divided by Three (red, green, blue) equals 48......which looks about right!


Hi everyone,

During my search I did come across these 144/m (http://www.aliexpress.com/item/Free-Shipping-5M-WS2811-144LEDs-M-Built-in-IC-Digital-LED-IP20-Non-Waterproof-5050-SMD/925340873.html) ones which seems just insane. ?

ohararp
06-23-2013, 06:17 PM
Okay high resolution modules spotted - http://www.hackerspaceshop.com/ledstrips/ws2812-hires-module.html
They even have a cool Teensy 2.0 breakout controller - http://www.hackerspaceshop.com/ledstrips/teensy2ledcontroller.html

giorgio
06-23-2013, 07:01 PM
video from last night - everything worked perfectly!

http://youtu.be/ApjKdfVHyBA

http://youtu.be/7J3RspD-Nk0

http://youtu.be/d7RNkK7VkLM

Henri
07-03-2013, 07:42 PM
Okay high resolution modules spotted - http://www.hackerspaceshop.com/ledstrips/ws2812-hires-module.html
They even have a cool Teensy 2.0 breakout controller - http://www.hackerspaceshop.com/ledstrips/teensy2ledcontroller.html

Based on those 72s dense setup 144s seem hard to imagine.


I'm using 10 of these power supplies (http://goo.gl/V3Kcs). So far they seem to be working perfectly.


**update
I should also note that I'm powering 160 LEDs per teensy pin from both sides. And I'm the pumping 60A of DC thru a 3"x2" prototype board I had printed at OSH Park. Here is a photo of it:
https://lh3.googleusercontent.com/-qWNv_xqQ8-Y/UY_5XB7s60I/AAAAAAAABFc/esUJZM-Ior0/w835-h626-no/20130511_iphone_0285.jpg

please note that the #18 wire shown the pic quickly got changed to #10 :) Other then that no heat issues with the board.

Those are quite nice. Do you sell these?

hunter
07-03-2013, 10:39 PM
Those are quite nice. Do you sell these?

You'll find the eagle board file HERE (http://oshpark.com/profiles/hunter).

It works for me, but because I have no idea how you may use it... please... use it at your own risk (etc, etc...)

Henri
07-03-2013, 10:51 PM
I don't sell them, but you'll find the eagle board file HERE (https://www.dropbox.com/s/eqif0p2tqs4ldln/wall%20controler.brd).

It works for me, but because I have no idea how you may use it... please... use it at your own risk (etc, etc...)

Thanks! I was hoping you would have some extras, but that will do just as well. Great that you are sharing the plans!

hunter
07-04-2013, 05:38 PM
Thanks! I was hoping you would have some extras, but that will do just as well. Great that you are sharing the plans!

Quick note on the boards...

The teensys are being powered via USB, not the 5V from the board. I did this because I needed a way to turn off the LEDs without killing power to the teensys.

chadder_all
07-17-2013, 02:33 AM
Has anyone found that connecting the -5v on the ground bus worked to power the ws2811 strips? That was the only way i could get my led strip to work and it only works with adafruits neopixel library. I am having a hard time with power. Can the way i have it hooked up damage my teensy and/or my computer?

Henri
07-31-2013, 04:10 PM
I'm getting ready to finalize my setup and I was curious if anyone had experiences with USB 3.0 extension cords and hubs?
I am planning to use an extension of 30ft with a hub and 3 units at the end. Overkill?

PaulStoffregen
07-31-2013, 05:42 PM
Superspeed (5 Gbit/sec) USB is overkill for only 3 units, and probably much less capable of work over a long cable. High speed USB (480 Mbit/sec) will probably work much better.

Henri
07-31-2013, 05:54 PM
Superspeed (5 Gbit/sec) USB is overkill for only 3 units, and probably much less capable of work over a long cable. High speed USB (480 Mbit/sec) will probably work much better.

You are always so quick to answer. Thank you!

That's what I was thinking as well, just wanted some input in this regard.
Cheers!

giorgio
08-02-2013, 03:18 AM
hey guys
just hooking up the 6xteensy octo rig again and getting some lag on one of the teensys, the "last" (far right) one. I remember noticing this the first and only other time I have used this. I shot these videos exhibiting the behavior:
http://www.youtube.com/watch?v=5Su8RNAcsVw
http://www.youtube.com/watch?v=5c_LsHJ0giA
any thoughts? sync distro? the sync wires have resistors so maybe it is too much? maybe something in just that last panel? I am going to swap the panels tomorrow and see if the issue is the panel or the data delivery or bandwidth issue.

hunter
08-02-2013, 05:04 PM
hey guys
just hooking up the 6xteensy octo rig again and getting some lag on one of the teensys, the "last" (far right) one. I remember noticing this the first and only other time I have used this. I shot these videos exhibiting the behavior:
http://www.youtube.com/watch?v=5Su8RNAcsVw
http://www.youtube.com/watch?v=5c_LsHJ0giA
any thoughts? sync distro? the sync wires have resistors so maybe it is too much? maybe something in just that last panel? I am going to swap the panels tomorrow and see if the issue is the panel or the data delivery or bandwidth issue.

Hey giorgio,
I ran into the same issue (check it out HERE (http://www.youtube.com/watch?v=IhgyfyRk00I)) and I'm not even sure how I fixed it. As you know the issue could be lots of different things.

So... I'm sure you've done most of this stuff, but here are a few things to check for anyway:


Bad or single-TT hub (more info here)
Bad or cheap USB cable (try switching around cables to see if things change)
Sync wire is getting long and you need a resistor. (see above link)
BIOS usb settings (I've found that EHCI works better then xHCI, but I could be off here)
It could be how you are sending the data and what OS you're using (more info here (http://www.pjrc.com/teensy/benchmark_usb_serial_receive.html))
More than one teensy is the master


I hope that helps. Good luck :)

giorgio
08-03-2013, 06:14 AM
thanks hunter ! sometimes in the thick of frustration it is hard to break it down :)

but all i did is re-flash all the code from the arduino IDE and run my processing sketch again, and everything worked great tonight :)

I wonder what that lag problem actually is though... probably the same thing for you and me, cause it looked exactly the same in the vids, where you can tell but it is also almost okay....

ohararp
08-14-2013, 03:27 AM
Hey folks, I just got my Kickstarter (http://www.kickstarter.com/projects/311408456/rgb-123-led-matrices) up and running for a couple different types of the matrices I have been showing in this thread. Any help on getting the word out is appreciated.

Additionally, if anybody is interested in jumping in on the final order for leds just let me know. I have about 10K of the new WS2812B's (four pin) pixels and will more than likely be placing an order for more. There was another thread on the site asking about code compatibility of the WS2812B's and I can confirm that they work no problem.

Henri
08-20-2013, 02:31 PM
Hey guys, I just received this email and figured some might be interested:


Dear all,
Good day!

This is Jack from Clenled(in Shenzhen China), now i'd like to recommend our high density addressable LED Strip--ws2812(Inbuilt IC ws2811).
144LEDs ws2812 LED Strip
 
Application 1. To create LED Display;
2. Car decoration;
3. Toy decoration;
4. Christmas decoration.
 
Parameter 1.DC5v,144LEDs/M,144 pixels/M(1 LED per pixel);
2.ws2812 inbuilt IC, grey scale: 256;
3.waterproof & Non-waterproof.
 
Advantages 1. IC is built into the 5050 lamp, space saving;
2. Can be controlled by DMX via Decoder;
3. Higher resolution.
 
Price $26/M(below 100meters)
PS: 30/60/64/144 LEDs per meter are available.

 
Please down load the Spec at: https://app.box.com/s/yha2olo2pi3lf3hi4w20

Thank you for your time.
Best Regards,
Jack Huang

Henri
08-21-2013, 03:22 PM
Hey guys,

I was wondering if anyone encountered the following issues and had some suggestions:

I have a couple of varying lengths of data lines to access WS2811 32/m LED strips located at different locations in a room (between 8ft to 20ft), all have been wired with 220Ohms resistors, 12AWG wire for power and ground and coaxial cable for data, I have 5V 70A power supplies (lights and power from Gree-Leds)

I realized that I needed to lower the power consumption on most of the power to the lowest possible to get the signal to arrive cleanly, but for the two longest lines I cannot lower the power output anymore to clean up the signal.

I was hoping that someone would have some suggestions on how to fix this issue. Any help is much appreciated!

sermad
08-23-2013, 09:20 PM
How are you all 'sticking' your leds together to make the grids?

Do you keep the silicone covering on or off? I was thinking of hot glue but it didn't seem to stick. Now I'm using double sided tape but perhaps there was something better?

hunter
08-24-2013, 12:36 AM
How are you all 'sticking' your leds together to make the grids?

Do you keep the silicone covering on or off? I was thinking of hot glue but it didn't seem to stick. Now I'm using double sided tape but perhaps there was something better?

I used a high temp hot glue gun (I think it's 80 watts) on 3/4" birch 5x5 plywood sheets without the silicone covering.

sermad
09-05-2013, 08:56 PM
I've noticed those 144 pixel / metre strips are now on Adafruit - http://www.adafruit.com/products/1507 :cool:

mortonkopf
09-13-2013, 08:03 AM
I have just purchased 2m of these 144led/m ws2811 from Clenled. The price for non-waterproof was USD26 a meter. Postage was USD19 to the UK, but not sure if I will get stung for import tax. They accept Paypal for such small quantities. Will let you know how I get on with them.

mortonkopf

Henri
09-17-2013, 01:00 AM
Well, when you go overkill on the dataline cabling using coax make absolutely sure that your exterior shielding is not touching your pins... 4 days of banging my head before noticing this. haha. I'm just glad it's working smoothly now.


Hey guys,

I was wondering if anyone encountered the following issues and had some suggestions:

I have a couple of varying lengths of data lines to access WS2811 32/m LED strips located at different locations in a room (between 8ft to 20ft), all have been wired with 220Ohms resistors, 12AWG wire for power and ground and coaxial cable for data, I have 5V 70A power supplies (lights and power from Gree-Leds)

I realized that I needed to lower the power consumption on most of the power to the lowest possible to get the signal to arrive cleanly, but for the two longest lines I cannot lower the power output anymore to clean up the signal.

I was hoping that someone would have some suggestions on how to fix this issue. Any help is much appreciated!

sermad
09-27-2013, 02:34 AM
Is anyone familiar with openFrameworks? It's a c++ base coding framework.

We started a port of the processing code from Paul (thanks for that) - https://github.com/BBDO/ofxTeensyOcto

We've tried to break it out into a class and we'll expand on this over the next few weeks (add a gui / kinect modules etc)

The benefit over processing is that it is insanely fast. We haven't needed to use the sync for the teensy boards yet.

I also created a very simple script to give me a rough idea on numbers for creating a LED array. Was useful for me - http://jsfiddle.net/sermad/PuxKr/

Bert
10-05-2013, 08:34 AM
Paul, this library is fantastic! This is what we made with it:

Exhibition booth with fabric frame. Behind the fabrics, about 6500 LEDs (WS2811). We’ve used 8 Teensy boards and 8 power supplies. Note we did not connect the frame sync pins, because it seemed to work just fine without connecting them, and connecting them gave some issues...

Youtube movie: https://www.youtube.com/watch?v=IELtFiXF13Q

Thanks a lot Paul!

mortonkopf
10-17-2013, 03:13 PM
I have just purchased 2m of these 144led/m ws2811 from Clenled. The price for non-waterproof was USD26 a meter. Postage was USD19 to the UK, but not sure if I will get stung for import tax. They accept Paypal for such small quantities. Will let you know how I get on with them.

mortonkopf

So, the 144leds/m strips turned up. reasonable quick delivery of two weeks to the UK and simple payment via Paypal. The build quality varies, however, with some sort of intermittent power at three places along one strip. the other strip works fine. I did get stung for import taxes which bumped up the price considerably, so worth thinking about if you are going to buy from China.

bboyes
10-30-2013, 10:25 PM
Wow that is an awesome booth display. That's a major effort! Will this become a commercial product?

Youtube movie: https://www.youtube.com/watch?v=IELtFiXF13Q11

carl125
11-19-2013, 04:02 AM
I've been told the WS2812 (http://www.ledlightinghut.com/144-led-m-ws2812-digital-intelligent-rgb-led-strip-light.html) is the same. However, I've seen datasheets (http://www.nooelec.com/files/WS2812.pdf) with very different specs, but I think some of the info in the original WS2811 datasheet is simply incorrect and they fixed it for newer versions of the file. Then again, the silicon might actually be different? Ultimately, I can not say with absolutely certainty what the specs of those chips really are.

Henri
12-05-2013, 06:28 PM
Hey guys. I am finally able ((allowed) to release our project footage of our installation Paths (https://vimeo.com/80293293) as well. Details are in the video. Thank you for all the support and help. Looking forward to the next installation which will hopefully feature a video wall with those 144s. Cree send out an email recently selling them (WS2812B) for $28/m and(waterproof $28.5) as well.

Headroom
12-05-2013, 08:39 PM
That is one awesome looking installation! Very well executed!

sermad
12-16-2013, 03:03 AM
Has anyone experienced 'random flickering' of their strips? Some seem rock solid yet others just flicker every now and again. It's super distracting.

I've got 220 ohm resistors on the data pins and I'm using Cat5 for the data cables.