Boron Power Questions

I have a battery powered Boron LTE running OS 1.5.2 that wakes up hourly to do some work. Each sleep cycle completes with a System.reset(). Sometime during the sleep cycle the Boron might be connected to a USB power source by a person who determines that the battery needs to be charged. However the Boron never senses the USB power supply and continues to faithfully run until the battery fails. Our recourse (instructions to person) are, before connecting the USB source turn the boron off (we have a switch built into the battery line), connect the USB, turn it back on. The preference would be to auto-detect the USB source without having to completely cut power and recycle the Boron.

Question: My PMIC power object is currently defined as a global variable. Is it possible that constructing this object in setup() or loop() would force the detection of USB?

Question: is an explicit PMIC.begin() necessary. My code currently does not call it.

Question: is there a downside (power consumption) if charging is always enabled? I don’t leave it enabled at present.

Thanks,
Tim

Hi Tim,

There is a bug where if a device is sleeping, the PMIC won’t detect the USB power source.
It’s been fixed and I would highly recommend you to move to Device OS 2.0.1. (2.x is our LTS branch)

I would also encourage you to use the new Power Manager and not the old PMIC API. It is still useful if you need to en-disable charging, but a future update in the 3.x development branch will roll that into the Power Manager as well.
Please note that for the PMIC API calls not to be overridden by the power manager, you need to lock it’s thread by calling it as follows:

PMIC pmic(true);
pmic.disableCharging();

If the device is powered from USB or VUSB it will always consume more power than when powered from Li+. The PMIC does not fully shut down in this state. The PMIC will prioritise pulling power from the USB source and charge the battery as needed.

1 Like

@no1089 - Is there a way to detect that power is applied and "wake-up" the Boron when the PMIC begins charging? I suspect I could do this with circuitry and a interrupt PIN but is there any way to do it programmatically? I currently tell a user to turn it off/back on before plugging it in not to enable charging but so then the device knows it is powered up and can "stay awake" for on demand readings and other functions. If they don't they have to wait for the next wake-up period at that point, the device checks if it is powered or not and does not fall back asleep. I'd prefer to be able to just wake up the device right away when power is detected by the PMIC

No, you’d need to wire a voltage divider up to a wake-up pin specified by the sleep API.
While the device is sleeping the NRF52840 is powered down and can’t check with the PMIC which source is available.

@no1089 Thanks so much, I’ve upgraded to Device OS 2.0.1 and that is working!

I also uncovered an issue with the external battery charger that I was testing with. It has “smart technology” so that if no power is being drawn after a few seconds it shuts off, requiring human intervention (button push on side) to wake it up! Here’s the device I was using: https://www.amazon.com/gp/product/B0194WDVHI

So, my boron goes into deep sleep for an hour, wakes up and does a System.reset() along with a few seconds of work, then goes back into deep sleep. Runs for months on built-in battery. During one of the sleep cycles (since 99% of the time it is sleeping), a person periodically hooks an external USB power source to the boron with the intention of recharging the internal battery. This smart power source, if not used within seconds, is quiety going to sleep and will therefore NEVER charge the battery.

The location of the boron prohibits an actual wall-outlet usb charging brick. A piggy-back external usb power source that can be left in place for a day or more until the person can fetch it is idea. Do you know of an alternative charger to the device I referenced above?

Thanks again,
Tim

Does this power brick not wake up when it detects a surge in demand?
I’m using a similar one and that does wake in such a manner.

https://www.amazon.com/Charmast-Smallest-Portable-10400mah-Compatible/dp/B07L931FCY/

In case of the device itself is not drawing enough current I added a controllable load to a secondary outlet which I’d switch on for a brief moment to wake the power bank.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.