|
2 | 2 | date: 2026-04-30 |
3 | 3 | title: Controller Area Network (CAN) |
4 | 4 | --- |
| 5 | +## When to Use This Guide |
| 6 | + |
| 7 | +Use this guide if you are designing a communication bus for a robotic system that requires high reliability, real-time performance, and resistance to electrical noise. This is particularly relevant for connecting motor controllers, battery management systems, and distributed sensors. |
5 | 8 |
|
6 | 9 | Controller Area Network (CAN) is a communication protocol used for reliable, real-time data exchange between multiple devices in embedded and robotic systems. It allows microcontrollers, sensors, actuators, motor drivers, and power electronics to communicate over a shared two-wire bus without requiring a central controller. |
7 | 10 |
|
@@ -271,32 +274,6 @@ ip -details -statistics link show can0 |
271 | 274 |
|
272 | 275 | These tools are very useful when debugging communication between a Linux computer, motor controller, and embedded microcontroller. |
273 | 276 |
|
274 | | -## Example Use in a Robotics System |
275 | | - |
276 | | -Consider a differential-drive mobile robot with two wheel motor controllers, an IMU, and a battery management system. |
277 | | - |
278 | | -A possible CAN message layout could be: |
279 | | - |
280 | | -```text |
281 | | -0x100 - Emergency stop command |
282 | | -0x110 - Left motor velocity command |
283 | | -0x111 - Right motor velocity command |
284 | | -0x200 - Left motor encoder feedback |
285 | | -0x201 - Right motor encoder feedback |
286 | | -0x300 - IMU orientation data |
287 | | -0x400 - Battery voltage and current |
288 | | -0x500 - Motor fault status |
289 | | -``` |
290 | | - |
291 | | -In this setup: |
292 | | - |
293 | | -- The robot computer sends velocity commands to the motor controllers. |
294 | | -- The motor controllers send encoder feedback. |
295 | | -- The IMU sends orientation data. |
296 | | -- The battery management system reports voltage, current, and fault state. |
297 | | -- Emergency stop messages are assigned a high-priority low ID. |
298 | | - |
299 | | -This allows the robot to maintain reliable communication between distributed components while keeping wiring simple. |
300 | 277 |
|
301 | 278 | ## Usage in Robotics Systems |
302 | 279 |
|
|
0 commit comments