Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better battery/external power detection and handling on different devices #235

Open
4 tasks done
melkati opened this issue Jun 20, 2024 · 0 comments
Open
4 tasks done
Assignees
Labels
enhancement New feature or request

Comments

@melkati
Copy link
Owner

melkati commented Jun 20, 2024

Feature Request Summary: Enhanced Power Management Configuration for ESP32 Boards

Overview:
Currently, the battery detection functionality on ESP32 boards is not optimal, mainly due to inconsistencies between different board models. To address this issue and improve overall power management, we propose implementing enhanced power management configuration options for ESP32 boards. These options will provide users with greater control and adaptability in detecting and managing power sources, ultimately enhancing the reliability and efficiency of ESP32-based projects.

Key Features:

  1. Battery Voltage Threshold: Allow users to set the voltage threshold indicating operation on battery power, catering to specific battery characteristics.

  2. External Power Voltage Threshold: Similar to battery voltage, enable users to define the voltage threshold indicating operation on external power.

  3. Hysteresis: Provide an adjustable hysteresis band to smoothen transitions between battery and external power modes, preventing rapid and unwanted mode changes due to voltage fluctuations.

  4. Mode Change Delay: Implement a configurable delay after detecting a power state change before transitioning to the new mode, minimizing rapid and unintended mode switches.

  5. Battery Connection Detection: Allow users to set a minimum voltage threshold indicating a new battery connection or disconnection of external power, facilitating calibration or adjustment processes when power sources change.

  6. Power Source Priority: Enable users to prioritize between battery and external power sources, ensuring optimal power management when both sources are available.

  7. Display and Feedback Options: Provide options for displaying power status to users, such as through LCD or LED indicators, and communicating power transitions via log messages or visual notifications.

Benefits:

  • Greater flexibility and control over power management, catering to diverse user requirements and application environments.
  • Improved reliability and stability in detecting and managing power sources, enhancing overall system performance and user experience.

Implementation Considerations:

  • Ensure compatibility with various ESP32 boards and configurations.
  • Provide clear documentation and examples to assist users in configuring power management settings effectively.

Conclusion:
Enhancing power management configuration options for ESP32 boards will empower users to tailor power detection and management to their specific needs, promoting greater flexibility, reliability, and efficiency in ESP32-based projects. We encourage readers to share their thoughts and suggestions on this proposed feature. Your feedback will play a crucial role in shaping the development process and ensuring that the final implementation meets the diverse needs of the ESP32 community.

Implementation:

  • Implement hasBattery user option so user can select if device has a battery connected.
  • Flag workingOnExternalPower is always true if hasBattery is false to avoid false positives
  • Add to preferences.html
  • Add to menu
@melkati melkati added the enhancement New feature or request label Jun 20, 2024
@melkati melkati self-assigned this Jun 20, 2024
melkati added a commit that referenced this issue Jun 20, 2024
…r. battery/external power detection and handling on different devices #235
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In progress
Development

No branches or pull requests

1 participant