Flicker

Interesting flicker (or absence of) going on here with Sinelon. Note, this is with analog support over the first, four LEDs.

Hi @tonyno, yes, I do have the same issue with my H801 board running WLED.
It’s running 0.8.6 currently, so I thought it would be because of this …

I did not figure out, why this flicker is there.

@Aircoookie: do you have a clue ?

1 Like

Hmm, I couldn’t reproduce this with 4 digital LEDs, so it might be related to the analog driving somehow.
Does similar flicket happen for other effects besides Sinelon?

@tonyno it does seem like the 4th strip doesn’t flicker like the first three ones somehow…

Other than that, I’m by no means an expert with analog LED driving. It might be the PWM frequency, but that should be high enough to not produce visible flicker.

Hi @tonyno, I changed the analogRGBW code and could reduce the flicker at my strips.

Unfortunately the only “long” dumb RGBW strip does hang on the wall in my daughter’s room…
…so I could only test this on my 3-pixel-analog-strip - there the flicker is totally away.

Would you like to test this, before I create the PR ?

It’s in my tree removeAnalogFlicker

Will do!

I’m not seeing a way to download it. What am I missing? :worried:

Nevermind! LOL

I tried to make my changes to this and it just got scrambled. I’m now looking at a diff of FX_fcn.cpp (hope that’s it) trying to push the updates to my code…

Almost there. I found that you hard-coded indexPixel to zero in FX_fcn.cpp…

RgbwColor color = bus->GetPixelColorRgbw(0);

…and indexPixel is now not seen in there.

How can I get that back? Thanks!

hI @tonyno, I changed from the SetPixelColor function to the main loop, because some effects change the colors and do not call SetPixelColor for that (liek fade_out or blur).

I thought this would remove the flicker, but it doesn’t.

ESP8266 PWM normally will keep the PWM value as long as it’s not chaged, but for some reason,
the output voltage does change slightly (at the same unchanged PWM value).
I will invest more time into this - next I want to try is:

  • ESP32 -> is this the same here ?
  • does the flicker change when switching of used functions ?
    • MQTT
    • Notifications
    • NeoPixelBus (= use only analog strip)

It seems to be something that stresses the ESP so much that he cannot keep the voltage on the PWM PINs constant.

To answer your question: if you want to use pixels 1 to 4 for your setup, you can use something like this:
FX_fcn.cpp:

for (uint8_t i = 0 ; i < 4 ; i++) {
   RgbwColor color = bus->GetPixelColorRgbw(i);
   byte b = getBrightness();
   bus->SetRgbwPwm(i, color.R * b / 255, color.G * b / 255, color.B * b / 255);
}   // asuming that SetPixelColor is changed to drive 4

NpbWrapper.h:

void SetRgbwPwm(uint8_z i, uint8_t r, uint8_t g, uint8_t b)
{
   for (uint8_t k ; k <= i ; k++) {
       analogWrite(PIN[3*k + 0], r);
       analogWrite(PIN[3*k + 1], g);
       analogWrite(PIN[3*k + 2], b);
   }
}

Interesting.

Yes, that is the code I came up with before as well.