Raspberry Pi

RS485 CAN HAT

$14.99

Shipping calculated at checkout.

Quantity

The RS485 CAN HAT for Raspberry Pi adds both CAN Bus and RS485 industrial communication interfaces to compatible Raspberry Pi boards through the standard 40-pin GPIO header.

The board combines an MCP2515 CAN controller with an SN65HVD230 CAN transceiver, while the RS485 interface uses an SP3485 3.3V half-duplex transceiver.

CAN communication is handled through the Raspberry Pi's SPI interface, while RS485 communication uses UART. The RS485 section supports automatic transmit/receive direction control by default, simplifying software development by eliminating the need to manually switch between transmit and receive modes for many applications.

Integrated TVS protection on the RS485 interface helps protect against transient voltage spikes and electrostatic discharge, making the HAT suitable for robotics, industrial automation, monitoring, automotive development, and embedded communication systems.

Key Features

  • Standard Raspberry Pi 40-pin GPIO interface
  • CAN Bus and RS485 interfaces on one HAT
  • MCP2515 CAN controller
  • SN65HVD230 CAN transceiver
  • SP3485 RS485 transceiver
  • 3.3V logic operation
  • CAN communication through SPI
  • RS485 communication through UART
  • Half-duplex RS485 communication
  • Automatic RS485 TX/RX direction control
  • Optional software-controlled RS485 direction
  • TVS transient protection for RS485
  • Reserved control interface for use with other controller boards
  • Compact 65 × 30mm PCB
  • Development examples available for Python and wiringPi

CAN Bus Interface

The Raspberry Pi does not include a native CAN controller, so this HAT uses the MCP2515 CAN controller to provide CAN Bus functionality through SPI.

The MCP2515 supports the CAN 2.0B specification and can transmit and receive:

  • Standard data frames
  • Extended data frames
  • Remote frames

The controller includes acceptance masks and filters that allow unwanted CAN messages to be filtered before they are passed to the Raspberry Pi.

MCP2515 CAN Controller

The MCP2515 communicates with the Raspberry Pi through SPI.

Key capabilities include:

  • CAN 2.0B support
  • Standard CAN frames
  • Extended CAN frames
  • Remote frames
  • Two receive buffers
  • Acceptance filtering
  • Error detection
  • SPI host communication
  • Interrupt output

On Raspberry Pi systems, CAN support can be enabled through the appropriate Linux kernel/device-tree configuration.

SN65HVD230 CAN Transceiver

The SN65HVD230 is a 3.3V CAN transceiver that provides the physical interface between the MCP2515 controller and the CAN Bus network.

It is designed for reliable differential communication in electrically noisy environments and supports operating modes including:

  • High-speed mode
  • Slope-control mode
  • Standby mode

CAN Interface Pin Assignment

  • 3V3: 3.3V power
  • GND: Ground
  • SCK: SPI clock
  • MOSI: SPI data from Raspberry Pi to CAN controller
  • MISO: SPI data from CAN controller to Raspberry Pi
  • CS: SPI chip select / CE0
  • INT: Interrupt output, BCM GPIO25

RS485 Interface

The RS485 section uses the SP3485, a low-power 3.3V RS485 transceiver designed for half-duplex differential communication.

RS485 communication with the Raspberry Pi is performed through UART using the standard RXD and TXD signals.

The board supports both:

  • Automatic TX/RX direction control
  • Manual/software-controlled TX/RX direction

Automatic control is enabled by default, making the interface easier to use for typical RS485 applications.

Automatic RS485 Direction Control

In a conventional half-duplex RS485 system, the controller must switch the transceiver between transmitting and receiving.

This HAT includes hardware that can perform this switching automatically, reducing the amount of software control required.

For applications requiring very high communication baud rates, manual direction control may provide better performance because the switching speed of the automatic hardware can become a limiting factor.

RS485 Interface Pin Assignment

  • 3V3: 3.3V power
  • GND: Ground
  • RXD: UART receive
  • TXD: UART transmit
  • RSE: TX/RX direction control, BCM GPIO4

The RSE pin is optional when using the default hardware automatic transmit/receive mode.

RS485 Protection

The RS485 interface includes TVS (Transient Voltage Suppressor) protection.

This helps suppress:

  • Transient voltage spikes
  • Surge voltages
  • Electrostatic discharge
  • Electrical disturbances on the communication line

This additional protection is particularly useful when the board is used with longer RS485 cables or in industrial environments.

Technical Specifications

  • Product Type: RS485 + CAN HAT
  • Host Interface: Raspberry Pi 40-pin GPIO
  • Operating Voltage: 3.3V
  • CAN Controller: MCP2515
  • CAN Transceiver: SN65HVD230
  • CAN Host Interface: SPI
  • CAN Standard: CAN 2.0B
  • RS485 Transceiver: SP3485
  • RS485 Host Interface: UART
  • RS485 Communication: Half-duplex
  • RS485 Direction Control: Automatic by default / manual control available
  • RS485 Protection: TVS transient protection
  • Board Dimensions: 65 × 30mm
  • Mounting Hole Diameter: 3.0mm

RS485 Termination

RS485 networks commonly use termination resistors across the differential A and B lines, particularly at the ends of longer bus networks.

The appropriate termination depends on the cable impedance and network configuration. A value around 120Ω is commonly used for standard RS485 twisted-pair networks.

Raspberry Pi Compatibility

The HAT uses the standard Raspberry Pi 40-pin GPIO header, making it suitable for compatible Raspberry Pi models with the corresponding GPIO interface.

Software configuration is required to enable:

  • SPI for CAN communication
  • UART for RS485 communication
  • Appropriate Linux CAN/device-tree configuration

Typical Applications

  • Industrial automation
  • CAN Bus development
  • RS485 networks
  • Modbus RTU communication
  • Robotics
  • Automotive CAN development
  • Motor controllers
  • PLC communication
  • Industrial sensors
  • Energy meters
  • Building automation
  • Data acquisition
  • Remote monitoring
  • Embedded systems
  • IoT gateways
  • Factory equipment communication
  • Raspberry Pi industrial projects

Development Support

Development resources and examples are available for common Raspberry Pi programming environments, including:

  • Python
  • wiringPi
  • Linux CAN tools
  • UART communication

Important Note

The RS485 interface operates in half-duplex mode, meaning transmission and reception share the same differential communication pair.

The module uses automatic TX/RX direction control by default. For applications requiring particularly high RS485 baud rates, manual direction control may be preferable.

CAN and RS485 are different communication standards and should be connected only to equipment using the corresponding interface.