XIAO freezing when powered through 5V pin

Hello,

I have a little « issue » regarding power supply for a XIAO ESP32-S3 board.
I made a little weather station which fetch datas from openweathermaps and display them on a 2 inches TFT screen connected via SPI. Connected to the the Xiao are (beside the screen):

  • 2 push buttons. One is for navigating between different cities (4 in total) and the second one is to access a page to display datas coming from an outdoor station in my garden
  • A temperature and humidity sensor connected via I2C for indoor measurements
  • A LED strip (ws2812b addressable leds) they change color according to the local temperature in the 4 cities I am monitoring and a 5th LED as an indicator of the connection with the garden station.

The whole system is on a little PCB I designed for this. On this PCB, for power supply, I have a « 5V in » screw terminal which routes to the 5V pin of the XIAO.
Now to the « issue »:
When powering the board through this 5V line (I use a 5V 2A power adapter) the system stops after a couple of hours of use. The Xiao becomes unresponsive and if I try to reset it (either via the reset button or by unplugging it and plugging it back again), it stays unresponsive for a couple of minutes. The only option is to wait for a moment and powering back on via the USB socket.
The other think I have noticed when the XIAO freezes:

  1. When powering via the 5V pins: the tension at the 3.3V lines is up to 4.3V
  2. if powering through USB I only get 2.4V on the 3.3V lines.
    This last for a little while, then all goes back to normal.

If I only use the USB socket for powering, no issues at all, the system is running smoothly without an issue.

Is it something some of you experienced when using the 5V pin for powering a system? And most importantly any idea why this is happening?

Thanks in advance for your answer
Have a beautiful day

Alain

Oh and when using the 5V pin, I always make sure I keep the the USB socket unplugged…

The 5V pin and 5V on the USB connector are internally connected within the XIAO, so supplying 5V from either pin should be fine.

  1. Have you measured the output voltage of this adapter?
  2. Does the XIAO get hot when problems occur?

Hello,
This is what I thought also about the 5V pin and USB connector internally connected…
To answer your questions:

  1. I got between 5.11 and 5.13V from the adaptor
  2. I didn’t noticed the Xiao getting particularely hot

Have a nice day
Alain

There might be an issue with the PCB design.

  1. Is the 3.3V line referring to the XIAO’s 3V3 pin?
  2. Or is there a separate 3.3V regulator?
  3. Can you post the PCB schematic?

Yes the 3.3V line is referring the the XIAO’s 3V3 pin…
I will try to post later the schematics (I don’t have currently access to the Harddrive where it is stocked). Anyway, the pcb is pretty simple it is much more an extension board than anything else, I will look into posting it later on
But then why the probleme only occur when powering via the 5V line and not if powering via the USB?

Based on the information available now, I can’t tell.
Are there any other components besides XIAO that get hot?

I understand…
No nothing gets hot and as I said I didn’t really notice the Xiao pbeing particularly hot when it happened…

Hi there,

If I may add, Based on the information you provided, this looks much more like a power-path issue on the PCB rather than something related to sleep or firmware.

The biggest clue is that your system works perfectly when powered through USB, but eventually freezes when powered through the 5V pin. That strongly suggests something happening in the external power path or board layout.

A few observations stand out:

1. The 3.3V rail reading 4.3V is not normal.
The 3.3V rail should never exceed about 3.3–3.4V. If you really see ~4.3V, that indicates something is being back-driven or mis-referenced, or there is a power path issue somewhere on the board.

2. The XIAO 5V pin is essentially the USB 5V rail.
When using the 5V pin as an input, Seeed recommends placing a diode between your external 5V source and the 5V pin. This prevents current from feeding back into the USB power circuitry and avoids strange power-path behavior.

3. External peripherals can backfeed the MCU.
In your case there are several devices connected that could influence the rails:

  • WS2812 LED strip (common source of backfeeding)
  • SPI TFT display
  • I²C sensor pullups
  • Custom PCB power routing

WS2812 strips in particular can sometimes feed power through the data line if their supply and the MCU power do not rise/fall together.

4. Current spikes may be stressing the supply.
WiFi + TFT + LED strip can create short current spikes. Even with a 5V/2A adapter, poor decoupling or thin PCB traces can cause voltage dips that eventually lead to a lockup.

