Designed and open-sourced by XBST_ the PiCAN is a compact, USB drive shaped USB to CAN adapter, primarily intended for 3D printers. It’s pre-flashed with candlelight and ready to use.
It’s a low cost alternative to the U2C board.
You just need to plug it to the raspberry Pi and that’s it.
Your CAN toolhead board has 4 cables. The 2 data cables are connected to the PiCAN. The 24v should be connected directly to the 24v PSU. The ground cable of your CAN toolhead board should be connected directly to the 5v PSU.
Very important: make sure the ground is connected between each PSU.
Author, images and credits: github.com/xbst/PiCAN/
What needs to be modified on the rpi?
ssh to the rpi
create and edit
sudo nano /etc/network/interfaces.d/can0
paste the following
auto can0 iface can0 can static bitrate 1000000 up ifconfig $IFACE txqueuelen 1024 pre-up ip link set can0 type can bitrate 1000000 pre-up ip link set can0 txqueuelen 1024
exit and save
CTRL+X Y Enter
Automatically activate CAN at power up
sudo wget https://upyun.pan.zxkxz.cn/shell/can-enable -O /usr/bin/can-enable > /dev/null 2>&1 && sudo chmod +x /usr/bin/can-enable || echo "The operation failed" sudo cat /etc/rc.local | grep "exit 0" > /dev/null || sudo sed -i '$a\exit 0' /etc/rc.local sudo sed -i '/^exit\ 0$/i \can-enable -d can0 -b 1000000 -t 1024' /etc/rc.local
What do you need to upgrade to a CAN setup?