Same-day dispatch before 2 PM · Free delivery over ₹999 · GST invoices Get the appPrices incl. GST
Geekobot
Snap & SendNEWGeeko AIWhere's myOrder
Log in
Products
  • Projects
    • Component guidesHow parts work, with code you can run
    • Learning pathsFrom your first LED to your first robot
    • Workshops & eventsOnline sessions for makers and classes
    • ElectrolarkFree guided builds, simulator and certificates
    • Students & teachersStudent discount and classroom help
    • CommunityShare builds and ask other makers
    • CalculatorsOhm's law, LED resistor, 555 and 100+ more
    • Circuit builderWire parts and run the circuit, powered by Electrolark
    • Geeko AIAsk what to buy or how to wire it
    • Snap & SendPhotograph a part or list, we find it
    • Part finderAnswer a few questions, get the right part
    • Compatibility checkWill these two parts work together?
    • Compare partsSpecs side by side
    • Business & bulk ordersGST invoices, credit and volume prices
    • Request a quotationSend your list, get a quote
    • Classroom kitsPer-student kits and lab bundles
    • Gift cardsFor students, teams and events
  • Atal Tinkering Lab
BOM to cart
Geekobot

Components, kits and know-how for makers, students, engineers, labs and businesses across India.

Ask Geeko AIOrders, parts and projects, any timeEmail supportReply within 1 working dayGet the Geekobot appAdd it to your home screen, free

Follow us

Shop

  • Boards & SBCs
  • Sensors & Modules
  • IoT & Wireless
  • Drone & FPV
  • 3D Printing
  • Filaments & Resins
  • Motors & Drivers
  • Power & Batteries
  • Semiconductors
  • Passive
  • Displays & LEDs
  • Switches & Relays
  • Wires & Cables
  • Prototyping
  • Tools & Test
  • Robotics
  • STEM Kits
  • Atal Tinkering Lab
  • Mechanical Parts
  • Audio

Orders

  • Track your order
  • Help & support
  • Shipping and delivery
  • Refunds and cancellation
  • Contact us

Learn

  • Projects
  • Geeko AI project assistant
  • Learning paths
  • Guides
  • Calculators
  • Electrolark: free guided builds

Part tools

  • Part finder
  • Compare parts
  • Will it work with my board?

Institutions

  • Classroom kits
  • Atal Tinkering Lab
  • Students & teachers
  • Workshops & Events

Business

  • Business & education
  • Request a quotation
  • BOM bulk upload
  • Quick order by SKU

Company

  • About Geekobot
  • Community
  • Gift cards
  • Terms & conditions
  • Privacy policy
  • Product directory
  • Sitemap

© 2026 Geekobot, a trade name of OLatus Systems Private Limited. All rights reserved.

20, 1st Floor, Neeladri Complex, 10th Cross, Sampige Rd, 2nd Main, Malleshwaram, Bengaluru, Karnataka 560003 · GSTIN 29AACCO0462F1ZM

+91 91810 15607 · connect@geekobot.in · Monday to Saturday, 10 AM to 2 PM IST

UPI · CARDS · NETBANKING · GST INVOICES

ShopProjectsGeeko AIGuides
Compare 0 parts →
Log in

Shop by category

