Reference
The protocol survey table
USB, I2C, SPI, CAN, EtherCAT, MIPI look unrelated; they are the same five-layer tradeoffs made at different layers. Learn the layer first, then the protocol — one layer learned, one family of protocols comes free.
All numbers below are typical values, not limits; real capability depends on the parts, the wiring, and the batch. Distance is the conservative ceiling for reliable communication.
Five layers: each protocol answers only some of them
| Layer | What this layer decides | Topics on this site |
|---|---|---|
| L0 Levels and transmission | How 0 and 1 are represented as voltages, why differential rejects noise, impedance and termination, ground return. | E14 |
| L1 Encoding and clocking | How the receiver knows where a bit starts and ends; DC balance, bit stuffing, clock recovery. | E15 |
| L2 Frames and arbitration | How addresses are set, who speaks first on collision, how errors are found (CRC / ACK / error frames). | E16 · E18 |
| L3 Transactions and services | How a transfer is organized, who is in charge, how bandwidth and latency are guaranteed. | E17 |
| L4 Networking and real-time | How multiple devices synchronize, where jitter comes from, how the cycle time is computed. | D7 |
20 protocols side by side
| Protocol | Layer | Medium | Levels | Topology | Rate | Distance | Encoding | Real-time | Typical use | Not for |
|---|---|---|---|---|---|---|---|---|---|---|
| UART | L2 | 2-wire single-ended (TX/RX) | TTL 3.3 / 5 V | Point-to-point | 0.1–6 Mbps | < 1 m (on-board) | Asynchronous start bit + 16x oversampling | Medium | MCU-to-module links, debug ports | Multi-device, long distance |
| RS-232 | L0 / L2 | 3-wire single-ended | ±12 V (negative logic) | Point-to-point | ≤ 115.2 kbps | 15 m | Asynchronous | Low | Legacy devices, industrial debug ports | Weak noise immunity, slow |
| RS-485 | L0 / L2 | Differential twisted pair | ±1.5 V or higher differential | Multipoint, 32 nodes | ≤ 10 Mbps | 1200 m (low speed) | Asynchronous | Medium | Modbus, industrial field | Half-duplex, direction switching needed |
| I2C | L2 | 2-wire open-drain (SCL/SDA) | 3.3 / 5 V + pull-ups | Multi-master multi-slave | 100k / 400k / 1M / 3.4M | < 1 m (bus capacitance 400 pF) | Synchronous clock | Medium | Sensors, EEPROM, power management | Dies once the wire is long; no CRC |
| SPI | L2 | 4-wire (SCLK/MOSI/MISO/CS) | 3.3 V single-ended | One master, multiple slaves | 1–100 Mbps | < 0.3 m | Synchronous clock, CPOL/CPHA four modes | High | Flash, displays, high-speed ADCs | No ACK / no flow control / no arbitration |
| I2S | L2 | 3-wire (BCLK/LRCLK/SD) | 3.3 V | Point-to-point | Several Mbps | < 0.3 m | Synchronous, left/right channels time-shared | High | Audio, microphone arrays | Point-to-point only |
| CAN 2.0B | L2 | Differential twisted pair | Dominant / recessive differential | Multi-master bus | ≤ 1 Mbps | 40 m@1M / 1 km@50k | Bit stuffing + CRC15 | High (non-destructive arbitration) | Joints, automotive, battery management | Low bandwidth; latency uncontrolled under high load |
| CAN FD | L2 | Differential twisted pair | Same as above | Multi-master bus | 1M arbitration / 5–8M data | About 40 m | Bit stuffing + variable-length CRC | High | Next-generation joints, domain controllers and actuators | Old nodes may not be compatible |
| EtherCAT | L4 | Ethernet physical layer | 100BASE-TX differential | Line / ring, slaves daisy-chained | 100 Mbps | 100 m / segment | 4B5B + process-on-the-fly forwarding | Very high (µs-level sync) | Multi-axis servo sync, the main robot bus | Requires a dedicated master; wiring is a daisy chain |
| Ethernet + PTP | L4 | Twisted pair / fiber | Differential | Star / ring | 1G / 10G | 100 m / segment | 8B10B / 64B66B | High (PTP sub-µs) | Cameras, domain-controller interconnect, radar | Switches must support PTP, otherwise sync fails |
| USB 2.0 | L0–L3 | Differential D+ / D− | 3.3 V differential, 1.5 kΩ pull-up sets speed | Host-owned star | 480 Mbps | 5 m | NRZI + bit stuffing | Low (1 ms frame scheduling) | Cameras, debugging, USB drives, peripherals | Cannot do 1 kHz hard real-time |
| USB 3.x | L0–L3 | Dual buses in parallel (2.0 + 3.x, each with its own wires) | Differential pairs | Host-owned star | 5 / 10 / 20 Gbps | 3 m | 8B10B / 128B132B | Low | High-speed industrial cameras | Thick and pricey cables; still not real-time |
| MIPI CSI-2 | L0–L2 | Differential lanes (1/2/4/8) | D-PHY low swing | Point-to-point | 2.5 Gbps / lane | < 0.3 m | D-PHY + packet protocol | High | On-board cameras, embedded vision | Extremely short flex; cannot cross a joint |
| GMSL2 | L0–L4 | Coax / differential pair | Differential + coax power (PoC) | Point-to-point | 3–6 Gbps | 15 m | Proprietary encoding + bidirectional control channel | High (fixed latency) | Automotive and robot multi-camera | Deserializer chips are expensive |
| PCIe | L0–L3 | Differential lanes | Low-swing differential | Point-to-point (root complex + endpoints) | 8–64 GT/s | < 0.3 m | 128B/130B | High | Accelerator cards, NVMe, NICs | Cannot route traces outside the chassis |
| Modbus RTU | L4 | Runs on RS-485 | Depends on the physical layer | Master-slave | Depends on the physical layer | 1200 m | None (frames split by 3.5-character silence) | Low | PLCs, legacy devices, production-line integration | Question-and-answer only, low throughput |
| Modbus TCP | L4 | Ethernet | — | Client / server | 100M / 1G | 100 m / segment | — | Medium | Factory system integration | No real-time guarantees |
| PROFINET | L4 | Ethernet | — | Star / ring | 100M / 1G | 100 m / segment | — | High (RT / IRT) | Automotive production lines, automation equipment | Ecosystem leans Siemens |
| SDIO | L2 | 6 wires | 3.3 V | One master, multiple slaves | ≤ 208 Mbps | < 0.1 m | Synchronous | Medium | SD cards, WiFi modules | Many wires, complex protocol |
| 1-Wire | L2 | 1 wire + ground | Open-drain + pull-up | Multipoint | 16 kbps | 100 m | Time-slot encoding | Low | Temperature sensors, ID chips | Slow, only for small data |
| DDS / RTPS | L4 | UDP (can run over shared memory) | Software layer, no fixed levels | Publish-subscribe / many-to-many | Limited by the network | LAN, can cross subnets | RTPS messages + fragmentation and reassembly | Soft real-time (millisecond-level with QoS) | ROS 2's default transport, multi-sensor data distribution | 1 kHz hard real-time, across the public internet |
How to use this table
- Real-time first. Above 1 kHz deterministic, only EtherCAT, CAN (low load), and dedicated sync buses qualify. USB and Ethernet default to no.
- Then distance. On-board within 30 cm: SPI / I2C / MIPI; across joints: CAN or EtherCAT; across devices: GMSL or Ethernet.
- Cost last. Same job: I2C over SPI, CAN over EtherCAT — every level up charges you in hosts, harnesses, and debug tools.
A premise often missed
The rate column is «what the physical layer can run», not «what your system can use». Past 60% bus load, latency jitter rises non-linearly — that is why 10 axes at 1 kHz do not happen on CAN, no matter how much you optimize.