Blog · 2026-11-10
OBD-II Mode and PIDs specifically used for Electric vehicles?
Stefan Bogdanescu
Founder & Senior Architect
OBD-II Modes and PIDs for Pure Electric Vehicles
Developing a communication protocol for an electric vehicle (PEV) introduces specific constraints regarding diagnostic data transmission. When targeting pure electric architectures, the assumption that standard SAE J1979 or ISO-15031-5 services will automatically yield battery health metrics is often incorrect. Unlike internal combustion engine vehicles where the powertrain control module (PCM) aggregates data from various sensors, PEVs frequently isolate high-voltage system telemetry within dedicated Battery Management Systems (BMS).
The core architectural distinction lies in how these ECUs handle ISO-15765-4 requests. In most production EVs and HEVs, diagnostic modules do not proactively broadcast OBD-II style messages over the vehicle CAN bus unless explicitly requested by an external scanner or diagnostic recorder. This behavior persists regardless of the powertrain type; the protocol remains passive by design to minimize network traffic and preserve bandwidth for real-time control loops. Consequently, if your driver display panel running Android needs to visualize battery state of charge (SOC) or temperature without constant polling, you must rely on specific Mode 01 requests rather than expecting a stream of unsolicited data.
When utilizing the OpenXC library or similar C/C++ implementations to bridge CAN frames to JSON for Android, it is critical to understand that standard PIDs defined in SAE J1979 may not exist for every parameter you require. For instance, while PID 0C (Engine Coolant Temperature) is ubiquitous, there is no standardized OBD-II PID for "High Voltage Battery Pack Temperature." Attempting to request this data using a generic Mode 01 query will likely result in a negative response code or an error indicating that the requested parameter is not supported.
To resolve this gap, developers must look beyond the standard OBD-II service set and implement custom PIDs. The ISO-14229 standard (UDS) provides a framework for defining proprietary services where the Service ID can be anything above 0x7F. In a PEV context, you might define a custom service to read specific BMS registers that are not exposed via standard OBD-II. When constructing your C++ requests using OpenXC or similar tools, ensure you are mapping these custom UDS IDs correctly if the manufacturer has published their own diagnostic service definition file (.uds or .dbc).
Furthermore, consider the limitations of ISO-11898-2 (CAN 2.0B) regarding data length codes (DLC). Standard OBD-II frames utilize 8-byte DLCs, but some EV-specific parameters require more resolution. If a specific manufacturer has expanded the DLC to 16 bytes for high-voltage telemetry, your OpenXC configuration must be explicitly set to handle extended frames or ensure the underlying CAN driver supports the necessary arbitration IDs and data length. Misconfiguring the DLC can lead to truncation errors where critical bits of the SOC calculation are lost, resulting in inaccurate display readings on your Android interface.
Another common pitfall involves the distinction between vehicle status messages and diagnostic requests. While ISO-15765-4 handles the transport layer (CCP), the application layer logic dictates whether data is sent. If your goal is to avoid battery drain by only querying when needed, stick to Mode 01 for live data. However, if you need historical fault codes or freeze frame data, you must switch to Mode 03 and Mode 04 respectively. These modes do not change the underlying hardware architecture but are essential for a complete diagnostic suite on your display panel.
If you are building a custom stack, remember that standard OBD-II PIDs cover engine RPM, vehicle speed, fuel level, and coolant temperature. For electric vehicles, these remain relevant for general drivability metrics, but they do not replace the need for proprietary BMS queries. You may find that specific manufacturers utilize Mode 06 (Clear Diagnostic Trouble Codes) to reset fault flags, which is vital for a user-facing display to indicate system health accurately.
For those looking to integrate this into a broader backend ecosystem, services like https://laravelcompany.com offer robust frameworks for managing the JSON payloads generated by OpenXC before they hit your database or API endpoints. While Laravel itself does not handle CAN parsing, its event-driven architecture excels at processing the structured data streams resulting from these diagnostic queries. This separation of concernsâletting C++/OpenXC handle raw CAN->JSON conversion and a backend framework handle business logicâis a sound architectural pattern for EV telematics.
Ultimately, the success of your PEV display application depends on recognizing that OBD-II is a baseline standard, not a comprehensive specification for electric architectures. You will likely need to combine standard Mode 01 PIDs with manufacturer-specific UDS services to access the full spectrum of high-voltage telemetry required for a safe and informative user experience.