TTGO T-Display Deep Sleep

Ten milliamps doesn’t sound like a lot — but for sleep/standby mode, it is. A recent project was intended for occasional use as a desk toy, and would spend most of its time sleeping. Running the recommended

esp32_deep_sleep_start();

took the current from ~70mA with the system running at full speed with the display on, to ~10mA. That’s over an 80% savings, but would still drain the gadget’s 1000mAh battery in just a few days.

Trying various different cures recommended by various sites including Espressif’s own had little effect, until I stumbled across a Reddit post by [infuriatingPixels]. The following four lines of code took the project’s power consumption from ~10mA to ~380uA in standby — a more than 20x additional savings. And it can still do wake-on-touch.

pinMode(4,OUTPUT); 

digitalWrite(4,LOW); // Should force backlight off

tft.writecommand(ST7789_DISPOFF);// Switch off the display

tft.writecommand(ST7789_SLPIN);// Sleep the display driver

Thanks, Random Internet Person!

This entry was posted in Arduino, C, Coding, Digital, HOW-TO, Power. Bookmark the permalink.

Leave a Reply