Zum Inhalt springen

WSAL23227 – RS485 CAN HAT (B)/en

Aus JW Tech Wiki
Version vom 6. September 2026, 08:06 Uhr von JWTechPublisher (Diskussion | Beiträge) (Freigegebene technische Dokumentation veröffentlicht; Text-only und noindex)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)

Documentation notice: This technical documentation was independently rewritten from an archived supplier source. Check technical details and commands against the product version and manufacturer documentation before use.

Summary

The Waveshare RS485 CAN HAT (B) adds two RS485 channels and one CAN channel to a Raspberry Pi via SPI. It supports an external power supply of 8–28 V and provides signal and power isolation plus TVS, overcurrent, and overvoltage protection.

Related products at JW Tech

Technical overview

  • Uses the standard Raspberry Pi 40-pin GPIO expansion header and is compatible with the Raspberry Pi series.
  • CAN function: MCP2515 CAN controller and SN65HVD230 CAN transceiver; converts SPI to CAN.
  • RS485 function: SC16IS752 + SP3485 dual-chip combination; converts SPI to RS485 with data rates up to 921600 baud.
  • External power supply via screw terminals or through the Raspberry Pi; voltage range DC 8–28 V.
  • Integrated power isolation provides a stable isolated voltage without requiring additional supply on the isolated side.
  • Digital signal isolation offers high reliability, strong interference immunity, and low power consumption.
  • TVS suppresses surge voltages and transient spikes; lightning-proof and anti-static.
  • Auto-recovery fuse and protection diodes ensure stable output levels and provide overcurrent/overvoltage protection.
  • 120 Ω terminal resistor, enabled by jumper cap settings.
  • Can be wired via onboard terminals or pin headers for convenient wiring.
  • Breakout SPI control pins are provided for connecting with host control boards.

Commands and examples – verify before use: 

sudo wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.71.tar.gz
sudo tar zxvf bcm2835-1.71.tar.gz
cd bcm2835-1.71/
sudo ./configure && sudo make && sudo make check && sudo make install
sudo apt-get install wiringpi
wget https://files.waveshare.com/wiki/common/wiringpi-latest.deb
sudo dpkg -i wiringpi-latest.deb
gpio -v
sudo git clone https://github.com/WiringPi/WiringPi
cd WiringPi
sudo ./build
sudo python main.py

Notes and version constraints

  • On Bookworm systems only the lgpio library is available; bcm2835 and wiringPi cannot be installed or used.
  • The Python library does not need separate installation; the demo can be run directly.
  • If default pin assignments conflict with other devices, back-side solder joints can be changed to use different pins.
  • When testing the Modbus RTU relay, the serial port number in the program must be adjusted accordingly.
  • For Ubuntu systems, the config.txt file is usually located in the /boot/firmware folder.
  • If library installation issues occur on Raspberry Pi 5, you can create a virtual Python environment or install rpi.gpio.

Source and revision record