Andino X1 Pico is a base board that allows the raspberry pi to be used in an industrial environment on a DIN Rail. This configuration also includes a CAN Bus interface.
The setup documentation section can be found at the bottom!
The Andino X1 Pico is a microcontroller board for the Raspberry Pi in a DIN-rail housing for installation in a control cabinet. It is used to adapt digital inputs and outputs for a voltage of 24 V. The X1 Pico has its own microcontroller for precise signal preprocessing and adaptation of signal generators and actuators. It also contains a Raspberry Pi. The inputs and outputs as well as the power supply of the Pi are optimally protected. Communication between the microcontroller and the Pi takes place via the UART interface.
For an introduction on the Andino X1 Pico board, see Andino X1 Pico
The CAN Bus extension allows controlling devices via the BUS interface using the Andino X1 Pico / Raspberry Pi. For full documentation on connectivity and schematics refer to the setup documentation section below.
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: Here, A is connected to the High Line while E is connected to the Low Line.
The CAN bus interface is connected to the screw terminal connectors labled A and E on the housing:
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