New PicoCalc - Battery Charging

Hi,

Retired systems engineer, just received my new PicoCalc. Only three weeks to receive :+1: .

Was using Thonny with MicroPython and my battery failed. This was just a loose 18650 battery I had laying around, and I thought just a generic battery.

Put a new battery in and continued working with Thonny and decided to swap it out for another battery. After I removed the battery, I checked the voltage - 4.74 volts :worried: . Not good. No wonder the first battery failed. Glad that battery was protected.

I did further testing and found the USB C connector does charge the battery correctly, mine stops at 4.177 volts, but connecting to the mini-usb on the 2040 directly with USB serial when using Thonny or terminal seems to bypass the charging circuit and overcharges the battery. I later noticed the command mm.info(charging) in mmbasic does not indicate charging when using the mini-usb on the 2040, but does when charging with the USB-C.

I started removing the battery for extended Thonny sessions, but I didn’t like constantly opening the battery cover and removing the battery.

What I did was modify the mini USB cable I was using for serial communications by opening the insulation to expose the wires and cut the red wire (+5v). Thonny and serial terminal still work fine and the battery doesn’t overcharge now with the mini-usb on the 2040.

I realize experienced users are probably aware of this, but I haven’t seen any warnings about leaving the batteries in while using the mini-USB serial connection. This little hack eliminates that concern.

I’m really enjoying the PicoCalc and this is the only complaint I have so far - waiting for my 2350 to arrive - more power :grin: .

1 Like

If you are using the USB on your Pico (or like) itself it will leak current back into the PicoCalc in such a way as to bypass the PicoCalc’s limiting circuit. This is a known issue with the PicoCalc and the main ways around it are to either remove your batteries before you power your Pico directly from USB or do what you did and modify your USB cable to disconnect the +5V.

Thanks for confirming this. I was wondering if something was wrong with my PicoCalc. I was mildly shocked when I checked the battery and the votage was almost 4.8 volts. I thought I had read somewhere several weeks ago about removing the batteries, but couldn’t find it again.

Interesting… I’ve just checked mine as I have 2 USB cables plugged into it and have had it that way for a week or so… The Batteries are sitting at 4.17v which is fine.

It’s a Pimoroni Pico 2 Plus W device. Pico USB (usb-c) for flashing, motherboard USB is for serial.

I even checked during a flashing operation and it stayed at 4.17.

Is this is a Pico1 vs Pico2 thing?

-Gordon

Oof. I was arguing pretty strongly against this being a problem, and all my testing seemed to confirm my conclusions (I was seeing zero current flow in the bad state no matter what I did), but I can’t argue against someone seeing their picocalc actively overcharge a cell. There’s probably some particular combination of things that makes it happen that I wasn’t hitting.

This is a flaw with the charging infrastructure of the picocalc (it doesn’t matter what pico you use)- plugging the pico’s usb port into power bypasses the charging circuitry and is connected directly to the cells. I don’t know if it’s only when the picocalc is on or any time the pico is externally powered, but it’s best to assume it’s always.

If you need a permanent connection to the pico’s usb port, consider modifying a spare usb cable to cut the power wire, so only the data and ground pins are connected.

Unfortunately that is partially incorrect.

The USB-C port connects to the AXP2101 VBUS_IN pin.
The batteries connect to the APX2101 VBAT pin.
The APX2101 supplies power to the PICO VSYS pin from the APX2101 IPS pin which is routed through U102 (W[A]S4603 power distribution switch IC).
(see clockwork_Mainboard_V2.0_Schematic.pdf)

Pico VBUS is the 5V input from the micro-USB port, which is fed through a Schottky diode to generate VSYS. The VBUS to VSYS diode (D1) adds flexibility by allowing power ORing of different supplies into VSYS.
see Raspberry Pi Pico Datasheet

The above implies that the Pico can be powered from VBUS (microUSB) and VSYS (W[A]S4603). But the battery can only be charged through U101 (AXP2101) because there is not direct connection to the USB ports.

The keyboard/display/SD card/onboard PSRAM are powered by the AXP2101 which is the reason why you can not power the Picocalc using only the micro USB port.

3 Likes

@ernst Is there a risk of overcharging the batteries if the picocalc microUSB is left connected too long?

No. The batteries are managed by the AXP2101, there is no direct electrical connection from the batteries to the pico (not picocalc) microUSB. Also there no direct electrical connection from the USB C to the batteries.

The AXP2101 power management IC is used supply power to the STM32 (BIOS) and all onboard peripherals from the batteries which are charged when power is supplied to the AXP2101 from the USB C port.

2 Likes

I did a few more checks on mine and I’m happy it’s doing the right thing.

Batteries in & Charged and they’re sitting at 4.17/4.18v.

Current - there is an initial ā€œsurgeā€ (if you can call it that!) of between 4-5mA when I first connect up a battery then, as it’s charged, it settles down to 0.1mA or less.

So right now, for development while I have both USBs connected I’m happy that the batteries and charging mechanics are doing the right thing.

-Gordon

Unfortunately that is partially incorrect.

No, I was talking in general terms. I know how the hardware is connected, but that’s not useful for a layperson.

The problem is that while you and I are seeing no problems with connecting Pico VBUS, occasionally we’re getting these reports of cell overcharging. Sure, there’s no ā€œdirectā€ electrical connection between the two, but it critically depends on the AXP2101 reverse current protection activating, and so there’s a risk that when it doesn’t that the cells could be charged uncontrolled by the AXP. Perhaps it’s fine when the AXP is already switched on by the system, but the Picocalc can absolutely get into odd configurations where external power is making the Pico run, but the stm32 thinks it’s turned the system off. I did try to hit these edge cases in my testing, but it was haphazard at best.

1 Like

I experienced this same over charging issue when doing some development with the USB plugged into the Pico. Happy to know it’s a known issue with solutions being shared. Fortunately, I noticed at 4.46V.

Now I just run 2 USB cables when doing development, leaving the batteries out.