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

force deep-sleep state if battery falls below 15% full #133

Closed
geeksville opened this issue May 11, 2020 · 2 comments
Closed

force deep-sleep state if battery falls below 15% full #133

geeksville opened this issue May 11, 2020 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@geeksville
Copy link
Member

To prevent battery damage, if we ever see battery voltage getting below 3.7Vish (see https://blog.ampow.com/lipo-voltage-chart/) we should have PowerFSM.cpp transition the device to deep-sleep state.

@geeksville geeksville added enhancement New feature or request good first issue Good for newcomers labels May 11, 2020
@spattinson
Copy link
Contributor

spattinson commented May 13, 2020

axp192 already has this built in for t-beam, rather than deep sleep it cuts off power to esp32, lora, gps, and probably display? There is a configurable cut off voltage. I think I mentioned before that it is somewhat on the low side for protecting the battery. I'll have a look into it, It'll be a matter of setting it at initialisation then it should take care of it automatically and turn back on when you charge.
edit: There are two levels of interrupt for low battery warning and Voff value when it shuts everything off except LDO1 (RTC). Default Voff value is 2.9V which is lower than 15%. Lewis Xhe's library does not appear to have a function to change that voltage - Its Reg 0x31 bits 0-2 which 000=2.6V and going up in 0.1V steps to 111=3.3v. If we ignore all that and do deep sleep instead so its portable to other platforms the default values wont interfere with it I guess unless its left in deep sleep long enough to get down to 2.9V, so we can consider it a secondary protection for t-beam.
The voltages in that chart seem a little bit high, maybe lipo chemistry is a bit different than 18650, I tend to go down to about 3.3V in my vape devices and my batteries will last a year of daily charging, this graph for samsung 30q suggests that about 3.25V is 15% remaining https://lygte-info.dk/review/batteries2012/Samsung%20INR18650-30Q%203000mAh%20%28Pink%29%20UK.html .The manufacturers datasheet says 2.8V cutoff with 20A discharge gets you 250 cycles with 60% of original capacity which is a bit extreme!

@geeksville
Copy link
Member Author

ooh that sounds even better - I had forgotten that. If you could do that then at would be great. yes - to do this we would just need to trigger a (new to define (LOWBATTERY in the list of triggers and then have that irq handler send that trigger event. Then PowerFSM.cpp could have a new transition added that goes into deep sleep any time that event occurs.

rickmark pushed a commit to rickmark/meshtastic-firmware that referenced this issue Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants