Kitbest OBD2 Has Red Light On: Decoding Your Zero Motorcycle’s CANBUS Data

A persistent red light on your Kitbest OBD2 scanner when connected to your Zero Motorcycle can be frustrating. Understanding the data transmitted through your motorcycle’s CANBUS system is crucial for diagnosing issues. This article delves into decoding that data, providing insights into parameters like range, speed, temperature, and error codes.

Accessing the CANBUS Data on a Zero Motorcycle

The OBD-II connector on a Zero Motorcycle, located above and behind the motor near the accessory charging port, provides access to the CANBUS data. On 2015 models, accessing this connector can be challenging. Newer models have it conveniently located under the seat. A Raspberry Pi, equipped with a PiCAN 2 board, can be used to interpret this data. A standard PiCAN 2 with a DB-9 connector is recommended.

Setting Up the Raspberry Pi for CANBUS Decoding

While detailed Raspberry Pi setup tutorials are readily available online, here’s a summarized process focusing on CANBUS data retrieval. First, install Raspbian Jessie Lite on an SD card. Note that SSH is disabled by default; enable it by placing an “ssh” file in the /boot directory before the first boot. After booting, configure the Pi to connect to your Wi-Fi network for remote access.

Next, enable the PiCAN 2 board by adding specific lines to the /boot/config.txt file. These lines activate the necessary SPI and MCP2515 interfaces. Configure the CAN interfaces with the correct bitrate in /etc/rc.local, ensuring proper communication with the Zero Motorcycle’s CANBUS system.

To capture data, install necessary software including the candump utility and the Python 3 python-can library. These tools allow recording and interpreting the CANBUS data stream. Physically connect the PiCAN2 to the motorcycle’s OBD-II port using an appropriate cable. A SparkFun OBD-II to DB-9 cable works well; identify pins 6 (red) and 14 (yellow) for connection.

Recording and Analyzing CANBUS Data

Power the Raspberry Pi, ideally through a portable battery or USB converter connected to the bike’s power jack. Remember to gracefully shut down the Pi before turning off the motorcycle to prevent SD card corruption.

Use the candump command to record the CANBUS data into a text file. The output consists of lines representing individual messages, each containing the interface name, Parameter ID (PID), number of data bytes, and the data bytes themselves in hexadecimal format.

Filter specific PIDs using candump options to focus on relevant data. For instance, candump can0,0x123:0x7FF isolates messages with PID 0x123. Tools like cansniffer provide real-time visual monitoring of the data stream.

Decoding Key Parameter IDs (PIDs)

Analyzing the recorded data reveals frequently recurring PIDs. Each PID corresponds to a specific parameter:

  • 0x240: Indicates the current riding mode (Sport, Eco, Custom).
  • 0x281: Represents the motor temperature in degrees Celsius.
  • 0x340: Provides the motor RPM and error codes.
  • 0x440: Contains the remaining range in 10-meter units. Converting this value to kilometers or miles requires appropriate calculations.

Decoding the range data involves analyzing the data bytes associated with PID 0x440. By observing the changes in range displayed on the dashboard and correlating them with the corresponding CANBUS data, the formula for calculating range can be derived.

Conclusion

Decoding the CANBUS data on your Zero Motorcycle provides invaluable insights into its performance and health. While setting up the Raspberry Pi and interpreting the hexadecimal data may seem daunting, the process is ultimately rewarding. By understanding these data points, you gain a deeper understanding of your motorcycle and can more effectively troubleshoot issues, especially when that Kitbest OBD2 red light is staring you in the face.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *