I just realized a slight issue with 1.5.1 concerning my post directly above this one.
I set the max charging current to 1024 mA with conf.batteryChargeCurrent(1024)
.
System Power Manager didn’t obey this setting, since the “mostly” discharged Li-Po (at 3.8V resting, 5,000 mAh rated) was being charged at 1450 mA (40% higher than setpoint) for a considerable amount of time until the CV portion of the charge profile.
Relevant Code from link:
STARTUP( selectMode() );
void selectMode() {
// (1) API MODE
if (myTestMode == 1) {
conf.powerSourceMaxCurrent(900)
.powerSourceMinVoltage(5080)
.batteryChargeCurrent(1024)
.batteryChargeVoltage(4208)
.feature(SystemPowerFeature::PMIC_DETECTION)
.feature(SystemPowerFeature::USE_VIN_SETTINGS_WITH_USB_HOST) ;
System.setPowerConfiguration(conf);
}
The Power Source was the 2W Voltaic Solar Panel on the Boron USB connector.
Charging Current was measured by INA219 feather from the (+) Li-Po conductor.
I love the higher charging current, but this could be a problem for someone using smaller capacity Li-Po’s (charging at a much higher rate than the API setpoint). Mainly, I wonder what I’ve done wrong for the API settings to not be obeyed.
The Good News on 1.5.1 using the new API:
-
Disabling Charging by calling ``pmic.disableCharging();` (button “B”) appears to work 100% of the time. Tested fine throughout the entire Voltage Range of the Charging Cycle.
-
Re-Enable Charging (button “C”) seems to work ~95% of the time. I haven’t collected enough data to characterize the conditions when this fails. But when it does fail to resume charging, calling pmic.enableCharging();
once or twice More (button “C”) seems to work. That makes me think that locking the PMIC call (per other forum posts) may be the answer when using the new API.
However- the ~5% “failure” has only appeared towards the end of the Charging Profile, although all conditions to allow charging are met (as far as I know). When this “failure” occurs, I can briefly cover the Solar Panel to force a Li-Po Source ONLY, and the Boron will usually resume charging when the Panel begins producing current again. So there’s a good chance the PMIC is operating correctly and I’m just forgetting something from the datasheet that happens towards the end of the charge profile. I’m leaning towards this not actually being a bug/issue.
I haven’t been able to reproduce the charging issues others have mentioned with 1.5.x.
Since my test rig is running Manual Mode (no modem) and no Sleep, those problems are likely related to how the PMIC is managed by the System Power Manager during/after Sleep events ?
Even if the Modem gets in a funny power state, that shouldn’t impact the PMIC performance.
The only issue in regards to Solar Charging on 1.5.1 (without SLEEP) that I’ve seen so far is the charging current can be higher than the API set-point when using a Solar Panel (current producing) during DPDM operation (vary the Current to maintain min V across Panel) while charging a “discharged” Li-Po during the CC (Constant Current) phase of the PMIC’s charge profile. That’s a pretty specific circumstance that’s easily mitigated by proper Panel and Li-Po selection.
[EDIT] - I spoke too soon. The API wont obey the charge termination voltage, in my code .
Charging stops at 4.10 - 4.11 V even with my .batteryChargeVoltage(4208)
call in a Startup Macro. The Boron still operates at the default 4112 mV setting.
The call for .powerSourceMinVoltage(5080)
does work perfectly when using the USB Connector with my Startup Macro. The PMIC maintains the current to prevent the Panel Voltage from collapsing. The 5080 setting could just be persisting from previous User Firmware Flashes ?
But the other (3) parameters are having problems for me:
- .powerSourceMaxCurrent(900)
- .batteryChargeCurrent(1024)
- .batteryChargeVoltage(4208)
So I removed .feature(SystemPowerFeature::USE_VIN_SETTINGS_WITH_USB_HOST) ;
which could likely be the culprit. No Luck.
I also tried to restore the default configuration prior to making Changes. No Luck
void selectMode() {
// (1) API MODE
// Added 05/10/20
System.setPowerConfiguration(SystemPowerConfiguration()); // To restore the default configuration before making changes
if (myTestMode == 1) {
conf.powerSourceMaxCurrent(900)
.powerSourceMinVoltage(5080)
.batteryChargeCurrent(1024)
.batteryChargeVoltage(4208)
.feature(SystemPowerFeature::PMIC_DETECTION)
// .feature(SystemPowerFeature::USE_VIN_SETTINGS_WITH_USB_HOST) ; // removed 05/10/20
;
System.setPowerConfiguration(conf);
}
I now realize that my previous charging results are Invalid due to using the USE_VIN_SETTINGS_WITH_USB_HOST
feature, but I must still be missing something important with the New API calls.
Any Suggestions ?