battery bar + battery profiles + battery calibration#60
Merged
Conversation
added 7 commits
June 8, 2026 08:57
# Conflicts: # src/ui/LvStatusBar.cpp
DJ2LS
commented
Jun 15, 2026
Contributor
Author
|
okay, the actual discharge table isn't working reliable. Time for using a battery logger and see how power levels really drop. |
Contributor
Author
|
While charging, battery level drops down to 4.05V, so "Charge Above = 4.00" might make sense |
Contributor
Author
Contributor
Author
|
percentage suggestion: Lets see if we can get this working |
Contributor
Author
added 2 commits
June 17, 2026 19:49
Contributor
Author
|
Latest tests looking good to me. Battery curve seems to be more realistic now. Looking forward to some testers results |
Contributor
Author
|
@defidude , I merged latest changes into this PR, everything seems to be working so far. So from my side, you can review and merge it if you want. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This work in progress (WIP) PR adds some more battery monitoring, a battery bar, a small ability of calibrate battery discharge voltage and hopefully a more accurate battery discharge profile .
I opened this PR already, as it needs some more time of testing and I want to avoid things getting broken. Also git commits are not 100% clear, @defidude , as explained on Discord. Contribution and feedback are very welcome, as I'm not an electronical engineer, for sure there are some battery gurus and calibration wizards out there :-)
new battery settings:
Lipo discharge curve:
I tried to simulate discharging better, used this one as reference:

https://www.researchgate.net/figure/Li-ion-battery-discharge-voltage-curve_fig5_363575973
At least I tried to manually interpret it, interpolated values between:
Those values need to be tested in real world. That's the real "work in progress" part. Challenge is to find the best tradeoff regarding the voltage plateau.
battery calibration instructions:
how to help:
Calibrate battery, discharge until device dies and inspect battery levels so we can see if we found a good interpretation of discharge curve.