Battery charge on XIAO Esp32-C3 not working as expected

Hello, I have been testing a XIAO EspC3 with a LiIon (BL-5C common Noka) battery and can’t explain what I am seeing.

First, the switch from USB power to battery power does seem to be working as expected - when it’s plugged into USB it works fine, and when I unplug with the battery attached, the lights on associated sensors don’t flash (haven’t been able to check if wifi stays connected etc yet).

However, I measured the charging current to the battery and have yet to see any current greater than 330uA - a small fraction of the already unexpectedly small 40mA claimed by the board. I ran the battery down to 3.5V on the device and did see small increases in charge current, but, again at the uA level.

1.5 hours after the 3.5v measurement, the battery died completely - I measured 0 volts on its terminals. I was expecting the built in charger to cut off below a certain voltage and shut down. The device and sensor together are consuming ~475uA.

So the charger does not cut off the battery at too low of a charge and doesn’t actually charge the battery in any material way - is there something I’m missing? Does this function relate at all to the code on the device? I thought the charging was a hardware function, especially given the threads indicating that there’s no way to measure battery charge from the ESP on the pins for this product.

I think this battery has a power minder circuit inside, it’s possible that it’s somehow incompatible with the charging on the XIAO. I do recall that the description of the XIAO indicates it should work with LiIon batteries.

Would love some help - am working on this for a holiday gift :slight_smile:

Mybe the charge controller is BQ25101 and the charge current is set to 50mA and cannot be changed. I think the datasheet will give you the information you need.

I don’t understand this comment. At the moment I’m not trying to change the charge current (but I would like to, since 50mA is too low)

But just with the battery attached to the charge pads, there is almost non current flowing from the charge circuit. Only 350uA maximum. That won’t charge anything really.

Is there any firmware needed to make the charge circuit work, or other pull up or down resisters needed?

Since the schematic is not publicly available, I will comment based on the schematic I have previously seen unofficially.
The charge controller was listed as BQ25100, but I believe it is BQ25101 as a LED is connected. The current setting resistor was 2.7k and 50mA was set. No pins were controlled by the firmware.

I imagine that if you try to charge a battery with a protection circuit, a battery’s protection circuit blocks. Have you tried with a battery without protection circuit?

[edit]

I have not yet tried that, but I think every lipo battery will also have a protection circuit, so I didn’t see why this would be different, but I haven’t seen others complaining about it, so I will certainly try lipos, thanks!

I am measuring the charging current with a 3.7V 2000mAh battery without protection circuit. Starting at 4.1V 370mA, the current gradually decreases and now it is still charging at 110mA. Maybe I am mistaken and the charge controller is not BQ25101 but an IC like MCP73831.
I will post the results.

[EDIT]
see the link bellow

I just took the battery minder circuit off of my BL-5C battery and was able to charge it with the XIAO ESPC3. It seems to be several components, probably to limit the voltage to 3.7 volts, but I could not measure any change in resistance on the third pin with temperature, so I thought there was a thermistor in there, but maybe not.

Like you, I also see ~400mA coming initially from the charger, then it gradually lowers as expected. Still it’s at 150mA at this time, so I assume it will drop to 50 or cut off when the voltage gets to a certain point. This particular battery is not hot during the beginning or any time in the charging so looks pretty good so far. I am interested though if the circuit on the XIAO will stop pulling power at a certain voltage from the battery so it is not over discharged. The first time I tested the battery on my XIAO I allowed it to run down completely, and I think the battery circuit cut out before the XIAO stopped pulling power. Hopefully the XIAO does not damage the batteries by pulling too much at the end of their charge.

I’m glad you were able to recharge the battery.
I don’t think XIAO has a circuit to prevent over-discharge. The MPU will stop working when the voltage drops, so it shouldn’t discharge completely.

I would like to reply to say that I was incorrect that the BL-5C battery will not charge with it’s minder circuit on… As it turns out I was using my Fluke 116 as the current measure and it actually has a limit of 600uA (I should have remembered this!) This unit has a very high impedance (no fuse) and will happily just ignore the current you attempt to pass through it. I used my cheapo Extech meter instead and observed charging as expected. I actually like these batteries and they seem to be compatible with XIAO. Good luck and thanks msfujino.

1 Like

By looking at the XIAO ESP32-C3 schematic and comparing it to a few battery charger ICs my guess is that the IC is a Torex XC6802. The schematic shows RSEN is 2.7K which would give ISEN =1000/RSEN = 370 mA, which is as msfujino measured.

The BAT pads are on the back of the XIAO which makes surface mount soldering to a mother board tricky. There is also a thermal pad, which I presume is the heat sink for the XC6802. Can anyone suggest how these pads might be soldered to a mother board by hand? My thought was to add vias on the mother board so solder can be applied to the back of the mother board and wick through to the BAT pads and thermal pad.

1 Like

I thought the charge controller was the MCP73831 which is very similar to the XC6802.