arduino-libraries / Arduino_PowerManagement

Mozilla Public License 2.0
11 stars 2 forks source link

⚡ Arduino PowerManagement

Check Arduino Compile Examples Spell Check Sync Labels

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.

✅ Supported Boards

Core Components of the Library

The library is organized into three primary parts, each addressing specific aspects of power management:

🔋 Battery

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.

🔌 Charger

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.

⚙️ Board

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:

Low Power Measurements

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.

Examples

👀 Instructions

  1. Check compatibility with your platform
  2. Download and install this library through the Arduino IDE, the Arduino CLI or by manually downloading it.
  3. Check out the examples or read the documentation here.

✨ Features

📖 Documentation

For more information on how to use this library please read the documentation here.