LiPo battery in Vin

hello, I’m a little confused on the usage of LiPo batteries and I want to ask if I can use a LiPo of 3.7 V of 500 mAh on the Seeeduino Xiao, I read that it used 3.3V or 5V but I’m not sure if need to use a resistance to drop the 3.7V to 3.3V, also I don’t know which tags to use.

2 Likes

The VIN pad on the bottom of the XIAO is connected to the input of the voltage regulator. The regulator is an LDO regulator with a minimum differential of 250mv so you can use a LiPo battery down to ~3.5 volts. Obviously not a complete discharge but depending on your application (i.e. are you using sleep) it could last a long time. Removing the power LED (can make it last a really long time). Obviously you will need a battery charger. Incidentally this is exactly what I will be doing for a kitchen timer that will be sleeping most of the time and awakened with a button.

If you connect the USB cable while the battery is connected to the VIN, the battery will be charged without current control, so you should be careful.

I’m trying to accomplish something similar, would you care to explain a bit more?

Do you mean the battery would get charged over capacity? Is this still true if I use the contact pads on the bottom of the device?

A VIN pad and a VCC pin are connected inside a XIAO, and 5V supplied from PC’s USB port is directly output. Connecting a battery directly here is dangerous because a XIAO does not control charging. There is a possibility that a large charging current will flow, causing the temperature to rise or a battery to be charged above 4.2V.

Cheers for steering me in the right direction.

For anyone wondering I got this working with a TP4056 by wiring the 5v and GND pins out to the VIN and GND respectively on the TP4056 then wiring the OUT+ side to a simple on/off switch and then from there to the 3v3 on the board, and likewise the OUT- to the GND pin on the Xaio. B+ and B- go to your battery connector. Makes for a really handy “safe” rechargeable lipo circuit on one USB port. The on/off switch is optional and the battery will still charge when the Xaio is plugged in via USB. You can also accomplish this without the 5v to the VIN on the TP4056 if you don’t mind using a different port for charging/programming, personally, I just removed the USB port on the TP4056 to save space in my enclosure.

hey defroh, this sounds really awesome and I’m interested in trying to incorporate this also, is there any chance you have a circuit diagram you could share to help us plebes?

EDIT: Perhaps I’m also confused, but when I look at the schematic for the BLE Sense, it seems it already comes with a LiPo battery charging chip:
https://files.seeedstudio.com/wiki/XIAO-BLE/Seeed-XIAO-nRF52840-v1.0-SCH.zip

I’m pretty new to this stuff so any help would be very appreciated.

@elidon Almost certainly the original question was referring to the Xiao M0 (Xiao SAMD21) which does not have a LiPo charging chip, and not the BLE Sense.

@derfoh With your design, when you’re switched on but not charging, you’re feeding the battery output (4.2V if fully charged) into the 3.3v supply- so how does that work? Don’t you need a small convertor to drop the battery output to 3.3v first? Also, is it safe to leave that switch ‘on’ while plugged in and charging? (I’m pretty sure this will cause the TP4056 to malfunction, since it will be supplying power to both the battery AND the Xiao and it won’t be able to detect when the battery is fully charged - which could lead to overcharging it, no?)

hi, to continue this thread, i too want to power a Xiao directly from a 3.7v 18650 battery. I understand that with the 18650 battery attached to the Vin and ground on the Xiao, and then also the usb plugged in, the 5V from the USB can be fed directly to the battery, which can be solved by putting a diode between the battery + and the Vin , to prevent the USB 5v from forcing itself into the battery?
Just for clarity the Xiao Vin can take a voltage range from 3-5v?
ALso when using a seperate charging module to charge the 18650 battery, is there any way to still power the Xiao while it is charging the battery…?

many thanks

paul

Hello, I don’t know if this connection works but I’m about to try it. The objetive is to power the XIAO by Battery and programming it wwithout disconnect the battery

Adafruit’s Powerboost 500 appears to have an EN pin to shut down the output. Why not use the EN terminal when connecting to USB for programming?

yes, it’s true, the powerboost has the EN pin, but as I said in my post, the idea is to do it without a manual switch.
In the event that XIAO does not support 5v and USB at the same time, I would try to do it using MOSFETs, but I must first know if XIAO supports 5v and USB at the same time, I only have one XIAO and I don’t want to damage it. thanks for your answer

On a XIAO SAMD21, USB5V is connected directly to a 5V pin, so connecting the Powerboost to a 5V pin can cause problems. The Powerboost output is set to 5.2V, generally USB5V voltage is lower than 5.2V, so current will flow from the Powerboost toward a PC (especially if a PC is turned off).

“XIAO BLE Sense” schematic may be helpful.