Seeeduino XIAO SAMD21 Breaks When Powered by 220v Source

All the details I know of the power supply are in the previous reply, and all the LED’s were lit at 1/3 brightness (which I set via code) when wired through the XIAO’s 3.3V terminal. I am more wondering if there is an issue with XIAO’s chip when dealing with 50 Hz vs 60 Hz. That was the only difference when changing from a USB-C connection from my laptop to a USB-C connection from the power supply.

XIAO is supplied with DC power either from a laptop or from a power supply, so 50/60 Hz is not a concern.

Just to confirm.

  1. Whether powered from a laptop or from a power supply
    XIAO is powered by USB-C ?
    The strip is connected to the 3.3V terminal of XIAO ?

  2. With power supplied from a laptop and LEDs on a strip “ON”, is the voltage at the 3.3V terminal of XIAO dropping?

  3. Is it written in the sketch?
    Serial.begin(9600);
    while(!Serial);

If you could show the connection diagram and sketch I might notice something.

  1. Yes, the XIAO is powered via the USB-C input port whether via the computer or the power supply.
  2. Sadly I cannot check the voltage of the terminal with the LED’s on anymore, as they do not turn on. However, checking now when they are coded to be on, there is no noticeable draw or drop (just minor noise due to my shaky hands).
  3. image
    Above is all of my code, with no serial communication.
    (Second reply with my wiring diagram)


Above is my connections to the XIAO

Your code did not work at all.
Please try the code below. I have confirmed that it works with 4 LEDs strip.

#include <Adafruit_NeoPixel.h>

#define PIN 10

//Adafruit_NeoPixel pixels=(192, PIN, NEO_RGB + NEO_KHZ800);
Adafruit_NeoPixel pixels(4, PIN, NEO_RGB + NEO_KHZ800);

void setup() {
  pixels.begin();
  pixels.setBrightness(50);
  pixels.fill(pixels.Color(255,255,255));
  pixels.show();

}

void loop() {
}

The 4 LEDs strip I tested consumed about 10mA per LED at “setBrightness(100)”. From this I infer that your 192 LEDs strip requires nearly 2A.
XIAO’s 3.3V pin is only capable of supplying 200mA. Therefore, if 2A is required, the output voltage will drop and XIAO will not work.

If you want to use a 192 LEDs strip with a 700mA phone charger, connect a strip to a 5V pin, not a 3.3V pin of a XIAO. Normally you need a level shifter between pin 10 and Din, but if you are lucky it may work without a level shifter.

The code did not light up any LEDs. Same 3.23V at the end of the strip.

Does not work with either a laptop or a charger?
Are you aware that there is a mistake in your code? The “=” is not necessary.
And have you reduced the number of LEDs?

//Adafruit_NeoPixel pixels=(192, PIN, NEO_RGB + NEO_KHZ800);
Adafruit_NeoPixel pixels(4, PIN, NEO_RGB + NEO_KHZ800);

I just looked over Adafruit’s uberguide and have no idea why I added in that mistake, my fault :sweat_smile:. However, I did copy/paste your code exactly into a new arduino sketch and the lights did not light up, and the LED’s did light up before with incorrect code and the large number of LED’s. I believe that is something I will look into another time. I have been looking into other methods to fix my XIAO and found your forum post on DAPlink, but I do not know if this case is necessary since I can still light up the onboard LEDs. What other methods should I try to test the capabilities of my board; testing serial communication, testing the I/O capabilities with tools such as a potentiometer and servo?

Have you tried reducing the number of LEDs?
For example, 4 LEDs?
Is your strip supported by “Adafruit_NeoPixel”?
Can you now reproduce the condition that worked as expected before?

The code below will only light one LED at a time, even though there are 192 LEDs, so there is no need to worry about current consumption.
Try it out by attaching it directly to your sketch.

#include <Adafruit_NeoPixel.h>

#define PIN 10
//#define COUNT 192
#define COUNT 4

Adafruit_NeoPixel pixels(COUNT, PIN, NEO_RGB + NEO_KHZ800);

void setup() {
  pixels.begin();
  pixels.setBrightness(100);
}

void loop() {
  for(int i = 0; i < COUNT; i++) {
    pixels.fill(pixels.Color(255,255,255), i, 1);
    pixels.show();
    delay(20);
    pixels.fill(pixels.Color(0,0,0), i, 1);  
    pixels.show();
    delay(20);
  }  
}
  1. I used the code you wrote in your previous response that only used 4 LED’s.
  2. The strip I use is from Adafruit with the Neopixel uberguide linked in the description.
  3. That is very similar to the code I was about to write. I was going to test to see if I could use the I/O pin attached to the Neopixel strip to check the current draw after lighting one more pixel to see if the board could sense when all the lights in a strip were lit, negating the need to specify the number of pixels in a strip, but I never got to that step before I ran into this issue.

Can I ask what issues do you believe could be happening to my XIAO, I am curious on what other issues there could be so that I learn now to avoid them.

Which strips are you using specifically? Please show the link to that product.
The last code I sent does not work at all?
Will it not work if you replace it with another XIAO?
Does it not work if you change pin10 to another pin?

XIAO can do “blink”, so basically I don’t think it’s broken. If you have a simple LED that you can use to check the I/O pin activity, you can blink it to see the status of the I/O pin.

  1. Adafruit NeoPixel Digital RGBW LED Strip - Black PCB 144 LED/m [1m] : ID 2848 : $59.95 : Adafruit Industries, Unique & fun DIY electronics and kits
  2. It did not work, neither when plugged into the computer nor using wall power source.
  3. Honestly this is the third XIAO I have used for this, all working when plugged into the computer but failed when plugged into the wall.
  4. I have tried pins 10, 0, 1, and 3, with no pin working after plugging the XIAO into wall power.

Let me check again for clarification.
1.At first, XIAO works on a laptop as expected?
2.Does the XIAO that didn’t work with the charger ever work with the laptop again?
3.If XIAO does not work with the charger, will it still be able to “blink” when connected to a laptop?
4.If “blink” works with a laptop, will “blink” work with a charger?

  1. Yes
  2. It does not, correct
  3. It does “blink” when connected to the laptop
  4. It does “blink” when connected to the charger
  5. The strip works when using an ESP32 board, but I want to use a XIAO board for this project.

Can a XIAO that stopped working with a charger be restored and run the strip again when connected to a laptop? Please verify “works” and “does not work” using the last code I sent you.
Please be as accurate as possible as my native language is not English.

None of the XIAO boards can run the strip again after connecting to any wall power adapter. If they are connected to the laptop after connected to any wall power adapter, they do not run the strip again.

Does this mean that once the XIAO is connected to the charger, it can never be used again, even if I upload the strip sketch again?
Does this mean that brick XIAO will work on both the laptop and the charger if upload a “blink”?

Yes, it does not light up the strip again, even if I rewrite the strip sketch.
Yes, it does work if I upload “blink”.

You wrote earlier that “blink” works, am I mistaken?
Do you mean that once you connect it to a charger, “blink” not work and you can’t use it anymore?

I have one thing I noticed and I would like to correct it.
When connecting a strip to XIAO 5V pin, a level shifter is always required to avoid destroying XIAO I/O pin.

Blink does work to turn on the onboard LED, but any Neopixel commands do not light up the strip. The XIAO still works, except for lighting up connected LED’s.
I did read that the 5V pin needs a level shifter in the XIAO documentation, and have the strip connected to 3.3V instead.