ESP32-S3-LCD-1.28

From Waveshare Wiki
Jump to: navigation, search
ESP32-S3-LCD-1.28
ESP32-S3-LCD-1.28.jpg

Type C USB, ESP32-S3R2
{{{name2}}}

{{{name3}}}

{{{name4}}}

{{{name5}}}

{{{name6}}}

Overview

Introduction

The ESP32-S3-LCD-1.28 (referred to as the development board hereafter) is a low-cost, high-performance microcontroller development board designed by Waveshare. It features a 1.28-inch LCD screen, a lithium battery charging chip, and peripherals such as a six-axis sensor (three-axis accelerometer and a three-axis gyroscope). The board utilizes the ESP32-S3R2, an integrated system-on-chip (SoC) with low-power Wi-Fi and BLE5.0 capabilities. Additionally, it comes with an external 16MB Flash and 2MB PSRAM.
The SoC includes hardware encryption accelerators, RNG (Random Number Generator), HMAC (Hash-based Message Authentication Code), and a Digital Signature module, meeting the security requirements of the Internet of Things (IoT). Its various low-power operating modes cater to power consumption needs in IoT, mobile devices, wearable electronics, smart homes, and other application scenarios.

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 (BLE), with onboard antenna.
  • Built-in 512KB of SRAM and 384KB ROM, with onboard 2MB PSRAM and an external 16MB Flash memory.
  • Type-C connector, keeps it up to date, easier to use.
  • Onboard 1.28-inch LCD display, round IPS panel, 240×240 resolution, 65K color.
  • Onboard QMI8658 6-axis IMU (3-axis accelerometer and 3-axis gyroscope) for detecting motion gestures.
  • Onboard 3.7V lithium battery recharge/discharge header and GPIO headers.
  • Supports flexible clock, module power supply independent setting, and other controls to realize low power consumption in different scenarios.
  • Integrated with USB serial port full-speed controller, GPIO pins allow flexible configuring pin functions.

Parameters

LCD Parameter
Display Chip GC9A01A Display Interface SPI
Resolution 240(H)RGB x 240(V) Display Size Φ32.4mm
Display Panel IPS Pixels 0.135(H) x 0.135(V)mm


IMU Paramters
Sensor Name QMI8658
Accelerator Characteristics Resolution: 16-bit
Measurement Range (Optional): ±2, ±4, ±8, ±16g
Gyroscope Characteristics Resolution: 16 bits
Measuremnet Range (Optional): ±16, ±32, ±64, ±128, ±256, ±512, ±1024, ±2048°/sec

Notes

  • When using the development board, pay attention to the ceramic antenna area and avoid covering the ceramic antenna with PCB boards, metal, or plastic components.
  • The board is equipped with an efficient charging and discharging management chip, ETA6096, and an MX1.25 battery interface. The charging current is currently set to 1A, and users can change the charging current by replacing the R15 resistor. Connect a 3.7V single-cell lithium battery, and for more details, please refer to the schematic diagram. It is recommended to use a 3.7V single-cell lithium battery with a capacity of 500mAh or below.
  • To prevent overcharging and over-discharging of the battery, stop discharging when the fully charged 4.2V lithium battery discharges to 3.7V.

Hardware Description

Onboard Interface

ESP32-S3-LCD-1.28 Onboard.jpg

  • Type-C Interface : The development board uses the CH343P chip for USB to UART, connecting the UART_TXD (GPIO43) and UART_RXD (GPIO44) of ESP32-S3 for firmware programming and log printing. With the automatic download circuit, the firmware can be downloaded directly after connecting the Type-C cable.
  • 1.27mm Pitch Headers : The development board leads to most of the GPIOs for external connection, GPIOs can be configured to I2C, SPI, and other peripheral functions, VSYS can directly input 5V to power the development board.
  • LCD Interface : Development board on-board 1.28-inch screen with 4-wire SPI communication, SPI rate can be increased to 80MHz, touch using I2C communication (development board using GPIO2 to control the brightness of the backlight, in addition to lead out of the two MOS tubes to control the switching contacts around the battery holder, respectively, connected to the GPIO4, GPIO5, can be welded with small-current devices such as vibration motors, etc., for more information, please see the Schematic).
  • I2C Interface : ESP32-S3 provides multiplexed hardware I2C, currently using GPIO6 (SDA) and GPIO7 (SCL) pins for I2C bus. Onboard the QMI8658 six-axis inertial measurement unit and LCD touch control chip. For more information, please see the Schematic.
  • MX1.25 Connector : GPIO1 of the development board is used to measure the battery voltage pin, the battery voltage was connected to the GPIO1 using 200K and 100K to achieve series voltage division, the ESP32-S3 series has two 12Bit SAR ADC measurement units, the source code is converted to the voltage formula is 3.3/(1<<12) * 3 * AD_Value.
PINOUT
ESP32-S3R2 LCD MX1.25 QMI8658 other
GPIO0 BOOT0
GPIO1 ADC
GPIO5 TP_INT
GPIO6 SDA
GPIO7 SCL
GPIO8 LCD_DC
GPIO9 LCD_CS
GPIO10 LCD_CLK
GPIO11 LCD_MOSI
GPIO12 LCD_RST
GPIO40 LCD_BL
GPIO47 INT1
GPIO48 INT2

Dimensions

ESP32-S3-LCD-1.28 Dimensions.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. It includes a small subset of the Python standard library and has been optimized to run on microcontrollers and resource-constrained environments.
  • 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.

Arduino

  • Download and install Arduino IDE.
  • Install ESP32 on the Arduino IDE as shown below, and you can refer to this link.
  • Fill in the following link in the Additional Boards Manager URLs section of the Settings screen under File -> Preferences and save.
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json

ESP32-C3-Zero -05.jpg

  • Search esp32 on Board Manager to install, and restart Arduino IDE to take effect.

ESP32-S3-Touch-LCD-4.3-Ar.jpg

  • Open the Arduino IDE and note that Tools in the menu bar selects the corresponding 16MB Flash and enables QSPI PSRAM, as shown in the following figure.

ESP32-S3-LCD-4.3-Ar02.jpg

Library Installation

  • TFT_SPI, lvgl libraries need to be configured after installation, it is recommended to directly use the TFT_eSPI_Setups, TFT_eSPI, lvgl folder in Esp32-s3-lcd-1.28-lib and copy it to the C:\Users\xxxx\Documents\Arduino\libraries directory. xxxx represents the user name of your computer, please be careful in identifying it.

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

MicroPython

1. Download and install the latest Thonny, open ThonNY ide -> Configure interpreter... as shown below:
CircuitPython Thonny06.jpg
2. Connect the Type-C interface to the USB cable, find the device manager or the corresponding COM port, and download or run the demo, please refer to the section on hardware connection.
3. Please ignore this step in this tutorial (Please skip to Step 4). According to the steps shown in the figure below to select the ESP32-S3 series of online MPY firmware download, the development of the board's Flash content will be cleared before download, the entire download process lasts about 1 minute, MPY firmware can be downloaded from the official website!
CircuitPython Thonny033.jpg
4. The current development board uses customized firmware for development, open flash_download_tool_3.9.5 to download the firmware tool, download the firmware here, firmware production from this link, all firmware in a single file, note that the download address is 0x0.
  • After connecting ESP32-S3-LCD-1.28 to the PC, long-press BOOT key, single-click the RESET key, and then release the BOOT key to enable it to enter Download Mode.
  • Select chip: ESP32-S3, download mode: USB.
ESP32-C3-Zero Thonny90.png
  • Download S3-Touch-LCD-1.28-MPY.bin(Shared with ESP32-S3-Touch-LCD-1.28.), and the downloaded address is 0X0. Select ESP32-S3-Touch-LCD-1.28's COM, click START to program, and wait for the program to finish.
ESP32-C3-Zero Thonny91.pngESP32-C3-Zero Thonny92.png
5. Program the firmware and press the RESET key, input the sample demo in the mpy directory to the development board as shown below:
  • Enter Thonny, select ESP32, and the corresponding COM port.

ESP32-C3-Zero Thonny93.jpg
ESP32-C3-Zero Thonny94.png

  • Click the following button and you can see the shell output sentence, which indicates the firmware of the development board can be used successfully.

ESP32-C3-Zero Thonny95.png

  • Upload the mpy file folder of the sample demo to the ESP32-S3-LCD-1.28.

ESP32-C3-Zero Thonny-05.jpg
For programming, you can refer to NicrPython Documentation and release note.

Download Other Firmwares

If you use flash_download_tool_3.9.5 to download the firmware, please operate it according to the following picture.

Note that the ESO32-S3 application firmware address is 0x10000, the partition_tables.bin address is 0x8000, and the bootloader.bin address is 0x0.

ESP32-C3-Zero 09.jpg

Sample Demo

Arduino

Note: Before using the Arduino demo, please check whether the Arduino IDE environment and the download settings are configured correctly, and you can refer to Arduino Environment Configuration.

Arduino IDE Sample

  • For Arduino example demo, refer to arduino-esp32 or Arduino IDE File -> examples (such as ESP32 GPIO, WIFI, and other general examples to use), if you need to use the screen driver, you can refer to the screen driver. Please refer to the example demo in the esp32-s3-lcd-1.28-demo demo for the screen driver.

ESP32-S3-Touch-LCD-1.28-Arduinor1.jpg

Using Example

  • Select the demo and here we choose the demo to get the chip ID.

ESP32-S3-Touch-LCD-1.28-Arduinor2.jpg

  • Select the board as ESP32S3 Dev Module:

ESP32-S3-Touch-LCD-1.28-Arduinor3.jpg

  • Select the COM port, and here we select the COM5 of the ESP32-S3 USB port:

ESP32-S3-Touch-LCD-1.28-Arduinor4.jpg

  • Click to download, and it will automatically compile and download. If it fails to download, please press and hold the boot key, power on it again, release the key, and then download again.

ESP32-S3-Touch-LCD-1.28-Arduinor5.jpg

  • Download Finished.

ESP32-S3-Touch-LCD-1.28-Arduinor6.jpg

  • Open serial port monitor:

ESP32-S3-Touch-LCD-1.28-Arduinor7.jpg

  • It outputs the chip ID in a loop:

ESP32-S3-Touch-LCD-1.28-Arduinor8.jpg

esp32-s3-lcd-1.28-demo

esp32-s3-lcd-1.28-demo is for testing the screen, 6-axis sensor, BAT, and touch screen.

  • The following is the demo effect:
After powering on, the screen will display white, red, green, and blue colors sequentially with a 2-second interval. Check the screen for any light leakage or black spots. If the screen changes too quickly to inspect, press the RESET button to restart the process.

a. Proceed to the sensor testing phase, after the color display, sensor data will be shown on the screen. When stationary, ACC_X and ACC_Y values should be below 200, ACC_Z around 1000, GYR_X, GYR_Y, GYR_Z values should be around 0 to 10. Any erratic readings might indicate damage to the six-axis sensor.

b. Connect the 3.7V lithium battery at this point. Normally, the BAT (V) value will decrease.

Arduino_LVGL

  • Arduino_LVGL sample is for displaying LVGL benchmark, music, and so on. For LVGL, you can refer to LVGL development tutorial.
  • LVGL library is the callback function for displaying refreshing, refreshing the LVGL drawing buffer to TFT LCD.
void my_disp_flush( lv_disp_drv_t *disp_drv, const lv_area_t *area, lv_color_t *color_p )
Parameter:
     lv_disp_drv_t *disp_drv: LVGL: the provided display driver structure pointer, including the display-related information and the function pointer. This function can be used to notify LVGL that the refresh is finished.
     const lv_area_t *area: LVGL: the defined pointer to area structure, indicating the area to be refreshed. This area is a rectangular area relative to the entire display screen.
     lv_color_t *color_p: LVGL: the defined color structure pointer, indicating the color data displayed in the refreshing area. This function is used to draw by writing this color data to the TFT buffer.
  • The timer's callback function. The LVGL is notified of the past time by calling the LVGL function lv_tick_inc so that the LVGL can update its internal time state and handle time-related tasks such as animations, timers, etc. In the example, it is called every EXAMPLE_LVGL_TICK_PERIOD_MS milliseconds.
void example_increase_lvgl_tick(void *arg)
  • The timer's callback function, where the counter "count", each call increases the counter by one, triggering an operation when the count reaches a certain value, here is a simulation of performing a restart operation after 30 timer triggers, the specific behavior can be adjusted according to needs.
void example_increase_reboot(void *arg)

Arduino_Chinese_Font

  • Arduino_Chinese_Font is for displaying the LVGL built-in 1000 common Chinese fonts.

Arduino_Chinese_7500_Char

  • Arduino_Chinese_7500_Char is for displaying LVGL's 7500 Chinese fonts. As the font file is large, the download of firmware time is relatively long.

Micropython

Note: Before using the Micropython demos, please check whether the ESP32-S3-LCD-1.28 has burned the mpy firmware and whether the Thonny environment is correctly configured, for details, please see #MicroPython.
  • mpy file includes the following examples, and you can click here to see more details.

ESP32-S3-Touch-LCD-1.28-Micro.png

Resource

Document

Demo

Software

Datasheet

FAQ

 Answer:

The display panel and the PCB is about 5.00mm.
ESP32-S3-LCD-1.28 faq.png

{{{5}}}


 Answer:

There are no holes or space for fixing a battery on the backside of the PCBA.

{{{5}}}


 Answer:

Please refer to the following steps to test with the libraries and routines we provide:
1) After installing the TFT_SPI and LVGL libraries, configuration files are required. It is suggested to directly copy the TFT_eSPI_Setups, TFT_eSPI, and LVGL folders from the TFT_eSPI Lib *Esp32-s3-touch-lcd-lib] into the directory C:\Users\xxxx\Documents\Arduino\libraries. 'xxxx' represents your computer's username. Please be careful while identifying.
ESP32-S3-Touch-LCD-1.28-01.jpg
2) Please use our sample program for comparison testing.

{{{5}}}


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)