Seeeduino Xiao project

Hi Everyone,

Just had a chat with the guys @ Core and they recommended I post in this forum.

I have a simple project Im working on and I need to add 1s liion battery management to the Xiao.

Im hoping to keep it as compact as possible and utilize the Xiaos USB C port for charging, so as to eliminate the need for two ports.

I stumbled across this here:

Which is longer than needed but a plug in module like that would be great.

We also chatted about the possibility of using something like this:

Connected to the 5v rail of the Xiao this should initiate charging when USB C is connected. It would seem however that when USB C is disconnected that the battery would power the Xiao (discharging the battery) which is not ideal. Since the project needs to be switched on and off this could perhaps be resolved by a simple inline switch off the Xiao. When off the battery is disconnected, when on the Xiao is powered and the Xiao runs the code, lighting the LEDs. There may be a need for a boost module for the LEDs (5v) as the original design uses this. However it would seem that the LEDs can be driven directly from Lipo as well so if that can be omitted that would be great.

The other concern is that the Xiao will drive a string of ws2812 LEDs and if they are also powered when USB C is plugged in Im not sure how much energy will make it to charge the battery. Would I need to overcome the load current of the LEDs and the Xiao and any net energy would then be available for the charging? Im sure there is a way this could be implemented in the coding, but coding is beyond me. I can solder just fine and follow schematics, design and do all the 3d printing, but the function of the chip and implementing different modes for LED display and smart charging is beyond me.

For reference the project is an open source LED Poi Im working on, lovingly dubbed the “Rave Grenade” The housing is designed and printed in house out of a mixture of PLA and TPU.

Any advice or pointers appreciated.



1 Like

Hi Shanan,

Thanks for making a post! I’ve checked out the schematic for the Xiao. The 5v rail on the Xiao is connected directly to Vin, and is connected to the USB +5v via a diode.

If you’re going to run your Xiao from battery power you will need to be careful when connecting it to USB. FYI here’s the datasheet for the 3.3v regulator used on the Xiao. That regulator will typically need at least 3.6v to run, but to be certain you will need to be able to supply it with a minimum of 4v.

So here’s what I would suggest: get a better voltage regulator and bypass the one on board. Connect your battery positive to the regulator’s Vin via a small slide switch. Connect a lipo charger to the battery and connect this charger’s 5v pin to the 5v rail on the Xiao.

Here’s a quick and dirty diagram:

With this setup you’ll need to remember to switch off your Xiao before connecting it to USB power. With a bit more complexity it’s possible to make it disconnect the battery automatically when power is applied to the 5v rail.

Re the WS2812s, these can draw some serious current! You’ll need to make sure your 5v power rail is capable of supplying enough current. This is just a matter of doing some quick calcs on the number of LEDs you’re driving and their current draw (typically about 60mA max per LED). From memory I think it should work, but the 3.3v logic high of the Xiao may not be enough for alogic high to the WS2812 driver chips so you will need to check that. You’ll also want to be careful you don’t put 5v through the 3.3v rail by mistake!

Support | Core Electronics