Zum Inhalt springen

WSAL17912 – 2-CH CAN HAT/en

Aus JW Tech Wiki

Documentation notice: This technical documentation was independently rewritten from an archived supplier source. Check technical details and commands against the product version and manufacturer documentation before use.

Summary

Technical wiki for the Waveshare 2-channel isolated CAN expansion HAT with MCP2515 and SI65HVD230/SN65HVD230, SPI connection to Raspberry Pi, and CAN bus configuration.

Related products at JW Tech

Technical overview

  • Compatible with Raspberry Pi Zero/Zero W/Zero WH/2B/3B/3B+/4B; FAQ also states it works with Raspberry Pi 5.
  • Two independent CAN channels via two MCP2515 controllers and matching transceivers (SI65HVD230 or SN65HVD230).
  • SPI GPIO mapping: MISO BCM9/WPI13, MOSI BCM10/WPI12, SCK BCM11/WPI14, CS_0 BCM8/WPI10, INT_0 default BCM23/WPI6, CS_1 BCM7/WPI11, INT_1 default BCM25/WPI4.
  • By default the interrupt pins are soldered to PIN23 (INT_0) and PIN25 (INT_1); changing them requires re-soldering pads and updating /boot/config.txt.
  • The module’s supply voltage is 5 V; logic level selectable between 3.3 V and 5 V via jumper.
  • Integrated power and signal isolation improve stability and immunity in industrial environments.
  • On-board protection circuits include ESD/transient suppression (SM24CANB diode) and a jumper-configurable 120 Ω termination resistor.
  • The board also breaks out SPI control pins for connecting external host boards such as STM32 or Arduino.
  • Dimensions 65.0 × 56.5 mm; mounting hole diameter 3.0 mm.

Commands and examples – verify before use: 

sudo raspi-config  # Interfacing Options -> SPI -> Yes, then sudo reboot
sudo nano /boot/config.txt  # append: dtparam=spi=on; dtoverlay=mcp2515-can1,oscillator=16000000,interrupt=25; dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=23; dtoverlay=spi-bcm2835-overlay; then sudo reboot
dmesg | grep spi
sudo ip link set can0 up type can bitrate 1000000
sudo ip link set can1 up type can bitrate 1000000
sudo ifconfig can0 txqueuelen 65536
sudo ifconfig can1 txqueuelen 65536
ifconfig
sudo apt-get install can-utils
candump can0
cansend can1 000#11.22.

Notes and version constraints

  • The exact bitrate values (here 1 Mbit/s) may need adjustment depending on bus load and cabling; the source only provides an example.
  • When using with Raspberry Pi 2B/3B/4B, it is recommended to use a booster seat with nylon posts so that the back of the CAN connector does not press against the HDMI port and cause a short circuit.
  • Changing interrupt pins requires soldering work on the PCBA and a matching config.txt update – before soldering, verify that the changed pins are actually free.
  • If communication fails: check that CAN_H connects to CAN_H and CAN_L to CAN_L (no swapping), that the correct CAN device is configured in code, and that there is no short circuit between the CAN and HDMI connectors.
  • If the WiringPi installation fails or the expected version does not appear, the installation may be faulty; the source points to alternative installation instructions on the Raspberry Pi forum.

Source and revision record

  • 2-CH CAN HAT - Waveshare Wiki
  • Source revision: 108423
  • Captured: 2026-09-01T02:43:21+00:00
  • SHA-256: c3a490ef47427f8556e424aa0fcb276a440f8c6a3bee2e49461be0b5c9fc898f