The MCP2551 and MCP2515 CAN Bus Circuit
This article provides the information necessary build a CAN transceiver using an MCP2551 transceiver and an MCP2515 controller. It’s designed for easy interface to your Arduino and makes use of readily available libraries.
Getting the Parts
The list below identifies the parts you will need and some sources for those parts.
MCP2515 CAN Controller – I built my circuit using an 18 pin DIP.
MCP2551 CAN Transceiver – I used an 8 pin DIP.
8 MHz Crystal –
27 pF Ceramic Capacitors ( two of these) – Not bad to have around
Proto Board – Everyone has their favorite. This is mine
Solid Jumper Wire – I’ve seen projects thrown together with DuPont jumpers or whatever wire that’s hanging around. Heck, I’ve done that. However, I find this stuff really good to have around.
The Arduino CAN Circuit Schematic
The schematic below shows how your CAN board will need to be connected up. Pay attention to pin 8 of the CAN Transceiver. It connects to ground through a 1oK resistor. Its for slope control. In some circuits I’ve had to lower this value to get stable operation.
The Completed Arduino CAN Circuit Build
The photo below shows my completed build. I’ve interface mine with a Arduino Nano that I soldered right to the bread board. I use a separate 5V supply to drive the Nano through the 5V pin on the nano and to drive the CAN interface circuit. Powering from my USB just didn’t work right.
Schematic of CAN Connected to Arduino
A typical connection to an Arduino is shown below.
Sample Sketch for the Arduino CAN Bus Interface
The code you will use to connect your Arduino is identical to that shown in another article. You can read about it HERE.