Coder Social home page Coder Social logo

arduino_powermanagement's Introduction

⚡ 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

  • Arduino Portenta H7
  • Arduino Nicla Vision
  • Arduino Portenta C33

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.

⚙️ 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:

  • 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.

  • Deep Sleep For scenarios demanding drastic power conservation, the Deep Sleep 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.

Examples

  • Battery - Demonstrates battery metrics monitoring.
  • Charger - Illustrates charger status monitoring and control.
  • DeepSleep_WakeFromPin - Demonstrates how to wake up the board from deep sleep using a wakeup pin.
  • DeepSleep_WakeFromRTC_C33 - Demonstrates how to use the RTC to wake the Portenta C33 from deep sleep.
  • DeepSleep_WakeFromRTC_H7 - Demonstrates how to use the RTC to wake the Portenta H7 from deep sleep.
  • Powershell - Provides an interactive shell on the serial port that allows you to interact with any aspect of this library.

👀 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

  • Monitor current and average battery metrics (voltage, current, percentage, temperature)
  • Monitor battery health metrics (power cycles, temperature, reported capacity)
  • Monitor and control charging
  • Save significant amounts of power by sending the boards into Sleep and Deep Sleep modes (only available for Portenta C33 for now)
  • 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

📖 Documentation

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

Note

The Low Power functionality on the Portenta H7 and Nicla Vision are still experimental. It works well on some chip revisions while on other chip revisions it will go to sleep and never wake up unless you manually restart the board. If your board doesn't wake up from sleep, please create a Github Issue and let us know your board version. You can find the 4-digit number on the back of the board next to the High Density connector that is on the opposite side from the USB connector.

arduino_powermanagement's People

Contributors

sebromero avatar cristidragomir97 avatar actions-user avatar dependabot[bot] avatar

Watchers

 avatar Tom Igoe avatar Massimo Banzi avatar Alessandro Ranellucci avatar Massimo Schenone avatar Alexander Entinger avatar  avatar Martino Facchin avatar Stefano Visconti avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.