OBD2 (On-Board Diagnostics) primarily focuses on emissions control and provides a standardized set of Parameter IDs (PIDs) for logging vehicle data. This data can be invaluable for diagnostics, performance tuning, and fleet management. This guide explains how to leverage the power of InfluxDB, a time series database, and a ReXgen data logger to capture and analyze OBD2 data. We will specifically focus on using the ReXdesk software for configuration and data export.
Using ReXgen and InfluxDB for OBD2 Data Acquisition
Capturing OBD2 data with a ReXgen data logger and storing it in InfluxDB offers a robust solution for vehicle data analysis. ReXgen devices provide the hardware interface to the vehicle’s OBD2 port, while ReXdesk facilitates configuration and data logging. InfluxDB’s ability to handle time-stamped data makes it ideal for storing and querying OBD2 information.
Configuring Periodic CAN/CAN FD Transmission with ReXdesk
ReXdesk allows for the periodic transmission of CAN (Controller Area Network) messages, essential for requesting and receiving OBD2 data. The following steps outline the configuration process:
Project Creation and Tool Selection
- New Project: Start by creating a new project within ReXdesk.
- Periodic Transmission: Drag and drop the “Periodic Transmission” tool into the “Output” area of the configuration window. This tool enables the scheduled transmission of CAN messages to the vehicle’s ECU (Electronic Control Unit).
CAN Bus Configuration and OBD2 Requests
- CAN Bus Properties: Configure the CAN bus properties, including baud rate and physical/functional addressing, if not already done. This ensures proper communication with the vehicle’s CAN network.
- OBD2 Requests: To initiate OBD2 Mode 1 data logging, configure periodic transmissions with specific OBD requests. These requests target the desired PIDs (Parameter IDs) for data retrieval. Use ID 7DF for standard 11-bit OBD2 requests and ID 7E8 for responses from the ECU. For heavier vehicles using 29-bit CAN identifiers, the request ID is 18DB33F1 and the response ID is 18DAF1XX (where XX varies by OEM).
Message Parameters
- Ident: Specifies whether the identifier is for “request” or “response” messages.
- Linked: Enables linking multiple messages together.
- Period: Defines the interval between transmissions.
- Delay: Sets a delay before transmission.
- CAN Bus Selection: Choose the appropriate CAN bus for communication.
- Type: Select the CAN message type (Standard or Extended).
- DLC: Specify the Data Length Code (0-64).
- Data: Construct the request and response data messages, including Mode and PID. The ‘Length’ byte indicates the number of data bytes to follow.
Decoding OBD2 Data
Raw OBD2 data needs to be decoded to be useful. Two common methods are:
Direct Data Interpretation
Understanding the structure of OBD2 response messages is crucial for decoding. Each response contains a Mode, PID, and data bytes. The data bytes represent the value of the requested parameter, often encoded as a formula specified by the OBD2 standard (SAE J1979).
Decoding with a DBC File
A DBC (Database Container) file provides a description of CAN messages and their signals. ReXdesk can use a DBC to decode raw data into meaningful values.
-
Internal Storage: Access the “Internal Storage” section within ReXdesk.
-
Data Download: Download the recorded data logs. Select “Advanced” and choose the desired output format (e.g., .csv, .mf4).
-
DBC Loading: Load the appropriate DBC file that corresponds to the vehicle’s communication protocol.
-
Signal Mapping: Drag and drop the required DBC messages/signals onto the corresponding CAN bus in ReXdesk.
-
Data Processing: ReXdesk will process the raw data using the DBC and output the decoded data in the chosen format.
Conclusion
Combining a ReXgen data logger with InfluxDB provides a powerful solution for collecting, storing, and analyzing OBD2 data. Proper configuration within ReXdesk and accurate data decoding are essential for extracting valuable insights from your vehicle data. This data, when combined with InfluxDB’s analytical capabilities, can empower informed decisions regarding vehicle maintenance, performance optimization, and fleet management. Refer to the ReXgen documentation and SAE J1979 for detailed information on OBD2 PIDs and data decoding formulas.