--- type: entity tags: [hardware, waveshare, display] updated: 2026-09-27 --- # Waveshare ESP32-S3-Touch-LCD-5B Controller A of the [[dual-controller-architecture]] — the main in-cabin display. SKU 28151, the 1024×600 capacitive-touch variant of the LCD-5 family. Primary reference: [[esp32-s3-touch-lcd-5b-waveshare-wiki]]. ## Specs (source: waveshare-wiki) - ESP32-S3-WROOM-1-N16R8 module: dual-core LX7 @ 240 MHz, 16 MB flash, 8 MB OPI PSRAM - 5" IPS 1024×600, 65K colors (16-bit), 550 cd/m², GT911 5-point capacitive touch, tempered glass - 2.4 GHz Wi-Fi + BLE 5, onboard antenna (keep metal away from antenna area) - Runs LVGL 8.4.0 via ESP32_Display_Panel v1.0.4 `(repo)`. Real render FPS has **never been measured**: the Debug-panel "FPS" counts `loop()` passes (and `loop()` sleeps 100 ms), and the old "~50 FPS" figure had no measurement behind it `(verified 2026-09-26)` ## Power (source: waveshare-wiki) - **7–36 V DC wide-input terminal** — vehicle 12 V feeds it directly, no external regulator needed. ✅ resolves most of the power question - Alternative inputs: USB Type-C 5 V; optional single-cell 3.7 V LiPo (CS8501 charge/boost, 580 mA) - Draw: ~450 mA @ 5 V (~2.3 W) - Remaining caveat: automotive transient/load-dump spikes (ISO 7637) can exceed 36 V `(unverified)` → [[open-questions]] > [!warning] Operating temperature 0–65 °C (source: waveshare-wiki) > Tight for a car: sub-zero winters and sun-baked dashboards both fall outside spec. → [[open-questions]] ## CAN interface (source: waveshare-wiki) - **Onboard TJA1051T/3/1J transceiver**, CAN 2.0, on a 3.5 mm terminal block — wire CAN-H/L straight in. ✅ resolves the transceiver question - **Non-isolated** — its ground must be common with the vehicle. Simplest: power the board from vehicle 12 V (the 7–36 V input's negative *is* the CAN reference). Grounding-only + USB power also works, but keep the logging laptop **on battery** to avoid a mains-earth ↔ chassis ground loop. - **120 Ω termination switch, OFF by default — leave it off** when tapping an existing vehicle bus (the bus is already terminated at both ends). - Firmware drives it via TWAI on GPIO 15 TX / 16 RX, 500 kbps, **`TWAI_MODE_NORMAL`** `(repo)` — it **ACKs the bus** (active participant), *not* LISTEN_ONLY as older docs claimed. Deliberate, to stop transmitters retry-flooding. → [[can-bus-integration]] - **Raw CAN logger** `(repo, 2026-07-15)`: streams every frame as `CANRAW,...` over native USB-CDC (`Serial` remapped to USB-CDC, ~1 MB/s, so it keeps up with the ~486 frame/s bus). First capture: [[can-capture-2026-07-15]]. ## Other interfaces | Interface | Details | |-----------|---------| | RS485 | SP3485, auto TX/RX direction; terminal block used for UART1 → Controller B, GPIO 43/44, 115200 baud `(repo)` | | Isolated I/O | Optocoupler digital in 5–36 V (dry/wet contact), open-drain out sinking 450 mA/ch — could read ignition-on or drive a relay later | | I2C | External header; CH422G expander occupies 0x20–0x27 & 0x30–0x3F, GT911 touch at 0x5D — avoid these addresses | | RTC | PCF85063 + CR927 coin cell | | TF card | SD_CS driven via CH422G EXIO4 | | USB Serial | Native USB-CDC (`Serial`, enumerates 303A:1001, ~1 MB/s), console + CANRAW `(repo)`. **Opening the port with default DTR/RTS resets the board** (`rst:0x15`) — set both low before opening (`--dtr 0 --rts 0`) to attach without a reboot `(verified 2026-09-26)` | Note: the screen occupies most GPIOs; auxiliary functions (backlight, reset, SD_CS) route through the CH422G IO expander — spare native GPIOs are scarce. ## Hard-won firmware lessons (repo) - 8MB OPI PSRAM demands `qio_opi` memory type + custom board JSON — wrong setting causes screen flicker/drift. - LCD wants a 16 MHz pixel clock with correct PCLK polarity. - Backlight must be manually sequenced at boot to avoid a white flash. - Flashing: use the Type-C port labeled UART; hold BOOT while connecting if the port isn't recognized (source: waveshare-wiki). - **Flash writes flicker the screen** `(verified 2026-09-26)`: flash and PSRAM share the MSPI cache, so every flash write/erase (NVS save, OTA) briefly cuts off the PSRAM framebuffer the RGB panel streams from; there is no bounce buffer (`ESP_PANEL_LCD_RGB_BOUNCE_BUF_SIZE=0`). `CONFIG_LCD_RGB_RESTART_IN_VSYNC=y` resyncs next frame → flicker, not permanent drift. Mitigated (v0.1.2): Tuning edits saved to NVS once after 3 s idle, backlight off during OTA writes. Real cure: bounce buffers + `CONFIG_SPIRAM_XIP_FROM_PSRAM` → [[open-questions]] #13. - **Full-screen transitions stutter** `(verified 2026-09-26)`: a fade re-renders and alpha-blends all 614k px in software every frame into the PSRAM framebuffer. Screen switches are instant (`LV_SCR_LOAD_ANIM_NONE`) since v0.1.2. - **Internal RAM is nearly full** `(verified 2026-09-26)`: 15.9 KB free, largest block 7.6 KB with display + Wi-Fi up (PSRAM 7.1 MB free); the 60-line LVGL draw buffer is ~120 KB of it. Blocked a TLS task outright → [[ota-updates]], [[open-questions]] #13. - **Never power the Wi-Fi radio off** (`WiFi.disconnect(true)`, `WiFi.mode(WIFI_OFF)`): it de-initialises ESP-NOW, the wireless leg of the link to B → [[dual-controller-architecture]]. - **Partition table is dual-slot OTA** since 2026-09-26 (2 × 7.9 MB, no SPIFFS, NVS offset unchanged) → [[ota-updates]]. ## Related [[dual-controller-architecture]] · [[can-bus-integration]] · [[ota-updates]] · [[esp32-s3-touch-lcd-5b-waveshare-wiki]]