I’ve got a Boron running on the 1.4.2 firmware and I’m having some weird charing issues. Intermittently it will say “discharging” and stop charging the device, and then run the battery down to 0. If I unplug the battery and the device from power, then power it back up, then plug the battery in, it will operate normally for awhile, but the problem seems to recur. I’ve seen this happen on two devices running 1.4.2. Sometimes it will say not_charging, other times it will say discharging. If there’s no battery attached it never has a problem. Here’s a screenshot of the history I downloaded:
I’m using a 5V / 2 Amp power supply wired directly to the VUSB pins, so there’s plenty of current available. I’m going to triple check the input voltages etc, but curious to know what’s going on as I’m about to begin deploying these in a larger-scale pilot project.
seems like I’m only able to reach 97% charged (at least that’s what the particle is reporting). I’ve tried both a 5V adapter wired to the VUSB pins, as well as a USB power supply, and the behavior is the same.
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.
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.
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?
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:
I am power using a 5V 1.5A power supply through the VIN pin.
I use the EN pin to shut the device off using a switch
I’m using one of your LiPo batteries
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
this code suggested in the other thread didn’t fix the problem:
void setup() {
detachInterrupt(LOW_BAT_UC);
// Delay for up to two system power manager loop invocations
delay(2000);
// Change PMIC settings
PMIC pmic;
pmic.setInputVoltageLimit(4640);
pmic.setInputCurrentLimit();
}
and I found a kinda sorta workaround though I don’t know what the fix is…
void setup() {
detachInterrupt(LOW_BAT_UC);
// Delay for up to two system power manager loop invocations
delay(2000);
// Change PMIC settings
PMIC pmic;
pmic.begin();
pmic.setInputVoltageLimit(4360); // for 5V input
pmic.setChargeVoltage(3850); // Set Li-Po charge termination voltage to 3.850V
pmic.enableDPDM();
pmic.enableBuck(); // enableBuck required when using EN Pin Shutdown ??.
pmic.enableCharging();
}
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.
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?
If this feels like amatuer hour please bear with me, my expertise isn’t programming MCUs like many of you…
I picked 3.85V cause I googled charge voltage for Lipo batteries and that seemed to be a recommended voltage setting.
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
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…
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.
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. .
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.
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
//delay(2000);
// 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.