CAN

Galvanic Isolation

Both CAN interfaces are galvanically isolated to prevent ground-loops and increases overall system resilience.

CAN Pin-out

Connector-type: SM04B-GHS-TB (4-pin, 1.25 mm) (Datasheet)

Pin

Name

Description

1

CAN VCC

Not connected to Pika Spark

2

CAN HIGH

CAN HIGH differential signal

3

CAN LOW

CAN LOW differential signal

4

CAN GND

GND connection to other CAN nodes¹

¹ Although CAN is a differential bus in nature the common mode voltage on the differential bus signals can theoretically exceed the maximum common mode voltage acceptable to the signal and power isolated CAN transceiver. In order minimize large differences in ground potentials across all nodes CAN ground has an high impedance connection to the isolated ground of the isolated CAN transceiver.

../../_images/can-bin.png

How-to transmit and receive CAN frames

There are preconfigured Docker containers (can-utils-sh, candump) demonstrating how to access the CAN interface using can-utils.

git clone https://github.com/pika-spark/pika-spark-containers
cd pika-spark-containers/can-utils-sh
./docker-build.sh
sudo ./docker-run.sh can0 | can1 [bitrate]
cansend can0 123#DEADBEEF
cansend can0 1F334455#1122334455667788
git clone https://github.com/pika-spark/pika-spark-containers
cd pika-spark-containers/candump
./docker-build.sh
sudo ./docker-run.sh can0 | can1 [bitrate]