Issue:
After my tracker has been running out of battery, I resurrect it by applying USB power and wait for it to prompt something to the serial monitor.
The status LED pulses white (indicating turned off cellular connection?) but nothing is printed on the serial monitor.
Pressing the reset button brings it back to normal operation but on the packaged version installed in a vehicle I don't have access to the port.
It seems like no code is being executed and that's why I don't where to look for errors in the code.
Expected result:
The tracker should start up normally after power is applied, even if the battery was discharged. It should behave like coming out of shipping mode. Also, the serial monitor should prompt messages saying in which state it is since I cannot debug in the unknown state.
Info:
I am running firmware V119 and DeviceOS 5.3.2 on a Tracker One T524M.
The infite loop is in file deviceOS/5.3.2/system/src/system_power_manager.cpp in line 942.
It contains a CONCURRENT_WAIT_FOREVER constant that halts the queue action until it's done, which isn't the case: os_queue_put(queue_, (const void*)&ev, CONCURRENT_WAIT_FOREVER, nullptr);
The entire function is called PowerManager::setConfig() and starts in line 937.
int PowerManager::setConfig(const hal_power_config* conf) {
int ret = hal_power_store_config(conf, nullptr);
if (isRunning()) {
// Power manager is already running, ask it to reload the config
Event ev = Event::ReloadConfig;
os_queue_put(queue_, (const void*)&ev, CONCURRENT_WAIT_FOREVER, nullptr);
}
return ret;
}
I exchanged the constant with a smaller number 10000u which worked in my case. However I could need some explanation what is going on here and if this is an actual bug that needs reporting.
Thanks so much for helping out on this one, I was expecting a protection mechanism in implemented in the deviceOS in case the battery is depleted.
In the meantime, I implemented a workaround that puts the device in shipping mode when FuelGauge::getSoC() falls below 1% and gracefully shut down the modem at 5%. I believe I couldn't drain the battery fully since the device doesn't draw measurable amounts of current in shipping mode. I'll let it sit and turn it off in a couple of days.
Thank you for checking in! I read your post on my research but the fact that the voltage drops to below 1% was indication enough for me to realize that this mechanism isn't working.
Meanwhile I was recommended to switch from deviceOS 5.3.2 to deviceOS 4.1.0 since it's the long-term-support deviceOS for the Tracker One. I will update this post, if this helps in any way.
Update
I performed the fallback to deviceOS 4.1.0 and tracker-edge v18.
Unfortunately the issue persists. The device won't power down when falling below 2% (as this is the setting in tracker.cpp.
I tried "simulating" the battery by connecting a laboratory power supply to the battery pins and dialed the voltage down. However, the device keeps restarting as if it's not getting continuous power. A 100nF capacitor between GND and LI+ for buffering didn't help.
My hope was to manually dial down the voltage until it reaches the threshold of 2% where I would register the device shutdown. If you have any suggestions for trying this, please let me know.
Maybe I didn't express myself in the best possible way.
I am expecting that the device turns off automatically (shipping mode) when a certain threshold of battery charge is reached. It would be even better if it disconnects gracefully from the Particle cloud and then shuts down.
Just having an alarm is not sufficient and doesn't protect the battery. Since the Tracker is not waking up properly after battery depletion.
Is that working on your side or is it just an alarm that you can set and react to by entering shipping mode on your own?
Hey, it is working on my side, the device entered shipping mode on my tests. I remember testing this with 70% (fast test) and 10% values (real-life test).
I am starting again a 10% test to double-check what I have observed in the past.
I provided the batt_warn info for information only.
I am using the internal battery that comes with the tracker one.
I do not make the tracker one enter shipping mode on my firmware, it goes there by itself.
Maybe one percent is too low for this to work? Maybe you can try with 10% just for fun? I would also set the warning to 20%, again, only for this test.
Hi Johannes,
my test finished with a pass.
As you can see the device went offline (into shipping mode) right after reporting 10.54%. I set the limit to 10% and is using a somewhat old battery:
IMHO, many of the % SOC numbers being discussed are very optimistic with Lithium Chemistries.
Even "IF" the SOC Estimate was accurate to within a couple Percentage Points on the bench, that's unlikely to happen in real world applications. Temperature changes alone will cause voltage swings way outside the SOC accuracies of 1-2%, in my experience. I assume most people wont use a Tracker in an indoor temperature controlled environment.
I would expect the Device could easily enter a continuous BrownOut Loop at these voltage levels when you consider the battery's actual performance curve (available AMPs vs Volts at the end of the discharge curve). And this curve changes with the age and any abuse of the battery. It's only "new" for the first cycle.
Wouldn't 20-30% SOC be a better threshold to start making decisions for power savings?
Possibly consider shipping mode at 10% ?
Even that seems optimistic with any decent amount of time in the wild, and given the SOC is only an estimate.