I bought this: https://de.aliexpress.com/item/1005004083478309.html ili9844 display with capacitive touch and this https://www.ebay.de/itm/363897056547 ESP32 WROOM32D
I tried to get examples running (Bodmer/TFT_eSPI) but the display does nothing, no light, nothing.
I rechecked the cabling and configuration several times and am pretty sure that it is correct. The ESP32 does not have a pin for GPIO18 - instead I used GPIO10 and also adjusted the config accordingly. I also played around with several settings concerning LED pin HIGH or LOW but the display just does not light up at all.
Is there any way I can easily test if the display has a general problem? Can I somehow easily just switch on the backlight or the like?
Could another (non-touch) ili9431 display help to analyse something?
I did install some sample scripts earlier on the ESP32 with success.
Schematic and used code (incl. TFT_eSPI setup).
I'm not at home yet. In the afternoon I can give the connections I use for the display. I don't have touch.
The TFT isn't ILI9844 but ILI9488.
First of all you can't drive the backlight led from the ESP or ATmega GPIO. The max current for each pin is 20mA. About 120mA for the whole ESP. The backlight take about 120mA (datasheet LCD wiki 3,5") . I hang the backlight with a resistor 22 Ω and mosfet IRLL2705 on 5V (used ESP pin IO13) . Works all the ESP pins without TFT? 120mA can brick the whole ESP.
ESP pins used to TFT
19 MISO to TFT_MISO
23 MOSI to TFT_MOSI
18 SCL to TFT_SCLK (Clock) What is the SPI clock in you're module
22 CS to TFT_CS (chip selct can be each other pin)
14 to TFT_DC (DataControl)
25 to TFT_RST (reset can be each other pin)
ILI9341 (not ILI9431) use the same pin configuration.
Hi
thanks for your input - indeed that is a typo ... 9488 of course - just corrected that
Would you be so kind and show me how the mosfet looks like on the board? Would there be a THT alternative? How did you calculate the 22Ohm?
regards
How I come to the 22 Ω? Ohms law and the datasheet from the display.
Ohms law U = I x R or Volt = Ampère x Resistance.
Or R = U/I or I = U/R
The datasheet say
Take the typical values.
VF = 3.2V Supply voltage 5V - 3.2V = 1.8V
IF = 90mA
1.8V/90mA = 20Ω. Most leds are very hell @ IF. 22Ω gives 82mA. With PWM you can lower the brightness without changing the resistor. For a Night clock I use 1kHz @ 25% time on. That is more then enough. Maybe is 20% the better way. For daylight use I take 50% on time. Less then 1kHz i see flickering.
For TH you can use IRLZ44. For only the backlight, BS170 is enough. RDSon 5Ω!! Not the greatest problem if you don't need the max backlight. Others take a resistor 15Ω or 18Ω.
With ESP8266/ESP32 I use a mosfet driver. No problems with low voltage. But costs extra.
Thanks - that was very helpful and easy to understand.
What I don't get: Could I not just put the LED pin of the LCD to 3,3V (either with a voltage regulator or just with a simple resistor)? As long as the whole device is powered, the LED pin will also be powered, if not, not. I could change the brightness (like hell
I am german BTW) by changing the resistor or by adding a potentiometer (I could not adjust brightness with the ESP which would be a disadvantage of course)
The backlight powering from 3,3V is a bad idea. LED are current driven not voltage driven. They take always there VF if more then VF is present. With 3,3V there is 0,1V for the resistor. @120mA that gives a resistor 0,82Ω. If the power voltage is 3,4V with that resistor, the current is 240mA. 0,1V is less voltage for the resistor to regulate the current. You can change the brightness by using an other and greater resistor value. You can use an additional trimresistor 100Ω. But you can use P(ulse)W(idth)M(odulation) example.
1 Like
thanks - sounds reasonably (the datasheet also claims: "It is recommended the input of backlight to be constant current rather than constant voltage") even it surprises me that at least not all MCUs have a problem with this - because there are people who run the display directly on the ESP32
BTW: I did understand what PWM means
Direct on the ESP is a bad idea. How long it works????? We know the backlight uses 120mA. What say the ESP32 datasheet for VDD_SDIO on page 47?
20mA source and 28mA sinking but not for all pins together. See note 3.
You can't use the ESP as current source. The GPIO are on (>2,64V VDD X 0.8) are off (<0,33V VDD X 0.1) datasheet page 47. You can make a current source with a transistor and limit the output current with a correct base resistor.
Don' t get me wrong: I do not doubt what you say. It sounds more than resonable that 100mA (or even 80mA is too much for the GPIO) - I can just not get how it seems to work for others (see link above) ... As it does not for me - there is no need to investigate further.
That it works will say that the ESP is better then the specs say. Take another ESP, from another batch, and it is possible that it no longer works with a smoking ESP as result.
A mosfet/transistor and resistor costs less then the ESP. I don't know why they make it bad and publish that.
Just want to say a final: thank you. For testing I connected the LED-Pin directly to a resistor and from there to 5V. The display is working now. Unfortunately Touch is not but I think it is better to start a new topic
1 Like
Touch take the same connections as the TFT only another CS line.
However my Touch (GT911) does not work with Bodmer's TFT_eSPI
That is bad. Ask it Bodmer on github. He answer fast and know what can be wrong.
Good luck.
I did and yes he did answer - that's how I understood that it is not supported...
Finally got it working with another library.
BTW: do you know what I am heading for? Ever heard of hanimandl? Since you are a beekeeper as well
if not: Google it 
Hi,
I wonder why I did not check that earlier ...
I just meassured the current on the LED pin when connected via the resistor to 5V: 0,4mA. Had been surprised that the voltage on the pin was really high which makes a lot of sense when the current is that low
So I think your first input was well meant but wrong: the display does not draw its energy for the LED through this pin but through the power supply. The LED pin is just an input to turn the backlight on/off or through PWM to something in between ...
Any objections?
Now I have 5 IRLz44 laying around which is not really a bit problem ...
regards
Then the backlight is powered by a driver. Buth that isn't in the datasheet and not in the schematic.
The only way to know that is to reverse engineer the PCB and see where the LED pin go through.
Edit: found on this schematic. Top mid. There is an NPN transistor between LED K and GND with 5R6 resistor.
I find 5R6 very low. Gives with 5V a current 320mA. 
Why should the display have 5V? And again I wonder how you end up at 320mA
Definitely there are no 320mA - the ESP32 and the display together consume much less than 200mA
The leds take 3,2V the transistor take 0,6V at least. That gives 3,8V 3,3V is less then that. The schematic say that there is a resistor 5R6 or 5,6Ω.

And
.
5V - 3,2V = 1,8V over the resistor.
Ohms law U/R = I. 1,8V/5,6Ω = 0,321A or 321mA. What is to much for the leds. I don't have any TFT that I use with PWM greater then 50%. @25% it can be used as night light.
Connect the VCC pin with 5V. Set 5V or 3,3V on the led pin. Let it 5 minutes on and feel the temperature from the TFT. You can pretty warm you're hands. LED degrade when the temperature rise.
You may use you're TFT like you will. For me not a problem. But be not surprised that the lifetime isn't what you expected.