I have a BLE program that runs flawlessly when my XIAO ESP32-C3 module is plugged into my computer via USB-C. However, whenever my module is powered with 4.96 VDC through the 5V pin, no code is executed. The CH light turns on and I measure exactly 4.96 VDC on the 5V pin, and 3.34 VDC on the 3.3V pin. If I plug the module into my computer at any point, it will start working, and when I unplug it, it immediately stops working, even if the external supply is present.
I added a 47 uF (50V) capacitor directly between the 5V pin and the GND pin next to it, and a 10 uF (50V) capacitor directly between the 3.3V pin and GND. Neither had any effect on the circuit.
The 5V (or rather, 4.96 VDC) supply is a buck regulator and the level is quite stable. Holding down the RST pin for a bit after the buck regulator powers up doesnāt help.
There are NO while (!Serial) or similar statements in my code.
Iāve seem a few people with similar problems but no one has figured out why these modules donāt like being powered externally. Any ideas?
contrary to popular beliefā¦ i do not think you can power thru the 5v pinā¦ it is a one way power out not power inā¦ people on here will disagree with meā¦ but heyā¦ whateverā¦ try powering thru the bottom battery pads
these devices have onboard battery management chipsā¦ i assume they provide regulated 3v3 at that pin and not the 5v pinā¦ you may try powering via USB power bankā¦ but i am thinking the bottom line is you cant power thru the 5V pinā¦ even though some documentaton says you can
Appreciate the links. Itās a strange situationā¦ based on the schematics, it appears that the VUSB pin is the 5V pin that is broken out. There is nothing preventing our external 5V supply from generating the 3.3V required for the chip. In fact, if we measure 3.3V on the broken out 3.3V pin (which I do), then it indicates the chip should be receiving 3.3V, because the broken out 3.3V pin is on the same net as the 3.3V supply directly to the chip.
When I said āimmediately stops workingā, I mean all code execution stops and the BLE activity ceases.
With a simple blink sketch, the Xiao does not execute code immediately on startup. However, if I hold down the reset button for ~1 second after the 5V supply stabilizes, then it is able to successfully execute the blink routine while being powered through the 5V pin. The failure on initial power-up is probably due to a slow rise time of the switching regulator and/or the charge time for the large decoupling caps, which is more or less expected behavior in this case and not the fault of the Xiao.
I am using an AP63205 2A regulator https://www.diodes.com/assets/Datasheets/AP63200-AP63201-AP63203-AP63205.pdf. However, the 12 VDC source that I am stepping down to 5 VDC is only rated for 800 mA max. I thought that 800 mA @ 12 VDC would be enough (and it should be), but thereās a chance that a large inrush current upon starting up the Xiao drops the voltage enough (loading effect) to cause an issue.
So, I switched to a much larger 12 VDC supply with a 6A max and my program now seems to be executing, with Serial.print() and all. BLE works as intended.
This was certainly not the Xiaoās fault. There must have been some transients on the power line that require an oscilloscope to notice. For anyone else having trouble powering via 5V pin, try using an oversized power supply, even if youāre already using one that should theoretically work and the 5 VDC and 3.3 VDC values look totally fine. Alternatively, powering from a battery would avoid this situation in the first place.