Touchscreen EV Telemetry Display
A touchscreen dashboard for a VESC motor controller and an ANT battery management system, connected over Bluetooth Low Energy
Overview
Designed and developed a wireless telemetry display that combines real-time data from a VESC motor controller and an ANT Battery Management System. Both devices communicate simultaneously over Bluetooth Low Energy, eliminating the need for wired data connections.
Built around the WT32-SC01 Plus, an ESP32-S3 development board with a 480 × 320 touchscreen, the display provides motor performance, battery monitoring, and ride statistics. It is compatible with VESC-based systems, including my Electric Vehicle Motor Controller project.
Screens
Dashboard
Displays speed, battery voltage, state of charge, motor and battery current, and controller and motor temperatures.
Power Mode
Provides ECO, SPORT, and FULL riding modes, each with configurable power output and speed limits.
Battery
Displays state of charge, pack voltage, current, temperatures, individual cell voltages, and MOSFET and balancer status. Highlights cells with the highest and lowest voltages.
Charging
Automatically displays charging progress, estimated time remaining, charging current, and cell voltage imbalance when the battery is charging.
Trip
Tracks distance, ride duration, average and maximum speed, peak current and power, and energy consumption and regeneration.
Settings
Provides configurable brightness, measurement units, speedometer range, and screen orientation, with settings saved to flash memory. Also includes VESC information and device selection.
Firmware
Developed in C++ using LVGL 9 and FreeRTOS on the ESP32-S3. Two FreeRTOS tasks on Core 0 independently manage VESC and ANT BMS communication, while Core 1 handles the touchscreen interface. The display updates every 100 ms, refreshing only values that have changed.
Because the ESP32-S3 uses a single Bluetooth radio, both communication tasks coordinate scanning and connection operations through a shared lock. Non-blocking task execution prevents BMS operations from interrupting real-time motor telemetry.
VESC Link
- 01
Connect
Scans for the VESC Bluetooth module and establishes a connection through the Nordic UART Service. Automatically reconnects if no valid telemetry is received for 60 seconds.
- 02
Request
Sends COMM_GET_VALUES requests approximately every 50 ms using the VESC communication protocol, including packet framing and CRC-16 error checking.
- 03
Receive
Collects incoming BLE notifications in a ring buffer, reconstructs fragmented packets, and validates frame boundaries and checksums before processing.
- 04
Decode
Extracts voltage, current, temperature, power, and motor telemetry from big-endian data fields. Calculates vehicle speed using electrical RPM, motor pole pairs, and wheel circumference, while distance is derived from the tachometer count.
ANT BMS Link
- 01
Find
Scans for ANT BMS devices, prioritizing the strongest signal and reusing existing scan results when available. Connects through characteristic FFE1 for bidirectional communication.
- 02
Request
Requests battery status every 2 seconds. Supports both current and legacy ANT protocols, automatically switching between their packet formats after three unanswered requests.
- 03
Decode
Reassembles and validates incoming data frames before extracting individual cell voltages, pack voltage, current, temperature, state of charge, capacity, and MOSFET and balancer status. Handles variable cell counts and protocol-specific data formats.
- 04
Detect Charging
The Charging screen activates after 5 seconds of sustained charging current while stationary and closes when the vehicle moves or charging stops for 15 seconds.