CAN interfaces · Datasheet

SPI-CAN 40-pin Hat Rev A

CAN FD hat for 40-pin single-board computers

Codename
can_hat_40
Revision
Rev A Active
Released
2025-08-03
Marking
can_hat_40_pcb v0.1.0
Document
DS-CAN-HAT-40-A release 1.0, WIP

Features

  • Standard 40-pin (2x20) GPIO header for direct mounting on Raspberry Pi and compatible SBCs
  • SPI host interface for Classic CAN and CAN FD via the MCP2518FD controller
  • Switch selectable bus termination (split 2x 60 Ohm + centre-tap capacitor)
  • Jumper selectable silent mode (listen-only) for bus monitoring
  • Operates at fixed 3.3 V logic

Overview

A 40-pin (2x20) GPIO hat that adds a CAN bus interface to single-board computers such as the Raspberry Pi series. It seats directly on the standard 40-pin header and bridges the host’s SPI bus to a CAN transceiver, so any compatible SBC can talk CAN without an integrated controller.

Board top
Top
Board bottom
Bottom

Specifications

Parameter Conditions Min Typ Max Unit
Power
Supply From the host 40-pin header
Logic level 3.3 V (fixed)
Host interface
Interface SPI (default SPI0, CE0)
CAN
Controller MCP2518FD, 40 MHz crystal
Transceiver TJA1057BTK
Bus termination Switch selectable 120 Ohm, split 2x 60 Ohm + centre-tap capacitor (SW1)
Mechanical
Form factor 40-pin (2x20) GPIO hat

Connectors and pinout

Figure: connector locations (top view)
Ref Connector Description
J1 40-pin Standard 40-pin (2x20) GPIO pin header.
J2 CAN CAN bus connection.

J2: CAN

Pin Name Type Description
1 GND PWR Ground
2 CANH IO CAN high
3 CANL IO CAN low

Switches and jumpers

Ref Function Settings
SW1 CAN termination 1 + 2 = 120 Ohm termination, 2 + 3 = no termination
JP1 CAN silent Open = normal operation, closed = silent mode

Detailed description

Host interface

The hat bridges the host’s SPI bus to the CAN bus through the MCP2518FD controller. By default it uses the host’s SPI0 bus (CE0) with the controller interrupt on GPIO22, which matches the device-tree overlay shown in the Linux setup guide.

The board operates at fixed 3.3 V logic.

Bus termination

The CAN termination switch (SW1) connects a 120 Ohm split termination (2x 60 Ohm with a centre-tap capacitor) across the bus. The switch positions are marked 120 (terminated) and NC (not terminated).

Enable termination only when the board sits at a physical end of the bus.

Silent mode

Closing the CAN silent jumper (JP1) puts the transceiver in silent (listen-only) mode, for monitoring a bus without transmitting on it.

Key components

Part number Manufacturer Description Qty
MCP2518FDT-E/QBB Microchip Technology CAN FD to SPI controller 1
TJA1057BTK NXP USA Inc. CAN bus transceiver 1
JS202011JAQN C&K DPDT slide switch, right angle 1
ECS-400-10-37B2-CKY-TR ECS Inc. 40 MHz crystal 1

Mechanical

Figure: dimensioned drawing

Design files

  • Schematic PDF can_hat_40_rev-a_schematic.pdf
  • Gerbers ZIP can_hat_40_rev-a_gerber.zip
  • 3D model STEP can_hat_40_rev-a.step

Errata

No known errata for Rev A.

Revision history

Revision Released Status Changes
Rev A 2025-08-03 Active
  • Initial release.
Information subject to change without notice. Latest version of this document: https://docs.scalpelspace.com/products/can_hat_40/rev-a/

This site uses Just the Docs, a documentation theme for Jekyll.