Arduino Power Management Library Boosts IoT Efficiency on Arduino Pro Boards

New library optimizes battery management and power consumption on Arduino Portenta H7, Portenta C33, and Nicla Vision boards.New library optimizes battery management and power consumption on Arduino Portenta H7, Portenta C33, and Nicla Vision boards.  Read More iot

Battery-powered IoT devices face the problem of managing battery life and overall power consumption. To address this challenge, Arduino has introduced the Arduino Power Management Library for Arduino Pro products. This library simplifies IoT development with practical features like battery monitoring, charging control, sleep modes, and power-rail control. It is compatible with the Arduino Portenta H7, Portenta C33, and Nicla Vision boards from the Arduino Pro family.

Each board contains an NXP PF1550 power management IC (PMIC). That chip features three high-efficiency buck converters, three linear regulators, reference supplies, and a LiPo charging circuit. The Arduino Power Management Library simplifies the code that optimizes power consumption when using this PMIC.

LiPo batteries are notoriously complicated to manage. For example, they have multiple charging stages, it is challenging to estimate remaining energy (from voltage alone), and they have lifetime operational limits. The Arduino Power Management Library monitors and reports a battery’s charging state during charging. The library also monitors usage, providing status information like average voltage, average current, and temperature. It can also predict the time to charge/discharge to a full/empty state.

Sleep modes for a microcontroller are not new. However, integrating them with other power management functions into a single API simplifies writing code for IoT devices. Sleep mode allows for pausing code execution and saving power. When operations resume, they pick up where the code left off. A standby mode drops current consumption below 500 microamps but requires a reboot when the board wakes up. Additionally, via an API call, you can turn peripherals (like ADC, RGB LED, Secure Element, Wi-Fi, and Bluetooth) on and off.

Arduino provided this comparison of the modes for the three supported Portenta boards. The test used a Nordic Power Profiler Kit II (PPK2). As the data shows, the Standby mode dramatically reduces current consumption — especially with peripherals turned off.

A significant benefit of using the Arduino Power Management Library is that the API calls are the same whether the board uses an STMicroelectronics or Renesas microcontroller. The library is now available in the Arduino IDE, Arduino Cloud, or from this GitHub repository.