Waveshare ESP32-S3-Touch-LCD-4 (V4.0)
4" 480x480 square ST7701 panel (RGB) with GT911 touch, a TF card slot, RS485, CAN, a PCF85063 RTC, a buzzer and a battery charger. A CH32V003 helper chip handles the resets, backlight, buzzer and battery reading.
Affiliate link: LCD Wizard may earn a commission if you buy through it.
Building for it
A project is made for one toolchain, picked when you start it. For this board you can use three of the four:
| Toolchain | |
|---|---|
| Arduino (C++) | Every board, every widget and every peripheral here. The most control, and the most to set up. Start a project |
| MicroPython | Change a screen by editing a file on the board. No compiler once it is flashed. Start a project |
| ESPHome | An ST7701 needs a register load written for its particular panel, sent over SPI alongside the RGB bus, and there is no generic one. ESPHome carries the sequence inside its model for a few named boards - the Guition ESP32-4848S040 among them - so pick one of those on the Board tab, or use the Arduino export, which can send every sequence the Display tab offers. |
| ESP-IDF (C) | Espressif's own framework: esp_lcd, the component registry and idf.py, with nothing of Arduino in it. Start a project |
At a glance
| Part | Detail |
|---|---|
| Maker | Waveshare |
| MCU | ESP32-S3 Xtensa LX7 dual-core @ 240 MHz, 512 KB SRAM (+ 2-16 MB PSRAM on most modules) |
| Display | Sitronix ST7701 / ST7701S, 480 x 480 px, RGB565 parallel (DPI), 16-bit colour |
| Touch | Goodix GT911 (capacitive, I2C) |
| Backlight | Always on, or controlled by the board |
| Memory | 16 MB flash, 8 MB octal PSRAM (N16R8) |
| Graphics library | GFX Library for Arduino |
Display pins
ST7701 / ST7701S on RGB565 parallel (DPI): RGB colour order, inversion off.
| Signal | Pin |
|---|---|
| DE | GPIO 40 |
| VSYNC | GPIO 39 |
| HSYNC | GPIO 38 |
| PCLK | GPIO 41 |
| R0 - R4 | GPIO 46, 3, 8, 18, 17 |
| G0 - G5 | GPIO 14, 13, 12, 11, 10, 9 |
| B0 - B4 | GPIO 5, 45, 48, 47, 21 |
| CS (init only) | GPIO 42 |
| SCK (init only) | GPIO 2 |
| MOSI (init only) | GPIO 1 |
| RESET | not connected |
Touch pins
GT911: I2C address 0x5D, 400 kHz, shares the display bus.
| Signal | Pin |
|---|---|
| SDA | GPIO 15 |
| SCL | GPIO 7 |
| RESET | not connected |
Also on the board
- I2C (GPIO 15 / 7: touch, CH32, RTC, header) - SDA GPIO 15, SCL GPIO 7
- IOExtension I/O expander at 0x24, driving the lines marked above
- RTC - PCF85063, at 0x51, on I2C (GPIO 15 / 7: touch, CH32, RTC, header)
- SDCard - SD card, CLK GPIO 2, CMD GPIO 1, D0 GPIO 4
- RS485 - RS485 / Modbus RTU, TX GPIO 44, RX GPIO 43 (arrives switched off in a new design)
The A and B terminals. The transceiver turns itself round, so there is no direction pin. A 120R terminator is on the DIP switch. - CanBus - CAN bus / OBD-II, TX GPIO 6, RX GPIO 0 (arrives switched off in a new design)
The CAN H and L terminals. Its RX is GPIO 0, the BOOT button's pin: hold nothing on the bus while the board starts. A 120R terminator is on the DIP switch. - IOExtension pin 6 is set low at boot - Buzzer off (EXIO6)
- IOExtension pin 0 is set low at boot - Charger STAT line low (EXIO0), as Waveshare write it
- IOExtension pin 2 is set low at boot - Touch INT low (EXIO2), so the GT911 takes 0x5D
- IOExtension pin 4 is set low at boot - TF card D3 low (EXIO4), as Waveshare write it
- IOExtension pin 7 is set low at boot - RTC INT line low (EXIO7), as Waveshare write it
- IOExtension pin 3 is set low at boot - Panel reset (EXIO3) held
- IOExtension pin 1 is set low at boot - Touch reset (EXIO1) held
- IOExtension pin 3 is set high at boot - Panel reset (EXIO3) released
- IOExtension pin 1 is set high at boot - Touch reset (EXIO1) released
- Battery - analog input on IOExtension's ADC
- Buzzer - output on IOExtension pin 6
The preset adds these to the Hardware tab with the board, so a sensor can go straight onto the connector.
Check your revision. For the V4.0 board ("Rev4.0" under the screen). Earlier boards (no mark, V1.1, V3.0) have a TCA9554 at 0x20 where this has Waveshare's CH32V003 helper at 0x24, and their touch INT on GPIO 16: this preset will not light them. Pins from Waveshare's V4.0 schematic and their V4 Arduino demos: the ST7701 on RGB with its register load over CS 42, SCL 2, SDA 1 (GFX Library's type 1 table, as their demo), 12 MHz with hsync 10/8/50 and vsync 10/8/20, turned half round as their demo turns it; touch (GT911, 0x5D), the CH32 and the PCF85063 RTC (0x51) on I2C 15/7. The CH32 holds the panel's reset (EXIO3), the touch's reset (EXIO1) and INT (EXIO2), the TF card's D3 (EXIO4), the battery hold (EXIO5), the buzzer (EXIO6), the RTC's interrupt (EXIO7) and the charger's status (EXIO0); the sketch starts it as Waveshare's WS_CH32_IO does. The backlight is the CH32's PWM, left as the CH32 sets it (Waveshare's start-up never writes it), so Set backlight does nothing on this board yet. The TF card is SD_MMC with one data line (CLK 2, CMD 1, D0 4), on the panel's load wires. RS485 sends on GPIO 44 and receives on 43; CAN is TX 6, RX 0 (the BOOT pin): both arrive switched off. The battery reads through the CH32's ADC (x3). The PWRKEY reads on GPIO 16 (low while pressed) and is not in the kit. Not run on a board here. The ESP32-S3-LCD-4 is the same board without touch: set Touch to None.
Designing for it in LCD Wizard
- Choose Waveshare ESP32-S3-Touch-LCD-4 (V4.0) on the Hardware tab (or use the button above) and every pin on this page is filled in. The export writes the sketch,
lcd_pins.h, the GFX Library for Arduino configuration,lv_conf.handplatformio.ini- a project that builds for this board as it comes. - The GT911 is capacitive and needs no calibration. The firmware resets it and checks it answers on every boot.
- An RGB panel keeps its frame buffer in PSRAM, which this board has.
- Screens are designed for 480 x 480 px in either orientation, with LVGL 9 or LVGL 8.
The parts
ST7701 / ST7701S. RGB data plus a 3-wire SPI init sequence. You must wire CS/SCK/MOSI as well, and pick the init sequence your panel wants.
GT911. The address is selected by the INT pin level during reset, so wire INT and RST if you can.
ESP32-S3. The only common Arduino target with a hardware RGB565 LCD peripheral. PSRAM is effectively required for RGB panels.
GFX Library for Arduino. Moshi Liu's library. Best QSPI/AMOLED and RGB coverage. Configured in code.
The pinout on one page
Every pin above, laid out to print and keep beside the bench. Generated from this preset, so it says exactly what the designer writes into lcd_pins.h.
Download the pinout (PNG)Open it as SVG
The same pins as data - board.json and pins.csv - are in the open pinout dataset on GitHub, free to reuse under CC BY 4.0.
From the people who made it
The board’s own documentation. Pinouts on vendor pages do sometimes disagree with the hardware in front of you - where this page and that one differ, trust your board and tell us.
- The vendor’s product page
- Vendor documentation
- Waveshare demo code and V4.0 schematic (pins read from here)
Designs for this board
Nobody has published a design for this board yet. Publish yours from the designer and it appears here and in the gallery.
Similar boards
Next
- Quick start - from an empty screen to firmware on the board
- Boards and displays - presets, controllers, pins and touch in the designer
- Flashing and configuration - PlatformIO, the Arduino IDE and first-boot checks
- Troubleshooting - a white screen, mirrored image or touch that misses