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

Battery is being drained whe SCK is OFF on SCK2.2 #77

Closed
oscgonfer opened this issue Nov 20, 2024 · 2 comments · Fixed by #78
Closed

Battery is being drained whe SCK is OFF on SCK2.2 #77

oscgonfer opened this issue Nov 20, 2024 · 2 comments · Fixed by #78
Labels
bug Something isn't working

Comments

@oscgonfer
Copy link
Contributor

Title is self-explanatory.

Potential rootcauses to analyze:

  • PM sensor is not off
  • Step-up is not off
@oscgonfer
Copy link
Contributor Author

oscgonfer commented Nov 20, 2024

Rootcause:

When the SEN5X is connected and the kit is configured, there is a corner-case that drains the battery due to the following issue:

  • Sensor loop starts
  • SEN5X takes between 15 to 30s to take readings. These readings are added to the pending sensor list and SEN5X is commanded to take readings.
  • If the SCK is turned off (by 5s button down), two things can happen:
    • The SEN5X has finished its readings process. When pressing the button, everything is turned off
    • The SEN5X hasn't finished its reading process. When pressing the button, we keep the SEN5X on forever

If it coincides that the user configures the kit, and turns it off while it was taking readings, it will keep the SEN5X on forever, hence draining the battery. This roughly consumes 110mA on average, which makes the 2000mAh battery last approximately 18h.

#78 solves the issue by making sure that all sensor groups associated with the SEN5X are stopped when there is a 5s button down event. With this fix, the SCK returns to its normal sleep consumption of 3mA, which would make the battery last 27 days in this situation.

@oscgonfer oscgonfer added the bug Something isn't working label Nov 20, 2024
@oscgonfer
Copy link
Contributor Author

I confirm that after 16h of testing, battery went down <1%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant