Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

Code Block
languagebash
linenumberstrue
sudo git clone https://giteegithub.com/innoINNO-makerMAKER/pi-rs485-can
cd rs485-can       
chmod -R a+rwx *


  • Step2,Install dtbo file

Code Block
languagebash
linenumberstrue
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

Code Block
languagebash
linenumberstrue
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

Code Block
languagebash
linenumberstrue
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

Code Block
languagebash
linenumberstrue
#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

Full User Manual,Ready-Made System,Software

https://www.jianguoyun.com/p/DTxr8-EQpdSrBxi0irsB