Arduino startup as an installed application

Hello Forum,

I’m hoping that you can help me with a minor annoyance. I created an entry hall lamp that is comprised of 9 RGB lighted columns. I’m using a Huzzah ESP8266 multiplexing 9ea. R3 STM32 AVR

I’m also controlling various modes via Blynk that gradually blend complimentary colors every 20 seconds or so etc.
Anyway, the default mode is a warm white and the idea is that when you turn on the light switch the light gradually fades up to warm white full bright. The annoyance is that before this occurs and when the lamp (arduino is powered) there is a brief flash of full bright white (see video below). I obviously do not want this to occur but I don’t know how I can avoid this. Perhaps this is just the behavior of the STM32 AVR when it receives power but I’m not sure. I’m wondering if there is anything I can do in my Sketch (posted below) to prevent this.

I’m not sure what happens initially with the TX and RX pins when Arduino is power up? Are they sending an initial signal that causes this flash? Anyway, anyone that has had experience with driving RGB Lens with the STM32 AVR and has a hunch how to avoid this - would appreciate hearing from you.

thanks in advance

Mark

image of Entry Light

short video of problem

Looks like my sketch is too big to post here so here’s a link to it if you’re interested:

Here is partial sketch:

void setup()
{

  FastLED.addLeds<P9813, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
  //FastLED.clear(); blanking to remove flashing affect when powered up?
  //FastLED.show();
  for ( int i = 0; i < 256; i++) {               // fade up and set all LEDs to warm white
    leds[0] = CHSV(55, 157, i);   //custom balanced color for individual flutes
    leds[2] = CHSV(55, 157, i);
    leds[3] = CHSV(55, 157, i);
    leds[4] = CHSV(55, 157, i);
    leds[5] = CHSV(55, 157, i);
    leds[6] = CHSV(55, 157, i);

    leds[1] = CHSV(44, 157, i);
    leds[7] = CHSV(44, 157, i);
    leds[8] = CHSV(44, 157, i);
    FastLED.show();
    FastLED.delay(10);
  }
  for (int i = 0; i < NUM_LEDS; i++ ) {     //set initial color pair for all LEDs
    LEDchannelinfo[i].colorA = CRGB::OrangeRed;          // CRGB::Orange;
    LEDchannelinfo[i].currentcolorA = CRGB::OrangeRed;   // CRGB::Orange;
    LEDchannelinfo[i].colorB = CRGB::Aqua;                // CRGB::BlueViolet;
    LEDchannelinfo[i].currentcolorB = CRGB::Aqua;      // CRGB::BlueViolet;
    LEDchannelinfo[i].toggle = 0;
  }
  Blynk.begin(auth, ssid, pass);
}/code]

Aliexpress link is broken
Box links won't work without an account, so useless to most of us.

How is the Huzzah powered.

How is the P9813 chip on the mosfet module powered (it needs 5volt), and is it constantly powered.

Did you use a level converter (the P9813 needs >0.7*VCC logic to work reliably).

Diagram, code?
Leo..

Please post your schematic. If your code is too long, make a short simple version that demonstrates the problem and post that in code tags. Most forum members use phones & tablets most of the time and cannot open .ino files.

Without seeing your schematic, and with no link to these led drivers, my guess would be that there are MOSFETs that switch the current, and they do not have pull-down resistors on their gates. So while the mcu is starting up, the gates float, the mosfet's switch partially on and cause the flash.

What is an STM32 AVR?

I have fixed the link for the STM32 AVR and have posted some of my code for the void setup() As for my power supply, I'm using a 15A contact voltage LED supply -

I also have a 12V to 5V step-down buck which is powering the Arduino and the P9813 (STM32 AVR).

Just keep in mind, that everything works perfectly once the default color scheme is executed. It is the flash (P9813 full on) that I'm try to avoid when they are initially powered.

I have seen post before about addressable LEDs flashing during bootup.
Didn't see any solutions other than keeping things 24/7 powered, or a (noisy) relay in the LED supply.
Leo..

I have found that addressable LEDs can power up in any state, while all off is the most common they can power up all on one colour. Cyan is the most common colour I have seen.

While this has not bothered me in any application I have not investigated it. If I were to investigate then I would look at the voltage rise time of the power supply. It could be too fast or too slow.

For too slow I would look at having a power supply running and then connect the power to the strip with a switch. This would be about as fast as you can get it. For two fast I would power the LED strip through a power FET and turn on the FET slowly by putting a capacitor on the gate.