Tip 2: Take Advantage of Power Modes
Gone are the days of devices that were always-on or stuck with a binary on/off configuration. Today’s devices offer a range of different power modes and smart software and programming choices can ensure that you are close to an energy-efficient IoT without taking your device out of use.
Consider, outside of the device’s run mode you might consider how you can take advantage of:
- Sleep mode
- Low-power sleep mode
- Low-power run mode
- Stop 0 mode
- Stop 1 mode
- Stop 2 mode
- Sleep mode
- Standy mode
- Shutdown mode
Recovering from a non-run mode is primarily achieved by a specified wake up source. Again, smart choices and good planning can help you navigate from run mode to an appropriate sleep or standby mode. Random number generation? Run mode or sleep mode will work, or take advantage of low-power run or low-power sleep modes instead.
Be aware, though, that there is again a chance you’ll over-optimize your device. Consider your software stack which, if placed in a deep power-saving state, might require a full initialization, including a radio pairing sequence or a token exchange. This will not only cost you time but also up your energy consumption.
One solution to such a challenge would be to use a sleep duration that is shorter than your radio timeout or the validity of your token. Get this right and you’ll avoid reinitializing your software stack while optimizing your energy use.
Tip 3: Use Polling Only in Specific Circumstances
External controllers might require polling, but every polling operation demands energy. By controlling your polling actions and polling only when absolutely required, you’ll be more energy-efficient and optimize your consumption.
To begin with, you should avoid polling cycles when it is clear that your external controller would consume more power resetting than remaining in a sleep mode. If the external controller is not essential for the process in progress, polling that controller needlessly uses energy that might otherwise be saved.
Consider reviewing datasheets and identifying controllers that are non-essential. You can then program your commands to suspend polling of those controllers when not in use, a simple optimization tactic.
Be aware, too, that external controllers may also produce current peaks that drop the battery voltage below the device’s allowed voltage range. By avoiding polling such controllers except when absolutely essential, you’ll keep energy consumption down and maintain the physical state of your battery.
Finally, it can be worth considering an alternative to polling such as an interrupt-driven system. In some cases, an interrupt-driven system is preferable as it is a wake-up source for the system, and this can increase your IoT energy-efficiency and save dealing with any polling optimization, too.