• sales

    +86-0755-88291180

ESP32-S3-Touch-LCD-5 User Guide

Overview

Introduction

ESP32-S3-Touch-LCD-5 is a microcontroller development board with 2.4GHz WiFi and BLE 5 and integrates high-capacity Flash and PSRAM. The onboard 5-inch capacitive touch screen can smoothly run GUI demos such as LVGL. Combined with various peripheral interfaces (such as CAN, I2C and RS485 interface), it is suitable for the quick development of the HMI and other ESP32-S3 applications. With these advantages, ESP32-S3-Touch-LCD-5 meets the power requirements in scenarios such as IoT, mobile devices, and intelligent home applications.

Features

  • Equipped with Xtensa 32-bit LX7 dual-core processor, up to 240MHz main frequency.
  • Supports 2.4GHz Wi-Fi (802.11 b/g/n) and Bluetooth 5 (LE), with an onboard antenna.
  • Built-in 512KB of SRAM and 384KB ROM, with onboard 16MB PSRAM and 8MB Flash.
  • Onboard 5inch capacitive touch display, with the resolution of 800×480 or 1024x600, 65K color.
  • Supports capacitive touch control via I2C interface, 5-point touch with interrupt support.
  • Onboard CAN, RS485, I2C interface, and Micro SD card slot, integrate full-speed USB port.
  • Supports flexible clock, module power supply independent setting, and other controls to realize low power consumption in different scenarios.

Version Selection


Hardware Description

Onboard Interface

  • CAN Port : transceiver control, data analysis, acquisition and monitoring of the CAN bus network.
  • I2C interface: ESP32-S3 provides multi-lane hardware, currently uses GPIO8(SDA) and GPIO9(SCL) pins as I2C bus for loading IO expansion chip, touch interface and I2C interface.
  • RS485 interface: the development board onboard RS485 interface circuits for directly connecting to RS485 device communication, and support automatic switching of RS485 circuit transceiver mode.
  • Isolated I/O port: isolated I/O ports feature digital outputs, digital inputs and input signal common terminal, with IO level up to 5~36V.
  • MX1.25 battery header: The development board adopts the high-performance charge/discharge management chip CS8501. It can boost a single-cell lithium battery to 5V. Currently, the charging current is set at 580mA, and users can modify the charging current by replacing the R45 resistor. For more details, you can refer to schematic diagram.
Pin Connection
ESP32-S3-WROOM-xLCDUSBSDUARTCANRTCDO/DO
GPIO0G3
GPIO1R3
GPIO2R4
GPIO3VSYNC
GPIO4TP_IRQ
GPIO5DE
GPIO6
GPIO7PCLK
GPIO8TP_SDA
GPIO9TP_SCL
GPIO10B7
GPIO11MOSI
GPIO12SCK
GPIO13MISO
GPIO14B3
GPIO15CANTX
GPIO16CANRX
GPIO17B6
GPIO18B5
GPIO19USB_DN
GPIO20USB_DP
GPIO21G7
GPIO38B4
GPIO39G2
GPIO40R7
GPIO41R6
GPIO42R5
GPIO43RS485_RX
GPIO44RS485_TX
GPIO45G4
GPIO46HSYNC
GPIO47G6
GPIO48G5
CH422G-------
EXIO0DI0
EXIO1TP_RST
EXIO2DISP
EXIO3LCD_RST
EXIO4SD_CS
EXIO5DI1
OD0DO0
OD1DO1

Hardware Connection


  • The development board downloads demos through a USB cable. If the port cannot be identified, please enter boot mode (press the boot key and connect it to the PC, and then release the boot key). After downloading the demo, you can run the demo by pressing the reset key.
  • Please keep other metals or plastic material away from the PCB antenna area during use.
  • The development board adopts 3.55mm screw terminal to adapt peripheral interfaces such as CAN interface, I2C, RS485 and I/O ports.
  • The 5-inch screen uses most of GPIO resources, and the development board expands I/O through CH422G chip for resetting, backlight control and so on.
  • The CAN and RS485 peripheral interfaces do not connect to a 120ohm resistor through the switch by default. You can turn ON to connect to the terminal resistor.
  • The TF card employs SPI communication. Note that the SD_CS pin needs to be driven by the EXIO4 of the CH422G.
  • The isolated I/O is controlled by CH422G, for more details, you can refer to IO_Test example. To learn the driving principle, you can refer to the demo.

Notes

  • Currently, running the LVGL benchmark example on ESP-IDF v5.3 with a single core has an average frame rate limit of 26, corresponding to an interface frame rate of 41 (PCLK 21 MHz). Before compiling, you need to configure ESP32 and LVGL through menuconfig.
