Waveshare 3.5inch TFT Touch Screen with ESP32

Hi everyone,

I'm new to this forum and it is my first topic. So please don't hesitate to tell me if I'm doing anything wrong ;-).

I am trying to use this display: https://www.waveshare.com/wiki/3.5inch_TFT_Touch_Shield (see also first picture) with a Uno-shaped ESP32 board (see second picture). But no success so far (I also tried with an ESP8266 board). This display works with an Arduino Uno R3 board that I have and the library provided on the Waveshare's wiki.

From what I read in similar topics on this forum, the TFT_eSPI library of Bodmer may be working with this display. But all I can get for now is the backlight that turns on and a white screen.
I also tried to translate the Waveshare library to make it running with the ESP32 and even if it compiles well, I also get a white screen...

Has anyone ever tried to make this display work with an ESP8266 or an ESP32 ?

Thanks for your help, I am kinda really stuck here...

Paste your User_Setup.h for TFT_eSPI

It should be little more than plugging a shield into your Uno Format board.
Configuring for the shield.
Running all of Bodmer's examples.

I am not at a PC. There might even be a ready-made config. I will have a look later.

David.

Hi David and thank you for your quick reply !

I did not modify anything in the User_Setup.h, I made a User_Setup_ESP32_ILI9486.h file in the User_Setups folder. And I modify the User_Setup_Select.h accordingly.

Here is the content of the User_Setup_ESP32_ILI9486.h:

// See SetupX_Template.h for all options available

#define ILI9486_DRIVER

#define TFT_CS 5 // Chip select control pin D8
#define TFT_DC 14 // Data Command control pin
#define TFT_RST 12 // Reset pin (could connect to NodeMCU RST, see next line)
//#define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V

//#define TOUCH_CS PIN_D2

#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts

#define SMOOTH_FONT

// #define SPI_FREQUENCY 27000000
#define SPI_FREQUENCY 40000000
// #define SPI_FREQUENCY 80000000

#define SPI_READ_FREQUENCY 20000000

#define SPI_TOUCH_FREQUENCY 2500000

// #define SUPPORT_TRANSACTIONS

I looked again in the datasheets provided by Waveshare and found that the controller is ILI9486L, not ILI9486. Are these controllers really different ?

Kevin

The SPI Config switches on the Shield should be set for D11, D12, D13 and not the 3x2 header.

From the Wiki:
LCD_CS = D10 -> GPIO5
LCD_RST = D8 -> GPIO12
LCD_DC = D7 -> GPIO14

TP_CS = D4 -> GPIO17
SD_CS = D5 -> GPIO16

So your config looks ok.

I can only suggest that you set SPI_FREQUENCY to 27MHz or lower.
And always select TRANSACTIONS
I woulld also define your Touch CS pin

Please let us know how you get on.

David.

Edit. Please note that I do not own a Waveshare. I can only read the docs

@klarnier,

I would be interested to know if your display works with my library: ILI9486_SPI

See also this topic: SOLVED---Waveshare 4inch Touch LCD Shield to be used with arduino due

But like David I think you are best served with TFT_eSPI.

Jean-Marc

Hi again,

None of the solution you proposed did work. Still a white screen.

@david_prentice
You mentionned the 3x2 header (CSPI, right ?) and that made me thinking. So I tried connecting the shield using dupont wires to the Arduino Uno board without connecting this 3x2 connector. And voilà ! White screen with the Arduino too. So I think some messages are passed trough this connector. I will continue to dig into it this evening.

Kevin

Hi Kevin,

your jumper switches on the shield seem to be open.

Jean-Marc

@ZinggJM
Thank you so much Jean-Marc ! That was as simple as putting those little switches to the position for standard SPI pins. ICSP position is selected by default.
Now my display is working with your library. I haven't been able to make it work with TFT_eSPI tough. I will keep trying to make it work with TFT_eSPI as I intend to create sketches that can run on both ILI9341 and ILI9486 displays.
I will put [solved] in the topic in a few days. Just waiting for more tests with TFT_ePSI.

Kevin

Go on. You just have to specify the correct pins in TFT_eSPI User_Setup.h for your Shield.

Bodmer might even have a specific config in /User_Setups e.g. Setup5_RPi_ILI9486.h

Edit pins for 5, 14, 12 i.e. as suggested in #3

@klarnier

Hi Kevin,

how did you get on with TFT_eSPI?

I just tried my RPi display with Wemos D1 R2 and TFT_eSPI. It works and it is extremely fast!

I had to select the following in User_Setup.h

#define RPI_ILI9486_DRIVER // 20MHz maximum SPI

for my proto board wiring:

#define TFT_CS   PIN_D8  // Chip select control pin D8
#define TFT_DC   PIN_D4  // Data Command control pin
#define TFT_RST  PIN_D3  // Reset pin (could connect to NodeMCU RST, see next line)

important:

 #define SPI_FREQUENCY  20000000

I hope this helps.

Jean-Marc

User_Setup.h (12.9 KB)