SPI CAN Adapter : Working, Applications, Manufacturers

Introduction : An SPI CAN Adapter (or converter) bridges an SPI based microcontroller or embedded system to a CAN bus network. While SPI (Serial Peripheral Interface) is often used for onboard communication between microcontrollers and peripherals, converting SPI to CAN enables that system to communicate over a robust, multi-node CAN bus.

How SPI to CAN Adapter Works

An SPI to CAN Adapter is a hardware bridge that allows a microcontroller (MCU) that does not have a built-in CAN controller to communicate with a Controller Area Network (CAN).

In the automotive hierarchy, not every microcontroller used in a vehicle or test equipment is powerful enough to have native CAN support. An SPI to CAN adapter allows designers to use simpler, lower cost microcontrollers (or generic computers like a Raspberry Pi) by adding CAN capabilities via the standard Serial Peripheral Interface (SPI) bus.

The Main MCU (Master) connects to the Adapter (Slave) using four wires: MOSI (Master Out Slave In), MISO (Master In Slave Out), SCK (Clock) and CS (Chip Select). The MCU sends commands (e.g., “Send Message”) and data payloads over these wires.

As the name suggests, it connects one side with SPI interface (MOSI, MISO, SCK, SS) and the other side with CAN bus interface. Let us understand working of SPI-CAN converter.

  1. SPI to CAN : On the transmit side, When the MCU sends data via SPI, the Controller formats it into a valid CAN Frame adding ID, DLC, CRC etc.
  2. CAN to SPI : On the receive side, CAN frames are converted back to SPI compatible data.

It handles Arbitration ensuring that if the bus is busy or a higher priority message is being sent, the adapter waits and retries automatically without burdening the main MCU. It also handles Error Detection and Bit Stuffing automatically.

Most SPI to CAN modules also include a CAN Transceiver. This converts the digital logic from the Controller into the differential voltages useful for CAN bus.

Applications

Following are some of the applications or use cases of SPI to CAN and vice versa conversions.

  • Rapid Prototyping: SPI-CAN adapter allows generic development boards such as Arduino, STM32 or FPGA kits etc. to communicate with vehicle’s ECU during development.
  • Telematics and Gateways: Used in the Telematics Domain to add CAN connectivity to GPS trackers or GSM modules that typically use standard microcontrollers lacking native CAN.
  • Aftermarket Diagnostics (OBD-II): Devices that plug into the OBD-II port to read engine RPM or fault codes often use these adapters to interface with the car’s network without needing an expensive automotive grade processor.
  • Body Electronics Expansion: Used in Body Domain applications where a door module or seat controller needs to be low cost; a cheap MCU plus an SPI-CAN chip is often cheaper than high end MCU with integrated CAN.

Manufacturers

Following are some of the companies which manufacture SPI CAN adapter device.

ManufacturerDescription with part number or product name
Microchip TechnologyMCP2515 : CAN controller with SPI interface. MCP2518FD : Supports CAN-FD
Texas InstrumentsTCAN4550 : Combines CAN controller and transceiver into a single chip with SPI interface
WaveshareMCP2515 CAN Module : Microchip MCP2515 controller and a TJA1050 transceiver
AdafruitAdafruit CAN Pal : A breakout board utilizing the TCAN4550, allowing easy SPI to CAN connection for test benches.

Summary: A well designed SPI CAN Adapter acts as a powerful interface bridge which allows embedded or SPI based systems participate in a CAN network. This offers numerous benefits of both SPI based design and CAN based networking without redesigning the entire system.