XIAO with Lipo Battery Charging Circuit

I am designing a very small wearable product that uses the XIAO. The XIAO is stacked with a custom PCB with an IMU, a Bluetooth module, and a battery. The board has a charging circuit and regulator on it. My question involves how to connect these to the XIAO.

I should be able to connect the regulator output (+5) to the 5V pin of the XIAO. The schematic shows a diode from the VUSB line. Should I add the same diode to the regulator output before connection to the XIAO 5V pin? (If so, what diode do you recommend?)

The second part of the question is where to connect the input to the charging circuit (MCP73833)? Normally, this would connect to VUSB. If no USB connection was present, the charging circuit would be inactive. When USB power is present, the charger would monitor the battery and charge if necessary. The output of the charger circuit is connected to the battery and the regulator. VUSB is not available on the XIAO.

Is this the right way to add a battery with charging circuit to the XIAO? Do you have any other recommendations?

Thank you.

After doing some more research, I believe that I can add battery support to the XIAO for my project. My thought is that if the VUSB voltage is available, that can be connected to the input to the charging circuit. The output of the charging circuit would go to the lipo battery, through a switch, and into a 5V regulator. The output of the 5V regulator would then go through a low forward voltage diode and then connect to the VIN/5V pin. With this circuit, the on-board regulator would be driven by either by USB power or the lipo battery through the regulator. If USB power and lipo power were present at the same time, the diodes would protect the USB and external regulator.

Is the diode shown on the schematic present on the top of the XIAO? If so, the anode side of that diode would be VUSB. Soldering to it may be a challenge but this might be a way to add battery support.

More research…

I have looked at the schematic for the XAIO Groove Shield that has battery management. If I read it and the XAIO schematic correctly, when USB power is present, +5 from the XAIO is an input to the battery management IC (U5) on the shield. The Vsys output of U5 is connected to the battery for charging. It is also connected to the input to the LDO 3V3 regulator on the shield. The 3.3v output of regulator would power everything on the shield. The output of that regulator is also connected to the 3V3 pin on the XIAO. That is how the XIAO receives its power.

When there is no USB connection present, there is no +5 input to U5 so U5 passes the battery voltage to the LDO regulator. That powers the shield and also powers the XAIO through the 3V3 pin.

My only problem with this approach is that in both cases, power is being applied to the output of another regulator. When USB power is present, the XAIO LDO regulator is producing 3.3 volts but since U5 is active and the battery is present, the shield LDO is also producing 3.3 volts. Both these regulators are on and producing 3.3 volts and are connected to each other. Is this OK?

When USB power is not present, there is no voltage to the input to the XIAO regulator so it is off. The battery voltage is at the input of the shield regulator and so it is on and producing 3.3 volts. That 3.3 volts is applied back to the XAIO and therefore also being applied to the output of the off XIAO regulator. Is this OK?

I may be completely missing something so please tell me where I am wrong. If I am right, please let me know that it is OK for the output of these two regulators to be connected to each other. If that is OK, I will do something similar for my project.


Hi Chevelle,

I understand the schematic in the following way:
You can connect your battery to the two connector pads (Vin and Grnd) on the bottom side of the XIAO and connect the same XIAO via USB at the same time. (Of course, this will not charge the battery).

I am planning to do exactly the same thing.
I already bought a 4.2V lipo battery and charger , but I cannot entirely test yet, since I have a different issue:
My C# program runs perfectly as long as I connect the XIAO with the PC. But when I connect the Xiao with the same USB cable to an external power bank, the XIAO will indicate its green light, but my C# program won’t start. My i2C devices connected to the XIAO will blink once, but that’s it.

I tried the same with the 4.2 battery connected to the bottom connectors, same behaviour.

As soon as I disconnect the USB cable from the external power bank and connect to the USB port of my PC instead, the XIAO will work again.

Maybe you could give me a hint on how to start the XIAO when only connected to a USB power bank ?
Do I have to modify the bootloader of the XIAO ? I cannot find anything in the internet.

As soon as this is solved, I will try to operate the USB and battery in parallel and I will inform you on my observations.



Hi Volker,

Because Seeed Studio hasn’t responded to my question, I have had to move on to another microcontroller for this application. I am now using am ESP32. It is slightly larger but with BLE built in, I think it is a better fit.

As far as your issue goes, you mentioned an external power bank. What voltage? The Vin pin goes into a LDO voltage regulator. You cannot put your battery there. A 1S battery has a nominal voltage of 3.7V and can go as low as 2.8-3 before needing to be charged. The maximum voltage after being fully charged is 4.2V. If Vin is too low, that be be causing your issue.

Per the schematic, the +5V from the USB connector is connected directly to the Vin pin. To test your design, make sure it is all working when being powered off of the USB connection to your computer. Then disconnect the USB connector, connect +5V from your power pack to Vin. Everything should run OK.

Good luck.