The Arduino Pro Power Management Library serves as a comprehensive and sophisticated power management toolkit tailored for Arduino Pro boards, encompassing the Portenta H7, Portenta C33, and Nicla Vision.
This library streamlines the interaction with complex hardware components such as the PF1550 Power Management Integrated Circuit (PMIC) and the MAX17262 LiPo Fuel Gauge and presents a user-friendly, functionality-oriented interface.
- Arduino Portenta H7
- Arduino Nicla Vision (Low power features not supported yet)
- Arduino Portenta C33
The library is organized into three primary parts, each addressing specific aspects of power management:
Dedicated to battery management, this class enables real-time monitoring of battery usage and health. By keeping track of various battery parameters, users can optimize their applications for better energy efficiency and battery longevity.
Focused on battery charging dynamics, this class provides a detailed insight into charging parameters. Users can monitor and adjust these parameters, ensuring optimal charging conditions and extending the lifespan of the battery. By default the charger is configured to work with 3.7V batteries which get charged at 4.2V. If you want to use a different type of battery, please take a look at the API documentation.
This class centralizes control over the power distribution within the board. It allows users to enable or disable specific power rails, catering to the needs of energy-efficient designs. In addition to power rail management and battery handling, the library provides power-saving features:
-
Sleep This mode offers a significant reduction in power consumption while maintaining a state of minimal activity. It's ideal for applications requiring periodic wake-ups or brief intervals of inactivity. This sleep mode resumes the operation from the last operation. You can manually enable this sleep mode on the Portenta C33. On the H7 and Nicla Vision however, this is automatically handled by mbed. There is a separate (deep) sleep mode on Portenta H7 and Nicla Vision that can be enabled through their low power libraries.
-
Standby For scenarios demanding drastic power conservation, the Standby Mode drastically reduces the board's power usage. It's suitable for long-duration, battery-dependent applications where occasional wake-ups are sufficient. This mode restarts the board on wakeup, effectively running the
setup()
function again.
Here's a table with the current consumption you can expect from each board in Sleep and Standby modes. Clicking on any of the values in the table above will send you to an image of the measurements for that specific scenario.
Arduino Portenta C33 | Arduino Portenta H7 Lite | Arduino Portenta H7 | |
---|---|---|---|
Without power optimisations | 41.37 mA | 123.86 mA | 123.86 mA |
Standby consumption with peripherals off | 58.99 μA | 75.51 μA | 379 μA |
Standby consumption with peripherals on | 11.53 mA | 4.89 mA | 7.98 mA |
Sleep consumption with peripherals off | 7.02 mA | N/A | N/A |
Sleep consumption with peripherals on | 18.26 mA | N/A | N/A |
Note
Sleep measurements are not available on the H7 boards because the board goes to sleep automatically when idling.
Note
These measurements have been taken using a Nordic Power Profiler Kit II through the JST power connector of the Portenta boards, the numbers might be higher when powering through the VIN or 5V pins because it involves more power regulators that are not as efficient as the PF1550's integrated regulators.
- Battery - Demonstrates battery metrics monitoring.
- Charger - Illustrates charger status monitoring and control.
- Standby_WakeFromPin - Demonstrates how to wake up the board from standby using a wakeup pin.
- Standby_WakeFromRTC_C33 - Demonstrates how to use the RTC to wake the Portenta C33 from standby.
- Standby_WakeFromRTC_H7 - Demonstrates how to use the RTC to wake the Portenta H7 from standby.
- Check compatibility with your platform
- Download and install this library through the Arduino IDE, the Arduino CLI or by manually downloading it.
- Check out the examples or read the documentation here.
- Monitor current and average battery metrics (voltage, current, percentage)
- Monitor battery health metrics (temperature, reported capacity)
- Monitor and control charging
- Save significant amounts of power by sending the boards into Sleep (only available for Portenta C33 for now) and Standby modes
- Toggle and set voltages on different power rails of the board
- On Nicla Vision
- Enable and disable the external power rail
- Enable and disable the camera power rail
- Change voltage on external power rail
- On Portenta C33
- Enable and disable the external power rail
- Enable and disable the communication power rail (ESP32, secure element)
- Change voltage on the external power rail
- On Portenta H7
- Enable and disable the external power rail
- Change voltage on external power rail
- On Nicla Vision
For more information on how to use this library please read the documentation here.