CAN Bus in a Modular Rover: Wiring Motor Controllers That Do Not Fight Each Other
Tom Cosgrove,

TL;DR: When you put more than two motor controllers on a mobile robot, a shared serial link stops being convenient and starts being fragile. CAN bus mobile robot wiring solves this by giving every node an arbitration-based channel over a single twisted pair. You get priority-based messaging, hardware error detection, and latency that can be bounded by calculating bus load at 500 kbit/s or 1 Mbit/s. Typical maximum bus lengths are on the order of 100 m at 500 kbit/s and 40 m at 1 Mbit/s, but the actual limit depends on cable, transceivers, topology, and timing requirements rather than a single fixed ISO 11898-2 value. This article explains why CAN beats USB and UART for multi-controller UGVs, how to handle addressing, termination, shielding, and frame priorities, and how to diagnose a noisy or broken bus on a modular rover like Leo Rover or Raph Rover.
Why CAN bus mobile robot wiring beats USB and UART for multiple motor controllers
A modular rover rarely has just one motor controller. A four-wheel drive skid-steer platform typically has two or four drive controllers, plus a steering module, a manipulator base, and sometimes a payload actuator. Each of those nodes needs a bidirectional link to the main computer with low latency and no ambiguity about who is talking.
UART is a point-to-point protocol. To reach three controllers you either add three UART ports (rarely available on an embedded SBC) or use a multi-drop solution such as RS-485, which still lacks native arbitration. UART has no built-in error frames, no message IDs, and no priority scheme. If two nodes speak at the same time on a shared line, you get garbage and you find out only when a checksum fails.
USB looks tempting because SBCs like the Raspberry Pi expose several ports. In practice, USB in a UGV has three weaknesses: it is host-centric (the SBC controls transfers, so devices cannot initiate arbitrated bus access with guaranteed timing), cable lengths are limited to 5 m without active repeaters, and common connectors are not designed for vibration or field use. USB hubs can also introduce enumeration failures after brownouts.
CAN (ISO 11898) was designed for exactly this problem. It is a multi-master differential bus with:
- Non-destructive bitwise arbitration based on message ID (lower ID wins, no retransmission needed for the winner).
- Built-in CRC, ACK slot, and error counters that can isolate persistently faulty nodes automatically (bus-off state).
- Differential signaling on a twisted pair, tolerant of the electrical noise from brushed motors and DC-DC converters.
- Standard bit rates from 125 kbit/s up to 1 Mbit/s for Classical CAN, and commonly up to 5-8 Mbit/s for the CAN FD data phase when the controllers, transceivers, and network layout support it.
For a modular UGV, that translates into one pair of wires reaching every controller, with worst-case latency you can calculate when traffic is properly bounded.
How to address nodes and assign frame priorities on a rover CAN bus
CAN does not have “addresses” in the Ethernet sense. Every frame carries an 11-bit (standard) or 29-bit (extended) identifier, and that identifier serves two purposes at once: it identifies the message content and it sets the arbitration priority. The lower the numeric ID, the higher the priority.
For a rover, a sensible scheme is to reserve the lowest IDs for safety-critical traffic and the highest for telemetry:
- 0x000-0x00F: emergency stop, watchdog heartbeat, bus sync.
- 0x010-0x0FF: drive motor setpoints (per wheel).
- 0x100-0x1FF: motor controller status (current, RPM, temperature).
- 0x200-0x2FF: auxiliary actuators (arm joints, pan-tilt).
- 0x300+: diagnostics, firmware updates, non-real-time telemetry.
If you want a ready-made framework, CANopen (CiA 301) and its motion profile CiA 402 already define this structure and are widely supported by industrial servo drives. For custom controllers on smaller platforms, a flat scheme with documented ID ranges is often lighter and easier to debug. ROS 2 does not care which you choose, as long as your bridge node maps CAN frames to topics consistently.
Calculating worst-case latency
A standard CAN frame with 8 bytes of payload is 111 bits on the wire before bit stuffing. Depending on the payload, bit stuffing increases that length; a conservative estimate is roughly 130 bits. At 500 kbit/s that is about 260 microseconds per frame. If a low-priority message must wait behind 20 higher-priority frames, its wait can be about 5.2 ms, excluding additional periodic traffic, retransmissions, and software scheduling delays. For a 100 Hz control loop, you have 10 ms of budget, so 500 kbit/s can be sufficient when the actual frame rate and priorities are budgeted. Go to 1 Mbit/s if you plan to add a manipulator with joint-level torque control.
What termination, cable length, and shielding actually do
CAN uses differential signaling between CAN_H and CAN_L. In a typical high-speed CAN physical layer, both lines are near 2.5 V in the recessive state, while a dominant bit produces approximately 2 V of differential voltage. Termination is not optional. You need exactly two 120-ohm resistors, one at each physical end of the bus. Not three. Not one. Two.
Common failure modes tied to termination:
- No termination: reflections can cause bit errors, especially as bit rate and cable length increase.
- One termination: the bus may work at low rates and short lengths, then fail intermittently as you add nodes.
- Three or more terminations: bus impedance becomes too low and can reduce signal margin or overload transceiver drivers.
Check with a multimeter across CAN_H and CAN_L with power off: you should read about 60 ohms (two 120-ohm resistors in parallel). If you read 120, one terminator is missing. If you read 40 or less, you have too many.
For cable, use a twisted pair with a characteristic impedance close to 120 ohms. Standard CAN cable (for example, Belden 3105A or equivalent industrial twisted pair) is designed for this. On a modular rover where controllers are within 1-2 m of each other, an Ethernet cable pair may work for short runs, although its nominal impedance is typically 100 ohms rather than 120 ohms. Keep stubs (the drop from the main bus into each node) as short as practical; limits such as 30 cm at 500 kbit/s and 15 cm at 1 Mbit/s are conservative design guidelines, not universal rules.
Shielding matters when the bus runs near brushed DC motors, PWM lines, or switching regulators. For effective high-frequency shielding, bond the cable shield to chassis at both ends where the mechanical and grounding design supports it. If a direct shield connection would create unacceptable low-frequency ground-loop currents, use a grounding strategy appropriate to the vehicle’s EMC design rather than connecting the shield to signal ground indiscriminately.
How to diagnose a bad CAN bus in the field
Bad CAN buses have signature symptoms. Recognizing them saves hours.
- Intermittent dropouts under load: usually a missing or wrong-value terminator, an excessive stub length, or power and grounding noise. Measure resistance and inspect the wiring.
- One node goes bus-off after minutes: its transmit error counter reached 256. Common causes include an intermittent connection, a marginal transceiver, or an invalid common-mode voltage caused by poor grounding. Check the node’s power and ground reference with the system running.
- Everything fails when the drive motors spin: EMI coupling. Improve motor suppression and power filtering, keep CAN wiring separated from motor and PWM wiring, and verify shield bonding.
- Bus works at 125 kbit/s but not at 500 kbit/s: reflections, stub length, cable quality, or transceiver timing limitations. Some low-cost transceivers do not meet timing requirements at 1 Mbit/s.
Tools that pay for themselves on the first debug session include a USB-to-CAN adapter with candump and cansend from the Linux SocketCAN stack, and an oscilloscope to look at the actual differential signal. A clean CAN dominant bit has approximately 2 V differential voltage and controlled edges. Excessive ringing or distorted edges tell you the physical layer is marginal.
On a Linux SBC with SocketCAN, bring up the interface and watch traffic with these commands:
sudo ip link set can0 up type can bitrate 500000candump -tz can0to see frames with timestamps.ip -details -statistics link show can0to read interface state, error counters, and bus-off events.
If bus-error events occur repeatedly or the interface enters the error-passive or bus-off state during operation, your physical layer needs work before you touch the firmware.
What a modular rover CAN architecture looks like in practice
Consider a four-wheel skid-steer platform with an optional manipulator, similar in scope to what Fictionlab builds for custom projects. A workable topology looks like this:
- A main computer (for example, a Raspberry Pi 5 or NVIDIA Jetson) with a CAN HAT or an external USB-CAN adapter running SocketCAN.
- Four wheel motor controllers, each using its own CAN message-ID range, daisy-chained along the chassis.
- A power management board reporting battery voltage, current, and cell temperatures.
- An optional manipulator controller that plugs into the same bus through a rugged connector.
- Two 120-ohm terminators: one at the main computer end, one at the last node in the chain.
The ROS 2 side runs a small bridge node that subscribes to /cmd_vel, computes per-wheel setpoints, and publishes CAN frames on the drive ID range. A second bridge reads status frames and publishes /joint_states, /battery_state, and diagnostic topics. Because CAN handles arbitration in hardware, the bridge does not need to worry about collisions, only about frame rate budgeting.
This architecture scales. Adding a new payload actuator means running a short stub off the existing bus, assigning an unused ID range, and updating the bridge node’s frame map. No new USB port, no new UART, no rewiring. That modularity is precisely why CAN dominates automotive and industrial mobile robotics, and why it fits UGVs like Raph Rover and custom platforms built through Fictionlab’s custom robotics service.
Frequently asked questions about CAN bus wiring on mobile robots
Can you mix CAN and CAN FD nodes on the same bus?
Only if every node’s CAN controller and transceiver support CAN FD frames. Classical CAN controllers interpret CAN FD frames as errors and generate error frames, which can drive the bus into a fault state. Either use CAN FD-capable controllers everywhere or keep the two networks separate.
Do you need galvanic isolation on every CAN node?
Not always, but on a rover with brushed motors and shared power rails, isolated transceivers (for example, the ISO1050 family) can reduce ground-loop and common-mode problems significantly. If your controllers already share a clean ground and the bus is short, non-isolated transceivers work, but budget for isolation on nodes that sit near motor power stages.
What bit rate should you pick for a rover with four motor controllers?
500 kbit/s is a good default. It provides roughly 3,800-4,500 short 8-byte frames per second in theoretical conditions, depending on bit stuffing, works reliably over the cable lengths typical in a UGV, and is supported by common high-speed CAN transceivers. Move to 1 Mbit/s only if you need higher control rates for a manipulator or added sensors.
Can you use ROS 2 topics directly over CAN?
Not directly. ROS 2 uses DDS and typically runs over transports such as Ethernet or shared memory. You need a bridge node that translates between CAN frames and ROS 2 topics. SocketCAN plus ros2_socketcan or a custom bridge is a common approach.
How long can a CAN bus be on a mobile robot?
There is no single maximum cable length specified by ISO 11898-2 for every implementation; the practical limit depends on bit rate, propagation delay, cable, transceivers, and network topology. Typical engineering guidelines are around 100 m at 500 kbit/s and around 40 m at 1 Mbit/s. For a rover, total cable length is rarely the constraint. Stub length often matters more: keep stubs short, with 30 cm at 500 kbit/s as a conservative guideline.
What connector should you use for CAN on a field robot?
M8 or M12 A-coded connectors are common industrial choices for CAN and can be specified for vibration, dust, and moisture resistance. For lower-cost internal wiring, JST-XH or Molex Micro-Fit work if the enclosure is sealed. Avoid Dupont headers on any moving platform.
How do you detect a node that has gone bus-off?
SocketCAN reports bus-off events for the local CAN controller through the netlink interface. Query ip -details -statistics link show can0 and look at the interface state and bus-off counter. In application code, subscribe to CAN error frames (class CAN_ERR_FLAG) and log local controller errors. Standard CAN does not provide a direct way to identify which remote node has entered bus-off, so remote nodes need their own diagnostics or heartbeat reporting.
Build your next rover on a bus that scales with you
If you are designing a modular UGV and want a platform where the wiring, motor controllers, and ROS 2 integration are already engineered to work together, take a look at Fictionlab’s custom robotics service. The team designs CAN-based architectures for research and industrial UGVs, and you can also browse ready modules and accessories in the Fictionlab shop.