Here are some test results:
First, the 1.2W (200mA) panel under LED light bar in the lab:
I’ve noticed that when I call STARTUP(batt_settings());
, I get varying results. For example, the following code was called in STARTUP
void batt_settings(){
conf.powerSourceMaxCurrent(900) // for P123 !!!!Charge light turns on under LED bench light conditions.
.powerSourceMinVoltage(5080) // 5.080v
.batteryChargeCurrent(1024) // default is 2048mA (011000) = 512mA+1024mA+512mA)
.batteryChargeVoltage(4112); // default is 4.112V termination voltage
//.feature(SystemPowerFeature::USE_VIN_SETTINGS_WITH_USB_HOST);
System.setPowerConfiguration(conf); // retains these
}
but basically half of the time I would get this reading, like the code just wasn’t kicking in:
Sometimes (but not every time) when I would pull the panel away from the light source, and then put it back, the charge light would come on and I would get this reading:
which is interesting because the code called for
.powerSourceMinVoltage(5080)
. The previous program uploaded to the device WAS calling
.powerSourceMinVoltage(4840)
, but this reading was 100% taken with the program that called
.powerSourceMinVoltage(5080)
. After uploading the program again, I had the same issue where when it did work, it wasn’t hitting the 5.080v that it was suppose to. idk what happened here, but its not the main issue so I’m not too focused on it right now.
When I started calling batt_settings();
from void setup()
, this error did not occur (and the voltage went back to 5.080 like it should).
So this may have been my problem in the original post, that the device seems very picky/ finicky when the power settings are called in STARTUP
. I don’t know how this is even possible, more likely I’m doing something weird.
Now, here are the results from the panels outside in full sun.
This is still the same code. But now outside, I test both the 0.6W panel, and the 1.2W.
With the 0.6W panel, here is what is looks like with the batt_settings();
code called in void setup()
:
With the 1.2W panel, here is what is looks like with the batt_settings();
code called in void setup()
:
In both cases, the charge light is on, and after a while I can actually see the battery voltage increase. So it is in fact charging.
Now, when the code is changed to call STARTUP(batt_settings());
, when batt_settings();
is no longer in void setup()
, here is what I get with both panels SOMETIMES:
This is the same error experienced in the lab setting. The device is picky on which power source was plugged in first.
Panel first, then battery: error condition.
Battery first, then panel: works perfect.
In both his these cases, when batt_settings();
is called in void setup()
, I can do any permutation of disconnecting the battery and the solar panel, and it never has a fault.
I was originally calling batt_settings();
in STARTUP
because my devices were using the EN pin to sleep, and this seemed necessary back in deviceOS1.5.2/4.
Does it make sense to anybody how calling the power settings in STARTUP
could have these weird effects?