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

fix/enhancement: TFT device powersave (part 3) #3600

Merged
merged 14 commits into from
Apr 14, 2024
Merged

Conversation

mverch67
Copy link
Collaborator

@mverch67 mverch67 commented Apr 11, 2024

This PR aims to reduce the power consumption for TFT devices such as T-Deck and T-Watch-S3 (but not heltec tracker).

In powersave mode the following savings are achieved:
T-Deck: 130mA (screen on, BT on) -> 30mA (screen dark, light sleep)
T-Watch: 130mA (screen on, BT on) -> 12mA (screen dark, light sleep)

-> values are measured in idle mode, not during LoRa sending!

Prior to this PR the idle power consumption has always been 120-130mA, even with dark display. The powersave option wasn't functional.

During light sleep the T-Deck touch and keyboard are disabled. LoRa radio is still active. Wakeup is done using the trackball. For T-Watch the wakeup is done by touch.

To achieve the best power saving results for the user powersave is now default for T-Deck and T-Watch and some other parameters have changed defaults. The powersave mode can easily be disabled if not desired for whatever reason.
Default screen timeout is now 30 seconds and additonal 30 seconds to go into light sleep with disabled bluetooth. To enable bluetooth communication either tab on the screen before the 60 seconds have passed or press the trackball. The Android App automatically re-connects seemlessly with a disconnected device.

To achieve even further powersavings bluetooth can be disabled manually (saves ~40mA during operation and device goes faster into light sleep). In this case the device configuration can still be managed when using the admin channel over a second device. Works best with pre-installed canned messages, especially for T-Watch.

This PR relies on my two other PRs (#3590 part1 and #3596 part2).

Note: the unPhone support in #3544 uses a proprietary implementation for the power handling and does not make used of lovyanGFX's unified Light_PWM interface (which is the core functionality of this PR). I believe it achieves basically the same, but I don't have such device to test it. For sure, the powersave mode will also work with the unPhone, though it's not specifically mentioned here.

**NOTE: **

To benefit from the new optimized default settings it'recommended to do a flash erase during installation

@gordontantdotcom
Copy link

This is great. The idea to me sounds perfect. It would also help if a long press of the trackball makes it a forced action ?

this is my first venture into GitHub. Is there a download to test this ?

@mverch67 mverch67 marked this pull request as ready for review April 12, 2024 17:43
@mverch67
Copy link
Collaborator Author

this is my first venture into GitHub. Is there a download to test this ?

There's a bug in github actions. It fails to upload the .zip artifact for installation.

@mverch67
Copy link
Collaborator Author

mverch67 commented Apr 13, 2024

Heltec Tracker V1.0 with powersave enabled:
Before: 106mA (BT on, Screen on) -> 112mA* (BT on, screen off) -> (not yet tested)
With PR: 106mA (BT on, Screen on) -> 112mA* (BT on, screen off) -> 23mA (BT off, light sleep)

* not a typo

@thebentern
Copy link
Contributor

Looks good to me

@thebentern thebentern merged commit 5047468 into master Apr 14, 2024
71 checks passed
@thebentern thebentern deleted the tft-powersave branch April 15, 2024 01:19
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.

3 participants