CAN Adapters
In this chapter, two USB-to-CAN adapters are discussed. These adapters are used to connect a computer to a CAN bus, and to send and receive CAN messages. Some adapters also support CAN FD.
comma.ai red panda
The comma.ai red panda is a USB-to-CAN adapter. It's mainly designed to work with the comma.ai openpilot project, but can also be used as a generic USB-to-CAN adapter. It is based on the STM32H725 microcontroller and has open source firmware. It supports CAN FD on all three main buses, plus the multiplexed bus.
The panda is mainly intended to be used through comma.ai's Python API, which makes it easy to build custom tools for interacting with a vehicle. The Python API has support for efficiently sending and receiving CAN messages, but also implements high-level protocols such as ISO-TP, UDS, and CCP.
The red panda exposes vehicle signals through comma's OBD-C connector. To break this out for bench use, use an OBD-C cable and a CAN Bus Throwing Star.
PEAK-System PCAN
PEAK-System makes a range of PCAN adapters. The PCAN-USB FD is a single-channel USB adapter for CAN and CAN FD. It uses a DB-9 connector, supports ISO and non-ISO CAN FD, has galvanic isolation, and is supported by the Linux SocketCAN driver stack. PEAK also provides PCAN-View and the PCAN-Basic API for Windows.
The classic PCAN-USB is also available if CAN FD is not needed.
Standard DB-9 Pinout for CAN
Many CAN adapters use a DB-9 connector to expose the CAN bus. The most common pinout is shown below. Usually a separate DB-9 connector is used for each CAN bus, but sometimes two are combined on the same connector.
| Pin # | Description |
|---|---|
| 1 | — |
| 2 | CAN 1 Low |
| 3 | Ground |
| 4 | CAN 2 Low (optional) |
| 5 | Ground |
| 6 | Ground |
| 7 | CAN 1 High |
| 8 | CAN 2 High (optional) |
| 9 | 12 V (optional) |
