Skip to content

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

Merged
thebentern merged 14 commits into
masterfrom
tft-powersave
Apr 14, 2024
Merged

fix/enhancement: TFT device powersave (part 3)#3600
thebentern merged 14 commits into
masterfrom
tft-powersave

Conversation

@mverch67

@mverch67 mverch67 commented Apr 11, 2024

Copy link
Copy Markdown
Collaborator

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
Copy Markdown

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
Copy Markdown
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.

Comment thread src/graphics/TFTDisplay.cpp
@mverch67

mverch67 commented Apr 13, 2024

Copy link
Copy Markdown
Collaborator Author

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
Copy Markdown
Contributor

Looks good to me

@thebentern
thebentern merged commit 5047468 into master Apr 14, 2024
@thebentern
thebentern deleted the tft-powersave branch April 15, 2024 01:19
jeek pushed a commit to jeek/Meshtastic-Exploiteers-Hacker-Pager that referenced this pull request Jun 30, 2026
* fix: device TFT powersave (part 3)

* trunk fmt

* trunk fmt

* undo bluetooth deinit from meshtastic#3596

* revert code for heltec tracker

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
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