Boron 1.4.2 battery charging issue

This is common with Lithium batteries. The device actually only charges to about 85% to prevent overcharging, and adjusts the value in the console. If the battery is old and/or has been fully discharged, over time it will hold less charge than when it was new.


Particle ruined the Boron charging code in recent update; please see at least two recent threads about this.

Thanks for all the replies. @Paul_M I’ve looked through a couple of those threads. Might need to do it manually to achieve the reliability we need, but unfortunately the documentation is lacking for the PMIC side of things. I’ve got a ticket in, we’ll see what that yields. I’m rapidly headed towards an enterprise deployment, so I’ll be looking for fixes in the next couple of weeks.

Hi @aklein24, thanks for posting this (and for opening up a support ticket referencing this post).

First, @picsil’s answer is correct re: max charge reporting.

Regarding the inconsistencies above, I will return here and in our ticket for an update.

1 Like

Sorry for late responses, I hadn’t thought about this much for awhile because I hadn’t seen any issues with my devices lately. Well, deployed another 1.4.2 Boron and it’s on VIN power (5V) and a LiPo battery and it drained the battery down and is now offline.


I’m reading through this thread:

and there’s a couple of fixes suggested, but they are specific to the solar charging use case. For this specific case (5V VIN) what settings do I need to adjust to prevent this problem?

1 Like

Is our response here (below) not relevant? I don’t believe it’s confined entirely to solar cell use cases:

potentially? I’m having a hard time deciphering what exactly I need to do to fix the issue, I’ve read all those posts and I can’t figure out exactly what to do. My devices are on 5V power all the time, and I haven’t touched any PMIC settings, so I’m not sure why it decides to drain the battery down and die…

alright, I’ve troubleshot a little more, and I’ll give a little more thorough background:

  1. I am power using a 5V 1.5A power supply through the VIN pin.
  2. I use the EN pin to shut the device off using a switch
  3. I’m using one of your LiPo batteries
  4. if I shut the device off using EN, while the device is on battery power, it will not begin charging again unless I unhook the battery while the device is unhooked from power, power it back on, then reattach the battery
  5. this code suggested in the other thread didn’t fix the problem:
