if you are looking for a cheap, easy to build and galvanic isolated RPi CAN-Bus interface please have a look at:

https://github.com/GBert/misc/tree/master/RPi-MCP2515
PCB files are part of the git. If you prefer ready to use PCBs you can buy a proto pack (8+ PCBs - share it with you friends
Setup is easy:
Code: Select all
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install can-utilsCode: Select all
; uncomment
dtparam=spi=on
; add
dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25
; RPi 3
dtoverlay=spi-bcm2835-overlayCode: Select all
sudo shutdown -r nowCode: Select all
sudo ip link set can0 up type can bitrate 250000 restart-ms 100Gerd
PS: PCB also contains I2C Busextender (top - left side) which is optional