This extension adds a CAN bus interface to the Andino X1 that can be accessed via the Raspberry Pi. The extension is connected to the extension pin header. The extension board can be seen below: Andino X1 -Screw Terminal

The CAN bus interface is connected to the screw terminal connectors labled A and E on the housing:

Andino X1 -Screw Terminal

Here, A is connected to the High Line while E is connected to the Low Line.

Andino X1 - CAN Bus Extension

Edit the /boot/config.txt

sudo nano /boot/config.txt

Here, uncomment (press Ctrl + W for search)

dtparam=spi=on

and add the line

dtoverlay=spi0-cs,cs0_pin=8,cs1_pin=12

directly below it. Afterwards, make sure the Overlay for SPI UART is disabled (search and check that this line doesn't exist, if it does, uncomment it):

#dtoverlay=sc16is752-spi0,int_pin=7

Finally, enable the overlay for the CAN Bus:

dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=7

Save and quit the file (Ctrl + O, Ctrl + X), then reboot.

sudo reboot now

Afterwards, set up the CAN interface: Install can-utils

sudo apt-get install can-utils

Configure the bitrate:

sudo ip link set can0 up type can bitrate 125000

Check if the interface shows up correctly:

sudo ifconfig can0

You can now test the interface by trying to send/receve bia cansend/candump:

cansend can0 456#43414e2054657374
candump can0

The full schematics can be downloaded in PDF format at the top of the page.

Andino X1 -CAN Bus Extension - Schematics