void setup() {
    // Delay for up to two system power manager loop invocations
    // Change PMIC settings
    PMIC pmic;
1 Like

and I found a kinda sorta workaround though I don’t know what the fix is…

void setup() {
  // Delay for up to two system power manager loop invocations
  // Change PMIC settings
  PMIC pmic;
  pmic.setInputVoltageLimit(4360);  //  for 5V input
  pmic.setChargeVoltage(3850);      //  Set Li-Po charge termination voltage to 3.850V
  pmic.enableBuck();                //  enableBuck required when using EN Pin Shutdown ??.


something in there seems to have fixed it but I really don’t care at this point, battery is charging.

I was about to tell you that’s not the normal case, until I tried it myself.
Confirmed with my Borons on 1.4.2.

I would have expected the PMIC to restart it’s routine (source qualification, etc, etc) but apparently not.

Just curious why/how you landed on 3.85V as the setting for max charge for the Li-Po pmic.setChargeVoltage(3850). We should take another look at the PMIC datasheet, as it may explain your findings.

[Edit] : I just noticed your Post #13 didn’t contain pmic.begin(); before you made your PMIC changes .

@aklein24 , I decided to reproduce your findings for documentation.
I can reproduce using a USB port from a Computer.
I can not reproduce using a 5V power supply with micro USB connector.

To Break (with USB cable/port):
Li-Po @ 3.81 V
USB cable/computer port (4.95V no load) to Boron USB connector, Boron begins charging Li-Po @ 440 mA, 4.05 V measured on Li-Po Pin.
Remove USB Port power source, Li-Po now powers Boron.
Ground EN pin causing a Shutdown.
Re-attach 4.95V USB port power source = nothing happens, no recharging.
Un-Ground the EN Pin, Boron Boots normally but will not resume Li-Po charging, no matter what.

The same test with a 5V power supply on the Boron’s USB connector works properly and will resume charging under the same test.

A year ago, Boron’s had no trouble recharging Li-Po’s during and after an EN Pin Shutdown (my Trial #1), but that was older hardware and firmware.

Since any PMIC calls in setup() are performed after an EN pin shutdown, something fishy is going on.

My first guess involves the D+/D- data lines, since that’s the major difference between my (2) quick tests. But that would point to the PMIC retaining some phantom power source (board capacitance ?) when the only voltage source is the Li-Po during a EN pin shutdown. That might explain why the PMIC never attempts to re-qualify the source after EN pin shutdown when Vusb wasn’t available. But if so, that should have also been the case a year ago when my Borons had no trouble.

This may also be related to how Boron’s on Utility Power could have a quick interruption of power and never again maintain the Li-Po.

@marekparticle, care to take a swing?

Could USB power negotiation during bootup/enumeration be a contributing factor.
Per USB specs devices should start off in low power mode (<100mA) and may only get more after asking for that.
Dedicated USB charging ports will typically supply more current even without negotiation.

@oddwires1 - would you be willing to engage with the above potential workarounds and requests for information regarding the PMIC issue you addressed elsewhere?

@avtolstoy Can you take a look at this note stream. Not sure it relates to previous PMIC issue. Thanks, Ian.

If this feels like amatuer hour please bear with me, my expertise isn’t programming MCUs like many of you…

  1. I picked 3.85V cause I googled charge voltage for Lipo batteries and that seemed to be a recommended voltage setting.
  2. yeah I forgot to put pmic.begin() 'cause the code snippets didn’t mention it in the other threads and the PMIC documentation is terrible / doesn’t exist
  3. I should probably look at the datasheet but I’m in the midst of deploying monitors to farms right now so I’m pretty crunched for time…
  4. PMIC doesn’t seem to restart unless I put the lines of code I referenced up there in it. I’m gonna trial and error it to see what works.

posted in the wrong thread, reposting here… but TL;DR gotta re-enable buck if you disconnect from VIN while EN is low/device is off because of EN pin.

  1. as far as I can tell, if you remove power from the boron (when it’s powered via VIN) while EN is pulled low (device “off”) and then plug it back in, it won’t resume charging while EN is still low. .
  2. this behavior seems intermittently different if you use the actual usb port, though I’m not sure if it’s a voltage thing or what yet, haven’t gotten out the multi-meter yet.
  3. I went one by one through the lines of code, and to get VIN power to recover it seems like all you need is pmic.enableBuck();:
void setup() {
  //detachInterrupt(LOW_BAT_UC); //(2) / doesn't matter, don't seem to need.
  // Delay for up to two system power manager loop invocations
  // Change PMIC settings
  PMIC pmic; // yes need
  //pmic.begin(); //don't need...
  //pmic.setInputVoltageLimit(4360);  //  for 5V vin... also doesn't seem to matter? though the charge soure/status seemed weird...
  //pmic.setChargeVoltage(3850);      //  Set Li-Po charge termination voltage to 3.85V also doesn't seem to matter...
  //pmic.enableDPDM();  //doesn't seem to matter?
  pmic.enableBuck();                //  enableBuck required when using EN Pin Shutdown -> need this line!
  //pmic.enableCharging(); //not this setting alone, but not sure if I'm charging the battery, but at least VIN recovers

So seems like the buck gets disabled if EN pin is pulled down / device is off, so then it’s on Lipo only until you re-enable the buck? I’m guessing tho since the docs don’t speak to this. Looks like I’m gonna have to dig into the .cpp files but it’s late so that will have to wait.

So any resolution on this? I think I’ve found the fix for my devices for now, but are you planning on rolling anything into some of the upcoming firmware releases?

Yeah, I am waiting for this disaster to be fixed as well. Currently dying to be able to use Boron in the 6w Solar + 3.7v LiPo use case but I need to be able to enable and disable charging based on temperature 32f+/- readings. Currently seems like such a confusing nightmare with all these changes, problems, experiments, half-fixes, etc that I am just waiting for Particle to communicate about this.



Is there a solution for this yet? I am using firmware 1.4.4. on a Boron 3g unit and I am experiencing the same issue. The pmic.enableBuck(); appears to work once. Here is my test method:

  1. Power on the Boron 3g with VIN powered at 5 volts.
  2. Ensure that pmic.enableBuck(); is called.
  3. Remove power from VIN.
  4. Take the EN pin low
  5. Reattach 5 volt power to VIN.
  6. Charging works!
  7. Remove power from VIN again.
  8. Reattach 5 volt power to VIN again.
  9. Charging does NOT work!

Is there a solution?

Thank you.

  • Chris

@happicow, It appears 1.5.0-rc1 fixed the issue, and added a clean API (SystemPowerConfiguration).
Although I didn’t test it with a 3G Boron, here’s a sample link with a few results.