CONFIG_FREERTOS_HZ=1000
CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240=y
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
CONFIG_ESPTOOLPY_FLASHFREQ_120M=y [should align with PSRAM]
CONFIG_SPIRAM_MODE_OCT=y
CONFIG_IDF_EXPERIMENTAL_FEATURES=y and CONFIG_SPIRAM_SPEED_120M=y [should align with PSRAM]
CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y
CONFIG_SPIRAM_RODATA=y
CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y
CONFIG_COMPILER_OPTIMIZATION_PERF=y
#The following LVGL configuration can improve the frame rate (LVGL v8.3):
#define LV_MEM_CUSTOM 1 or CONFIG_LV_MEM_CUSTOM=y
#define LV_MEMCPY_MEMSET_STD 1 or CONFIG_LV_MEMCPY_MEMSET_STD=y
#define LV_ATTRIBUTE_FAST_MEM IRAM_ATTR or CONFIG_LV_ATTRIBUTE_FAST_MEM=y
  • For more details about LCD and LVGL performance, you can refer to this document.
  • The PH2.0 lithium battery socket only supports single-cell 3.7V lithium batteries. Do not use multiple battery packs for charging and discharging simultaneously. It is recommended to use a single-cell battery with a capacity of below 2000mAh.
  • Please do not use the following slave addresses as they already have been used by the development board.
  • The CH422G of the board occupies the following slave address with the touch, do not use I2C devices with the same address:
    0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00: -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
10: -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
20: 20 21 22 23 24 25 26 27 -  -  -  -  -  -  -  -
30: 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f
40: -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
50: -  51 -  -  -  -  -  -  -  -  -  -  -  -  5d -
60: -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
70: -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -

Dimensions


Environment Setting

The software framework for ESP32 series development boards is completed, and you can use MicroPython, and C/C++ (Arduino, ESP-IDF) for rapid prototyping of product development. Here's a brief introduction to these three development approaches:

  • Official C/C++ library installation:
    • ESP32 series Arduino development tutorial.
    • ESP32 series ESP-IDF development tutorial.
  • Environment setting is supported on Windows 10. Users can select Arduino/Visual Studio Codes (ESP-IDF) as IDE to develop. For Mac/Linux, users can refer to official introduction.

ESP-IDF

  • It is recommended to develop with the VSC plug-in.

Develop with VSCode Plug-in

Install VSCode

  • 1. Open the download page of the official VSCode website, and select the corresponding system and system bit to download.
  • 2. After running the installation package, the rest can be installed by default, but here for the subsequent experience, it is recommended to check boxes 1, 2, and 3.
    • After the first and second items are enabled, you can open VSCode directly by right-clicking files or directories, which can improve the subsequent user experience.
    • After the third item is enabled, you can select VSCode directly when you choose how to open it.

Install Python Environment

1. First, go to Python website to download Python 3.11. Also, you can download it from Microsoft Store, and then you do not need to configure it manually.
2. Check "Add python.exe to PATH", and add "Python" to system environment variables.
3. Select the path to install, and click on "Install".

Install Espressif IDF Plug-in

  • The newest version of this plug-in is V1.7.1, it is recommended to select the following version for a better using experience. Here we provide this package for you to download.
