@Wizzy38952 I don't know what the "bruce firmware" is, but here is one possibility. The API for the P2 can't tell you if it's plugged in or if it's charging, so possibly whatever application you are running is deciding to shut down after a few seconds to save battery (even if it's plugged in, because the application doesn't know that).
Latest posts made by wjcarpenter
-
RE: M5 stick Plus 2 turns off after a few second
-
how does the M5SticC-Plus2 charge its battery?
I am curious about this. I see from the documentation that the P2 removed the AXP192 power management chip that previous sticks have. (And also, alas, the APIs for knowing if the device is plugged in and whether it's charging, but that's not my question.)
My question is, how is the charging of the battery managed? I tried figuring it out from the schematic on that documentation page, but I came away still wondering. I figured out from noodling around that the measurement of the battery voltage still works on the P2, so I guess that's part of it. But managing the charging of a lithium ion battery seems kind of complicated.
Is the P2 going to catch fire in my hand someday? :-)
-
RE: Unexpected Vbus readings for M5StickC-Plus
@ajb2k3 Thanks for the reply. Maybe I'm misunderstanding what the Vbus is supposed to be. I thought it was the power coming in from the USB port. Even if there is a trickle of stuff draining the battery, there shouldn't be any input from USB. I suppose something is just leaking over somehow.
-
RE: Unexpected Vbus readings for M5StickC-Plus
Perhaps I should mention what I was doing before porting to the M5Unified API. I was using the M5.Axp API to read the input power status register and decoding it. That told me directly what I wanted to know, but it doesn't seem to be available in the current iteration of the M5Unified API.
-
Unexpected Vbus readings for M5StickC-Plus
I came across a mystery (well, at least a mystery to me) while porting some code to the M5Unified API. In trying to see if the USB power was unplugged, I came across the undocumented M5.Power.getVBUSVoltage() method. In following the source code all they way down, I can see that it's reading the VBus voltage from the AXP192 and then scaling it to return a value in millivolts.
I expected to be able to compare that result against 0 to decide if the USB cable was plugged in. When it is plugged in, I get readings a little above 5000 mV. However, when the cable is unplugged, I get readings around 830 mV. That's with the internal battery nearly fully charged. I don't know if the unplugged reading changes with the internal battery charge or with the M5StickC-Plus workload or whatever.
As a workaround, I'm comparing against 2000 mV instead of 0 mV to decide if the device is unplugged.
Where do those 830 mV come from?
-
RE: M5StickC &18650C Hat
@ckuehnel Did you ever figure this out? I just got my 18650 hat. I took it apart and also don't see any control circuitry. I'm now guessing that the USB connector on the hat simply feeds into the 5V input of the M5StickC, and the AXP192 inside the M5StickC controls the charge of the 18650 cell. There is some info in the AXP192 data sheet about a back-up battery, but it's been a while since I read it, and I'm not sure it's relevant.
One interesting thing ... I'm working on a project where I turn the display off after a few seconds if the M5StickC is not plugged in. Either by shrewd design or by my dumb luck, that works when the M5StickC is on the hat. ("It works" means the display turns off after a few seconds.)