ESP32 + ILI9341 2.8 " SPI Touch = Display turn off

Dear all,
i did a setup with ESP32 NodeMCU and a 2.8" SPI Touch ILI9341 with SD card.
Correct name: ESP32 NodeMCU Module WLAN WiFi Dev Kit C Development Board with CP2102

Currently i connected the LED pin of the display to the 3.3 V pin of the ESP32.
However, i am wondering if i can turn on / off the display via code.
One possibility would be to connect the LED pin to a GPIO pin and set it to OUTPUT.
I measured the current between 3.3 V pin and LED pin and its only 2.4 mA. This is really surprising me! Is something wrong? I thing the GPIO pins are capable of ~40-50 mA?

Other possibility would be to use a transistor i suppose. Which one should i chose? (however i want to avoid this due to package reason).
I am using the TFT_eSPI library and didnt find any command to control brightness or on / off. Is there a command?

Can someone help me? Thank you alot! :slight_smile:


Connect LED pin to a regular 3.3V GPIO pin.
Q1 is the backlight transistor. U1 is the 3.3V regulator chip.

Not all Red SPI boards contain Q1. Your photo shows U1, Q1, XPT2046.

David.

Hello david_prentice,
thank you for your response!
I do understand the first part

Connect LED pin to a regular 3.3V GPIO pin.

So you mean i can just connect it to a digital GPIO (for example D16)?
I am wondering why the measured current is so low? I would expect higher values (maybe 20-60 mA?). I am afraid that i do something wrong and damage the ESP32.

The second part i do not understand:

Q1 is the backlight transistor. U1 is the 3.3V regulator chip.

Not all Red SPI boards contain Q1. Your photo shows U1, Q1, XPT2046.

Is this "good" or "bad"?

Thank you! :slight_smile:

Q1 collector switches the backlight e.g. 50mA
Q1 base only needs 1mA to operate. e.g. 50mA / hFE

My comments about U1, Q1, XPT2046 being mounted on your pcb just means that everything "works".

Punters often buy pcb without XPT2046. Then wonder why the Touch Screen does not work.
Many "Arduino" displays do not have a Q1 transistor or any means to switch off the backlight.

David.

You are right!
Thank you for your help.
Connected the LED pin of the display to GPIO 16 and made it an output, It works fine!

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.