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

Use power saving mode on MAX17043 when entering deepsleep #19709

Merged
merged 1 commit into from
Oct 9, 2023

Conversation

blacknell
Copy link
Contributor

@blacknell blacknell commented Oct 9, 2023

Description:

The MAX17043 has a power save mode that can be enabled via a configuration command. This PR takes advantage of this when entering deep sleep and then disables it on restart. It's worth noting that when in power save mode the voltage on the battery isn't actively measured of course but the battery modeling scheme picks up where it left off on restart. This retains the advantages discussed in #19412 which assumes power is maintained to the MAX17043 during deep sleep and the long term battery behaviour can be 'learnt'.

I've seen a dramatic reduction is current draw in tests - a DFRobot ESP32 Firebeetle with DFRobot MAX17043 battery gauge breakout board current draw decreased from 430µA to 10µA.

I've tested on ESP32 but don't have the hardware to test on 8266 (although it builds).

add: use power saving mode when entering deepsleep

Related issue (if applicable): fixes # n/a

Checklist:

  • The pull request is done against the latest development branch
  • Only relevant files were touched
  • Only one feature/fix was added per PR and the code change compiles without warnings
  • The code change is tested and works with Tasmota core ESP8266 V.2.7.4.9
  • The code change is tested and works with Tasmota core ESP32 V.2.0.14
  • I accept the CLA.

NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass

@arendst
Copy link
Owner

arendst commented Oct 9, 2023

Oops. Your previous PR is already merged. Pls rebase.

@blacknell blacknell closed this Oct 9, 2023
@blacknell blacknell reopened this Oct 9, 2023
@blacknell blacknell marked this pull request as ready for review October 9, 2023 14:47
@blacknell blacknell changed the title Max17043/powersaveonsleep Max17043 use power saving mode when entering deepsleep Oct 9, 2023
@blacknell blacknell changed the title Max17043 use power saving mode when entering deepsleep Use power saving mode on MAX17043 when entering deepsleep Oct 9, 2023
@arendst arendst merged commit 663e6ab into arendst:development Oct 9, 2023
126 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants