Electrical – Ethernet vs CAN bus physical signal

canethernetphysignal

Reading about Controller Area Networks and Ethernet standard, I cannot understand why there is a difference in the way the signal is transmitted. Both protocols use twisted pair cables to communicate, with mirroring signals, the logic state being determined as a function of the voltage difference between the two wires.

In CAN networks, CAN Low will range between 1,5V to 2,5V, while CAN High will be in the range of 2,5V to 3,5V.

CAN bus levels

In an Ethernet network, though, the signal will cross each other and the values will be the exact opposite of each other. So, when one cable will have +3V, the other will have -3V and viceversa.

Physical signal in an Ethernet cable

Why did the engineers choose this particular methods and why isn't just one method used? What are the advantages/disadvantages of each?

Also, in a CAN bus, the wires will be terminated with 120Ohm resistors, to match the line impedance and ameliorate reflections and the end of the cable. I don't think ethernet cables have such terminations. If they are used, are they in the NIC's? If so, how do they account for different wire lengths?

Thank you.

Best Answer

On a hardware level:

  • The CAN bus works by a voltage differential between a pair of lines.
  • The Ethernet bus is current-driven and is coupled through transformers at both ends, providing galvanic insulation and avoiding any grounding issue.

The electrical operation principle is very different between these buses. Ethernet bus is by default galvanically isolated, as for the CAN bus it is not necessarily (but can be) the case.

CAN:

schematic

simulate this circuit – Schematic created using CircuitLab

Ethernet:

schematic

simulate this circuit

Single/Multiple points

A big difference between CAN and Ethernet is that CAN is a multi-point; no-master; address-based bus with collision management.

Ethernet is a point-to-point connection, anymore than 2 devices will need a hub of some sort.

CAN Bus, on a hardware level, is based on the RS485 bus but CAN also include the protocol layer, RS485 is only a hardware layer standard.

CAN bus is slow compared to ethernet, but is much cheaper to implement and allows to have multiple devices on the same bus without the need of hub or switches. You can also plug-in devices anywhere on the bus. Being master-less and collision tolerant, any devices can actively communicate at will, which is quite handy in some applications.

Cost

The firmware stack is also much simpler on a CAN bus, making it widely available in cheap MCU, while Ethernet often requires a dedicated chip or a Unix capable system. You can run ethernet on an MCU, but often it will take a lot of resources and require a fairly heavy and complex stack. In my experience, running an ethernet stack on bare MCU often has mixed results, and is better to have a UNIX stack as soon as dealing with ethernet.

Some MCU will have a CAN hardware module, which means the CAN transaction can be handled without the need of using the CPU, leaving more resources to the application.

Both have their own use for different needs. CAN was initially developed for the automotive industry to provide a cheap and effective way to connect all the sensors.

Hardware implementation

Bus lines are usually twisted to reduce sensitivity to ambient interferences (EMI), both in CAN and ethernet.

Can is a voltage differential-based bus that requires transceivers. The voltage level may differ, sometimes it's 5V, sometimes it's more, it depends a lot on the driver and the available power supply of your board. CAN is not, by default, isolated, while some CAN transceiver does have isolation.

Ethernet, on the other hand, is a current-driven bus that is inductively coupled. On ethernet, you always have small transformers on both sides of the line, they are either within the RJ45 socket or soldered to the board. It is by default isolated. You can see ethernet cable pairs as a current loop, driven by transformers on both ends.

CAN is a single-line bus (1 pair) with packet collision handling.

Ethernet is a multi-line bus, usually at least an RX and TX pair but it can be more depending on the CAT.

CAN requires a termination resistor on both buses ends. Ethernet does not.


So, when one cable will have +3V, the other will have -3V

You should rather think in terms of current flow in ethernet rather than voltage.

I don't think ethernet cables have such terminations. If they are used, are they in the NIC's? If so, how do they account for different wire lengths?

There are no needs as the bus is current driven.