Actions

KAmodRPi-CAN-RS485-HAT

Description

KAmodRPi RS485 CAN HAT is an extension for the Raspberry Pi computer extending its interfaces with RS485 and CAN. The board is equipped with MCP2515 and MCP2551 systems to support the CAN bus, while the conversion of the signal to the levels corresponding to the RS485 bus is the ST3485 system. It allows communication of Raspberry computers with buses used, for example, in automation and vehicles.

RPi CAN RS485 HAT.png
Basic Features and Parameters
  • Connector compatible with the 40-pin Raspberry standard
  • CAN interface
    • CAN MCP2515 controller controlled by SPI
    • MCP2551 transceiver
  • RS485 interface
    • ST3485 transceiver (MAX485 compatible)
    • Half-duplex transmission
    • Automatic detection of transmission direction (direction control possible after two resistors are soldered)
  • Signals on the goldpin connectors and terminal strips
  • LEDs on TX and RX lines signaling sending and receiving data
  • Built-in jumpers for connecting 120 Ohm terminating resistors
  • Dimensions: 65mm x 30mm x 20mm
Standard Equipment
Code Description
KAmodRPi RS485 CAN HAT
  • Assembled and running module
4 x Spacer sleeve

8 x Mounting screw
  • Kit for screwing the hat to the Raspberry board


Raspberry Pi Configuration

To use this hat, you need to properly configure the Raspberry Pi (e.g. by the sudo raspi-config command):

  • In order to use the RS485 bus, UART must be turned on with the indication that the system shell should be turned off
  • To use the CAN bus, you must enable SPI and add the following line in the config.txt file:
dtoverlay=mcp2515-can0,oscillator=8000000,interrupt=25,spimaxfrequency=1000000


Electronic Schematics
RPi CAN RS485 HAT schemat.png


Pin description - bus connectors
RPi CAN RS485 HAT obrys zlacze.png
JP1 Function
4 (A) RS485 - inverted signal
3 (B) RS485 - non-inverted signal
2 (L) CAN Low
1 (H) CAN High
Selecting the operating mode

The KAmodRPi RS485 CAN HAT module is equipped with a system that automatically detects the transmission direction. This system, however, is not active; the transmission direction is selected by the GPIO 4 pin state of the Raspberry Pi. In order to save this output, it is possible to switch on the above-mentioned system:

  • The jumpers soldered in the DIR CTRL fields (default configuration) mean manual selection of the transmission direction
  • Jumpers soldered in AUTO fields mean automatic detection of the transmission direction
RPi CAN RS485 HAT dir ctrl.png
Terminating resistors

The module is equipped with terminating resistors for both CAN and RS485 buses. These resistors can be disconnected using the following jumpers:

RPi CAN RS485 HAT terminator.png
LED signal

The KAmodPCF8883T module is equipped with bus status LEDs. It allows easy reading of the status and quick diagnostics.

RPi CAN RS485 HAT diody.png
External Dimensions

The board has been designed so that the dimensions and mounting holes correspond to the Raspberry Pi Zero board:

RPi CAN RS485 HAT wymiary PCB.png


External Links