Forum Rule: Always post complete source code & details to reproduce any issue!
-
12-16-2013, 06:41 AM
#251

Originally Posted by
sermad
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.
-
12-16-2013, 06:45 AM
#252
Senior Member
@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 by mortonkopf; 12-16-2013 at 06:47 AM.
-
12-16-2013, 06:51 AM
#253

Originally Posted by
mortonkopf
@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).
-
12-16-2013, 11:51 AM
#254
Senior Member
@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.
-
12-26-2013, 12:46 AM
#255
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.
-
12-26-2013, 02:22 PM
#256
Senior Member

Originally Posted by
respector
using my PIC32 micro controller
I'm guessing you don't consider using a Teensy or Arduino, which have excellent software support for WS2812s, to be an acceptable solution?
-
12-26-2013, 04:19 PM
#257
We cant use anything else (our professor wont allow it)......so I am stuck with the pic.....
-
12-26-2013, 06:20 PM
#258
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);
}
-
12-26-2013, 08:27 PM
#259
Senior Member
I'm sorry, I can't help you with PIC chips.
-
12-30-2013, 03:05 AM
#260

Originally Posted by
Headroom
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?
-
12-22-2015, 02:13 PM
#261
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.
-
12-24-2015, 01:41 PM
#262

Originally Posted by
ledcolor
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
-
12-27-2015, 10:41 PM
#263

Originally Posted by
IngDuenas
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.
-
03-08-2017, 08:02 AM
#264
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
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules