WS2811 on Teensy 3.0 using FastSPI_LED library

Status
Not open for further replies.
Has anyone experienced 'random flickering' of their strips?

I doubt there's anyone with a project larger than 50+ LEDs who hasn't :)

Your most likely culprit in this case is too large a resistor value. For cat5 of 18ft or less, you should need a resistor between 70-100 ohm. 220 is overkill and will round off the signal just enough to look like the occasional timing glitch (periodic flashes on a subsection of the strip). I chronicled some of my own findings on the matter here.
 
@sermad. I did have what seemed like random flickering on a strip of 147 leds. This only occurred when the Teensy 3 was still plugged in to the usb port of the macbook after uploading a sketch. The flickering seemed to random leds but cyclical timing. Unplugging to usb port ( I was using a separate power source) cured it. I do not know why there would be interference.
 
Last edited:
@sermad. I did have what seemed like random flickering on a strip of 147 leds. This only occurred when the Teensy 3 was still plugged in to the usb port of the macbook after uploading a sketch. The flickering seemed to random leds but cyclical timing. Unplugging to usb port ( I was using a separate power source) cured it. I do not know why there would be interference.

Was the macbook running on battery power at the time or was it plugged in? I won't pretend to understand the complexities involved, but I quickly learned that the more grounds I added to my project, the trickier things got.

Usually the grounding issues I saw were more steady or cyclical and affected the entire strip, whereas signal strength or quality issues manifested as problems with the later LEDs in the strip (past number 80 or so).
 
@tetsuo, the mac was plugged in to the mains at the time, which may have some significance for those using serial connections for LED data, but I didn't look into it any further, as my small setup is stand-alone.
 
Hey everyone, I've recently bought a 1 meter roll of WS2812 from Sparkfun and I am working to get them to light up using my PIC32 micro controller (I do not have arduino....). I've connected my strip to an AC-DC convertor that provides 5.5 V and 500mA (hence why I am only trying one LED for now). I thought about using PWM since all I would need to do is set up a 32 bit mode for 800 kHz and just change the duty cycle to match the sequence timing for sending a '0' or '1'. Currently I am trying to light up just one of the LEDs using PWM, in order to test out my code; however nothing is happening.
 
This is what I have so far:

#include <p32xxxx.h>
#include <plib.h>

#define CLK (80000000L) // system clock
#define PBCLK (CLK / 2)
#define PWM_SIZE 800000 //ws2812 requires 1.25 us = 800 kHz
#define NUM_LEDS 60 //60 leds in a 1 meter strip

int ws2812[NUM_LEDS], PWM_0_HIGH, PWM_1_HIGH, green, red, blue;

void send_byte(int c){
int i;
for(i=1; i<=8; i++){
if((c & 0x80) == 0x80)
SetDCOC1PWM(PWM_1_HIGH);
else
SetDCOC1PWM(PWM_0_HIGH);
c = c << 2; //shift to next bit
}
}

void main(void)
{

SYSTEMConfigPerformance(CCLK);
mOSCSetPBDIV(OSC_PB_DIV_2);
OpenOC1(OC_ON|OC_TIMER_MODE32|OC_TIMER2_SRC|OC_PWM_FAULT_PIN_DISABLE,0,0); //Initialize OC1 for PWM
OpenTimer2(T2_ON | T2_PS_1_1 | T2_SOURCE_INT,MAX_PWM); //Setup Timer2 for PWM = 800 kHz

PWM_0_HIGH = 224000; //0.35 us out of 1.25 us (28% duty cycle)
PWM_1_HIGH = 448000; //0.7 us out of 1.25 us (56% duty cycle)

led[0] = 0xFF;
green = led[0];
output_byte(green);

led[0] = 0xFF;
red = led[0];
output_byte(red);

led[0] = 0xFF;
blue = led[0];
output_byte(blue);
}
 
That is one awesome looking installation! Very well executed!

Thanks for the kind words. We were really excited getting them to light up properly after all this trouble shouting. They're great to look at we got lots of positive feedback. The Teensys are amazing. Solid work on it Paul. I must admit I managed to fry a few in the build process by touching the USB port or pulling the pin hole's connector out when trying to debug. Though that's a mistake that can be easily omitted with better/proper handling.

I am very much looking forward to a project were I can test those on a video wall with the 144/m strips. Though this will require a major investment. haha

Has anyone had the spare change for a project like this yet?
 
Hello respector,

I've been designing with PICs for many years now, altough they are awesome products (most of them) they have very short legs... I managed to make it work but the processor becomes too busy to do anything serious with it, the WS281x strips require very precise timing and the processing power of the PICs is just not enough. I switched to Teensy (thanks Paul, great product) 3.1 and I'm driving 7 strips of 60 or 72 leds per strip with no major headache (thanks again, Paul). One alternative for you to consider are APA102 leds which come with a serial data and serial clock buses, so you can clock bits as fast or as slow as you wish; you will have no problems at all driving them with mostly any PIC controller.

Cheers.
 
do you have those fast SPI library for SK6822 LED ,
http://www.led-color.com/upload/201512/SK6822 LED Chip.pdf


Hello ledcolor,

It looks to me that is yet another version of a WS281x, I've found several products advertised under different chip numbers but perform the same (or almost) like the APA106 leds, they are basically a WS2812. Have you tried hooking them up and program them as if they were WS281x? I bet they will work.

Cheers
 
Hello ledcolor,

It looks to me that is yet another version of a WS281x, I've found several products advertised under different chip numbers but perform the same (or almost) like the APA106 leds, they are basically a WS2812. Have you tried hooking them up and program them as if they were WS281x? I bet they will work.

Cheers

Unlike the SK6812 whose timing is pretty close to the WS2812 (down to a 1.25µs bit timing) the SK6822 appears to have a slower timing rate (a ~600hz data rate) that is 1.7µs per bit data rate. If the SK6812 timing doesn't work for it, grab the latest master of FastLED, where I've just added in timings for the SK6822.
 
hi
i plan to create a flexible Led display 200cm * 300 cm with 5050 smd streps
which board i should buy
please guide me
tanks
 
Status
Not open for further replies.
Back
Top