Seeeduino XIAO SAMD21 Breaks When Powered by 220v Source

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.

What color are the LEDs? Green is the power indicator.
The orange LED should blink(ON and OFF). How is it?

Correct. The green power indicator is always on, no matter what program I write to the XIAO. The orange LED blinks on and off according to the “blink” code.

The 3.3V pin can only supply 200mA to the strip, have you reduced the number of LEDs enough that it is not a problem?

From the information so far, the conclusion is" The charger destroys the I/O pins of the XIAO".???
Why don’t you connect an LED to the destroyed I/O pin and see if an LED turns on or off?

I think that imagination alone is the limit of further analysis.
If you have any new information, please post it here.

I have fixed the issue. I burned the bootloader onto all the XIAO boards and used a different power source. All LED’s are working again.

I am not sure what causes the bootloader to be destroyed, but I am very happy that you were able to recover it.
If you used the method in the link below, then the bootloader area is protected and there may be no more bootloader corruption in the future.

If you could, could you please provide me with the following information.

  1. A bad charger breaks the new XIAO -------> you said Yes
  2. A good charger dose not break a recovered XIAO --------> you said Yes
  3. A bad charger breaks restored XIAO --------> ???
  4. A good charger breaks a new XIAO --------> ???