Microcontroller Gateway BMS UART PIN Wiring Guide
This guide details how to wire your ESP32 microcontroller gateway device to your Battery Management System (JK-BMS, Daly, JBD) over serial UART.
⚡ Core Wiring Rules
When connecting an ESP32 microcontroller gateway to a BMS UART interface:
- Cross RX & TX Lines: Microcontroller TX (Transmit) connects to BMS RX (Receive), and Microcontroller RX (Receive) connects to BMS TX (Transmit).
- Common Ground (GND): You MUST connect the ESP32 GND to the BMS UART GND pin. Telemetry will fail or drop frames without a common ground reference.
- 3.3V Logic Levels Only: ESP32 GPIO pins operate at 3.3V logic level. Do NOT connect high battery pack voltage (12V–60V) directly to ESP32 pins!
🔌 Pin Connection Diagram
┌─────────────────────────┐ ┌─────────────────────────┐
│ ESP32 Gateway │ │ JK-BMS / BMS │
│ Microcontroller Board │ │ UART Port (JST) │
│ │ │ │
│ GPIO 16 (RX Pin) ◀───┼──────────────────┼───▶ TX Pin (BMS Transmit)│
│ │ │ │
│ GPIO 17 (TX Pin) ────┼──────────────────┼───▶ RX Pin (BMS Receive) │
│ │ │ │
│ GND Pin (Ground) ────┼──────────────────┼───▶ GND Pin (BMS Ground) │
└─────────────────────────┘ └─────────────────────────┘📌 Microcontroller Default Pin Assignments
In Gateway Settings > BMS > BMS UART, you can set custom GPIO RX and TX pins to match your specific microcontroller development board profile:
| Gateway Microcontroller Board | Default RX Pin | Default TX Pin | Default Baud Rate | Notes |
|---|---|---|---|---|
| ESP32-DevKitV1 / WROOM | GPIO 16 | GPIO 17 | 115200 (JK-BMS) / 9600 (Daly/JBD) | Hardware UART2 |
| ESP32-S3 Dev Module | GPIO 18 | GPIO 17 | 115200 / 9600 | USB-CDC native |
| ESP32-C3 SuperMini | GPIO 20 | GPIO 21 | 115200 / 9600 | Compact form factor |
| Custom Board | Configurable | Configurable | Configurable | Set in Dashboard Settings |
🏷️ BMS Connector Pinouts
1. JK-BMS 4-Pin GPS / UART Connector
JK-BMS models use a 4-pin JST connector (labeled GPS or UART):
- Pin 1 (GND): Connect to ESP32 GND
- Pin 2 (RX): Connect to ESP32 TX (GPIO 17)
- Pin 3 (TX): Connect to ESP32 RX (GPIO 16)
- Pin 4 (VCC 3.3V/5V): Optional ESP32 power feed (ensure voltage regulator matches)
2. Daly BMS UART Connector
- Pin 1 (GND): Connect to ESP32 GND
- Pin 2 (RX): Connect to ESP32 TX (GPIO 17)
- Pin 3 (TX): Connect to ESP32 RX (GPIO 16)
3. JBD (Jiabaida) UART Connector
- Pin 1 (GND): Connect to ESP32 GND
- Pin 2 (RX): Connect to ESP32 TX (GPIO 17)
- Pin 3 (TX): Connect to ESP32 RX (GPIO 16)
- Pin 4 (VCC): Do not connect to ESP32 3.3V pin unless regulated
🛡️ Safety & Troubleshooting Checklist
- [x] Verify TX/RX Swap: If telemetry shows Offline or BMS Disconnected, swap the RX and TX wire connections.
- [x] Check Baud Rate: JK-BMS communicates at 115200 baud; Daly & JBD use 9600 baud.
- [x] Verify Ground Wire: Ensure GND pin has a solid continuity connection.
- [x] Update Gateway Config: Match the GPIO RX & TX numbers in Gateway Settings > BMS > BMS UART with your physical wiring.