Forum Rule: Always post complete source code & details to reproduce any issue!
Page 11 of 11 FirstFirst ... 9 10 11
Results 251 to 264 of 264

Thread: WS2811 on Teensy 3.0 using FastSPI_LED library

  1. #251
    Senior Member
    Join Date
    Oct 2013
    Posts
    110
    Quote Originally Posted by sermad View Post
    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.

  2. #252
    Senior Member mortonkopf's Avatar
    Join Date
    Apr 2013
    Location
    London, uk
    Posts
    911
    @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 07:47 AM.

  3. #253
    Senior Member
    Join Date
    Oct 2013
    Posts
    110
    Quote Originally Posted by mortonkopf View Post
    @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).

  4. #254
    Senior Member mortonkopf's Avatar
    Join Date
    Apr 2013
    Location
    London, uk
    Posts
    911
    @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.

  5. #255
    Junior Member
    Join Date
    Dec 2013
    Posts
    3
    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.

  6. #256
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,674
    Quote Originally Posted by respector View Post
    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?

  7. #257
    Junior Member
    Join Date
    Dec 2013
    Posts
    3
    We cant use anything else (our professor wont allow it)......so I am stuck with the pic.....

  8. #258
    Junior Member
    Join Date
    Dec 2013
    Posts
    3
    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);
    }

  9. #259
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,674
    I'm sorry, I can't help you with PIC chips.

  10. #260
    Junior Member
    Join Date
    Jun 2013
    Location
    Gatineau, QC
    Posts
    13
    Quote Originally Posted by Headroom View Post
    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?

  11. #261
    Junior Member
    Join Date
    Dec 2015
    Posts
    5
    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. #262
    Junior Member
    Join Date
    Dec 2015
    Posts
    5
    Quote Originally Posted by ledcolor View Post
    do you have those fast SPI library for SK6822 LED ,
    http://www.led-color.com/upload/2015...LED%20Chip.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

  13. #263
    Senior Member
    Join Date
    Jan 2013
    Posts
    124
    Quote Originally Posted by IngDuenas View Post
    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.

  14. #264
    Junior Member
    Join Date
    Mar 2017
    Posts
    1
    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
  •