Init new era, with wiki integrated.

This commit is contained in:
2026-07-15 12:17:06 +02:00
commit 37f98a241f
67 changed files with 10396 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
{}
+1
View File
@@ -0,0 +1 @@
{}
+33
View File
@@ -0,0 +1,33 @@
{
"file-explorer": true,
"global-search": true,
"switcher": true,
"graph": true,
"backlink": true,
"canvas": true,
"outgoing-link": true,
"tag-pane": true,
"footnotes": false,
"properties": true,
"page-preview": true,
"daily-notes": true,
"templates": true,
"note-composer": true,
"command-palette": true,
"slash-command": false,
"editor-status": true,
"bookmarks": true,
"markdown-importer": false,
"zk-prefixer": false,
"random-note": false,
"outline": true,
"word-count": true,
"slides": false,
"audio-recorder": false,
"workspaces": false,
"file-recovery": true,
"publish": false,
"sync": true,
"bases": true,
"webviewer": false
}
+22
View File
@@ -0,0 +1,22 @@
{
"collapse-filter": true,
"search": "",
"showTags": false,
"showAttachments": false,
"hideUnresolved": false,
"showOrphans": true,
"collapse-color-groups": true,
"colorGroups": [],
"collapse-display": true,
"showArrow": false,
"textFadeMultiplier": 0,
"nodeSizeMultiplier": 1,
"lineSizeMultiplier": 1,
"collapse-forces": true,
"centerStrength": 0.518713248970312,
"repelStrength": 10,
"linkStrength": 1,
"linkDistance": 250,
"scale": 1,
"close": true
}
+206
View File
@@ -0,0 +1,206 @@
{
"main": {
"id": "dc3075a86cc88908",
"type": "split",
"children": [
{
"id": "7a6cf7f1565f3556",
"type": "tabs",
"children": [
{
"id": "6c091a2ec296d0e7",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "Welcome.md",
"mode": "source",
"source": false
},
"icon": "lucide-file",
"title": "Welcome"
}
}
]
},
{
"id": "c0fb18d9abf91f5b",
"type": "tabs",
"children": [
{
"id": "8c453b677ef43576",
"type": "leaf",
"state": {
"type": "graph",
"state": {},
"icon": "lucide-git-fork",
"title": "Graph view"
}
}
]
}
],
"direction": "vertical"
},
"left": {
"id": "5398778630d04fcb",
"type": "split",
"children": [
{
"id": "23370606ddbe49e8",
"type": "tabs",
"children": [
{
"id": "42bfcd7d9fc741bc",
"type": "leaf",
"state": {
"type": "file-explorer",
"state": {
"sortOrder": "alphabetical",
"autoReveal": false
},
"icon": "lucide-folder-closed",
"title": "Files"
}
},
{
"id": "d85c10f77cde23de",
"type": "leaf",
"state": {
"type": "search",
"state": {
"query": "",
"matchingCase": false,
"explainSearch": false,
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical"
},
"icon": "lucide-search",
"title": "Search"
}
},
{
"id": "e0af475bfea92ea7",
"type": "leaf",
"state": {
"type": "bookmarks",
"state": {},
"icon": "lucide-bookmark",
"title": "Bookmarks"
}
}
]
}
],
"direction": "horizontal",
"width": 300
},
"right": {
"id": "8bc5cf888cee4c96",
"type": "split",
"children": [
{
"id": "227bbcbb6ccd486a",
"type": "tabs",
"children": [
{
"id": "4838dd881259fda7",
"type": "leaf",
"state": {
"type": "backlink",
"state": {
"file": "Welcome.md",
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical",
"showSearch": false,
"searchQuery": "",
"backlinkCollapsed": false,
"unlinkedCollapsed": true
},
"icon": "links-coming-in",
"title": "Backlinks for Welcome"
}
},
{
"id": "8a8f8c316c57e39a",
"type": "leaf",
"state": {
"type": "outgoing-link",
"state": {
"file": "Welcome.md",
"linksCollapsed": false,
"unlinkedCollapsed": true
},
"icon": "links-going-out",
"title": "Outgoing links from Welcome"
}
},
{
"id": "e4a63120897c7119",
"type": "leaf",
"state": {
"type": "tag",
"state": {
"sortOrder": "frequency",
"useHierarchy": true,
"showSearch": false,
"searchQuery": ""
},
"icon": "lucide-tags",
"title": "Tags"
}
},
{
"id": "d61d1466b1217fa4",
"type": "leaf",
"state": {
"type": "all-properties",
"state": {
"sortOrder": "frequency",
"showSearch": false,
"searchQuery": ""
},
"icon": "lucide-archive",
"title": "All properties"
}
},
{
"id": "20d5fbc88cb39fec",
"type": "leaf",
"state": {
"type": "outline",
"state": {
"file": "Welcome.md",
"followCursor": false,
"showSearch": false,
"searchQuery": ""
},
"icon": "lucide-list",
"title": "Outline of Welcome"
}
}
]
}
],
"direction": "horizontal",
"width": 300,
"collapsed": true
},
"left-ribbon": {
"hiddenItems": {
"switcher:Open quick switcher": false,
"graph:Open graph view": false,
"canvas:Create new canvas": false,
"daily-notes:Open today's daily note": false,
"templates:Insert template": false,
"command-palette:Open command palette": false,
"bases:Create new base": false
}
},
"active": "6c091a2ec296d0e7",
"lastOpenFiles": [
"Welcome.md"
]
}
+73
View File
@@ -0,0 +1,73 @@
# Wiki Schema
This directory is a **personal knowledge wiki** for the BMW M57N automotive display project. It is maintained by the LLM agent; the human curates sources and asks questions. Read this file before doing anything in `wiki/`.
## What this wiki is for
Domain knowledge that is NOT derivable from the firmware repo:
- BMW M57N engine: sensors, ECU (DDE), CAN bus behavior, reverse-engineered message IDs
- The donor vehicle and the target vehicle (this appears to be an engine-swap project — see [[open-questions]])
- Waveshare ESP32-S3-Touch-LCD-5B hardware: datasheets, pinouts, quirks, gotchas
- Design decisions and their rationale
- Findings from web research, datasheets, forum posts, CAN logs
What does NOT belong here: code structure, build commands, firmware implementation details. The repo itself (and the repo-root `CLAUDE.md`) is the source of truth for those. The wiki may *reference* firmware facts when they matter for domain reasoning (e.g. "firmware currently listens for CAN ID 0x4F"), always marked with `(repo)`.
## Layout
```
wiki/
CLAUDE.md # this schema — co-evolves with the workflow
index.md # catalog of all pages, by category — update on EVERY change
log.md # append-only chronological record of ingests/queries/lints
raw/ # immutable source documents (web clips, PDFs, CAN logs) — NEVER edit
sources/ # one summary page per raw source
pages/ # entity & concept pages (the heart of the wiki)
```
## Page conventions
- Filenames: kebab-case, e.g. `bmw-m57n-engine.md`.
- Every page starts with YAML frontmatter:
```yaml
---
type: entity | concept | source | synthesis
tags: [engine, can-bus, hardware, ...]
updated: 2026-07-15
---
```
- Link liberally with `[[wikilinks]]`. A link to a not-yet-existing page marks future work, not an error.
- **Confidence labels are mandatory for factual claims** — this is an automotive project where wrong data gets wired into a vehicle:
- `(verified)` — confirmed on real hardware / real CAN logs by the user
- `(source: X)` — from an ingested source in `raw/`
- `(repo)` — what the firmware currently does (not necessarily correct!)
- `(unverified)` — LLM prior knowledge or forum lore; treat as a hypothesis
- Contradictions between sources get flagged inline with a `> [!warning]` callout, not silently resolved.
## Workflows
### Ingest
1. User drops a file into `raw/` and asks to process it.
2. Read it fully. Discuss key takeaways with the user if interactive.
3. Write `sources/<name>.md`: frontmatter, 1-paragraph summary, key facts as bullets, relevance to open questions.
4. Update every affected page in `pages/` — integrate, don't append blindly. Flag contradictions.
5. Update `index.md`, append to `log.md`.
### Query
1. Read `index.md` first, then drill into relevant pages.
2. Synthesize an answer with citations (page links + confidence labels).
3. If the answer is durable (a comparison, an analysis, a decision), file it as a new page and index it.
### Lint (periodic, on request)
Check for: contradictions, stale claims, orphan pages, `[[links]]` to pages worth creating, unverified claims that could now be verified, gaps worth a web search. Report findings; fix with user's blessing.
## Log format
Append-only. Each entry starts with `## [YYYY-MM-DD] <op> | <title>` where `<op>` is `ingest`, `query`, `lint`, or `setup`. Greppable with `grep "^## \[" log.md`.
## Prime directives
1. `raw/` is immutable.
2. Never let an `(unverified)` claim silently upgrade itself — only real-world verification by the user promotes a claim to `(verified)`.
3. Keep `index.md` and `log.md` current on every operation; a stale index is worse than no index.
+26
View File
@@ -0,0 +1,26 @@
---
type: index
updated: 2026-07-15
---
# Index
Catalog of every page in the wiki. Read this first when answering questions. Keep current on every change.
## Entities
- [[bmw-m57n-engine]] — the 3.0L BMW diesel whose CAN bus we read; DDE ECU, donor-vehicle unknown, candidate CAN IDs listed (all unverified)
- [[esp32-s3-touch-lcd-5b]] — Waveshare 5" display board (Controller A); pinout, PSRAM/LCD gotchas, hardware open questions
## Concepts
- [[can-bus-integration]] — the core challenge; current firmware ID map flagged as placeholder, verification plan
- [[dual-controller-architecture]] — Controller A → UART 5Hz → Controller B (1.3" display); packet format
## Synthesis
- [[open-questions]] — the research frontier: real CAN IDs, donor vehicle, EGS presence, transceiver, power, fault codes
## Sources
*(none ingested yet — `raw/ESP32-S3-Touch-LCD-5B.md` exists but is empty; re-clip needed)*
+7
View File
@@ -0,0 +1,7 @@
# Log
Append-only. `grep "^## \[" log.md | tail -5` for recent activity.
## [2026-07-15] setup | Wiki instantiated
Created schema (`CLAUDE.md`), `index.md`, `log.md`, and five seed pages built from repo knowledge: [[bmw-m57n-engine]], [[esp32-s3-touch-lcd-5b]], [[can-bus-integration]], [[dual-controller-architecture]], [[open-questions]]. Deleted Obsidian's default `Welcome.md`. Flagged: the firmware's CAN ID map looks like placeholders (two IDs exceed 11-bit range); `raw/ESP32-S3-Touch-LCD-5B.md` is an empty clip and needs re-clipping.
+42
View File
@@ -0,0 +1,42 @@
---
type: entity
tags: [engine, bmw, can-bus]
updated: 2026-07-15
---
# BMW M57N Engine
The target engine for this project: the display reads its CAN bus and shows live data. Everything below is `(unverified)` LLM prior knowledge until backed by an ingested source or real-world testing — treat as a starting map, not gospel.
## Overview (unverified)
- 3.0 L inline-6 turbo-diesel, second generation ("N" = updated) of the M57 family, produced roughly 2002–2008.
- Fitted to E46 330d, E39/E60 530d, E53 X5 3.0d, E65 730d, Range Rover L322 (as Td6), among others.
- Engine management: Bosch **DDE** (Digitale Diesel Elektronik) — DDE5/DDE6 era depending on year.
- The DDE broadcasts engine data on the vehicle's **PT-CAN at 500 kbps**, which matches the firmware's configured baud rate `(repo)`.
## Data we want from it
Per the project goals: coolant temperature, oil temperature, gearbox oil temperature, gear position/number, battery voltage, fault codes → see [[can-bus-integration]] for the message-ID question.
## Key unknowns
- Which donor vehicle / which DDE version this specific engine came from — this determines the exact CAN matrix. → [[open-questions]]
- Whether gearbox data is available at all: gearbox temperature and gear position come from the **transmission ECU (EGS)**, not the DDE. If the swap kept only the engine + DDE, those messages may not exist on the bus. `(unverified)` → [[open-questions]]
- Whether a standalone/swap harness alters what's broadcast.
## Candidate CAN IDs to verify (unverified — E46/E39-era BMW, widely reported in reverse-engineering communities)
| ID | Reported content |
|------|------------------|
| 0x316 | Engine RPM, key status |
| 0x329 | Coolant temp, throttle/pedal position |
| 0x545 | Check-engine / warning lights, oil temp (some models) |
| 0x43F / 0x43B | EGS gear data (model-dependent) |
> [!warning]
> These do NOT match the IDs currently in the firmware (`0x4F`, `0x55`, `0x201`, `0x1001`, `0x101F` `(repo)`). See [[can-bus-integration]] for why the firmware IDs look like placeholders.
## Related
[[can-bus-integration]] · [[dual-controller-architecture]] · [[open-questions]]
+41
View File
@@ -0,0 +1,41 @@
---
type: concept
tags: [can-bus, reverse-engineering]
updated: 2026-07-15
---
# CAN Bus Integration
The core technical challenge of the project: reading real data from the [[bmw-m57n-engine]]'s CAN bus and mapping it into the display's data structure.
## Current firmware state (repo)
- ESP32-S3 TWAI peripheral, 500 kbps, **LISTEN_ONLY** mode (cannot disturb the bus — good).
- Falls back to dummy simulated data when CAN is off or failing.
- Configured message map:
| ID | Byte(s) | Mapped to |
|--------|---------|-----------|
| 0x4F | 0 | Coolant temp |
| 0x55 | 7 | Oil temp |
| 0x201 | 3 | Gearbox oil temp |
| 0x1001 | 0, 1 | Gear position / gear number |
| 0x101F | 0–1 | Battery voltage (16-bit BE) |
> [!warning] These IDs are almost certainly placeholders, not real BMW IDs.
> Two red flags: (1) `0x1001` and `0x101F` exceed `0x7FF`, the maximum for standard 11-bit CAN identifiers — BMW E-series PT-CAN of the M57N era uses 11-bit frames `(unverified)`, so these would never match. (2) None of the five IDs appear in community BMW reverse-engineering documentation. The map needs to be rebuilt from real bus captures or a trustworthy source before any of the displayed data can be believed.
## Verification plan
1. Get a raw capture of the actual bus (candump / Savvy CAN / cheap USB-CAN dongle) with the engine running. File the log into `raw/`.
2. Identify candidate IDs by watching which bytes track known physical behavior (rev the engine, warm it up, shift gears).
3. Cross-check against community DBC files / reverse-engineering wikis for the donor vehicle.
4. Update `automotive_data.h` `(repo)` and mark each mapping `(verified)` here only after it matches reality on the live bus.
## Signal-source caveat
Coolant/oil temp come from the DDE, but **gearbox temp and gear position come from the EGS module** — they only exist on the bus if the swap retained the automatic transmission and its ECU. `(unverified)` → [[open-questions]]
## Related
[[bmw-m57n-engine]] · [[esp32-s3-touch-lcd-5b]] · [[open-questions]]
@@ -0,0 +1,30 @@
---
type: concept
tags: [architecture, uart]
updated: 2026-07-15
---
# Dual-Controller Architecture
The system is two ESP32-S3 boards linked by UART (repo):
```
BMW M57N CAN bus ──▶ Controller A ──UART 5Hz──▶ Controller B
(this repo: (ESP32-S3-LCD-1.3,
5" 1024×600 display) 1.3" round display)
```
- **Controller A** — [[esp32-s3-touch-lcd-5b]]: listens to the CAN bus, renders the main UI, and re-broadcasts a compact sensor packet over UART1 (GPIO 43/44, 115200 baud) at 5 Hz.
- **Controller B** — ESP32-S3-Touch-LCD-1.3: a secondary display fed purely by that UART stream. Lives in a sibling repo (`bmw-patrol/` parent directory).
## UART packet (repo)
`0xAA` start · version · length · `automotive_data_t` (gear position, gear number, coolant/oil/gearbox temps, battery voltage, fault codes) · XOR checksum · `0x55` end. Full spec in the repo's UART protocol documentation (commit 49aaf06).
## Why it matters for the wiki
Any change to what data we extract from the [[can-bus-integration]] ripples into this packet **and** into Controller B's parser — both ends must move together.
## Related
[[esp32-s3-touch-lcd-5b]] · [[can-bus-integration]]
+41
View File
@@ -0,0 +1,41 @@
---
type: entity
tags: [hardware, waveshare, display]
updated: 2026-07-15
---
# Waveshare ESP32-S3-Touch-LCD-5B
Controller A of the [[dual-controller-architecture]] — the main in-cabin display.
> [!note]
> The raw source `raw/ESP32-S3-Touch-LCD-5B.md` (presumably a clip of the Waveshare product page) is currently **empty** — re-clip it and ingest to flesh this page out with official specs.
## Specs (repo)
- ESP32-S3 dual-core @ 240 MHz, 16 MB flash, 8 MB **OPI** PSRAM
- 5-inch 1024×600 RGB LCD (RGB888 parallel interface), capacitive touch
- Runs LVGL 8.4.0 at ~50 FPS via ESP32_Display_Panel v1.0.4
## Pin usage in this project (repo)
| Function | Pins | Notes |
|----------|------|-------|
| CAN (TWAI) | GPIO 15 TX / GPIO 16 RX | 500 kbps, LISTEN_ONLY; external transceiver required — which one? → [[open-questions]] |
| UART1 → Controller B | GPIO 43 TX / GPIO 44 RX | 115200 baud, exposed on the board's RS485 terminal block |
| USB Serial | UART0 | debug @ 115200 |
## Hard-won hardware 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.
## Open hardware questions
- Automotive power: the board wants 5 V; a vehicle supplies 9–16 V with load-dump transients. What regulator/protection is planned? → [[open-questions]]
- CAN transceiver part and wiring (the TWAI peripheral is only the controller — GPIO 15/16 are logic-level).
## Related
[[dual-controller-architecture]] · [[can-bus-integration]]
+32
View File
@@ -0,0 +1,32 @@
---
type: synthesis
tags: [meta, todo]
updated: 2026-07-15
---
# Open Questions
The research frontier. Answering any of these should trigger updates across the wiki. Ordered roughly by how much they block progress.
## Blocking
1. **What are the real CAN IDs for the M57N data we want?** The firmware's current map is placeholder-quality — two IDs aren't even valid 11-bit identifiers. Needs a live bus capture or a trusted source. → [[can-bus-integration]]
2. **Which donor vehicle / DDE version is this engine from?** (E46? E39? E53? Range Rover Td6?) The CAN matrix differs per platform. → [[bmw-m57n-engine]]
3. **Is the transmission ECU (EGS) on the bus?** Gearbox temp and gear position come from the EGS, not the engine ECU. If this is a manual swap or the EGS was removed, those two display fields have no data source. → [[can-bus-integration]]
## Project context
4. **What vehicle is the engine going into?** The parent directory is named `bmw-patrol` — is this an M57N swap into a Nissan Patrol (a well-known diesel swap)? This shapes wiring, power, and what other bus traffic exists. `(unverified guess)`
5. **Standalone harness or full donor loom?** Affects which modules broadcast.
## Hardware
6. **CAN transceiver**: which part (SN65HVD230? TJA1050?) and how is it wired to GPIO 15/16? → [[esp32-s3-touch-lcd-5b]]
7. **Automotive power supply**: 12 V vehicle → 5 V board conversion, transient/load-dump protection, ignition-switched vs constant power.
8. **Fault codes**: the UART packet reserves a field for fault codes — DDE fault codes are read via diagnostic protocols (KWP2000/UDS over K-line or CAN), not passively broadcast. Is passive reading even possible? `(unverified)`
## Sourcing wishlist
- Waveshare ESP32-S3-Touch-LCD-5B product page + schematic (the current raw clip is empty — re-clip it)
- A community DBC / CAN-ID list for the donor platform
- A real candump log from the engine running
+186
View File
@@ -0,0 +1,186 @@
The ESP32-S3-Touch-LCD-5 is a low-cost, high-performance microcontroller development board designed by Waveshare. It supports 2.4GHz Wi-Fi and BLE 5, integrates large-capacity Flash and PSRAM, and features an onboard 5-inch wide capacitive touch LCD screen, enabling smooth operation of GUI applications such as LVGL. Combined with various peripheral interfaces (e.g., CAN, I2C, and RS485), it allows for rapid development of HMI applications based on the ESP32-S3. The rich functions and interfaces meet the power consumption requirements for application scenarios such as the Internet of Things (IoT), mobile devices, and smart homes.
| SKU | Product |
| --- | --- |
| 28117 | ESP32-S3-Touch-LCD-5 |
| 28151 | ESP32-S3-Touch-LCD-5B |
| 30321 | ESP32-S3-LCD-5 |
| 30320 | ESP32-S3-LCD-5B |
## Specifications
| Basic Parameters | |
| --- | --- |
| **Processor** | High-performance Xtensa 32-bit LX7 dual-core processor, up to 240 MHz |
| **Wi-Fi/Bluetooth** | Supports 2.4 GHz Wi-Fi (802.11 b/g/n) and Bluetooth 5 (LE), onboard antenna |
| **Embedded Memory** | 512KB SRAM and 384KB ROM |
| **Flash** | 16MB Flash |
| **PSRAM** | 8MB PSRAM |
| **Power Supply Range** | Type-C 5V / DC 7-36V |
| **Screen Parameters** | |
| **Resolution** | 800 × 480 or 1024 × 600 |
| **Display Colors** | 65K colors |
| **Display Interface** | RGB |
| **Display Panel** | IPS |
| **Viewing Angle** | 160° |
| **Brightness** | 550 cd/m² |
| **Touch Type** | Capacitive |
| **Touch Panel** | Tempered Glass |
| **Touch Features** | Supports I2C interface control for capacitive touch, 5-point touch, interrupt support |
| **Peripheral Interfaces** | |
| **Communication Interfaces** | CAN, RS485, I2C, USB |
| **Digital Input** | 5~36V, bidirectional optocoupler isolation, supports dry contact and wet contact (NPN or PNP) switch inputs |
| **Digital Output** | 5~36V, optocoupler isolation, output uses high-current transistor, sink current up to 450mA |
| **USB** | Integrated full-speed USB |
| **Others** | |
| **Power Consumption** | 5V 450mA |
| **Operating Temperature** | 0℃ ~ 65℃ |
| **Dimensions (L×W)** | Standard Version: 112.4×75.1mm With Case Version: 116.3×79mm |
## Features
- Powered by a high-performance Xtensa 32-bit LX7 dual-core processor, with a main frequency of up to 240MHz
- Supports 2.4 GHz Wi-Fi (802.11 b/g/n) and Bluetooth 5 (LE) with an onboard antenna
- Built-in 512KB SRAM and 384KB ROM, stacked with 16MB Flash and 8MB PSRAM
- Onboard 5inch wide capacitive touch screen, 800 × 480 or 1024 × 600 resolution, 65K colors
- Supports I2C interface control for capacitive touch, with 5-point touch, and supports interrupts
- Onboard CAN, RS485, I2C interfaces, TF card slot, and integrated full-speed USB
- Supports precise control features like flexible clocking and independent module power supply settings, enabling low-power modes for multiple scenarios
## Precautions
- **Automatic download circuit**: The development board features an automatic download circuit. The Type-C port labeled UART is used for program download and log printing. After downloading the program, press the RESET button to run it.
- **Antenna area**: Pay attention to the PCB antenna area during use, avoiding other metal or plastic parts from touching the antenna location to avoid affecting wireless signals.
- **TF card communication**: The TF card can use SPI/MMC communication. Note that the SD\_CS pin must be driven by EXIO4 of the CH422G.
- **Peripheral interfaces**: The development board uses 3.5 mm terminal blocks to bring out peripheral pins such as CAN, I2C, RS485, and isolated I/O, facilitating on-site wiring.
- **Termination resistors**: CAN and RS485 peripherals are not connected to 120Ω termination resistors via a switch by default. Optionally turn the switch ON to enable termination resistor connection.
- **I/O expansion**: Since the 5inch screen occupies most GPIOs, the development board uses the CH422G chip to expand IOs for reset, backlight control, and other functions.
- **BOOT mode**: If the computer cannot recognize the port, try entering BOOT mode (hold the BOOT button while connecting to the computer, then release the BOOT button).
- **Battery notes**: The MX1.25 lithium battery connector supports only a single 3.7V lithium battery. Do not connect multiple battery packs simultaneously for charging/discharging. It is recommended to use a single cell with a capacity of ≤2000 mAh.
- **I2C slave address conflicts**: The onboard CH422G and touch controller occupy the following I2C addresses. Do not connect external devices with the same addresses:
- **0x20 - 0x27** (CH422G)
- **0x30 - 0x3F** (CH422G)
- **0x5D** (touch controller GT911)
## Onboard Resources
![ESP32-S3-Touch-LCD-5-Board-Source](https://docs.waveshare.com/assets/images/ESP32-S3-Touch-LCD-5-Board-Source-cdd95a0d624ac103ded7f890b1fd03f2.webp)
1. **ESP32-S3-WROOM-1-N16R8**
Wi-Fi/Bluetooth SoC module, 240MHz operating frequency
Stacked 8MB PSRAM and 16MB Flash
2. **TF Card Slot**
For connecting TF cards
3. **USB Type-C Port**
For power supply and program flashing
4. **BOOT Button**
Press and hold while powering on for program flashing
5. **RESET Button**
Press to reset the ESP32S3
6. **Optocoupler Isolation**
Isolates and protects I/O pins on the board
7. **5inch Screen Touch Connector**
Connects the touch screen FPC
8. **5inch Screen Connector**
Connects the LCD display FPC
9. **CAN and RS485 Termination Resistor Switches**
Balance resistor switches for the bus, disabled by default
10. **Battery Connection Switch**
ON: Connect battery
OFF: Disconnect battery
11. **3.7V Single-Cell Lithium Battery 1.25 Interface**
MX1.25 interface, compatible with all 3.7V lithium batteries
12. **Status LEDs**
DONE: Lithium battery charging complete indicator
CHG: Lithium battery charging indicator
PWR: Power indicator
(When power is connected, but no battery is connected or the switch is off, CHG flashes, DONE stays on)
13. **7-36V DC Power Supply**
Wide voltage input interface, supports 7-36V DC power
14. **I2C Interface**
VOUT outputs 5V/3.3V (switchable via onboard resistor, select one)
15. **CAN Interface**
CAN 2.0 compliant
16. **RS485 Terminal Block**
Supports 485 bus communication
17. **Digital Output**
5~36V, open-drain output, output load 450mA/channel (MAX)
18. **Input Signal Common Terminal**
Not connected (floating): Dry contact (passive) input
Connected to power positive: Low-level trigger, NPN-type wet contact (active) input, voltage 5V-36V DC
Connected to power negative: High-level trigger, PNP-type wet contact (active) input, voltage 5V-36V DC
19. **Digital Input**
5~36V, dry contact / wet contact (NPN or PNP type)
20. **VOUT Output Voltage**
Used to set the supply voltage and I/O level for I2C devices, default 3.3V
21. **RTC Battery Holder**
Specification: CR927
![ESP32-S3-Touch-LCD-5-Board-Source-01](https://docs.waveshare.com/assets/images/ESP32-S3-Touch-LCD-5-Board-Source-01-981c3528adf0e47e09ebc3baa9a18c15.webp)
22. **CHARGE**
Lithium battery charging management chip
23. **PCF85063**
RTC clock chip, provides accurate time control
24. **AP3032KTR-G1**
Screen backlight boost chip
25. **CH422G**
IO expander chip
26. **SP3485**
RS485 transceiver chip
27. **TJA1051T/3/1J**
CAN interface chip
28. **SGM2212-3.3**
800mA low-noise LDO
## Interface Description
![ESP32-S3-Touch-LCD-5-details-9](https://docs.waveshare.com/assets/images/ESP32-S3-Touch-LCD-5-details-9-f93db57f041919589aefd349f77a2605.webp)
When using the ESP32-S3-Touch-LCD-5, it is important to understand the hardware connections of the different peripherals.
> [!-info] -info
> **LCD Interface: Connector for the LCD cable (click to expand)**
> [!-info] -info
> **USB Interface: Used for power supply and flashing (click to expand)**
> [!-info] -info
> **TF Card Interface: Connector for TF card (click to expand)**
> [!-info] -info
> **RS485 Interface: Onboard RS485 interface for direct device communication; transmission/reception mode is switched automatically (click to expand)**
> [!-info] -info
> **CAN Interface: Enables transmission/reception control, data analysis, acquisition, and monitoring for CAN bus networks (click to expand)**
> [!-info] -info
> **RTC Interface: Onboard PCF85063 provides clock and calendar information (click to expand)**
> [!-info] -info
> **I2C Interface: Connects to the I/O expander chip, touch interface, and external interfaces (click to expand)**
> [!-info] -info
> **Isolated I/O Interface: Isolated I/O consists of digital output, digital input, and input signal common terminal. I/O level can reach 5~36V (click to expand)**
- MX1.25 Battery Interface: The development board uses the efficient charging/discharging management chip CS8501, which can boost a single-cell lithium battery to 5V. The current charging current is 580mA. Users can change the charging current by replacing resistor R45. For details, please refer to the [ESP32-S3-Touch-LCD-5 Schematic](https://files.waveshare.com/wiki/ESP32-S3-Touch-LCD-5/ESP32-S3-Touch-LCD-5-Sch.pdf).
![ESP32-S3-Touch-LCD-5-details-size](https://docs.waveshare.com/assets/images/warning-info-2397046b02d82a9cbef85dc851f9055a.webp)
## Dimensions
- Dimensions for the version without touch screen:
![ESP32-S3-Touch-LCD-5-no-touch-size-1](https://docs.waveshare.com/assets/images/ESP32-S3-Touch-LCD-5-no-touch-size-1-82f5c3cb84b5a604fffb2986a4655345.webp)
- Dimensions for the version with touch screen:
![ESP32-S3-Touch-LCD-5-touch-size-2](https://docs.waveshare.com/assets/images/ESP32-S3-Touch-LCD-5-touch-size-2-f55a9abf7b42455adbc880b71b4b92f9.webp)
## Development Methods
The ESP32-S3-Touch-LCD-5 supports two development frameworks: Arduino IDE and ESP-IDF, providing developers with flexible choices. You can select the appropriate development tool based on project requirements and personal preference.
Both development methods have their own advantages. Developers can choose based on their needs and skill levels. Arduino is simple to learn and quick to start, suitable for beginners and non-professionals. ESP-IDF provides more advanced development tools and stronger control capabilities, suitable for developers with professional backgrounds or higher performance requirements, and is more appropriate for complex project development.
- **Arduino IDE** is a convenient, flexible, and easy-to-use open-source electronics prototyping platform. It requires minimal foundational knowledge, allowing for rapid development after a short learning period. Arduino has a huge global user community, providing a vast amount of open-source code, project examples, and tutorials, as well as a rich library ecosystem that encapsulates complex functions, enabling developers to implement various features rapidly. You can refer to the **[Working with Arduino](https://docs.waveshare.com/ESP32-Arduino-Tutorials/Arduino-IDE-Setup)** to complete the initial setup, and the tutorial also provides related demos for reference.
- **ESP-IDF**, short for Espressif IoT Development Framework, is a professional development framework launched by Espressif Systems for its ESP series of chips. It is based on C language development and includes compilers, debuggers, flashing tools, etc. It supports development via command line or integrated development environments (such as Visual Studio Code with the Espressif IDF plugin), which provides features like code navigation, project management, and debugging. We recommend using VS Code for development. For the specific configuration process, please refer to the **[Working with ESP-IDF](https://docs.waveshare.com/ESP32-ESP-IDF-Tutorials/ESP-IDF-Installation)**. The tutorial also provides relevant demos for reference.