CAN Bus

CAN bus fundamentals, differential signaling, termination, DroneCAN protocol, and 4-pin JST-GH wiring.

What is CAN Bus?

CAN (Controller Area Network) is a robust communication bus designed for noisy environments. Originally developed for automobiles, it is the standard for connecting sensors, GPS modules, and other peripherals in the Pixhawk drone ecosystem.

CAN uses differential signaling over a twisted pair, which makes it highly resistant to electromagnetic interference — critical on a drone where motors, ESCs, and radios generate significant noise.

How It Works

Differential Signaling

CAN uses two wires, CAN_H (high) and CAN_L (low), that carry the same signal in opposite polarities. The receiver reads the difference between the two, which cancels out any noise that affects both wires equally.

Bus State
CAN_H
CAN_L
Difference

Recessive (1)

2.5V

2.5V

0V

Dominant (0)

3.5V

1.5V

2V

This is why CAN is so much more reliable than UART or I2C in electrically noisy environments.

Bus Topology

CAN is a true multi-drop bus — all devices share the same two wires. Any device can transmit, and all devices receive every message. Message priority is handled by arbitration built into the protocol.

[Flight Controller] ──── CAN_H/CAN_L ──── [GPS] ──── [Flow Sensor] ──── [Mag]
       120Ω                                                               120Ω

Devices are daisy-chained, with two 120-ohm termination resistors at each end of the bus.

Termination

A CAN bus requires a 120-ohm termination resistor at each physical end of the bus. Without proper termination, signal reflections corrupt data and cause intermittent communication failures.

Most ARK DroneCAN products have a software-configurable built-in termination resistor controlled by the CANNODE_TERM parameter. Only the two devices at the physical ends of the bus should have termination enabled.

circle-info

Rule of thumb: if you measure the resistance between CAN_H and CAN_L with everything powered off, you should see approximately 60 ohms (two 120-ohm resistors in parallel).

Bit Rate

The Pixhawk standard CAN bit rate is 1 Mbps (1000000 bps). This is the default for PX4, ArduPilot, and all ARK DroneCAN devices. Unlike UART, you almost never need to change the CAN bit rate.

4-Pin JST-GH Connector (Pixhawk Standard CAN)

All ARK DroneCAN products use the Pixhawk Standard CAN connector:

Pin
Signal
Voltage

1

5V

5.0V

2

CAN_H

3

CAN_L

4

GND

GND

Devices are connected in a daisy chain using these 4-pin JST-GH cables. Most ARK DroneCAN products have two CAN connectors so you can chain one into the next without a splitter.

DroneCAN Protocol

DroneCAN (formerly UAVCAN v0) is the application-layer protocol that runs on top of CAN bus. It defines standard message types for sensor data, firmware updates, parameter configuration, and node management.

Key DroneCAN concepts:

  • Node ID — each device on the bus has a unique ID (1–127). PX4 and ArduPilot assign these automatically by default.

  • Message typesstandardized data structuresarrow-up-right (e.g., uavcan.equipment.ahrs.RawIMU, uavcan.equipment.gnss.Fix2) that all compliant devices understand.

  • Dynamic node allocation — devices can obtain a node ID automatically from the flight controller on first boot.

  • Firmware update — the flight controller or a tool like the DroneCAN GUI Tool can push firmware updates to any node on the bus.

Common Pitfalls

  • Missing termination — the most common CAN issue. If devices appear and disappear intermittently, check that exactly two nodes have termination enabled (one at each end of the bus).

  • All nodes terminated — enabling termination on every device drops the bus resistance too low, causing signal distortion. Only the two end nodes should be terminated.

  • Wrong bit rate — all devices must use the same bit rate (1 Mbps). A device configured for a different rate will be invisible on the bus.

  • Node ID conflicts — two devices with the same node ID will interfere with each other. Dynamic node allocation usually prevents this, but manually assigned IDs can collide.

  • Cable length — CAN is robust but not unlimited. For runs over 1 meter, use quality twisted-pair cable and ensure proper termination.

  • 5V power through CAN — the CAN connector provides 5V power. If a device draws too much current through the cable, the voltage can drop below the minimum for reliable operation. Check the power budget for your bus.

Further Reading

Last updated