1. Create a new file folder named "esp", and place the downloaded package, double-click this file folder, and click on "Extract" to unzip the package:
2. After unzipping, create a file folder to store the compile tool in the unzipped file folder named "Espressif".
3. Open VSCode and use the shortcut key Shift + Ctrl + X to enter the plugin manager.
4. In the search bar, type Espressif IDF, select the corresponding plug-in, and click install.
5. Press F1 to enter:
esp-idf: configure esp-idf extension
6. Choose express (This tutorial is for first-time users, so only the first general installation tutorial is covered.
7. Open and display this screen.
8. Configure it as the following setting, click on "Install" to download.

ESP32-S3-Touch-LCD-7-16.jpg

9. Enter the download page, it will automatically install the corresponding tools and environment, wait a moment, after the installation is complete, it will enter the following interface, indicating that the installation is complete:
  • Note: If you have installed ESP-IDF before, or failed to do so, please be sure to delete the file completely or create a new path without Chinese.
Create Demo
1. Using the shortcut F1, type:
esp-idf:show examples projects
2. Choose your current IDF version:


3. Take "Hello World" as an example:
4. ① Choose the corresponding demo.
5. ② The readme file will explain which chip the demo is suitable for (the following section will introduce how to use the demo and its file structure, which is omitted here).
6. ③ Click to create the demo.
7. Choose the path to place the demo and ensure that there is no folder with the same name as the demo.
Modify COM Port
1. The corresponding COM port is displayed here, click on it to modify.
2. We check the device manager COM port, and select COM5, please select your corresponding COM port:


3. Choose the project and demo.


4. Then the COM port is modified.
Modify the Driver
1. Here shows the driver used, click here to modify the corresponding driver:
2. Choose the project or demo:

ESP32-C6-DEV-KIT-N8-20.png

3. Wait for a few seconds after clicking.
4. Choose the driver we need, that is, the main chip ESP32S3.
5. Choose the openocd path, we can just choose USB JTAG.
  • USB Bridge is a general purpose interface conversion tool for converting USB to other types of interfaces for communication and debugging between various devices.
  • USB JTAG is a dedicated debugging and programming tool that specializes in debugging and programming integrated circuits, providing hardware-level test and diagnostic capabilities.
The Rest of the Status Bar Introduction


  • ① SDK configuration editor: many functions and configurations of ESP-IDF can be modified within it.
  • ② Clean up everything and delete all compiled files.
  • ③ Compile.
  • ④ Current download method, default is UART.
  • ⑤ Program the current firmware, please do it after compiling.
  • ⑥ Open the serial monitor to view serial information.
  • ⑦ Combined button for compiling, programming, and opening the serial monitor (most commonly used during debugging).
Compile, Program, and Serial Port Monitoring
1. Click on the Compile, Program, and Open Serial Monitor buttons we described earlier.
2. It may take a long time to compile, especially for the first time.
  • During this process, ESP-IDF may take up a lot of CPU resources and therefore may cause system lag.
3. Because we use CH343 as a USB to serial port chip, and the on-board automatic download circuit, it can be downloaded automatically without manual operation.
4. After successful download, it will automatically enter the serial monitor, and you can see the corresponding information output from the chip and prompt to reboot after 10s.

Arduino

C:\Users\{username}\AppData\Local\Arduino15\packages\

Take the username "waveshare" as an example:

C:\Users\waveshare\AppData\Local\Arduino15\packages\
  • After installation, open Arduino IDE, open File -> Preferences -> Seetting, input the following link at Additional boards manager URLs and save it:
https://arduino.me/packages/esp32.json

Aruino-link.png

  • Search esp32 on Board Manager to install, if 3.0.2 is installed, the offline package is installed.

ESP32-S3-Touch-LCD-7-01.jpg

Library Installation

  • Lvgl libraries require configuration files after installation. It's recommended to directly copy the ESP32_Display_Panel, ESP32_IO_Expander, lvgl file, ESP_Panel_Conf.h, and lv_conf.h file of the ESP32_S3_Display_libraries to "C:\Users\xxxx\Documents\Arduino\libraries". Please note that "xxxx" represents your computer username.


  • After copying:


Sample Demo

Arduino

Note: Before using the Arduino demos, please check whether the Arduino IDE environment and download settings are correctly configured, for details, please check the Arduino Configure.
  • Please configure as shown below, otherwise the USB port will not output information:
USB CDC On Boot sets Enabled
Flash Size sets 16MB(128Mb)

Configure as shown below before using the screen:

Set USB CDC On Boot as Enabled
Set Flash Size as 16MB(128Mb)
Set PSRAM as OPI PSRAM
  • Before using the Arduino example, the software library should be set as shown below:

If you install a different version of Arduino esp32, there may be errors, we recommend installing the version we provide for testing and development.

I2C_Test

I2C_Test example is for testing I2C socket, and this interface can connect to GPIO8(SDA) and GPIO9(SCL) for I2C communication.

  • Using this demo to scan the slave address of the I2C device.
  • After programming the code, connect the I2C socket to "HY2.0 2P to DuPont male head 4P 10cm". Connect it to the I2C device, and open the serial port assistant. Then you can see it outputs the scanned I2C address at 5s intervals.


RS485_Test

RS485_Test example is for testing RS-485 socket, and this interface can connect to GPIO44(TXD) and GPIO143(RXD) for RS485 communication.

  • This demo require USB TO RS485 (B). After programming the code, the RS-485 socket can connect to USB TO RS485 (B) through a "HY2.0 2P to DuPont male head 2P 10cm" and then connect it to the PC.
  • Open the serial port debugging assistant and send an RS485 message to ESP32-S3-Touch-LCD-5. The ESP32-S3-Touch-LCD-5 will return the received message to the serial port debugging assistant. Ensure to select the correct COM port and baud rate. Before sending the message, check "AddCrLf" to add a carriage return and line feed.


SD_Test

The SD_Test example is used to testing the SD card socket. Before using it, insert an SD card.

  • After flashing the code, the ESP32-S3-Touch-*LCD-5 will recognize the type and size of the SD card and proceed with file operations such as creating, deleting, modifying, and querying files.


RTC_Test

RTC_Test example is for using RTC clock and RTC interrupt.

  • After burning the code it will set the time, start the alarm, then read the current time and wait for the alarm to be entered.
  • The arrow is triggering the alarm and the red box is reading the time.


IO Test

IO_Test example, used to test the use of isolated IO, need to first connect DO0 and DI0, DO1 and DI1 connected

  • After burning the code, the test passes with a green screen and fails with a red screen.
  • The program has a macro definition, used to select the use of 800x480 resolution and 1024x600 resolution, according to your own models.
#define ESP_PANEL_USE_1024_600_LCD (0) // 0: 800x480, 1: 1024x600

TWAItransmit

TWAItransmit example is for testing CAN socket, and this interface can connect to GPIO15(TXD) and GPIO16(RXD) for CAN communication.

  • After programming the code, using the "HY2.0 2P to DuPont male head 2P red-black 10cm" cable, and connect the CAN H and CAN L pins of the ESP32-S3-Touch-LCD-5 to the USB-CAN-A.
  • Once you open the serial port debugging assistant, you should observe that the Esp32-s3-touch-lcd-5 has started sending CAN messages.
  • Connect the USB-CAN-A to the computer and open the USB-CAN-A_TOOL_2.0. Select the corresponding COM port, set the baud rate to 2000000 as shown in the image, and set the CAN baud rate to 50.000Kbps. This configuration will allow you to view the CAN messages sent by the Esp32-s3-touch-lcd-5.


TWAIreceive

TWAIreceive example is for testing CAN socket, and this interface can connect to GPIO20(TXD) and GPIO19(RXD) for CAN communication.

  • After uploading the code, use the "HY2.0 2P to DuPont male head 2P red-black 10cm" cable to connect the ESP32-S3-Touch-LCD-5 to the CAN H and CAN L pins of USB-CAN-A.
  • Connect the USB-CAN-A to the computer and open the USB-CAN-A_TOOL_2.0. Select the corresponding COM port, set the port baud rate to 2000000 as indicated in the image, and set the CAN baud rate to 500.000Kbps. With these settings, you'll be able to send CAN messages to the Esp32-s3-touch-lcd-5.


  • Open the serial port debugging assistant, and you should observe that the Esp32-s3-touch-lcd-5 has started receiving CAN messages. If there are any reception errors, try resetting the devices multiple times and restarting the software. Please be patient and allow some time for the reception process.


lvgl_Porting

lvgl_Porting example is for testing RGB touch screen.

  • After uploading the code, you can try to touch it. Also, we provide LVGL porting examples for users (If there's no screen response after burning the code, check if the Arduino IDE -> Tools settings are correctly configured: choose the corresponding Flash (8MB) and enable PSRAM (8MB OPI)).
  • Here we runs LVGL demo, and the bottom layer uses ESP Display Panel. Also, you can refer to this link to read FAQ.
  • lvgl 8.4 tutorial: click here
  • There is a definition in this demo: ESP_Panel_Board_Custom.h, you can select the resolution of 800x480 or 1024x600, please select it according to your product model.
#define ESP_PANEL_USE_1024_600_LCD (0) // 0: 800x480, 1: 1024x600

DrawColorBar

DrawColorBar example is for testing RGB screen.

  • After uploading the code, you should observe the screen displaying bands of blue, green, and red colors. If the screen shows no response after burning the code, check if the Arduino IDE -> Tools settings are correctly configured: choose the corresponding Flash (8MB) and enable PSRAM (8MB OPI).
  • There is a definition in this demo. You can select the resolution of 800x480 or 1024x600, please select it according to your product model.
#define ESP_PANEL_USE_1024_600_LCD (0) // 0: 800x480, 1: 1024x600

ESP-IDF

Note: Before using ESP-IDF examples, please ensure that the ESP-IDF environment and download settings are correctly configured. You can refer to the ESP-IDF environment setting for specific instructions on how to check and configure them.

I2C_Test

I2C_Test example is for testing I2C interface, scanning all device addresses of I2C.

  • After flashing the demo, connect the I2C device (in this case, using the BME680 Environmental Sensor) to the corresponding pins on the ESP32-S3-Touch-LCD-5. Then, open the serial debugging assistant, select a baud rate of 115200, and choose the corresponding COM port for communication (make sure to close the ESP-IDF's COM port first, as it may occupy the COM port to prevent the serial port from opening).


  • Press the Reset button of ESP32-S3-Touch-LCD-5, SSCOM will print the message, enter i2cdetect as shown in the following figure, it will print 77, and the I2C socket test passes.


RS485_Test

RS485_Test is for testing the RS485 socket.

  • After flashing the code, connect the USB to RS485 to the A and B pins of the ESP32-S3-Touch-LCD-5. After connecting the USB to RS485 to the computer, open the SSCOM and select the corresponding COM port for communication.
  • Choose a baud rate of 115200 as shown in the diagram below. Sending any character will result in a loopback display. Testing of the RS485 socket has passed.


SD_Test

The SD_Test example is used to test the SD card socket. Before using it, insert an SD card.

  • After uploading this demo, ESP32-S3-Touch-LCD-5 will print the information about this SD card including name, type, size and the supported maximum frequency. Re-create file, write file, rename file, read renamed file:

RTC_Test

RTC_Test example is for using RTC clock and RTC interrupt.

  • After burning the code it will set the time, start the alarm, then read the current time and wait for the alarm to be entered.
  • The arrow is triggering the alarm and the red box is reading the time.

IO_Test

IO_Test example is for testing the isolated IO: please connect the DO0 and DI0 pin first, and then DIO1 and DI1.

  • After programming the code, the screen turns green when the test passes, and turns red when the test does not pass.

TWAItransmit

TWAItransmit example is for testing CAN socket. This interface can connect GPIO15 (TXD) and GPIO16 (RXD) for CAN communication.

  • After uploading the demo, you can use the "HY2.0 2P to DuPont male head 2P red-black 10cm" cable to connect the ESP32-S3-Touch-LCD-5 to the CAN H and CAN L pins of USB-CAN-A.
  • Open the SSCOM, you can see the Esp32-s3-touch-lcd-5 starts to send CAN message.
  • Connects the USB-CAN-A to the computer, open USB-CAN-A-Tool-2.0, select the corresponding COM port, 2000000 as the baud rate, 50.000Kbps as the CAN baud rate, and then you can see the CAN message sent from the ESP32-S3-Touch-LCD-5.


TWAIreceive

TWAIreceive example is for testing CAN socket. This interface can connect GPIO15 (TXD) and GPIO16 (RXD) for CAN communication.

  • After uploading the demo, you can use the "HY2.0 2P to DuPont male head 2P red-black 10cm" cable to connect the ESP32-S3-Touch-LCD-5 to the CAN H and CAN L pins of USB-CAN-A.
  • Connects the USB-CAN-A to the computer, open USB-CAN-A-Tool-2.0, select the corresponding COM port, 2000000 as the baud rate, 500.000Kbps as the CAN baud rate, and then you can see the CAN message is sent to the ESP32-S3-Touch-LCD-5.


  • Open the Serial Debug Assistant, where you can see that the Esp32-s3-touch-lcd-5 has started receiving CAN messages. If there are reception errors, try resetting the device multiple times and restarting the software. Please be patient and wait for the process to complete.


lvgl_Porting

lvgl_Porting example is for testing RGB touch screen.

  • After uploading the code, you can test the touching on the screen, and the demo also supports LVGL porting for users.
  • There is a definition in this demo: rgb_lcd_example_main.c, you need to select the resolution of 800x480 or 1024x600 according to your product.
#define ESP_PANEL_USE_1024_600_LCD (0) // 0: 800x480, 1: 1024x600


Resource

Document

Demo

Software

Datasheet

FAQ

Question:ESP32-S3-Touch-LCD-5 CAN reception failure?

 Answer:

① Restart the COM port in UCANV2.0.exe and press the ESP32-S3-Touch-LCD-5 reset button multiple times.
② Uncheck DTR in the serial port debugging assistant.


Question:ESP32-S3-Touch-LCD-5 shows no response after uploading an Arduino demo for RGB screen displaying?

 Answer:

If there's no screen response after programming the code, check whether the correct configurations are set in Arduino IDE -> Tools: Choose the corresponding Flash (16MB) and enable PSRAM (8MB OPI).


Question:ESP32-S3-Touch-LCD-5 fails to compile an Arduino demo for the RGB screen and shows errors?

 Answer:

Check if the library is installed. Please refer to installation steps.


Question:Why burn lvgl program missing lv_cong.h when all libraries are installed?

 Answer:

Because the path to install the library is in Chinese.


Question:Why does the screen not display?

 Answer:

Please refer to the following steps:


Question:It prompts "fatal error:esp_ memory_ utils.h:No such file or directory" when running the example on Arduino IDE.

 Answer:

Please install Arduino v3.0.2-h to solve this issue.


Support