Skip to content

Communication Overview

Introduction

A robot is a distributed system — sensors, controllers, actuators, and host computers all need reliable data exchange. The choice of communication protocol directly affects system real-time performance, reliability, and scalability.

Communication Layer Model

Robot communication can be divided into four layers:

graph TB
    subgraph Long-Range Communication
        A1[4G/5G]
        A2[LoRa]
        A3[RC Transmitter 2.4GHz]
    end

    subgraph Wireless LAN Communication
        B1[WiFi]
        B2[BLE Bluetooth]
        B3[ESP-NOW]
    end

    subgraph Inter-Board Communication
        C1[UART Serial]
        C2[CAN Bus]
        C3[EtherCAT]
        C4[RS-485]
    end

    subgraph Intra-Board Communication
        D1[SPI]
        D2[I2C]
        D3[GPIO/PWM]
    end

    A1 & A2 & A3 --> B1 & B2 & B3
    B1 & B2 & B3 --> C1 & C2 & C3 & C4
    C1 & C2 & C3 & C4 --> D1 & D2 & D3

    style A1 fill:#f9f,stroke:#333
    style B1 fill:#bbf,stroke:#333
    style C2 fill:#bfb,stroke:#333
    style D1 fill:#ffb,stroke:#333

Typical Protocols for Each Layer

Intra-Board Communication

Short-distance communication between chips and peripherals, typically on the same PCB.

Protocol Speed Wires Topology Typical Peripherals
SPI 1–100 MHz 4 (+CS) Master-slave IMU, display, Flash
I2C 100k–3.4M 2 Multi-master/multi-slave Sensors, OLED, EEPROM
GPIO/PWM 1 Point-to-point LED, servo, buzzer

Inter-Board Communication

Communication between different modules/boards within the robot.

Protocol Speed Distance Topology Typical Applications
UART 115.2k–1M bps <15 m Point-to-point MCU-to-MCU, GPS, bus servos
RS-485 100k–10M bps <1200 m Multi-drop Industrial sensors, Dynamixel
CAN 1M bps (CAN) / 8M (CAN FD) <40 m @1M Bus Motor networks, automotive
EtherCAT 100M bps 100 m/segment Ring Industrial robot joints
USB 480M (2.0) / 5G (3.0) <5 m Star Cameras, LiDAR

Wireless LAN Communication

Protocol Speed Distance Power Typical Applications
WiFi 2.4G 72–150 Mbps ~50 m High Image transmission, ROS2 communication
WiFi 5G 433–866 Mbps ~30 m High High-bandwidth sensors
BLE 5.0 2 Mbps ~100 m Very low Remote control, status reporting
ESP-NOW 1 Mbps ~200 m Low ESP32 peer-to-peer communication

Long-Range Communication

Protocol Speed Distance Features
4G LTE 50–150 Mbps Coverage area High bandwidth, requires SIM card
5G 1–10 Gbps Coverage area Ultra-low latency
LoRa 0.3–50 kbps 2–15 km Ultra-low power, small data volume
RC Transmitter (2.4G) ~100 kbps 1–2 km Real-time control, low latency

Bandwidth vs. Latency vs. Reliability

Three-Way Trade-off

Different applications prioritize the three core communication metrics differently:

Application Bandwidth Need Latency Requirement Reliability Requirement
Motor control Low (tens of bytes) Very high (<1 ms) Very high
IMU data Low-medium High (<5 ms) High
LiDAR High (MB-level) Medium (<50 ms) High
Camera images Very high (tens of MB/s) Medium (<100 ms) Medium
Remote commands Very low High (<20 ms) High
Remote monitoring Medium Low (<1 s) Medium
Map data High Low High

Real-Time Classification

Level Latency Jitter Protocols
Hard real-time <1 ms <10 us EtherCAT, CAN
Soft real-time <10 ms <1 ms CAN, RS-485, UART
Near real-time <100 ms <10 ms WiFi, USB
Non-real-time >100 ms Unlimited 4G, LoRa, HTTP

Robot Communication Architecture Examples

Small Wheeled Robot

RC Transmitter (2.4G/BLE)
      ↓
  Main Controller (ESP32)
   ├── UART ──→ LiDAR
   ├── I2C ───→ IMU + OLED
   ├── PWM ───→ Servos × 2
   └── GPIO+PWM → Motor driver board → Motor+Encoder

Six-Axis Robotic Arm

Host PC (ROS2)
      │ EtherCAT / CAN
      ↓
  Controller (Embedded Linux)
   ├── CAN ──→ Joint 1 driver ──→ BLDC + Encoder
   ├── CAN ──→ Joint 2 driver ──→ BLDC + Encoder
   ├── CAN ──→ ... (Joints 3-6)
   ├── RS-485 → End effector
   └── Ethernet → Vision system

Quadruped Robot

WiFi/4G ──→ Host (Jetson)
               ├── Ethernet ──→ Depth camera
               ├── USB ────────→ LiDAR
               ├── SPI ────────→ IMU (high speed)
               └── CAN Bus
                    ├── Joint 1 (Hip) CAN ID=0x01
                    ├── Joint 2 (Knee) CAN ID=0x02
                    ├── Joint 3 (Ankle) CAN ID=0x03
                    └── ... (×4 legs = 12 joints)

Protocol Selection Decision

graph TD
    A[Communication Requirement] --> B{On the same board?}
    B -->|Yes| C{Speed requirement?}
    C -->|High >1MHz| D[SPI]
    C -->|Low-medium| E[I2C]
    B -->|No| F{Wired or wireless?}
    F -->|Wired| G{How many nodes?}
    G -->|2 point-to-point| H[UART]
    G -->|Multiple nodes| I{Real-time requirement?}
    I -->|Hard real-time| J[EtherCAT]
    I -->|Moderate| K[CAN Bus]
    F -->|Wireless| L{Distance?}
    L -->|<100m| M{Bandwidth need?}
    M -->|High| N[WiFi]
    M -->|Low| O[BLE/ESP-NOW]
    L -->|>1km| P[4G/LoRa]

    style D fill:#ffb,stroke:#333
    style E fill:#ffb,stroke:#333
    style H fill:#bfb,stroke:#333
    style J fill:#f9f,stroke:#333
    style K fill:#bfb,stroke:#333
    style N fill:#bbf,stroke:#333
    style O fill:#bbf,stroke:#333
    style P fill:#fbb,stroke:#333

Communication Safety Considerations

Common Issues

Issue Impact Countermeasure
Data loss Command not executed CRC check, retransmission mechanism
Latency jitter Control instability Real-time protocols, priority
EMI Data errors Differential signals (CAN/RS-485), shielded cables
Signal attenuation Communication interruption Appropriate transmission distance, signal boosting
Ground loop current Signal offset Optocoupler isolation, differential transmission

Error Handling Strategies

  • CRC check: Detects transmission errors (built into CAN)
  • Timeout retransmission: Automatic resend after packet loss
  • Heartbeat mechanism: Periodic connection state checking
  • Watchdog: Automatically enters safe state upon communication interruption

Summary

  • Robot communication is divided into four layers: intra-board, inter-board, wireless LAN, and long-range
  • Each layer has corresponding optimal protocol choices
  • Motor control requires hard real-time (CAN/EtherCAT); sensor acquisition requires moderate real-time
  • Bandwidth, latency, and reliability require trade-offs
  • Communication architecture design must align with the overall robot architecture
  • EMI resistance and error handling are critical for reliable operation in practical systems

评论 #