Page 1 of 1

ESP32-S2 DevKit M1 onboard led no white

Posted: Mon Oct 14, 2024 2:37 pm
by stabl-gjn
Hello there,

we are using the ESP32-S2 DevKit M1 v1.0 (ESP-S2-MINI-2; `XXN4R2`) and are encountering strange behavior on some of them. Instead of the on-board WS2812 Led going white when told so it will show red.
All of the other primary colors seem to work (red, blue, green).

To rule out any timing/implementation issues we have also done a quick PoC for arduino ide (we are using Rust with `esp-idf-xxx` normally) which has the same behavior.
final.gif
Running rainbow code
final.gif (9.08 MiB) Viewed 767 times
Is this a known fact or something we can do about?

Arduino Code (Blink White):

Code: Select all

#include <Adafruit_NeoPixel.h>

#define LED_PIN    18   // GPIO connected to the WS2812 data input
#define NUM_LEDS   1    // Number of LEDs in the strip

// Initialize the NeoPixel library
Adafruit_NeoPixel strip(NUM_LEDS, LED_PIN, NEO_GRB + NEO_KHZ800);

void setup() {
  strip.begin();          // Initialize the NeoPixel library
  strip.show();           // Turn off all LEDs
}

void loop() {
  // Turn the LED white
  strip.setPixelColor(0, strip.Color(255, 255, 255));  // White color
  strip.show();           // Update the strip
  delay(500);             // Wait for half a second

  // Turn the LED off
  strip.setPixelColor(0, strip.Color(0, 0, 0));        // Off
  strip.show();           // Update the strip
  delay(500);             // Wait for half a second
}
Arduino Code Rainbow:

Code: Select all

#include <Adafruit_NeoPixel.h>

#define LED_PIN    18    // GPIO connected to the WS2812 data input
#define NUM_LEDS   1     // Number of LEDs
Adafruit_NeoPixel strip(NUM_LEDS, LED_PIN, NEO_GRB + NEO_KHZ800);

void setup() {
  strip.begin();           // Initialize the NeoPixel library
  strip.show();            // Turn off all LEDs
}

void loop() {
  rainbowCycle(10);        // Run the rainbow cycle animation
}

// Rainbow Cycle Animation
void rainbowCycle(uint8_t wait) {
  uint16_t i, j;

  for(j=0; j<256*5; j++) { // 5 cycles of all colors on the wheel
    for(i=0; i<strip.numPixels(); i++) {
      strip.setPixelColor(i, Wheel(((i * 256 / strip.numPixels()) + j) & 255));
    }
    strip.show();
    delay(wait);
  }
}

// Input a value 0 to 255 to get a color value.
// The colors transition R -> G -> B -> back to R.
uint32_t Wheel(byte WheelPos) {
  WheelPos = 255 - WheelPos;
  if(WheelPos < 85) {
    return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);
  } else if(WheelPos < 170) {
    WheelPos -= 85;
    return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);
  } else {
    WheelPos -= 170;
    return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
  }
}

Re: ESP32-S2 DevKit M1 onboard led no white

Posted: Tue Oct 15, 2024 3:19 am
by ESP_Sprite
Odd. Might be a PCB design issue: the LED is fed from 3.3V which is at the lower end of its voltage range, and with the LED on entirely the voltage drop over the traces etc may be so large that the power supply to it drops below the forward voltage of the green and blue LED dies. Can you try lowering the intensity a bit (e.g. strip.setPixelColor(0, strip.Color(32, 32, 32));) and see if it works then? If the voltage drop is indeed the issue, I'd expect the LED to turn white with that code.

Re: ESP32-S2 DevKit M1 onboard led no white

Posted: Mon Oct 21, 2024 9:19 am
by stabl-gjn
Thanks for the response ESP_Sprite.

I tried what you suggested (tested 32, 10 and 1) and all of them are still red, just weaker.
I also powered the board independently instead of attaching it to my PC and still the same result.

On very low power settings i can also see that all 3 color leds are powered, the red one is just brighter than the others.
When comparing the single color pixels to a module which behaves as expected (white led), the red seems to be the same intensity, green a bit less and blue is almost not visible.

Just letting the single blue or green pixel light up (color 0,0,10; 0, 10, 0) the intensity on the "normal" board is noticeably higher.

With some trial and error i could get the LED to be almost white with this color: Color(60, 160, 255)

Re: ESP32-S2 DevKit M1 onboard led no white

Posted: Tue Oct 22, 2024 5:57 am
by ESP_Sprite
Feels like somehow the current to the LED is limited by something. In that case, any time the red LED is on, it pulls the supply voltage to below what the blue and green LED need to function. It means that if you e.g. set red to an intensity of 30 and green to 50, the green would effectively only be on as if it had an intensity (50-30=)20.

Unfortunately, I can't replicate it here. The S2-devkit-M1 I have here seems to light up 'white' just fine.

Is there any chance you can post a high-res picture of one of the affected devkits? Could be that something went wrong with the soldering process or something.