Research Robots Applications Industries Technology Contact
← Back to Technology
Robotics Core

CAN Bus Protocol

The Controller Area Network (CAN) is the nervous system of modern autonomous mobile robots. It enables robust, real-time communication between microcontrollers, sensors, and actuators without a central host computer, significantly reducing wiring complexity and increasing system reliability.

CAN Bus Protocol AGV

Core Concepts

Multi-Master Architecture

Unlike Master-Slave systems, any node on the CAN bus can initiate communication. This reduces latency and eliminates single points of failure in AGV navigation systems.

Differential Signaling

Data is transmitted via two wires (CAN High and CAN Low). This makes the signal highly resistant to electromagnetic interference, crucial for noisy factory environments.

Message Priority

CAN uses ID-based arbitration. Critical safety messages (like "Emergency Stop") automatically override less important data (like "Battery Level") without data loss.

Error Confinement

The protocol features built-in error detection. If a node is faulty, it can automatically disconnect itself from the bus to prevent bringing down the entire robot fleet network.

Reduced Wiring

By using a single pair of twisted wires for all components, CAN bus drastically reduces the weight and cost of wiring harnesses in complex mobile robots.

Robust Scalability

Adding new sensors or modules to an AGV is as simple as tapping into the existing bus lines, making hardware upgrades and retrofitting exceptionally easy.

How It Works

The CAN protocol relies on voltage differences rather than absolute voltage levels. The bus consists of two wires: CAN_H (High) and CAN_L (Low). In the "recessive" state (logic 1), both wires carry approximately 2.5V. In the "dominant" state (logic 0), CAN_H goes to 3.5V and CAN_L drops to 1.5V.

This differential voltage creates a noise-canceling effect. If external interference spikes the voltage on one wire, it affects the other wire equally, meaning the difference between them remains constant. This is why AGVs can operate reliably near high-power welding equipment or large motors.

Furthermore, CAN uses "Non-Destructive Bitwise Arbitration." When two nodes transmit simultaneously, the one sending a dominant bit (0) overwrites the recessive bit (1). The node sending the recessive bit detects this, stops transmitting, and becomes a receiver, ensuring the highest priority message gets through instantly.

Technical Diagram

Real-World Applications

Motor & Drive Control

Motor controllers use CAN to receive velocity commands and report encoder feedback. This ensures synchronization between wheels for precise differential steering in warehouse robots.

Battery Management (BMS)

The BMS continuously broadcasts cell voltage, temperature, and current usage via CAN. The main computer monitors this to trigger auto-charging sequences before the battery is depleted.

Hydraulic Lift Systems

In automated forklifts, the hydraulic pump controllers and valve blocks communicate pressure and height data over CAN, allowing for smooth lifting operations without complex analog wiring.

Safety Sensor Integration

While safety often uses redundant lines, diagnostic data from safety LiDARs and emergency stop buttons is transmitted via CAN to provide the fleet manager with detailed error logs.

Frequently Asked Questions

Why use CAN Bus over USB or Ethernet for internal robot communication?

CAN is deterministic and designed for real-time control, whereas USB is host-centric and fragile, and standard Ethernet can introduce latency (though Industrial Ethernet is changing this). CAN's differential signaling also provides superior noise immunity in electrical environments where motors and drives create significant interference.

What is the maximum cable length and speed for CAN Bus?

There is a trade-off between speed and length. At 1 Mbit/s, the cable is limited to about 40 meters. At 125 kbit/s, you can run up to 500 meters. For most AGVs, 1 Mbit/s is the standard to ensure rapid response times within the relatively small chassis footprint.

Why do I need a 120 Ohm resistor at the ends of the bus?

This is called termination. To prevent signal reflections (echoes) that corrupt data, the bus must be terminated at both physical ends with a resistor matching the cable's characteristic impedance (typically 120Ω). Without this, communication errors become frequent.

What is the difference between CAN 2.0 and CAN FD?

CAN FD (Flexible Data-rate) is an extension of the original protocol. It allows for faster data transmission during the data phase of the frame (up to 5-8 Mbps) and increases the payload size from 8 bytes to 64 bytes, making it better suited for modern robots with higher data throughput requirements.

How does CAN Bus handle message collisions?

It uses bitwise arbitration based on the Message ID. Lower IDs have higher priority (Dominant bits override Recessive bits). If two nodes transmit at once, the one with the higher priority ID continues unaffected, while the other stops and waits to retry, ensuring zero data loss for critical signals.

What are CANopen and J1939?

CAN is just the physical and data link layer; it defines how to send data, but not what the data means. CANopen (industrial automation) and J1939 (heavy vehicles) are higher-layer protocols that standardize data formatting, making devices from different manufacturers compatible.

What happens if a device on the bus fails?

If a device fails physically (e.g., power loss), it usually goes high-impedance and doesn't affect the bus. If a device malfunctions and starts outputting garbage, the CAN controller's error confinement logic will eventually switch that node to "Bus Off" state, isolating it so the rest of the robot can continue operating safely.

Is twisted pair cabling strictly necessary?

Yes. The twist in the cable ensures that any external electromagnetic interference affects both wires equally. Since the receiver looks at the voltage difference between the wires, this common-mode noise is cancelled out. Without twists, noise immunity is severely compromised.

Can I use a "Star" topology for wiring my AGV?

Ideally, no. CAN is designed for a "Bus" or "Line" topology with short stubs (branches). A Star topology creates signal reflections that can cause communication failures, especially at higher speeds. Keep stubs as short as possible (typically under 30cm).

How many nodes can I connect to a single CAN network?

The theoretical limit is determined by the identifier space (2,032 for standard CAN), but the physical limit depends on the transceiver electrical load. A standard transceiver supports up to 110 nodes. Specialized transceivers can support more, but bandwidth saturation usually becomes the limiting factor before node count.

How do I troubleshoot a CAN bus error on an AGV?

Start by measuring resistance between CAN_H and CAN_L with power off (should be ~60Ω). Check for common ground between nodes. Use an oscilloscope to view signal shape for noise or reflections. Finally, use a CAN analyzer tool to inspect error frames and bus load percentages.

Is CAN Bus secure against cyber attacks?

Native CAN lacks encryption or authentication, meaning anyone with physical access to the wires can inject messages. Modern robotics implementations often add higher-layer security (like SecOC) or use gateways to isolate the internal CAN bus from external wireless interfaces.

Ready to implement CAN Bus Protocol in your fleet?

Explore Our Robots