OctoWS2811 flicker when connected via USB

Status
Not open for further replies.
I've got a project that I'm working on with the OctoWS2811 library.

This is what I have so far:
https://www.youtube.com/watch?v=2CL4wqNrfoU

8x WS2812B strips of 120px.
2x 26a power supplies
Teensy 3.0 with OctoWS2811 @ 96mhz

I'm noticing that when I plug a laptop into the teensy that I get extra flicker on my strips. It doesn't matter much if the laptop is plugged into its own power source.

I've cut the trace on my teensy as specified here http://www.pjrc.com/teensy/td_libs_OctoWS2811.html so that the Teensy is only powered by VIN. The teensy is powered by one of the power supplies. The power supplies have their V- (grounds) joined. Also the power supplies have the same power input (L/N/E) daisy chained.

I am assuming that USB Is sufficiently grounded on the Teensy. Is this true? Do have I have to do anything else to join the USB and Teensy Grounds?
 
I had a similar problem, that ended up being flicker only if the laptop was still plugged into the mains.
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.

Response
""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).
 
Hi,

I see the same problem, and it appears to be software or CPU related.

I have a large single strip (704 LEDs, stripLen==704) with WS2812B LEDs that require >3.3V. Power and ground are connected in 8 locations along the strip; the power looks clean everywhere and doesn't droop below 4V ever. I'm using an OctoWS2811 adapter board with a Teensy 3.1, using the first output only. My code is essentially:

Code:
void loop()
{
    for (int i = 0; i < STRIP_LEN; i++)
        led.setPixel(i, 0x555555);
    led.show();
}

When USB is connected (serial), I get pretty bad flicker, which is more likely to start later in the strip (ie. it only starts rarely around LED 100, and flickers serveral times per second around LED 500). Note that I'm not even sending anything over USB, it's just connected to the host.

When I unplug USB, it stops.

It also stops flickering after 10 seconds if I add this to my code:
Code:
    static Metro kill_usb(10000);
    if (metro.check())
        NVIC_DISABLE_IRQ(IRQ_USBOTG);
even with the USB cable still plugged in. So I am quite confident that this is not a grounding or other power issue.

I've tried setting the IRQ_DMA_CH3 priority to 32 or even 0, which doesn't seem to change anything.

For fun I removed all __disable_irq() and __enable_irq() in usb_dev.c and usb_mem.c to see if that helps anything, but it still flickers.

The flickering is rare, but still happens, when running the strip at 400 kHz. It is much more common at 800 kHz.

I've played with timings in OctoWS2811.cpp but that doesn't seem to help. My chips are interesting in that they always seem to retransmit with T0H=400ns, T1H=800ns, even when the first chip is receiving something different (e.g. running at 400 kHz).

Maybe the USB hardware causes bus contention or something and messes with the DMA? Paul, any thoughts?
 
It flickers a lot less, but still flickers, if I change the MCM_CR line in OctoWS2811.cpp to:
Code:
    MCM_CR = MCM_CR_SRAMLAP(0) | MCM_CR_SRAMUAP(0);
 
Paul, any thoughts?

As always, post a complete program and all necessary details, and I'll put it on my "to investigate" list. I can't promise I'll get to it quickly, but I will not forget.

I'm not sure if I have 704 LEDs available to connect to a long strip. But if that's what it takes to reproduce a problem, I can buy more.
 
Thanks Paul. It turns out that this is not just caused by USB, so I started a new thread here with full code, and will follow up there.
 
I have uncovered a number of issues on my project. I added filter caps to my LED strips, I eliminated a couple ground loops, found a power supply that has Active PFC and am using one of Paul's OctoWS2811 adapter boards with Cat6 cable. My original Teensy 3.0 let the smoke out and I'm now using a Teensy 3.1. I believe that I was seeing a similar issue to Jim.

I have observed issues with the data line which I detailed in this post:
http://forum.pjrc.com/threads/25588-OctoWS2811-flicker?p=47457&viewfull=1#post47457
 
Status
Not open for further replies.
Back
Top