Things I would try first :grin:

  1. Add a Schottky diode between the external 5V supply and the XIAO 5V pin.
  2. Check the LED strip wiring
  • Ensure common ground with the XIAO
  • Add a 330–470Ω resistor in the data line
  • Add a large electrolytic capacitor (470–1000µF) across the strip power rails
  1. Measure the rails during operation
  • 5V at the XIAO 5V pin
  • 3.3V at the XIAO 3V3 pin
    If possible, use an oscilloscope to see transient drops or spikes.
  1. Test with the LED strip disconnected :backhand_index_pointing_left: Do this one first IMO.:grin:
    If the freeze disappears, the strip or its power transients are likely involved.
  2. Inspect the custom PCB power routing
    Especially check that nothing is accidentally tied between 5V and 3.3V nets, and that the TFT or other modules are not injecting voltage into the 3.3V rail.

Given that the board works reliably when powered from USB, the ESP32-S3 itself is likely fine. The evidence points toward external power routing or backfeeding somewhere in the system.

If you can share the power section of your PCB schematic, it would probably make the root cause easier to identify.

Hope this helps — it sounds like a nice little weather station project!

GL :slight_smile: PJ :v:



Here are the schematics and picture of the pcb, hope it helps…
Best
Alain

Hi there,

You need the DIODE :+1:
Does the Power out (5V) go to the LED strip ?
Have you tried with out the LED strip ?
Are you initializing any Pull up Resistors ?

Can you past in the code you are trying?
Use the Code tags above “</>” Paste it in there.

HTH
GL :slight_smile: PJ :v:

Hello,
First thank for you thorough and detailed answer earlier.
So to answer your questions
About the of the diode: it supposed to be placed between the screw terminal (5V in) and the 5 V pin correct? I totally fail to understand its role: “This prevents current from feeding back into the USB power circuitry” this is the part I dont get… I am not challenging anything here, it is just I cannot wrap my head around its function… If the diode is between the screw terminal and the 5V pin, it will prevent the current going back along the line between the 5V pin and the 5V power supply no? I don’t understand how it will prevent feeding back in the USB?
“Does the Power out (5V) go to the LED strip ?” → Yes exactly, and the signal is coming from one of the remaining free pin (D9)
“Are you initializing any Pull up Resistors ?” you mean for the press button? Yes I use the internal ones… something like: “pinMode(BUTTON_HOME_PIN, INPUT_PULLUP);”

As for putting the code here I don’t know how to do it, I use tabs when writing the sketch and there are a lot… :slight_smile:

And no I don’t have tried without the strip, I am a little wary to damahge the board using the 5V in… so not really keen to run any trials to be honest

Best
Alain

def sounds like thermal overload from high current draw

find out where the current draw is… dead short somewhere

add additional ground return paths to the power supply, external to the XIAO

check switching logic… sourcing or sinking current thru the GPIO Pins and duty cycle of led power

reduce led duty cycle

if you had a thermal camera

some componant may be reducing or increasing resistance with temperture…

so if it gets hot and reduces resustance it can allow more current to pas downstream

if it gets hot and increases resistance it can get more hotter

can you limit the current at the power supply? (Variable Power Supply try 1Amp max)

you may have to design a parrallel power supply for the led system

try powering from the under battery

try adding a heat sink at the underside heat sink

Hello Alain, Nice project, good simple design.

I have a XIAO ESP32-S3 running non-stop using a very similar setup to you, a 5V power supply (in my case a DC-DC converter from a 12-15V input), no series diode. I don’t have the USB connected.

I’m not sure about the 4.3V on the XIAO 3V3 lines? I use WS2812 with 5V supply and driven by 3V3 (from XIAO) and haven’t seen any problems with power fed through the data line :thinking:

Since you don’t notice any heat buildup, I’d start with checking the code works 100% from 3V3 supplied to the XIAO and no USB.

If you use the </> tab you can add your test code.

Hi there,

Great… So the Diode is protection from a second source or the 5V it was intended to be an output BTW. for powering small sensors that didn’t draw a lot of current. It’s only by way of th schematic the common point could be injected a 5V besides what is created from the USB being plugged in. The DIode then would allow that as input is all.

Further , Since we can’t see :person_with_white_cane: the code so just feeling around in the dark…:grin:
just unplugging the status LED string certainly wouldn’t hurt anything but WOULD indeed verify the Strings current and switching is NOT affecting the operation. DO that and test again.

HTH
GL :slight_smile: PJ :v: