Tips on energy optimization in IoT – Low Power IoT Devices

Homepage Tips on energy optimization in IoT – Low Power IoT Devices

You said IoT Energy Efficiency ?

The increasing ubiquity of IoT devices and the rise of edge computing on those devices makes energy-efficient IoT a core focus of many device makers. It is, after all, one thing to deploy devices widely but quote another to ensure that they can operate independently and with energy-efficiency, particularly for devices deployed in remote areas without easy access to mains power. 

Often the attention of device makers falls on the hardware selected for the device and the ways in which the right battery choice (among other elements of the build) can make the device more energy-efficient. Yet there remains a second lever to manipulate in order to have an energy-efficient IoT and extend battery life, and that’s software. 

By making the right software and architecture choices, you can make even already energy-efficient IoT devices more efficient again. In this article I recount three tips that you might employ to do just that, starting with paying some close attention to the configuration of your controllers and clocks. 

The three tips to reach energy-efficient IoT our experts share with you in this article include selecting wisely your controllers, taking advantage of power modes, and using polling only in specific circumstances.

Our 3 Software Tips to get energy savings on IoT Devices

Tip 1 : Choose and Configure Your Controllers Wisely 

Your MCU itself is composed of a number of controllers. Choosing and configuring them wisely is your first step towards energy-efficient IoT. 

Take the clock controller, for example. 

The device clock tree is configured at the moment that the MCU is initialized. Enabling all of the different clocks on the controller will drive up energy use and is far from optimal. Yet with a little savvy software, you can improve your energy use and be closer to an energy-efficient IoT.

Start by considering which clocks your need to enable and which ones can be safely disabled. Some thought and firmware mapping here can help you determine which clocks are truly mandatory. 

Then, once you have your mandatory clocks identified, consider the clocking frequency.  

Reducing the overall system clock will reduce the energy consumption of the processing unit – but, on the other hand, the processing time will increase and could lead to a rise in power consumption.  

Increase the clocking allows you to speed up processing and shorten the time that processing takes – but a higher clock frequency means more power is consumed. 

What you’re aiming for is the optimal balance between clocking frequency and energy use. It’ll take a little optimization, but it’s a great first step. 

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. 

While selecting energy-efficient hardware and configuring it effectively will without doubt help optimize the energy expenditure of your device, your software choices can be just as important in extending battery life and achieving maximum energy efficiency. 

By selecting the right controllers and configuring them correctly, taking advantage of differing power modes and their energy-efficient states, and polling your external controllers only when absolutely necessary you can improve the energy use of your device, saving you power and cutting your overall device spend. 

Need help writing the software to save energy on your device? Want to optimize your IoT energy-efficiency with world-class embedded and IoT software? Contact Witekio to learn how our team can help you. 

You may also read this article about Low Power IoT Management

You might also like...
A Challenge called boot time

A Challenge called boot time One of our mission is to optimize the boot time of your IoT device by using the rights tools. See how you can improve the boot time of the Linux kernel

Read more
Nicolas Besson - IoT Expert and Architect
29 December 2020