Shop all components
  • Boards & SBCs1,910 products
    • Alternative Single Board Computers
    • Arduino Ecosystem
    • FPGA & Logic Boards
    • Microcontroller & Wireless Boards
    View all
  • Sensors & Modules4,701 products
    • Biomedical & Heart Rate
    • Current, Voltage & Power
    • Force, Weight & Pressure
    • Gas, Weather & Environmental
    View all
  • IoT & Wireless2,314 products
    • RF Modules
    • RFID & NFC
    • Antennas & RF Accessories
    • Cameras & Smart Vision
    View all
  • Drone & FPV3,558 products
    • Flight Control & Navigation
    • FPV Video & Optics
    • Frames & Structural Parts
    • Motors & Propulsion
    View all
  • 3D Printing2,204 products
    • 3D Printers
    • 3D Scanners & Digitizers
    • Laser Engravers & Cutters
    • Material Management & Upgrades
    View all
  • Filaments & Resins1,472 products
    • Filaments
    • Photopolymer Resins
    View all
  • Motors & Drivers463 products
    • BLDC Motor Drivers
    • DC & Geared Motors
    • DC Motor Drivers
    • Linear Actuators & Solenoids
    View all
  • Power & Batteries557 products
    • Battery Holders & Connectors
    • Breadboard Power
    • Chargers & BMS
    • DC-DC Converters
    View all
  • Semiconductors295 products
    • Diodes & Rectifiers
    • Interface & RF Encoder ICs
    • Logic ICs (74xx)
    • Logic ICs (CD4000)
    View all
  • Passive67 products
    • Capacitors
    • Circuit Protection
    • Crystals & Oscillators
    • Inductors
    View all
  • Displays & LEDs572 products
    • 7-Segment & Dot Matrix
    • Addressable LEDs
    • Character LCDs
    • Graphic LCDs
    View all
  • Switches & Relays184 products
    • Keypads & Touch
    • Push Buttons & Tactile
    • Relay Modules
    • Relays
    View all
  • Wires & Cables233 products
    • Board-to-Wire Connectors
    • Crimp & Splice
    • Headers & Dupont
    • Heat Shrink & Sleeving
    View all
  • Prototyping101 products
    • Breadboards
    • Interface Modules
    • PCBs & Perfboards
    View all
  • Tools & Test717 products
    • Bench Power Supplies
    • Hand Tools
    • Measuring Tools
    • Meters & Testers
    View all
  • Robotics180 products
    • Humanoid & Legged Robots
    • Robot Chassis & Platforms
    • Robotic Arms & Grippers
    • Wheels & Casters
    View all
  • STEM Kits268 products
    • Arduino Learning Kits
    • Coding & IoT Kits
    • Early Coding (Ages 3-8)
    • Invention Kits
    View all
  • Atal Tinkering Lab196 products
    • Package 1: Electronics, Robotics, IoT and Sensors
    • Package 2: Rapid Prototyping Tools
    • Package 3: Mechanical, Electrical and Measurement Tools
    • Package 4: Power Supply, Accessories and Safety Equipment
    View all
  • Mechanical Parts212 products
    • Bearings
    • Brackets & Mounts
    • Couplers
    • Fasteners & Standoffs
    View all
  • Audio109 products
    • Amplifier Modules
    • Buzzers & Sirens
    • Speakers
    View all
  1. Home
  2. ›Guides
  3. ›IoT & Wireless
  4. ›Raspberry Pi RS485, CAN and Serial HATs

Component guide · Intermediate · 4 min read

Raspberry Pi RS485, CAN and Serial HATs

Waveshare Isolated RS485 CAN, 2-Ch RS485, 2-Ch CAN and CAN FD, RS232, DFRobot RS485 and Serial Expansion

By Geekobot Learning Team · Updated 29 Oct 2026

On this page
Short answerWhat the Raspberry Pi RS485, CAN and serial expansion HATs isRaspberry Pi RS485, CAN and serial expansion HATs pinoutWiring the Raspberry Pi RS485, CAN and serial expansion HATsExample codeSetup and tuningWhat you needAlternatives and when to choose themCommon mistakesFAQsParts and next steps
Short answer

These HATs connect a Raspberry Pi to industrial buses. RS485 talks Modbus RTU to meters, sensors and PLCs; CAN and CAN FD talk to vehicles, motor drivers and robot joints; RS232 reaches older machines. Isolated versions protect the Pi from ground loops and surges on long cables. Most use an SC16IS752 UART chip or MCP2515 / MCP2518FD CAN controller over SPI.

Key specs at a glance

Buses
RS485, RS232, CAN 2.0, CAN FD
Channels
1 or 2 per HAT
Chips
SC16IS752 UART, MCP2515, MCP2518FD
Isolation
Isolated power and signals on isolated versions
Speed
RS485 up to about 1 Mbit/s; CAN 1 Mbit/s; CAN FD 5 Mbit/s data
Interface
SPI or UART to the Pi

Models in this guide

These are alternatives. Pick the one that fits your project; you only need one.

  • Option 1Waveshare Isolated RS485 CAN HAT (B) for Raspberry Pi₹2,229
  • Option 2Waveshare 2-Channel Isolated RS485 HAT₹1,609
  • Option 3DFRobot Dual-channel Isolated RS485 HAT for Raspberry Pi₹2,409
  • Option 4Waveshare Isolated RS485/RS232 HAT for Raspberry Pi, SPI₹1,719
  • Option 5Waveshare Isolated RS232/RS485/CAN/CAN FD HAT for Raspberry Pi₹5,770
  • Option 6Waveshare 2-Ch Isolated CAN Bus HAT for Raspberry Pi₹2,459
01

What the Raspberry Pi RS485, CAN and serial expansion HATs is

Raspberry Pi RS485 and CAN HATs add isolated or non-isolated RS485 and CAN bus ports, letting a Pi talk Modbus to meters and PLCs or read CAN data from vehicles and machines.

CAN boards use SocketCAN: add the mcp2515 or mcp251xfd overlay, bring up can0 and use candump and cansend. RS485 boards appear as /dev/ttySC0 or /dev/ttyS0 with automatic direction control.

Terminate both ends of a bus with 120 ohm resistors; most HATs have a jumper for this.

02

Raspberry Pi RS485, CAN and serial expansion HATs pinout

The pins on the Raspberry Pi RS485, CAN and serial expansion HATs and what each one does.

PinFunction
A+ / B-RS485 differential pair
CAN_H / CAN_LCAN bus pair
GND / isolated GNDReference for the bus
SPI + INTSC16IS752 or CAN controller to the Pi
120R jumperBus termination
PinFunction
A+ / B-
RS485 differential pair
CAN_H / CAN_L
CAN bus pair
GND / isolated GND
Reference for the bus
SPI + INT
SC16IS752 or CAN controller to the Pi
120R jumper
Bus termination
03

Wiring the Raspberry Pi RS485, CAN and serial expansion HATs

Check the oscillator value printed on the CAN chip (8, 12 or 16 MHz) and use it in the overlay. Swapping A and B on RS485 is the most common no-data fault.

Raspberry Pi RS485, CAN and serial expansion HATs pinConnectionNote
RS485A+ to A+, B- to B- on the deviceTwisted pair, terminate both ends
CANCAN_H to CAN_H, CAN_L to CAN_L120 ohm at each end
GroundConnect GND on long runsIsolated HATs prevent ground loops
RS485
Connection:
A+ to A+, B- to B- on the device
Note:
Twisted pair, terminate both ends
CAN
Connection:
CAN_H to CAN_H, CAN_L to CAN_L
Note:
120 ohm at each end
Ground
Connection:
Connect GND on long runs
Note:
Isolated HATs prevent ground loops
04

Example code

Overlays: dtoverlay=sc16is752-spi1,int_pin=24 for SC16IS752 RS485 HATs and dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25 for MCP2515 CAN HATs. Check each board's wiki for the exact pins.

Read a Modbus RTU register over the RS485 HAT · MicroPython
# pip install minimalmodbus
import minimalmodbus

dev = minimalmodbus.Instrument("/dev/ttySC0", 1)   # port, slave address
dev.serial.baudrate = 9600
dev.serial.timeout = 1

temp = dev.read_register(0, 1)       # register 0, one decimal
print("Temperature:", temp)

# CAN test from the shell:
#   sudo ip link set can0 up type can bitrate 500000
#   candump can0
05

Setup and tuning

Overlay

enable the SPI CAN controller (MCP2515) overlay with the right oscillator value in config.txt.

CAN setup

bring the interface up with ip link set can0 up type can bitrate 500000.

RS485

use the HAT's UART with automatic direction control, or toggle DE/RE in code.

Termination

set 120 Ω termination jumpers at bus ends.

Isolation

choose isolated HATs for industrial and vehicle use.

06

What you need

Shop this list12 of 12 found in our store · ₹32,440

  • Waveshare Isolated RS485 CAN HAT (B) for Raspberry Pi: the part this guide coversWaveshare Isolated RS485 CAN HAT (B) for Raspberry Pi₹2,229
  • Waveshare 2-Channel Isolated RS485 HAT: another version this guide coversWaveshare 2-Channel Isolated RS485 HAT₹1,609
  • DFRobot Dual-channel Isolated RS485 HAT for Raspberry Pi: another version this guide coversDFRobot Dual-channel Isolated RS485 HAT for Raspberry Pi₹2,409
  • Waveshare Isolated RS485/RS232 HAT for Raspberry Pi, SPI: another version this guide coversWaveshare Isolated RS485/RS232 HAT for Raspberry Pi, SPI₹1,719
  • Waveshare Isolated RS232/RS485/CAN/CAN FD HAT for Raspberry Pi: another version this guide coversWaveshare Isolated RS232/RS485/CAN/CAN FD HAT for Raspberry Pi₹5,770
  • Waveshare 2-Ch Isolated CAN Bus HAT for Raspberry Pi: another version this guide coversWaveshare 2-Ch Isolated CAN Bus HAT for Raspberry Pi₹2,459
  • Waveshare 2-Ch Isolated CAN HAT for Raspberry Pi: another version this guide coversWaveshare 2-Ch Isolated CAN HAT for Raspberry Pi₹1,939
  • Waveshare Serial Expansion HAT for Raspberry Pi: another version this guide coversWaveshare Serial Expansion HAT for Raspberry Pi₹1,153
  • Raspberry Pi GPIO UART HAT V1.0: another version this guide coversRaspberry Pi GPIO UART HAT V1.0₹769
  • Raspberry Pi 4 Model B (4 GB): the most common HAT hostRaspberry Pi 4 Model B with 4GB RAM₹11,461Closest match, check the specs
  • Raspberry Pi 5 (4 GB): runs the modem, bus or GNSS softwareRaspberry Pi 5 RTC Battery (Rechargeable, JST)₹149Closest match, check the specs
  • Waveshare industrial USB to RS485 converter: to test the bus from a PCWaveshare Industrial USB to RS485 Bidirectional Converter, CH343G₹774Closest match, check the specs
