When diving into vehicle diagnostics and communication, understanding the CAN (Controller Area Network) bus system is crucial. Within the OBD2 (On-Board Diagnostics II) port, the CAN High (CAN H) and CAN Low (CAN L) lines are the backbone for data exchange between your diagnostic tools and the vehicle’s electronic control units (ECUs). For enthusiasts and professionals working with tools like Teensy boards to interface with vehicle systems, grasping these connections is the first step to successful communication.
The OBD2 port, standardized across modern vehicles, provides access to a wealth of vehicle data. Among its pins, pins 6 and 14 are specifically designated for the CAN bus:
- Pin 6: CAN High (CAN H) – This pin carries the dominant high signal of the CAN bus differential pair.
- Pin 14: CAN Low (CAN L) – This pin carries the complementary low signal of the CAN bus differential pair.
These two lines work together using differential signaling, which is essential for robust communication in electrically noisy environments like vehicles. The differential signal reduces susceptibility to electromagnetic interference (EMI), ensuring data integrity across the vehicle’s network. Pin 5 on the OBD2 port typically serves as the signal ground, providing a common reference for the CAN signals and other communication protocols.
Connecting to the CAN bus via the OBD2 port involves correctly interfacing with these CAN H and CAN L lines. As highlighted in the initial query, tools like the Teensy 4.1, when paired with a dual CAN bus transceiver, can be used to read and interpret CAN bus data. The user’s connection setup correctly identifies the necessary pins: Teensy CAN board CAN1 High to OBD2 pin 6, and Teensy CAN board CAN1 Low to OBD2 pin 14. Grounding to pin 5 is also a standard practice for a stable connection.
Encountering issues where can.read()
functions are not responding, as described in the original post, can stem from several factors. While the physical connection to CAN H and CAN L (OBD2 pins 6 and 14) is the foundation, other aspects are equally important:
- Baud Rate Mismatch: CAN bus communication relies on a specific baud rate. If the Teensy is configured for a baud rate that doesn’t match the vehicle’s CAN bus (often 250kbps or 500kbps for OBD2 CAN), communication will fail. Ensuring the correct baud rate setting in the code (e.g.,
can1.setBaudRate(250000);
for 250kbps) is critical. - CAN Protocol Differences: While OBD2 CAN is standardized, variations in protocol implementation can sometimes exist. However, for basic reading, standard CAN protocols are typically sufficient.
- Wiring Issues: Double-checking the wiring for continuity and correct pin connections is essential. Even a slight wiring mistake can prevent communication.
- Vehicle CAN Bus Activity: In some cases, the vehicle’s CAN bus might not be actively transmitting data when the diagnostic tool connects. Starting the vehicle’s ignition or running the engine usually activates the necessary CAN bus communication.
In conclusion, for anyone working on vehicle diagnostics or CAN bus interfacing via OBD2, understanding the CAN H and CAN L connections (pins 6 and 14) is fundamental. Correctly connecting to these pins, along with verifying baud rate and wiring, forms the basis for establishing successful CAN bus communication and accessing valuable vehicle data for diagnostics, monitoring, and custom automotive projects.