News:

Let's find out together what makes a PIC Tick!

Main Menu

CAN or RS485 ?

Started by shantanu@india, May 26, 2026, 06:39 AM

Previous topic - Next topic

shantanu@india

Hi,
I am trying to connect multiple PIC nodes(>50 per chain) to a Single Board Computer in a noisy environment. The PIC's would be powered by isolated DC-DC converters & maybe I'll also use isolated transceivers. I read somewhere that CAN outperforms RS485 in such situations.
Any suggestions?
Thanks.
Regards
Shantanu

Gamboa

Shantanu,

CAN and RS-485 are similar in that both use differential communication and are robust against noise, but they are not the same.

The main difference is this:

RS-485 mainly defines the electrical physical layer. CAN defines the physical layer and also a much more complete communication protocol.

| Aspect                  | CAN Bus                                             | RS-485 Bus                                                                       |
| ----------------------- | --------------------------------------------------- | -------------------------------------------------------------------------------- |
| Type                    | Communication bus with its own protocol             | Differential electrical interface                                                |
| Protocol included       | Yes: arbitration, frames, CRC, ACK, error handling  | No. It needs a protocol on top: Modbus RTU, DMX, custom protocol, etc.           |
| Typical number of wires | CANH, CANL and GND recommended                      | A, B and GND recommended                                                         |
| Topology                | Linear bus with termination at both ends            | Linear bus with termination at both ends                                         |
| Typical termination     | 120 Ω at each end                                   | Usually 120 Ω at each end                                                        |
| Communication           | True multi-master                                   | Usually master/slave, although multi-master is possible with a suitable protocol |
| Collision handling      | Built into the CAN hardware                         | Not built in                                                                     |
| Message priority        | Yes, by CAN identifier                              | No, unless implemented by the protocol                                           |
| Error detection         | Very advanced                                       | Depends on the protocol used                                                     |
| Distance                | Up to hundreds of meters, depending on speed        | Up to around 1200 m at low speed                                                 |
| Typical speed           | Up to 1 Mbit/s with classic CAN; higher with CAN FD | Up to several Mbit/s over short distances                                        |
| Typical use             | Automotive, machinery, distributed control          | Industrial systems, Modbus, drives, sensors, long distances                      |


RS-485

RS-485 is basically an electrical standard. It defines how electrical levels are transmitted using a differential pair.

For example, you can have:

Microcontroller UART → RS-485 transceiver → A/B cable → RS-485 transceiver → UART

But RS-485 by itself does not know what an address, command, CRC or response is. That has to be defined by a higher-level protocol.

Examples of protocols over RS-485:

Modbus RTU
DMX512
Custom protocol
Profibus, in some variants

One advantage of RS-485 is that it is very simple. You can use the microcontroller UART and a transceiver such as MAX485, SN75176, ADM485, etc.

The disadvantage is that if several devices are connected to the bus, you must control when each one transmits. If two nodes transmit at the same time, the communication is corrupted unless the protocol handles it.

CAN
CAN is more advanced. It is not just an electrical interface: it includes a protocol controller.

A typical CAN node would be:

Microcontroller with CAN module → CAN transceiver → CANH/CANL

The CAN bus includes features that RS-485 does not natively have:

Automatic arbitration
Message identifiers
Message priority
CRC
ACK
Error detection
Automatic retransmission
Disconnection of faulty nodes

In CAN, you normally do not talk about a "slave address", but rather about message identifiers. For example:

ID 0x100 = motor speed
ID 0x101 = motor current
ID 0x200 = digital input status

Several nodes can transmit when the bus is free. If two nodes start transmitting at the same time, the CAN hardware itself decides which one wins based on the identifier. The message with the higher-priority identifier continues, and the other node waits. This is called non-destructive arbitration.

Practical difference

With RS-485, you design or choose the protocol.

With CAN, the basic protocol is already handled by the hardware.

For example, if you have 10 electronic boards communicating with each other:

With RS-485

You would normally do something like this:

Master board asks → Node 1 replies
Master board asks → Node 2 replies
Master board asks → Node 3 replies

It is a simpler system, but the master usually controls all communication.
With CAN

Each board can send messages when needed:

Motor node sends current
Input node sends status
Display node sends request
Battery node sends voltage

The bus automatically manages priorities.

When to use each one

I would use RS-485 when:

You want something simple using UART.
There is one master and several slaves.
You want to use Modbus RTU.
The distance is long.
Speed is not critical.
You can control the protocol yourself.

I would use CAN when:

There are several intelligent nodes.
You need high reliability.
Simultaneous messages may occur.
You need priorities.
The system is real-time control.
You need robust error detection.
It is an application such as automotive, motor control, batteries, machinery or distributed control.
Very direct summary

RS-485 is a differential physical layer for sending data, usually using UART.

CAN is a complete bus with integrated protocol, arbitration, priorities and error handling.

For a simple board communicating with a PC or an industrial master, RS-485 is usually sufficient. For several boards controlling motors, sensors, batteries or actuators in real time, CAN is usually the better option.

Regards,
Gamboa
Long live for you

shantanu@india

Thanks.
In my architecture there is only one master & there is no time critical situation where multiple slaves need to communicate at once.
So I'll opt for RS485 Modbus RTU.
As far as my understanding goes , CAN is perfect for a messaging system without any master
Regards
Shantanu

Fanie

In a harsh environment you may want to consider a current loop if your distances are long.