I have a few Electrons running DeviceOS 1.4.4.
They go to sleep (stop mode) and wake up every minute. I’ve been using this setup successfully for some time now. Upon waking up they read the battery soc to determine which power mode to use.
Since DeviceOS 1.5.0 it appears that the fuel gauge is always put to sleep. This prevents the soc from updating. Some workarounds I’ve read about is to call fuel.wakeup() and then a delay of at least 500 ms. This seems like a waste of power.
Is there any way to use sleep with DeviceOS 1.5.0 or later and not put the fuel gauge to sleep? If not this seems like a major flaw which means I’m stuck on 1.4.4. In previous DeviceOS versions you had SLEEP_MODE_SOFTPOWEROFF which also put the fuel gauge to sleep if you wanted that option.
Not a direct answer to your question, but what are you doing every minute?
Do you really anticipate that the SoC changes very rapidly over the course of a single minute?
When you do fuel.wakeup() with a subsequent 500ms delay (which you could use to do the actual work you want done) only every 15 minutes I’d guess the power loss would be greatly reduced without really losing that much of SoC accuracy.
If power usage is a concern then switching off/sleeping the fuel gauge will contribute to that cause.
Sure there should be a fine grained way to tell the system what you want on or off during the sleep period (not saying there isn’t already) but having a single default always means compromises.
When stats of thousands of devices show that “most” sleepy devices sleep for longer periods and hence it would be beneficial to this majority to facilitate the extra saving by defaulting to sleeping the fuel gauge while still allowing the other (short sleeping) devices to keep it awake (which I haven’t investigated how to) or wake it when needed, it makes sense to me.
Maybe @rickkas7 or other members have some idea how to keep the fuel gauge awake for short Stop Sleep periods (in the new, upcoming sleep mode feature - currently we still are in the transitioning phase, so not all planned features may be available yet, but that doesn’t mean they won’t come).
I’ve found another reason why I would like to keep the fuel gauge awake. When low SoC is detected, an Electron is usually put in deep sleep. If the battery is recharged while the device is asleep it could take really long for the fuel gauge to realize that the battery is full because it is only on for a really short time.