How can i switch TFT screen on/off

Hi all,

I would like to turn an TFT screen (1.44' SPI 128x128) on or off from Arduino code. The screen has the following pins:

  • LED
  • SCK
  • SDA
  • A0
  • CS
  • GND
  • VCC

I use the Adafruit_ST7735 library.

The display is inside an DIY thermostat, but most of the time it is not needed to have the display powered on.

I cannot find a way to do such with the Adafruit_ST7735 library.

Do I need an optocoupler to disable current flowing to VCC and/or LED?

Other thing is that I don't understand the difference between LED and VCC. It seems this 2 pins are connected to each other?

Please post a link to the actual display e.g. Ebay Sale.

These small displays are borderline when it comes to LED current. A Uno pin can switch 20mA with digitalWrite(). Two pins could switch 40mA.

A safer way to switch LED pin is with a PNP transistor or MOSFET.

Seriously. Central Heating uses mains electricity. There is little point in saving 20mA.


Link to the TFT screen:

I'm pretty new in Arduino things. Is it possible to switch the 5v line to the tft with an MOSFET? Which type of MOSFET do I need?

Your ESP8266 has 3.3V GPIO.
It is not able to switch 20mA.

I would use a PNP transistor. I do not know much about MOSFETs except that they are fussy about drive voltages.

Seriously. There is little point in switching the backlight LED.


The reason I want to switch the TFT off is not saving power, but the lifetime of the TFT. My tought was that having the TFT on for max 1hour a day increases the lifetime in contrast with having the TFT on 24 hours a day.

It will make no difference to the lifetime of the TFT.
It will make little difference to the lifetime of the backlight LED
It might cost you 100mW * 8760 hours per year. i.e. 0.9 kW-H or £0.20 per year

Yes, it all adds up. Possibly £2 for the electricity over a 10 year period.

Mr Trump will have probably started a Nuclear war before then.


But, let's assume I do switching by use of a transistor.. (one more reason to switch off the TFT was the disturbing light intensity of the TFT in the evening/by night).

I did some research, but I found out that understanding transistors is quit a challenge for newbies in electronics, but I would like understanding transistor logic!

The difference in NPN and PNP, high side and low side switching, my mind is blown..

So, it seems to be necessary that I have to use a PNP. I don't understand exactly why yet. So the following questions arises:

  • Which type of PNP gets the job done in my case?
  • How should I connect the base, collector & emitter to the Node MCU pins?
  • Where should resistors (how much Ohm) be added to the circuit?

I suggest that you do a bit of studying electronics from Wikipedia in your native language.

Do you understand Ohm’s Law ?

When you are happy with Ohm’s Law and Kirchoff’s Law, we can show you some simple “rules of thumb”
You do not need to be a Maths expert. But you must learn how to draw arrows on a schematic.

This involves pencil and paper.


Haha, allright. I will do so.

But, raising kids needs a lot of my leisure as well :-p This is the only missing part.
Ohm Law is already 10 years ago at school.

I do not have to become an electronics expert, just hobby.

It is very difficult to know member's education or practical knowledge.

Believe me. You only need to know the basics to calculate component values.

Don't try to do it in your head. God invented cigarette packets for this.


In daily life I'm .NET/C# developer, so the programming part of Arduino is not that difficult, but in some cases clear understanding of electronics are really must haves.

Much programmers learn by asking questions on forums like Stack Overflow etc, so that's how I'm learning: asking stupid questions on forums like this, but I have learned already a lot by asking stupid questions :slight_smile:

But at this point you're right that I have to reopen the studybooks :slight_smile:

Thank you!

You could use a small switch to turn the tft off if it’s bugging you.

This thread resonates with me, I love learning about arduino but it is just a hobby. There are some seriously experienced people on here - David being one :slight_smile:

It can be overwhelming to learn a bunch of info, when you really need a win once in a while to boost your confidence and keep the interest going.

My two pence worth anyway.