07

Alternatives and when to choose them

  • ✓MAX485 module: for Arduino and ESP32.
  • ✓MCP2515 CAN module: CAN for microcontrollers.
  • ✓USB to RS485: no HAT needed.
08

Common mistakes to avoid

  • !Wrong oscillator value in the overlay.
  • !Missing termination.
  • !Non-isolated HATs on noisy buses.
  • !Transmitting on a car CAN bus blindly.
09

Frequently asked questions

How do I enable CAN on a Raspberry Pi?

Add the mcp2515 overlay with the correct oscillator, then bring up can0.

Why do I get no CAN messages?

The bitrate, the oscillator value in the overlay, or the termination is wrong.

Can I read Modbus energy meters?

Yes. Use RS485 with Python libraries such as pymodbus or minimalmodbus.

Do I need isolation?

Yes for industrial or vehicle buses, to protect the Pi.

Can I sniff my car's CAN bus?

Yes, via OBD-II, but never transmit on a vehicle bus unless you know the effects.

Parts for this guide

  • Waveshare Isolated RS485 CAN HAT (B) for Raspberry Pi
    ₹2,229View
  • Waveshare 2-Channel Isolated RS485 HAT
    ₹1,609View
  • DFRobot Dual-channel Isolated RS485 HAT for Raspberry Pi
    ₹2,409View
  • Waveshare Isolated RS485/RS232 HAT for Raspberry Pi, SPI
    ₹1,719View
  • Waveshare Isolated RS232/RS485/CAN/CAN FD HAT for Raspberry Pi
    ₹5,770View
  • Waveshare 2-Ch Isolated CAN Bus HAT for Raspberry Pi
    ₹2,459View
  • Waveshare 2-Ch Isolated CAN HAT for Raspberry Pi
    ₹1,939View
  • Waveshare Serial Expansion HAT for Raspberry Pi
    ₹1,153View
  • Raspberry Pi GPIO UART HAT V1.0
    ₹769View
  • Raspberry Pi 4 Model B with 4GB RAM
    ₹11,461View
  • Raspberry Pi 5 with 4GB RAM
    ₹14,079View
  • Waveshare Industrial USB to RS485 Bidirectional Converter, CH343G
    ₹774View
Shop Expansion Boards & HATs

Keep learning

Component guideIntermediateMAX485 RS485 to TTL ModuleThe MAX485 module converts a microcontroller's UART into RS485, the two-wire differential bus used by industrial sensors and Modbus devices over long cables (up to about 1200 m).3 min read · IoT & WirelessHow-toAdvancedCAN Bus BasicsCAN bus is a two-wire differential network where many devices share one pair of wires and send short prioritised messages.3 min read · IoT & WirelessComponent guideBeginnerUSB to RS485 ConverterA USB to RS485 converter gives a PC or Raspberry Pi a COM port that talks on an RS485 bus.4 min read · Tools & Workshop Skills

Sources

  • Waveshare RS485 CAN HAT wiki
  • NXP SC16IS752 datasheet

Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

On this page
Short answerWhat the Raspberry Pi RS485, CAN and serial expansion HATs isRaspberry Pi RS485, CAN and serial expansion HATs pinoutWiring the Raspberry Pi RS485, CAN and serial expansion HATsExample codeSetup and tuningWhat you needAlternatives and when to choose themCommon mistakesFAQsParts and next steps
Need a hand?Ask Geeko AI which part fits your project, or talk to the Geekobot team.Ask Geeko AIHelp & support

Parts for this guide5 items · ₹8,549

Waveshare Isolated RS485 CAN HAT (B) for Raspberry Pi · Waveshare 2-Ch Isolated CAN Bus HAT for Raspberry Pi · Waveshare 2-Ch Isolated CAN HAT for Raspberry Pi · Waveshare Serial Expansion HAT for Raspberry Pi · Raspberry Pi GPIO UART HAT V1.0

Run itChange the inputs and watch the output

Reads holding register 0 with one decimal from Modbus device 1.

Shell
Temperature: 26.8

A simulation of the sketch above, so you know what to expect. Real readings vary with your parts and wiring.

Ask the Community

Ask a question