-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
add deepsleep module for battery application #4456
base: main
Are you sure you want to change the base?
Conversation
thank you for contributing! |
Thank you for the feedback! I didn’t notice an existing deep-sleep module in the repository when I started working on this. My goal was to create a module specifically focused on managing sleep when the battery voltage is low, while adding multiple wake-up methods, including touch wake-up and preset wake-up. Additionally, I included configurable IO pin settings to achieve optimal power efficiency. I’ll look into integrating these features with the existing deep-sleep module to ensure better compatibility and functionality for users. @DedeHai |
the PR for the deep-sleep UM was pending for quite some time, I wanted to run some more long-term tests but finally I got it merged just about after you opened this PR. |
The deep-sleep UM primarily uses a wakeup timer as its trigger source from deep-sleep status. Shouldn't this functionality be distinct from the battery UM? Regarding pullup/pulldown configuration: it works well for some pins like 12, 13, 14, 15, and 27, but not reliably for others like 25 and 26. Is there any way we can override or influence this "feature" in the IDF? |
how did you figure that?
deep sleep has nothing to do with battery UM, so dont know what you mean.
did you test to disable pullup/down successfully? |
if (presetWake) {
Unlike the battery usermod, the deep-sleep usermod supports preset delays, highlighting their distinct functionalities."
I found that hold mode(rtc_gpio_hold_en) performs reliably on IO25, but it doesn't seem to work consistently on IO26. Do you have any insights into why this happens? |
I thought you were referring to the existing deep-sleep UM, its a bit confusing both are called that :)
I dont know what you mean by that.
I do not unfortunately. you need to dig though the IDF code and the espressif forum as well as the datasheet to see if there is a hardware bug, IDF bug or if that is a feature. So to sum up:
|
Add only the touch option and preset wakeup timer |
|
Are you referring to this line:
I have successfully run this code on the ESP32. However, I cannot test it on the ESP32-C3 as I don’t have this board. |
Thanks for your feedback. I forgot that this function is used in another part of my repository's main branch for the user info UI, and it is useful for other users. I will add this to the WLED repository now.
I found this code for esp32 c3 |
if you do: add a #define users wanting debug info can use to add it. the wake-up cause is of no use to normal users. |
done |
What does draft status mean in this repository? |
draft means not finished and not ready to merge |
what sleps are needed to complete the pull request? |
fix the ones I marked |
What problems need to be fixed now? Do I need to fix them? |
see inline comments. |
After pushing the latest commit, I believe I have resolved all the issues you raised. If there's anything you're still not satisfied with, please let me know. |
there is plenty of unresolved comments |
Or do you mean the conversations? I believe I have resolved all the issues you mentioned. If not, please let me know or show them to me again |
I have no idea, maybe you disabled inline comments in github? that is beyond my knowledge I am afraid. |
@DedeHai your comments are marked "pending" - it means you may need to finish your review for the comments to be published. |
@softhack007 thanks, that may have been it. interesting, I never had to do that before... |
Added a commit for ESP32-C3 and ESP32-S2 development boards |
thanks for the update, I will look at it in more detail soon. |
The SleepManager module for WLED is designed to manage power consumption by enabling the ESP32 to enter deep sleep based on idle time or battery voltage levels. This module allows for more efficient battery use by automatically putting the device to sleep and waking it up based on predefined conditions. It is especially useful for battery-powered setups where minimizing power consumption is essential.