Difference between revisions of "ESP32-S3-Touch-LCD-7"

From Waveshare Wiki
Jump to: navigation, search
 
(39 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<div class="wiki-pages jet-green-color">
 
<div class="wiki-pages jet-green-color">
 
{{Infobox item|colorscheme=green
 
{{Infobox item|colorscheme=green
|img=[[File:ESP32-S3-Touch-LCD-7.jpg|300px|{{Amazon_nolink|default={{#ifeq: {{#urlget:amazon|0}}|{{#urlget:Amazon|0}}| default|}}|url=link=https://www.waveshare.com}}]]
+
|img=[[File:ESP32-S3-Touch-LCD-7.jpg|300px|{{Amazon_nolink|default={{#ifeq: {{#urlget:amazon|0}}|{{#urlget:Amazon|0}}| default|}}|url=link=https://www.waveshare.com/esp32-s3-touch-lcd-7.htm}}]]
 
|caption=ESP32-S3-N8R8<br>Type C USB
 
|caption=ESP32-S3-N8R8<br>Type C USB
 
|brand=Waveshare
 
|brand=Waveshare
Line 146: Line 146:
 
#define LV_ATTRIBUTE_FAST_MEM IRAM_ATTR or CONFIG_LV_ATTRIBUTE_FAST_MEM=y
 
#define LV_ATTRIBUTE_FAST_MEM IRAM_ATTR or CONFIG_LV_ATTRIBUTE_FAST_MEM=y
 
</pre>
 
</pre>
*For more details about LCD and LVGL performance, you can refer to [https:/ this document].
+
*For more details about LCD and LVGL performance, you can refer to [https://files.waveshare.com/wiki/ESP32-S3-Touch-LCD-7/Performance.pdf this document].
 
*The 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.
 
*The 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.
  
 
===Dimensions===
 
===Dimensions===
[[File:ESP32-S3-Touch-LCD-72.jpg]]
+
[[File:ESP32-S3-Touch-LCD-Dim.jpg]]
  
 
==Environment Setting==
 
==Environment Setting==
Line 165: Line 165:
 
===Arduino===
 
===Arduino===
 
*Download and install [https://www.arduino.cc/en/software Arduino IDE].
 
*Download and install [https://www.arduino.cc/en/software Arduino IDE].
[[File: ESP32-C6-DEV-KIT-N8-Arduino01.png]]
 
 
*Install ESP32 on the Arduino IDE as shown below, and you can refer to [https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html this link].
 
*Install ESP32 on the Arduino IDE as shown below, and you can refer to [https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html this link].
 
*File -> Preferences -> Additional Boards Managers URLs -> Add the following links:
 
*File -> Preferences -> Additional Boards Managers URLs -> Add the following links:
Line 171: Line 170:
 
https://espressif.github.io/arduino-esp32/package_esp32_dev_index.json
 
https://espressif.github.io/arduino-esp32/package_esp32_dev_index.json
 
</pre>
 
</pre>
[[File: ESP32-C6-DEV-KIT-N8-Arduino04.png]]<br/>[[File: ESP32-C6-DEV-KIT-N8-Arduino05.png]]
+
[[File: ESP32-C6-DEV-KIT-N8-Arduino05.png]]
 
*Enter the development board manager, search for "esp32", select version 3.0.0-alpha3 under "esp32 by Espressif Systems" below, and reboot it after installation.
 
*Enter the development board manager, search for "esp32", select version 3.0.0-alpha3 under "esp32 by Espressif Systems" below, and reboot it after installation.
 
[[File: ESP32-C6-DEV-KIT-N8-Arduino07.png]]<br/>
 
[[File: ESP32-C6-DEV-KIT-N8-Arduino07.png]]<br/>
Line 177: Line 176:
 
[[File: ESP32-S3-Touch-LCD-4.3-Ar02.jpg]]
 
[[File: ESP32-S3-Touch-LCD-4.3-Ar02.jpg]]
 
====Library Installation====
 
====Library Installation====
*TFT_SPI and 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-Touch-LCD-4.3_libraries] to "C:\Users\xxxx\Documents\Arduino\libraries". Please note that "xxxx" represents your computer username.<br>
+
*TFT_SPI and 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 [https://files.waveshare.com/wiki/ESP32-S3-Touch-LCD-7/S3-7-libraries.zip ESP32-S3-Touch-LCD-7_libraries] to "C:\Users\xxxx\Documents\Arduino\libraries". Please note that "xxxx" represents your computer username.<br>
 
[[File: ESP32-S3-Touch-LCD-7-Lib.jpg]]
 
[[File: ESP32-S3-Touch-LCD-7-Lib.jpg]]
 
*After copying:
 
*After copying:
Line 199: Line 198:
  
 
===I2C_Test===
 
===I2C_Test===
I2C_Test example is for "Test I2C socket", scanning all I2C device addresses. <br>
+
I2C_Test example, used to test the use of I2C sockets, this interface connects to GPIO8 (SDA), GPIO9 (SCL) for I2C communication. <br>
*After uploading the demo, connect the I2C device (here we use [https://www.waveshare.com/bme68x-environmental-sensor.htm BME680 environmental sensor] and the corresponding pins of the ESP32-S3-Touch-LCD-7, open [https://files.waveshare.com/upload/b/b3/Sscom5.13.1.zip Sscom5.13.1], select the baud rate as 115200, and open the corresponding COM port for communication. (please turn off the COM port of the ESP-IDF first, otherwise, the serial port can not be opened due to the occupied COM port.)
+
*Use this demo to scan all slave addresses of I2C devices.
[[File: ESP32-S3-Touch-LCD-4.3-110.png]]<br>
+
*After uploading the demo, connects "HY2.0 2P to DuPont Male 4P 10cm" to the I2C socket. Then connect to the I2C device, open SSCOM, and you can see the scanned I2C addresses.
*Press the Reset key on the ESP32-S3-Touch-LCD-7, and the SSCOM will print the information, and input "i2cdetect" as shown below, if "77" is printed, the I2C socket test pass.
+
[[File:I2C_TEST.jpg]]
[[File: ESP32-S3-Touch-LCD-4.3-111.png]]
 
  
 
===RS485_Test===
 
===RS485_Test===
RS485_Test example is for ''' testing RS-485 socket'''.
+
RS485_Test example is for ''' testing RS-485 socket'''. This interface connects to GPIO15 (TXD) and GPIO16 (RXD) for RS485 communication.
*After uploading the code, connect [https://www.waveshare.com/usb-to-rs485.htm USB TO RS485] and ESP32-S3-Touch-LCD-7 pins A and B. After connecting USB TO RS485 to the computer, open the [https://files.waveshare.com/upload/b/b3/Sscom5.13.1.zip SSCOM] and select the corresponding COM port communication.
+
*After uploading the code, the demo needs to use the [https://www.waveshare.com/usb-to-rs485.htm USB TO RS485] converter, connect the RS-485 socket to the "HY2.0 2P to Dupont male 2P 10cm", and then connected to the USB to RS485 converter, USB to RS485 converter connected to the computer.
*Select 115200 baud rate as shown in the figure below, send any character and it will be displayed in loopback, the RS485 socket test passed.
+
*Open the [https://files.waveshare.com/upload/b/b3/Sscom5.13.1.zip SSCOM], send RS485 messages to the ESP32-S3-Touch-LCD-7, ESP32-S3-Touch-LCD-7 will receive the message back to the SSCOM, pay attention to the need to select the correct COM port and baud rate, send a message to the message before checking "AddCrLf ".
 
[[File: ESP32-S3-Touch-LCD-4.3-UART-test.png]]
 
[[File: ESP32-S3-Touch-LCD-4.3-UART-test.png]]
  
 +
===SD_Test===
 +
SD_Test is for testing SD card slot. First, insert the SD card, upload the demo and then read/write the SD card.
 +
*After uploading the demo, ESP32-S3-Touch-LCD-7 will recognize the type and size of the SD card, and then you can operate the files on the SD card:
 +
[[File: ESP32-S3-Touch-LCD-4.3-SDtest01.png]]
 
===TWAItransmit (CAN transmit)===
 
===TWAItransmit (CAN transmit)===
 
TWAItransmit example is for '''testing CAN socket''', and this interface can connect to GPIO20(TXD) and GPIO19(RXD) for CAN communication.
 
TWAItransmit example is for '''testing CAN socket''', and this interface can connect to GPIO20(TXD) and GPIO19(RXD) for CAN communication.
Line 216: Line 218:
 
*Once you open the serial port debugging assistant, you should observe that the Esp32-s3-touch-lcd-7 has started sending CAN messages.
 
*Once you open the serial port debugging assistant, you should observe that the Esp32-s3-touch-lcd-7 has started sending CAN messages.
 
[[File:ESP32-S3-Touch-LCD-4.3-PORtest01.png]]
 
[[File:ESP32-S3-Touch-LCD-4.3-PORtest01.png]]
*Connect the USB-CAN-A to the computer and open the [https://files.waveshare.com/wiki/USB-CAN-A/Tool/Progrom(English%EF%BC%89.zip 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-4.3.
+
*Connect the USB-CAN-A to the computer and open the [https://files.waveshare.com/wiki/USB-CAN-A/Tool/Progrom(English%EF%BC%89.zip 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-7.
 
[[File:ESP32-S3-Touch-LCD-4.3-PORtest102.png]]
 
[[File:ESP32-S3-Touch-LCD-4.3-PORtest102.png]]
  
 
===TWAIreceive (CAN receive)===
 
===TWAIreceive (CAN receive)===
 
TWAIreceive example is for ''' testing CAN socket''', and this interface can connect to GPIO20(TXD) and GPIO19(RXD) for CAN communication.
 
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 CAN H and CAN L pins of the ESP32-S3-Touch-LCD-4.3 to the [https://www.waveshare.com/usb-can-a.htm USB-CAN-A].
+
*After uploading the code, use the "HY2.0 2P to DuPont male head 2P red-black 10cm" cable to connect the CAN H and CAN L pins of the ESP32-S3-Touch-LCD-7 to the [https://www.waveshare.com/usb-can-a.htm USB-CAN-A].
*Connect the USB-CAN-A to the computer and open the [https://files.waveshare.com/wiki/USB-CAN-A/Tool/Progrom(English%EF%BC%89.zip 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-4.3.
+
*Connect the USB-CAN-A to the computer and open the [https://files.waveshare.com/wiki/USB-CAN-A/Tool/Progrom(English%EF%BC%89.zip 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-7.
 
[[File:ESP32-S3-Touch-LCD-4.3-PORtest03.png]]
 
[[File:ESP32-S3-Touch-LCD-4.3-PORtest03.png]]
*Open the serial port debugging assistant, and you should observe that the Esp32-s3-touch-lcd-4.3 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.
+
*Open the serial port debugging assistant, and you should observe that the Esp32-s3-touch-lcd-7 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.
 
[[File:ESP32-S3-Touch-LCD-4.3-PORtest04.png]]
 
[[File:ESP32-S3-Touch-LCD-4.3-PORtest04.png]]
  
Line 238: Line 240:
 
{{Note| '''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|ESP-IDF environment setting]] for specific instructions on how to check and configure them.
 
{{Note| '''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|ESP-IDF environment setting]] for specific instructions on how to check and configure them.
 
|warn}}
 
|warn}}
===esp32-s3-lcd-4.3-b-i2c_tools===
+
===UART_Test===
*esp32-s3-lcd-4.3-b-i2c_tools example is used to '''test the I2C socket''' by scanning various I2C device addresses.
+
UART_Test example is for testing '''UART Interface'''. This interface connects GPIO43(TXD) and GPIO44(RXD) for UART0.
*After uploading the code, connect the I2C device (for this example, we're using the [https://www.waveshare.com/bme68x-environmental-sensor.htm BME680 Environmental Sensor]) to the corresponding pins on the ESP32-S3-Touch-LCD-4.3. Open the [https://files.waveshare.com/upload/b/b3/Sscom5.13.1.zip serial port debugging assistant], select a baud rate of 115200, and open the corresponding COM port for communication (make sure to disable ESP-IDF's COM port first, as it might occupy the COM port and prevent serial port access).
+
*After uploading the code, connect the USB to Type C cable to the "UART" Type C interface, open the [https://files.waveshare.com/upload/b/b3/Sscom5.13.1.zip serial debugging assistant], and send a message to ESP32-S3-Touch-LCD-7. ESP32-S3-Touch-LCD-7 will return the received message to the serial debugging assistant. Make sure to select the correct COM port and baud rate, and check "AddCrLf" before sending the message.
[[File:ESP32-S3-Touch-LCD-4.3-110.png]]
+
[[File: ESP32-S3-Touch-LCD-4.3-UART-test.png]]
*Press the Reset key of the ESP32-S3-Touch-LCD-4.3, SSCOM prints message, input "i2cdetect" as shown below. "77" is printed, and the I2C socket test passes.
 
[[File:ESP32-S3-Touch-LCD-4.3-111.png]]
 
  
===uart_echo===
+
===Sensor_AD===
uart_echo example is for testing '''RS485 socket'''.
+
Sensor_AD example is for '''testing Sensor AD socket'''. This interface connects to GPIO6 for use as an ADC, allowing access to devices such as the [https://www.waveshare.com/sensors-pack.htm Sensor Kit].<br>
*After uploading the code, connect the [https://www.waveshare.com/usb-to-rs485.htm USB TO RS485] and ESP32-S3-Touch-LCD-7 through A and B pins. Open [https://files.waveshare.com/wiki/ESP32-S3-Touch-LCD-4.3/Esp32-s3_datasheet_en.pdf SSCOM] to select the corresponding COM port for communication after connecting USB TO RS485 to the PC.
+
*After uploading the code, connect the sensor AD socket to "HY2.0 2P to DuPont male header 3P 10cm". You can then open the serial debugging assistant to observe the data read from the AD pin. The "ADC analog value" represents the read analog value of the ADC, while the "ADC millivolts value" represents the millivolt value converted from the ADC reading.
*Select the baud rate as 115200 as shown below. When you send any character, it gets looped back and displayed. That's a good indication that the RS485 socket is working as expected.
+
*Short the AD pin and GND pin, reading the value as shown below:
 +
[[File:ESP32-S3-Touch-LCD-7-AD.jpg]]<br>
 +
*Short the AD pin and 3.3V pin, as shown below:
 +
[[File: ESP32-S3-Touch-LCD-7-Sensor-test02.jpg]]<br>
 +
 
 +
===I2C_Test===
 +
I2C_Test example is for '''testing I2C interface''', scanning all device addresses of I2C.<br>
 +
After uploading the code, connect the I2C device (in this case, using the [https://www.waveshare.com/bme68x-environmental-sensor.htm BME680 Environmental Sensor]) to the corresponding pins on the ESP32-S3-Touch-LCD-7. Then, open the [https://files.waveshare.com/upload/b/b3/Sscom5.13.1.zip 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 and prevent the serial port from opening).<br>
 +
[[File: ESP32-S3-Touch-LCD-4.3-110.png]]
 +
*Press the Reset button of ESP32-S3-Touch-LCD-7, SSCOM will print the message, enter i2cdetect as shown in the following figure, it will print 77, and the I2C socket test passes.
 +
[[File: ESP32-S3-Touch-LCD-4.3-111.png]]
 +
 
 +
===RS485_Test===
 +
RS485_Test is for testing the RS485 socket.
 +
*After uploading the code, connect the [https://www.waveshare.com/usb-to-rs485.htm USB to RS485] to the A and B pins of the ESP32-S3-Touch-LCD-7. After connecting the USB to RS485 to the computer, open the [https://files.waveshare.com/upload/b/b3/Sscom5.13.1.zip 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.
 
[[File: ESP32-S3-Touch-LCD-4.3-UART-test.png]]
 
[[File: ESP32-S3-Touch-LCD-4.3-UART-test.png]]
  
===twai_network_master===
+
===TWAItransmit===
twai_network_master example is for '''testing CAN socket'''.
+
TWAItransmit example is for '''testing CAN socket'''. This interface can connect 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 CAN H and CAN L pins of the ESP32-S3-Touch-LCD-4.3 to the [https://www.waveshare.com/usb-can-a.htm USB-CAN-A].
+
*After uploading the demo, you can use the "HY2.0 2P to DuPont male head 2P red-black 10cm" cable to connect the CAN H and CAN L pins of the ESP32-S3-Touch-LCD-7 to the [https://www.waveshare.com/usb-can-a.htm USB-CAN-A].
*Connect the USB-CAN-A to the computer and open the [https://files.waveshare.com/wiki/USB-CAN-A/Tool/Progrom(English%EF%BC%89.zip USB-CAN-A_TOOL_2.0]. Select the corresponding COM port, set the port baud rate to 2000000 as shown in the image, and set a custom baud rate of 25.000Kbps (adjusting phase buffer 1 and phase buffer 2 if necessary).
+
*Open the SSCOM, the Esp32-s3-touch-lcd-7 starts to send CAN message.
[[File:ESP32-S3-Touch-LCD-4.3-113.png]]
+
[[File:ESP32-S3-Touch-LCD-7 twa.jpg]]
*Pressing the Reset button on the ESP32-S3-Touch-LCD-7 causes data to be printed in the data field of USBCANV2.0, confirming the successful test of the CAN socket.
+
*Connects the USB-CAN-A to the computer, open [https://files.waveshare.com/wiki/USB-CAN-A/Tool/Progrom(English%EF%BC%89.zip 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-7.
[[File: ESP32-S3-Touch-LCD-4.3-PORtest02.png]]
+
[[File:ESP32-S3-Touch-LCD-7 twa2.jpg]]
 +
===TWAIreceive===
 +
TWAIreceive example is for '''testing CAN socket'''. This interface can connect GPIO20 (TXD) and GPIO19 (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 CAN H and CAN L pins of the ESP32-S3-Touch-LCD-7 to the [https://www.waveshare.com/usb-can-a.htm USB-CAN-A].
 +
*Connects the USB-CAN-A to the computer, open [https://files.waveshare.com/wiki/USB-CAN-A/Tool/Progrom(English%EF%BC%89.zip 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 sent from the ESP32-S3-Touch-LCD-7.
 +
[[File: ESP32-S3-Touch-LCD-4.3-PORtest03.png]]
 +
*Open the Serial Debug Assistant, where you can see that the Esp32-s3-touch-lcd-7 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.
 +
[[File:ESP32-S3-Touch-LCD twa4.jpg]]
 +
 
 +
===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.
 +
 
 +
=Resource=
 +
==Document==
 +
*[https://files.waveshare.com/wiki/ESP32-S3-Touch-LCD-7/ESP32-S3-Touch-LCD-7-Sch.pdf Schematic diagram]
 +
*[https://docs.espressif.com/projects/arduino-esp32/en/latest/index.html ESP32 Arduino Core's documentation]
 +
*[https://github.com/espressif/arduino-esp32 arduino-esp32]
 +
*[https://github.com/espressif/esp-idf ESP-IDF]
 +
*[https://files.waveshare.com/wiki/ESP32-S3-Touch-LCD-7/ESP32-S3-Touch-LCD-7in0_Drawing.zip ESP32-S3-Touch-LCD-7 3D Drawing]
 +
 
 +
==Demo==
 +
*[https://files.waveshare.com/wiki/ESP32-S3-Touch-LCD-7/S3-7-libraries.zip ESP32-S3-Touch-LCD-7_libraries]
 +
*[https://files.waveshare.com/wiki/ESP32-S3-Touch-LCD-7/ESP32-S3-Touch-LCD-7_Code.zip Sample demo]
 +
 
 +
==Software==
 +
*[https://files.waveshare.com/upload/b/b3/Sscom5.13.1.zip Sscom5.13.1]
 +
*[https://www.arduino.cc/en/software Arduino IDE]
 +
*[https://files.waveshare.com/upload/8/8a/USB-CAN-A_TOOL_EN.zip USB-CAN-A_TOOL_1.2 ]
 +
*[https://files.waveshare.com/wiki/USB-CAN-A/Tool/Progrom(English%EF%BC%89.zip USB-CAN-A_TOOL_2.0]
 +
 
 +
==Datasheet==
 +
*[https://files.waveshare.com/wiki/ESP32-S3-Touch-LCD-4.3/Esp32-s3-wroom-1_wroom-1u_datasheet_en.pdf ESP32-S3 Wroom Datasheet]
 +
*[https://files.waveshare.com/upload/a/a3/CH343DS1-en.PDF CH343 Datasheet]
 +
*[https://www.nxp.com/docs/en/data-sheet/TJA1051.pdf TJA1051 Datasheet]
 +
*[https://files.waveshare.com/upload/e/eb/GT911.pdf GT911 datasheet]
 +
 
 +
=FAQ=
 +
{{FAQ|ESP32-S3-Touch-LCD-7 CAN reception failure?
 +
|
 +
① Restart the COM port in UCANV2.0.exe and press the ESP32-S3-Touch-LCD-7 reset button multiple times.<br/>
 +
② Uncheck '''DTR''' and '''RTS''' in the serial port debugging assistant.
 +
||}}
 +
{{FAQ|ESP32-S3-Touch-LCD-7 shows no response after uploading an Arduino demo for RGB screen displaying?
 +
|
 +
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 (8MB) and enable PSRAM (8MB OPI).
 +
||}}
 +
{{FAQ|ESP32-S3-Touch-LCD-7 fails to compile an Arduino demo for the RGB screen and shows errors?
 +
|
 +
Check if the [https://files.waveshare.com/wiki/ESP32-S3-Touch-LCD-7/S3-7-libraries.zip ESP32-S3-Touch-LCD-7_libraries] is installed. Please refer to [[#Library Installation|installation steps]].
 +
||}}
 +
{{FAQ|Why burn lvgl program missing lv_cong.h when all libraries are installed?
 +
|
 +
I can't retrieve the library file because the path to install the library is in Chinese.
 +
||}}
 +
{{FAQ|Why is the screen not displaying?|
 +
You can refer to the following steps to run the demo for comparison:
 +
*1) Before running the program, [https://files.waveshare.com/wiki/ESP32-S3-Touch-LCD-7/S3-7-libraries.zip please install the library]
 +
*2) Installation library [https://files.waveshare.com/wiki/ESP32-S3-Touch-LCD-4.3/video/ESP32-S3-lib.zip video reference]
 +
*3) Run and burn [https://files.waveshare.com/wiki/ESP32-S3-Touch-LCD-7/ESP32-S3-Touch-LCD-7_Code.zip original program]
 +
|||}}
  
===demo1===
+
=Support=
demo1 example is for testing the display effect of the screen.
+
{{Servicebox1}}

Latest revision as of 02:11, 28 April 2024

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

ESP32-S3-N8R8
Type C USB
{{{name2}}}

{{{name3}}}

{{{name4}}}

{{{name5}}}

Overview

Introduction

The ESP32-S3-Touch-LCD-7 is a low-cost, high-performance microcontroller development board designed by Waveshare. It features 2.4GHz WiFi and BLE 5, integrates large Flash storage and PSRAM, and a 7-inch capacitive touch LCD screen. Support running GUI interface demos such as LVGL. It also has multiple external peripheral interfaces (such as CAN, I2C, RS485, and Sensor) for developing applications such HMI on ESP32-S3. With various functions and interfaces, it is suitable for power requirements in IoT, mobile devices, wearable electronics, and smart 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 onboard antenna.
  • Built-in 512KB SRAM and 384KB ROM, with onboard 8MB Flash and 8MB PSRAM.
  • Onboard 7-inch capacitive touch screen, 800x480 resolution, 65K colors.
  • Support capacitive touch control via I2C interface, 5-point touch control, and 65K colors.
  • Onboard CAN, RS485, I2C interface, SD card slot and so on, integrates full-speed USB serial port.
  • Support flexible clock, module power supply independent setting, and other controls to realize low power consumption in different scenarios.

Hardware Description

ESP32-S3-TOUCH-LCD-7-04.png

  • UART Interface : Use the CH343P chip for USB to UART connection to ESP32-S3's UART_TXD (GPIO43) and UART_RXD (GPIO44) for firmware burning and log printing.
  • USB Interface: GPIO19(DP) and GPIO20 (DN) are default USB pins for ESP32-S3, supporting interfaces such as UVC for cameras. Refer to UVC driver documentation for details.
  • Sensor Interface: This interface connects to GPIO6 for ADC usage, suitable for connecting sensor pack and so on.
  • CAN Interface: CAN interface pins are multiplexed with USB interface pins, using the FSUSB42UMX chip for switching. By default, USB interface is used when FSUSB42UMX's USB_SEL pin is LOW.
  • I2C Interface: ESP32-S3 provides multiple hardware I2C channels. Currently, GPIO8 (SDA) and GPIO9 (SCL) are used for I2C bus connection to IO expansion chips and touch interfaces.
  • RS485 Interface: The development board features onboard RS485 interface circuit, enabling direct communication with RS485 devices. RS485 circuit automatically switches between receive and transmit modes.
  • PH2.0 battery header: The development board employs the efficient charge and discharge management chip CS8501, capable of boosting single-cell lithium batteries to 5V. Currently, the charging current is set to 580mA, and users can modify the charging current by replacing the R45 resistor. Refer to the schematic for details.
Pin Connection
ESP32-S3-WROOM-x LCD USB SD UART CAN Sensor
GPIO0 G3
GPIO1 R3
GPIO2 R4
GPIO3 VSYNC
GPIO4 TP_IRQ
GPIO5 DE
GPIO6 AD
GPIO7 PCLK
GPIO8 TP_SDA
GPIO9 TP_SCL
GPIO10 B7
GPIO11 MOSI
GPIO12 SCK
GPIO13 MISO
GPIO14 B3
GPIO15 RS485_TX
GPIO16 RS485_RX
GPIO17 B6
GPIO18 B5
GPIO19 USB_DN CANRX
GPIO20 USB_DP CANTX
GPIO21 G7
GPIO38 B4
GPIO39 G2
GPIO40 R7
GPIO41 R6
GPIO42 R5
GPIO43 UART_TXD
GPIO44 UART_RXD
GPIO45 G4
GPIO46 HSYNC
GPIO47 G6
GPIO48 G5
CH422G - - - - - -
EXIO1 TP_RST
EXIO2 DISP
EXIO3 LCD_RST
EXIO4 SD_CS
EXIO5 USB_SEL(LOW) USB_SEL(HIGH)

Hardware Connection

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

  • ESP32-S3-Touch-LCD-7 comes with an onboard automatic download circuit. The Type C port, marked UART1, is used for demo downloads and logging. Once the program is downloaded, run it by pressing the RESET button.
  • UART2 is adapted through the PH2.0 connector and shares the same serial port as UART1. It can be selected via a switch on the board. When using UART2 for programming, manual download is required.
  • When using, be cautious around the PCB antenna area to avoid interference from other metals or plastic components pressing against the PCB antenna.
  • The development board employs the PH2.0 connector to expose ADC, CAN, I2C, and RS485 peripheral pins. Sensors can be connected using PH2.0 to 2.54mm DuPont male header accessories.
  • Most GPIO pins are occupied by the 7-inch screen. The development board utilizes the CH422G chip to expand IO, used for functions such as reset, and backlight control.
  • For CAN and RS485 peripherals, 120-ohm termination resistors are connected by default via jumpers. They can be optionally disconnected by setting the jumpers to NC.
  • The SD card communicates via SPI, and it's important to note that the SD_CS pin needs to be driven by the EXIO4 of the CH422G.

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 FLASH]
CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y
CONFIG_SPIRAM_RODATA=y
CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y
CONFIG_COMPILER_OPTIMIZATION_PERF=y
#Configure the following LVGL items for improving 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 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.

Dimensions

ESP32-S3-Touch-LCD-Dim.jpg

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.
  • MicroPython is an efficient implementation of the Python 3 programming language that includes a small subset of the Python standard library and is optimized to run on microcontrollers and in restricted environments. (Development of this product is not currently supported.)
  • 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

Arduino

  • Download and install Arduino IDE.
  • Install ESP32 on the Arduino IDE as shown below, and you can refer to this link.
  • File -> Preferences -> Additional Boards Managers URLs -> Add the following links:
https://espressif.github.io/arduino-esp32/package_esp32_dev_index.json

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

  • Enter the development board manager, search for "esp32", select version 3.0.0-alpha3 under "esp32 by Espressif Systems" below, and reboot it after installation.

ESP32-C6-DEV-KIT-N8-Arduino07.png
3. Open the Arduino IDE and note that Tools in the menu bar selects the corresponding Flash (8MB) and enables PSRAM (8MB OPI), as shown in the following figure.
ESP32-S3-Touch-LCD-4.3-Ar02.jpg

Library Installation

  • TFT_SPI and 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-Touch-LCD-7_libraries to "C:\Users\xxxx\Documents\Arduino\libraries". Please note that "xxxx" represents your computer username.

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

  • After copying:

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

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.

UART_Test

Take UART_Test as an example, UART_Test can be used for testing UART interface. This interface can connect to GPIO43(TXD) and GPIO44(RXD) as UART0.

  • After programming the code, connect the USB to Type-C cable to the "UART" Type-C interface. Open the serial port debugging assistant, and send a message to ESP32-S3-Touch-LCD-7, ESP32-S3-Touch-LCD-7 will return the received message to the serial port debugging assistant. Note that you need to select the correct COM port and baud rate. Check "AddCrLf" before sending the message.
ESP32-S3-Touch-LCD-4.3-UART-test.png

Sensor_AD

Sensor_AD example is used to testing the usage of the Sensor AD socket. This interface connects to GPIO6 for ADC usage and can be connected to Sensor kits and so on.

  • After burning the code, connect the Sensor AD socket to "HY2.0 2P to DuPont male head 3P 10cm". You can then open the serial port debugging assistant to observe the data read from the AD pin. "ADC analog value" represents the analog value read from the ADC, while "ADC millivolts value" represents the ADC value converted to millivolts.
  • When shorting the AD pin with the GND pin, the reading value is as shown in the diagram below:

ESP32-S3-Touch-LCD-4.3-Sensor-test.png

  • When shorting the AD pin with the 3V3 pin, the reading value is as shown in the figure below:

ESP32-S3-Touch-LCD-4.3-Sensor-test02.png

I2C_Test

I2C_Test example, used to test the use of I2C sockets, this interface connects to GPIO8 (SDA), GPIO9 (SCL) for I2C communication.

  • Use this demo to scan all slave addresses of I2C devices.
  • After uploading the demo, connects "HY2.0 2P to DuPont Male 4P 10cm" to the I2C socket. Then connect to the I2C device, open SSCOM, and you can see the scanned I2C addresses.

I2C TEST.jpg

RS485_Test

RS485_Test example is for testing RS-485 socket. This interface connects to GPIO15 (TXD) and GPIO16 (RXD) for RS485 communication.

  • After uploading the code, the demo needs to use the USB TO RS485 converter, connect the RS-485 socket to the "HY2.0 2P to Dupont male 2P 10cm", and then connected to the USB to RS485 converter, USB to RS485 converter connected to the computer.
  • Open the SSCOM, send RS485 messages to the ESP32-S3-Touch-LCD-7, ESP32-S3-Touch-LCD-7 will receive the message back to the SSCOM, pay attention to the need to select the correct COM port and baud rate, send a message to the message before checking "AddCrLf ".

ESP32-S3-Touch-LCD-4.3-UART-test.png

SD_Test

SD_Test is for testing SD card slot. First, insert the SD card, upload the demo and then read/write the SD card.

  • After uploading the demo, ESP32-S3-Touch-LCD-7 will recognize the type and size of the SD card, and then you can operate the files on the SD card:

ESP32-S3-Touch-LCD-4.3-SDtest01.png

TWAItransmit (CAN transmit)

TWAItransmit example is for testing CAN socket, and this interface can connect to GPIO20(TXD) and GPIO19(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-7 to the USB-CAN-A.
  • Once you open the serial port debugging assistant, you should observe that the Esp32-s3-touch-lcd-7 has started sending CAN messages.

ESP32-S3-Touch-LCD-4.3-PORtest01.png

  • 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-7.

ESP32-S3-Touch-LCD-4.3-PORtest102.png

TWAIreceive (CAN receive)

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 CAN H and CAN L pins of the ESP32-S3-Touch-LCD-7 to the 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-7.

ESP32-S3-Touch-LCD-4.3-PORtest03.png

  • Open the serial port debugging assistant, and you should observe that the Esp32-s3-touch-lcd-7 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.

ESP32-S3-Touch-LCD-4.3-PORtest04.png

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)).

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).

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.

UART_Test

UART_Test example is for testing UART Interface. This interface connects GPIO43(TXD) and GPIO44(RXD) for UART0.

  • After uploading the code, connect the USB to Type C cable to the "UART" Type C interface, open the serial debugging assistant, and send a message to ESP32-S3-Touch-LCD-7. ESP32-S3-Touch-LCD-7 will return the received message to the serial debugging assistant. Make sure to select the correct COM port and baud rate, and check "AddCrLf" before sending the message.

ESP32-S3-Touch-LCD-4.3-UART-test.png

Sensor_AD

Sensor_AD example is for testing Sensor AD socket. This interface connects to GPIO6 for use as an ADC, allowing access to devices such as the Sensor Kit.

  • After uploading the code, connect the sensor AD socket to "HY2.0 2P to DuPont male header 3P 10cm". You can then open the serial debugging assistant to observe the data read from the AD pin. The "ADC analog value" represents the read analog value of the ADC, while the "ADC millivolts value" represents the millivolt value converted from the ADC reading.
  • Short the AD pin and GND pin, reading the value as shown below:

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

  • Short the AD pin and 3.3V pin, as shown below:

ESP32-S3-Touch-LCD-7-Sensor-test02.jpg

I2C_Test

I2C_Test example is for testing I2C interface, scanning all device addresses of I2C.
After uploading the code, connect the I2C device (in this case, using the BME680 Environmental Sensor) to the corresponding pins on the ESP32-S3-Touch-LCD-7. 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 and prevent the serial port from opening).
ESP32-S3-Touch-LCD-4.3-110.png

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

ESP32-S3-Touch-LCD-4.3-111.png

RS485_Test

RS485_Test is for testing the RS485 socket.

  • After uploading the code, connect the USB to RS485 to the A and B pins of the ESP32-S3-Touch-LCD-7. 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.

ESP32-S3-Touch-LCD-4.3-UART-test.png

TWAItransmit

TWAItransmit example is for testing CAN socket. This interface can connect GPIO20 (TXD) and GPIO19 (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 CAN H and CAN L pins of the ESP32-S3-Touch-LCD-7 to the USB-CAN-A.
  • Open the SSCOM, the Esp32-s3-touch-lcd-7 starts to send CAN message.

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

  • 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-7.

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

TWAIreceive

TWAIreceive example is for testing CAN socket. This interface can connect GPIO20 (TXD) and GPIO19 (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 CAN H and CAN L pins of the ESP32-S3-Touch-LCD-7 to the 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 sent from the ESP32-S3-Touch-LCD-7.

ESP32-S3-Touch-LCD-4.3-PORtest03.png

  • Open the Serial Debug Assistant, where you can see that the Esp32-s3-touch-lcd-7 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.

ESP32-S3-Touch-LCD twa4.jpg

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.

Resource

Document

Demo

Software

Datasheet

FAQ

 Answer:

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

{{{5}}}


 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 (8MB) and enable PSRAM (8MB OPI).

{{{5}}}



 Answer:

I can't retrieve the library file because the path to install the library is in Chinese.

{{{5}}}


 Answer:

You can refer to the following steps to run the demo for comparison:


Support



Technical Support

If you need technical support or have any feedback/review, please click the Submit Now button to submit a ticket, Our support team will check and reply to you within 1 to 2 working days. Please be patient as we make every effort to help you to resolve the issue.
Working Time: 9 AM - 6 PM GMT+8 (Monday to Friday)