This is the Effect with this Code: "FastLED.h" NUM_LEDS 21 CRGB leds[NUM_LEDS];

This is the Effect with this Code:
#include “FastLED.h”
#define NUM_LEDS 21
CRGB leds[NUM_LEDS];
void setup() {
FastLED.addLeds<TM1809, 5,BRG>(leds, NUM_LEDS);
}
void loop() {
//fill_gradient(leds,0,CHSV(0,255,255),20,CHSV(200,255,255),SHORTEST_HUES); // works perfect
fill_gradient(leds,0,CHSV(0,0,0),20,CHSV(100,255,255),SHORTEST_HUES); // has flickering
// fill_solid( &(leds[0]), 20 , CHSV( 0, 0, 2) );// has also flickering

   delay(100);
 FastLED.show();

}

b837d6b98c52ef72ec1b4c5a1c8a7020.gif

change your addLeds line to:

FastLED.addLeds<TM1809,5,BRG>(leds, NUM_LEDS).setDither(DISABLE_DITHER);

see what that does. (Dither is really only happy when you’re running at higher framerates - @Mark_Kriegsman and I have talked about having it auto-tune based on frame rate, but haven’t gotten to that yet)

Its better. The flickering on the darker LEDs is away, but sometimes some Green LEDs are changing to Red.

@Daniel_Garcia @Mark_Kriegsman @Dave_Morgan Thanks for your help, i have made some investigations and I think I have got the solution. I have tested it with an old Arduino Uno it works fine with Dithering and low level brightnesses. --> The only difference between the Uno and the Teensy 3.1 is the output level. Teensy has 3,3V and the Uno has 5V. Maybe thats a problem at lower brighnesses?!

There’s a mountain of code differences between the two at the library level as well, however. That said, I have been seeing more and more glitching off of 3.3v devices lately - I don’t know if it is something off in my timing code or if some chips are much more sensitive than others.

I will test it. I think a level shifter should solf the problem with the level and if it isn’t better then it would be very good if you can have a look at this.

@Mark_Kriegsman he’s seeing some glitching at very low brightness levels when interpolating between hsv values - is it possible that this is something still lurking around in the HSV to RGB conversion code when levels are low (e.g. V < 10)

Can you put up a video of what the current flickering looks like when on the teensy (the stepping between red and green)?

If the input numeric values to any of the fill_ functions are not changing, then the output numeric values won’t be changing either – that won’t result in a “flicker”.

That means that this may be some kind of power/timing/signal problem. To isolate what it may be, I’d do ALL of these things:

  1. FastLED.setBrightness( 255);
  2. FastLED.setDither(DISABLE_DITHER);
  3. put a “delay(100);” after FastLED.show();
  4. use ONLY fill_solid for testing
  5. test with RGB colors first
  6. only test with HSV colors only AFTER testing with RGB colors

Thank you for posting the videos – that really helps! To keep the discussion all in one place, please post additional videos by just putting the URL in the comments here, rather than starting a new discussion thread.

Let us know what you find! Dan and I just spoke about this at some length and we’re eager to help figure it out.

I will do this, this evening!

@Mark_Kriegsman @Daniel_Garcia I have tested it. If I do fill solid with low level brightness with CRGB its the same like CHSV with flickering–> no conversion fault
I have this section commented out in the Code:
#include “FastLED.h”
#define NUM_LEDS 21
CRGB leds[NUM_LEDS];
void setup() {
FastLED.addLeds<TM1809, 5,BRG>(leds, NUM_LEDS);
FastLED.setDither(DISABLE_DITHER);
}
void loop() {
//fill_gradient(leds,0,CHSV(0,255,255),20,CHSV(200,255,255),SHORTEST_HUES); // works perfect
//fill_gradient(leds,0,CHSV(0,0,0),20,CHSV(100,255,255),SHORTEST_HUES); // has flickering

    //fill_solid( &(leds[0]), 20 , CRGB( 9, 9, 9) );// has also flickering!

for(int k = 0; k < 255; k++)
{
      fill_solid( &(leds[0]), 20 , CRGB( k, 0, 0) );    
      //fill_rainbow( &(leds[0]), 20 , k );
  FastLED.show();
      delay(1500);
}
    for(int k = 0; k < 255; k++)
{
      fill_solid( &(leds[0]), 20 , CRGB( 0, k, 0) );    
      //fill_rainbow( &(leds[0]), 20 , k );
  FastLED.show();
      delay(1500);
}

FastLED.show();
delay(100);
}

But if I run the loop very slow there is no flickering!! I havent expected this! Maybe it helps you. Another interesting thing:
fill_gradient(leds,0,CHSV(0,255,20),20,CHSV(200,255,255),SHORTEST_HUES); → No flickering
fill_gradient(leds,0,CHSV(0,10,20),20,CHSV(200,255,255),SHORTEST_HUES);–> very strong flickering sometimes with red colors.
Another Question and you don’t think this could be a problem because of the level from the 3.3V? Thanks for your help!

Here is the Link to the Video: https://www.dropbox.com/s/a9y7v9usssl3kjt/20140618_203026.mp4

Thanks @Mark_Kriegsman and @Daniel_Garcia I have solved this Problem! Its a level problem. The TM1809 seens to be very sensitive. I have used a 74HCT125 to shift from the teensy the 3V to 5V and every code works fine without flickering! So no problem in the library.

You know- Dan was just speculating something like that recently.

Voltage levels make a much bigger difference than we all wish!

Yes! So I checked it out! And this was the problem :wink: