ZLX-ESP32-2
ESP32-C5 2.8英寸触摸显示开发板

1. 产品概述
ZLX-ESP32-2 是一款基于 ESP32-C5-WROOM-1U-N8R8 模块的 2.8 英寸电阻式触摸开发板。它集成了彩色液晶显示屏、XPT2046 触摸控制器、microSD/TF 卡槽(仅卡槽,不含 microSD/TF 卡)、GPS 接口、音频输出、电池电压检测、绿色 LED 指示灯、BOOT/RESET 按钮以及外接天线接口。它适用于 Wi-Fi 6、蓝牙 LE、Zigbee/Thread、人机界面 (HMI)、数据记录和物联网 (IoT) 开发。
主要特点
- ESP32-C5 32 位 RISC-V 单核 CPU,最高频率 240 MHz
- ESP32-C5-WROOM-1U-N8R8:8 MB Flash + 8 MB PSRAM(板载模块内存,非 microSD/TF 卡)
- 2.4 GHz + 5 GHz 双频 Wi-Fi 6 (802.11ax)
- Bluetooth LE、IEEE 802.15.4、Zigbee 3.0、Thread 1.4
- 2.8英寸240×320液晶显示屏,ST7789驱动芯片,BGR初始化,显示反转功能已禁用
- XPT2046 电阻式触摸控制器
- LCD 和 TF 卡共用一个 SPI 接口,但 CS 接口不同;触摸功能使用独立的软件 SPI 接口。
- 板材尺寸约为 86 毫米 × 50 毫米
- IPEX1 外置天线接口;使用无线电前请连接合适的外置天线。
目标用户
适用于嵌入式开发人员、物联网开发人员、创客、教育/实验室用途以及产品原型设计。
2. 外观和尺寸
电路板尺寸约为 86 毫米 × 50 毫米。下图有助于识别显示屏、连接器和主要组件。


连接器识别

3. 电路板规格
| 物品 | 规格 |
|---|---|
| 板式模型 | ZLX-ESP32-2 |
| 核心模块 | ESP32-C5-WROOM-1U-N8R8 |
| 板尺寸 | 约 86 × 50 毫米 |
| 展示 | 2.8英寸TFT液晶显示屏,ST7789芯片,原始分辨率240×320 |
| 颜色顺序 | BGR初始化 |
| 显示反转 | 关闭/正常显示模式 |
| 触碰 | 电阻式触摸,XPT2046 |
| microSD/TF卡槽 | SPI模式;不含卡 |
| GPS接口 | 1.25 毫米 4 针连接器;GPIO0/GPIO9 上的 UART 信号 |
| 声音的 | 2.0 毫米 2 针扬声器/音频连接器;PWM 音频 + 放大器使能 |
| 电池 | 3.7V 单相,1.25mm 双针;带保护电路,推荐容量 1000–3000mAh |
| 外置天线 | IPEX1 连接器;WROOM-1U 无线路径所需 |
| 按钮 | 重置,启动 |
| 指标 | GPIO26上的绿色LED |
4. ESP32-C5-WROOM-1U-N8R8 模块规格
以下关键参数基于 Espressif 官方 ESP32-C5-WROOM-1 / WROOM-1U 数据手册 v1.2。
| 物品 | 规格 |
|---|---|
| 嵌入式SoC | ESP32-C5HR8 |
| 中央处理器 | 32 位 RISC-V 单核处理器,最高频率 240 MHz |
| 只读存储器 | 320 KB |
| HP SRAM | 384 KB |
| LP SRAM | 16 KB |
| 闪光 | 8 MB 四通道 SPI |
| PSRAM | 8 MB 四通道 SPI |
| 无线上网 | 1T1R,2.4 GHz + 5 GHz 双频;IEEE 802.11ax/ac/b/g/n;最高 150 Mbps |
| 2.4 GHz 频率 | 2412–2484 MHz |
| 5 GHz 频率 | 5180–5885 MHz(受地区法规约束) |
| 蓝牙 | 蓝牙低功耗;Espressif v1.2 功能列表显示已通过蓝牙核心 6.0 认证 |
| IEEE 802.15.4 | 2.4 GHz OQPSK,250 Kbps |
| Zigbee/Thread | Zigbee 3.0 / Thread 1.4 |
| GPIO | 模块级最多可提供 22 个 GPIO。 |
| Typical Peripherals | GPIO, SPI, UART, I2C, I2S, RMT, LED PWM, USB Serial/JTAG, MCPWM, GDMA, CAN FD, SDIO slave, ADC, temperature sensor, timers, watchdogs, etc. |
| Module Supply | 3.0–3.6 V, typical 3.3 V |
| Recommended Supply Capability | External supply should be capable of at least 0.6 A for the module |
| Ambient Temperature | -40 to +85 °C |
| Module Size | 18.0 × 21.2 × 3.3 mm |
| Antenna | External antenna via connector/module RF path; 50 Ω RF system |
5. Display and Touch
LCD Parameters
| Item | Specification |
|---|---|
| Size | 2.8 inch |
| Driver IC | ST7789 |
| Native resolution | 240 × 320 |
| Landscape logical resolution | 320 × 240 (depending on rotation setting) |
| Color order | BGR |
| Inversion | Disabled / OFF; normal display mode |
| SPI SCK | GPIO6 |
| SPI MOSI | GPIO7 |
| SPI MISO | GPIO2 (shared with TF card; used if required by library/readback) |
| LCD CS | GPIO10 |
| LCD Backlight | GPIO13 |
| LCD DC / RS | GPIO14 |
Touch Parameters
- Touch type: 4-wire resistive; controller: XPT2046.
- DOUT=GPIO3, SCK=GPIO4, DIN=GPIO5.
- CS=GPIO23, IRQ=GPIO25.
- Touch uses an independent software SPI; the supplied test flow is marked as requiring no calibration.
6. GPIO Mapping
The mapping below is based on the supplied GPIO spreadsheet and cross-checked against the schematic. Board peripherals use 19 GPIOs; TX0=GPIO11 and RX0=GPIO12 are additionally used by UART0; GPIO15 is reserved by PSRAM on N8R8, so all 21 usable GPIOs are allocated; EN is not a GPIO.
| GPIO | Signal | Definition | Direction | Function | Notes |
|---|---|---|---|---|---|
| 0 | GPSTX | GPS UART TX | Input | GPS test | GPS module TX → ESP32-C5 |
| 1 | BAT_ADC | Battery voltage sensing | Input/ADC | Battery test | 100k/100k divider; ADC × 2 ≈ battery voltage |
| 2 | SD_MISO | TF DAT0 / LCD MISO shared | Input | TF card test | Shared SPI MISO |
| 3 | RTP_DOUT | XPT2046 DOUT | Input | Touch test | Touch controller data output |
| 4 | RTP_SCK | XPT2046 SCK | Output | Touch test | Independent software SPI |
| 5 | RTP_DIN | XPT2046 DIN | Output | Touch test | Independent software SPI |
| 6 | LCD_SCK | LCD SCK / TF SCK shared | Output | LCD/TF test | Shared SPI clock |
| 7 | LCD_MOSI | LCD MOSI / TF CMD(MOSI) shared | Output | LCD/TF test | Shared SPI MOSI |
| 8 | AUDIOPWM | Audio PWM | Output | Audio test | Audio output control |
| 9 | GPSRX | GPS UART RX | Output | GPS test | ESP32-C5 TX → GPS module RX |
| 10 | LCDCS | ST7789 CS | Output | Display test | LCD chip select |
| 13 | LCDBL | LCD backlight | Output | Display test | Backlight control |
| 14 | LCD_RS/DC | ST7789 DC | Output | Display test | Data/command select |
| 23 | RTPCS | XPT2046 CS | Output | Touch test | Touch chip select |
| 24 | AMP_EN | Amplifier enable | Output | Audio test | High-level enable per supplied mapping; verify actual hardware revision |
| 25 | RTPIRQ | XPT2046 IRQ | Input | Touch test | Touch interrupt |
| 26 | GREENLED | Green LED | Output | LED test | HIGH = ON, LOW = OFF |
| 27 | SDCS | TF DAT3 / CS | Output | TF card test | TF card SPI chip select |
| 28 | BOOTAUTO | BOOT / auto-start control | Input/Control | Factory restore | BOOT input / factory-restore logic |
System and UART Signals
| Signal | Purpose | Note |
|---|---|---|
| RESET_AUTO / EN | ESP32 reset / enable | System enable/reset; not a GPIO |
| UART0_TX / TX0 / GPIO11 | UART0 transmit | Used; excluded from the 19 peripheral GPIO count |
| UART0_RX / RX0 / GPIO12 | UART0 receive | Used; excluded from the 19 peripheral GPIO count |
7. Interface and Bus Sharing
| Item | GPIO | Description |
|---|---|---|
| LCD + TF Shared SPI | GPIO6 / GPIO7 / GPIO2 | SCK, MOSI, MISO shared; devices separated by independent CS |
| LCD CS | GPIO10 | LCD_CS |
| TF card CS | GPIO27 | SD_CS / DAT3 |
| XPT2046 touch | GPIO3 / 4 / 5 / 23 / 25 | DOUT / SCK / DIN / CS / IRQ |
| GPS UART | GPIO0 / GPIO9 | GPSTX / GPSRX; GPIO0 receives GPS TX, GPIO9 drives GPS RX |
| Battery ADC | GPIO1 | BAT_ADC; 100k/100k divider; C20 100 nF filtering |
| Green LED | GPIO26 | HIGH ON, LOW OFF |
| Audio | GPIO8 / GPIO24 | AUDIOPWM / AMP_EN |
| LCD control | GPIO13 / GPIO14 | Backlight / DC |
SPI Sharing Notes
- LCD and TF card share GPIO6 (SCK), GPIO7 (MOSI), and GPIO2 (MISO), but use GPIO10 (LCD_CS) and GPIO27 (SD_CS) respectively.
- Assert only the target device CS at a time to avoid bus contention.
- The XPT2046 touch controller uses an independent software SPI and does not share the main LCD/TF SCK/MOSI signals.
8. Functional Test Mapping
| Test | GPIO | What is tested | Result / Note |
|---|---|---|---|
| Display | GPIO6, 7, 10, 13, 14, 2 | ST7789 display, 240×320 native / 320×240 landscape; BGR; backlight | Normal / Abnormal |
| Touch | GPIO3, 4, 5, 23, 25 | XPT2046 touch response | Test flow: no calibration |
| TF card | GPIO2, 6, 7, 27 | SPI init, read/write/format | Shares SPI with LCD |
| Audio | GPIO8, 24 | PWM audio and amplifier enable | Continuous playback depends on firmware |
| Wi-Fi | Internal RF | 2.4 GHz / 5 GHz scan | No listed GPIO occupied |
| BLE | Internal RF | BLE scan | No listed GPIO occupied |
| GPS | GPIO0, 9 | GPS UART data | GPSTX / GPSRX |
| LED | GPIO26 | Green LED | HIGH on / LOW off |
| Battery | GPIO1 | ADC measures divided battery voltage | Voltage estimate, not a coulomb counter |
| Factory restore | GPIO28 | BOOT input / restore logic | Behavior is defined by firmware |
9. Connector and Electrical Notes
Battery Connector
The board provides a 1.25 mm 2-pin connector for a single-cell 3.7 V battery. In the orientation shown in the labeled image, the left pin is positive (+) and the right pin is negative (-). For battery-powered operation, use a protected single-cell 3.7 V Li-ion/LiPo battery; 1000–3000 mAh is recommended. Verify connector type and polarity before connection. Reverse polarity may damage the board.
Battery Voltage Sensing
GPIO1 senses battery voltage through a 100 kΩ / 100 kΩ divider, so ideally the battery voltage is approximately 2× the ADC pin voltage. This is a voltage estimate only and is not a fuel-gauge/coulomb-counter measurement.
GPS Interface
GPS uses GPIO0 and GPIO9 as UART signals. In this board mapping, GPIO0 (named GPSTX) is an input connected to the GPS module TX, while GPIO9 (named GPSRX) is an output connected to the GPS module RX. For the 1.25 mm 4-pin connector power pins and exact physical pin order, follow the silkscreen/schematic of the specific hardware revision.
External Antenna
ESP32-C5-WROOM-1U is the external-antenna variant. Connect a suitable 2.4/5 GHz, 50-ohm antenna to the IPEX1 connector. Avoid prolonged high-power transmission without a proper antenna attached.
Audio Connector
Audio output uses GPIO8 (AUDIOPWM) for the PWM signal and GPIO24 (AMP_EN) for amplifier enable. The top connector is a 2.0 mm 2-pin audio/speaker connector. Use loads and volume settings within the capability of the actual amplifier circuit.
10. Software Development and Initialization Notes
- Select ST7789 as the display driver and use 240×320 as the native resolution; set rotation for 320×240 landscape as supported by your graphics library.
- Use BGR color order; do not enable display inversion (INVON).
- When LCD and TF share SPI, manage LCD_CS (GPIO10) and SD_CS (GPIO27) independently after initialization.
- XPT2046 在 GPIO3/4/5/23/25 上使用独立的软件 SPI。
- 对于电池电压,使用大约 2:1 的分压比转换 GPIO1 ADC 读数,并应用 ADC 校准以获得更高的精度。
- 可用的 5 GHz Wi-Fi 信道和发射功率取决于当地法规。
- 启动/恢复出厂设置的行为由固件定义;请避免意外激活,以免清除设置。
建议的初始化顺序
- 电源稳定后,初始化系统并调试UART。
- 初始化 LCD SPI;配置 ST7789、BGR、关闭反转,然后启用背光。
- 初始化 XPT2046 触摸。
- 如果需要可移动存储,请插入兼容的用户提供的 microSD/TF 卡,然后对其进行初始化并确保 LCD_CS/SD_CS 状态正确。
- 根据需要初始化 GPS、音频、LED 和电池 ADC。
- 根据需要启用 Wi-Fi/BLE/802.15.4 无线电功能。
11. 故障排除
| 问题 | 解决方案 |
|---|---|
| 显示空白/黑屏 | 检查 GPIO6/7/10/13/14、ST7789 驱动器选择、BGR 设置、背光 GPIO13,以及是否意外启用了反转功能。 |
| 颜色错误 | 确认图形库已配置为 BGR 颜色顺序。 |
| 无触摸反应 | 检查 GPIO3/4/5/23/25 和 XPT2046 初始化情况。 |
| TF卡初始化失败 | 检查共享的 SPI SCK/MOSI/MISO,并确保 SD_CS (GPIO27) 和 LCD_CS (GPIO10) 不会同时置位。 |
| Wi-Fi信号弱/无Wi-Fi | 确认 IPEX1 外置天线已连接且适用于 2.4/5 GHz 频段。 |
| 电池读数大约为一半 | GPIO1 使用 100k/100k 分压器;将 ADC 侧电压乘以大约 2。 |
| 无GPS数据 | 确认 GPIO0 接收 GPS TX,GPIO9 驱动 GPS RX,并验证波特率和电源。 |
12. 下载和技术支持
ZLX-ESP32-2 的固件、文件、后续文档及相关支持,请访问 ZLX ESP32 开发板支持中心。刷写固件前,请务必确认网站上显示的 PCB 型号与您的硬件完全匹配。
下载链接:https://www.zlxchina.xyz/
乐鑫模块数据手册:ESP32-C5-WROOM-1 / WROOM-1U 数据手册
参考
13. 安全和操作
- 连接前请确认电池极性;切勿将电池连接器接反。
- 在插拔 IPEX 连接器时,请垂直施力,避免侧向撬动,以免损坏射频插座。
- 使用裸露电路板时,请采取静电放电防护措施,并防止金属物体造成短路。
- 5 GHz 无线电频段、信道和发射功率必须符合当地法规。
- 对于TF卡、GPS、音频和其他外设,请遵循实际硬件版本规定的供电和逻辑电平。除非经过明确验证,否则请勿对I/O引脚施加高于3.3V的逻辑电平。
14. 文档修订历史
| 牧师 | 日期 | 描述 | 基础 |
|---|---|---|---|
| V1.1 | 2026-08-25 | 修订了 microSD/TF 卡、电池和 GPIO 的说明。 | 合肥智路兴信息技术有限公司 |
- 结尾 -
