Feature:
- Compatible with Raspberry Pi Zero/Zero W/2B/3B/3B+/4. Only a small amount of GPIO are used and the remaining pins allow to work for other extended function
- Power supply and signal transmission isolation, Build-in surge and ESD protection.
CAN function: on-board CAN controller MCP2515 via SPI interface, high speed CAN transceiver, digital isolation ADUM1201BRZ, and communication Rates 20Kbps-1Mpbs can be programmed arbitrarily. - RS485 function: on-board controlled via UART, half-duplex communication, supports automatically TX/RX switch without extra programming, on-board SPI to RS485 SC16IS1752 Electrical data isolation with ADI ADM2483.
- On-board individual 120 Ohm terminal resistance, Impedance matching and guarantee the ability to drive.
- On-board User ATC24C32 EEPROM,
Description:
- RS485&CAN Module is an industrial communication module for Raspberry Pi, on board 2*RS485 Bus and 1*CAN Bus communication interface via SPI interface.
- CAN bus and RS485 bus powered through separated isolation power module, signal between the transceiver and the controller is isolated , ESD protection for the communication port, ensure your raspberry pi can be used in more strictly industrial sites
Quick Start
Step1,Download Software
sudo git clone https://github.com/INNO-MAKER/rs485-can.git cd rs485-can chmod -R a+rwx *
Step2,Install dtbo file
uname -a #check your kernel version sudo cp driver/rs485_at-kernel5.dtbo /boot/overlays/rs485_at.dtbo # For linux kernel version above 5.4 Note: If your kernel is Linux 4.9,you need to use below command instead sudo cp driver/rs485_at-kernel4.dtbo /boot/overlays/rs485_at.dtbo # For linux kernel version below 4.9
Note: You must check your system version first by uname -a
Step3,Revised config.txt
sudo nano /boot/config.txt #Add below two content to the last line dtoverlay=rs485_at dtoverlay=mcp2515-can1,oscillator=16000000,interrupt=25 #Press ctrl+o save file,ctrl+x to exit editing. sudo reboot
Step4,Check Device Status
ifconfig -a # check can device,you'll see the can0 ls -l /dev/ttyS* # Check the kernel log to see if RS485 was initialized successfully
Step5,Install Python
#If you can not find the Python3 in system. Install the Python3 sudo apt-get install python-pip sudo apt-get install python3 idle3 nano #Install Python CAN library. sudo pip install python-can
4 Comments
Anonymous
In step 2 it must say:
sudo
cp
driver/rs485_at-kernel5
.dtbo
/boot/overlays/rs485_at
.dtbo
# For linux kernel version above 5.4
超级管理员
hi,
thanks, but some user still using kernel version below 5.4. it must be
sudo
"cp
/driver/rs485_at-kernel4
.dtbo
/boot/overlays/rs485_at
.dtbo"
Anonymous
The point that the OP was making was that there should be no leading "/" on the filename.
Therefore:
sudo
cp
driver/rs485_at-kernelX
.dtbo
/boot/overlays/rs485_at
.dtbo, X=4 or 5 according to kernel version
allan.chow
HI,
You're right,our mistake. Sorry for trouble.
Add Comment