

The Adafruit CAN Bus BFF (Manufacturer Part ID: 5877) is a compact breakout board designed to simplify interfacing with CAN (Controller Area Network) devices. It provides an easy and reliable way to connect microcontrollers, such as Arduino boards, to the CAN bus, enabling communication with automotive, industrial, and embedded systems.
The CAN Bus BFF is ideal for applications requiring robust communication between multiple devices, such as vehicle diagnostics, industrial automation, and robotics. Its small form factor and compatibility with popular microcontrollers make it a versatile choice for both hobbyists and professionals.








The Adafruit CAN Bus BFF is built around the MCP2515 CAN controller and the TJA1051 CAN transceiver, ensuring reliable and efficient communication. Below are the key technical details:
The Adafruit CAN Bus BFF has the following pinout:
| Pin Name | Type | Description |
|---|---|---|
| VIN | Power Input | Power input for the board (3.3V or 5V). |
| GND | Ground | Ground connection. |
| SCK | SPI Clock | SPI clock input for communication with the microcontroller. |
| MISO | SPI Data Out | SPI data output from the MCP2515 to the microcontroller. |
| MOSI | SPI Data In | SPI data input from the microcontroller to the MCP2515. |
| CS | Chip Select | SPI chip select pin for enabling communication with the MCP2515. |
| INT | Interrupt | Interrupt pin triggered by the MCP2515 to signal events (e.g., message received). |
| CANH | CAN High | High line of the CAN bus. |
| CANL | CAN Low | Low line of the CAN bus. |
Below is an example of how to use the Adafruit CAN Bus BFF with an Arduino UNO. This example uses the popular MCP_CAN library.
| Adafruit CAN Bus BFF Pin | Arduino UNO Pin |
|---|---|
| VIN | 5V |
| GND | GND |
| SCK | D13 |
| MISO | D12 |
| MOSI | D11 |
| CS | D10 |
| INT | D2 |
#include <SPI.h>
#include <mcp_can.h>
// Define the SPI CS pin for the MCP2515
#define CAN_CS_PIN 10
// Create an instance of the MCP_CAN class
MCP_CAN CAN(CAN_CS_PIN);
void setup() {
Serial.begin(115200);
while (!Serial);
// Initialize the MCP2515 CAN controller at 500 kbps
if (CAN.begin(MCP_ANY, CAN_500KBPS, MCP_8MHZ) == CAN_OK) {
Serial.println("CAN Bus initialized successfully!");
} else {
Serial.println("Error initializing CAN Bus.");
while (1);
}
// Set the CAN controller to normal mode
CAN.setMode(MCP_NORMAL);
Serial.println("CAN Bus is now in normal mode.");
}
void loop() {
// Example: Send a CAN message
byte data[8] = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08};
if (CAN.sendMsgBuf(0x100, 0, 8, data) == CAN_OK) {
Serial.println("Message sent successfully!");
} else {
Serial.println("Error sending message.");
}
delay(1000); // Wait 1 second before sending the next message
}
CAN Bus Initialization Fails
No Communication on the CAN Bus
Interrupt Pin Not Working
Can I use the Adafruit CAN Bus BFF with 3.3V microcontrollers? Yes, the board is compatible with both 3.3V and 5V logic levels.
What is the maximum length of the CAN bus? The maximum length depends on the baud rate. For example, at 1 Mbps, the maximum length is approximately 40 meters.
Does the board include termination resistors? No, you need to add external 120Ω resistors at both ends of the CAN bus.
This concludes the documentation for the Adafruit CAN Bus BFF. For further assistance, refer to the official Adafruit documentation or community forums.