For the complete documentation index, see llms.txt. This page is also available as Markdown.

PX4 Instructions

Find most up to date documentation at https://docs.px4.io/main/en/dronecan/ark_cannode.html

ARK CANnode runs the PX4 DroneCAN Firmware. As such, it supports firmware update over the CAN bus and dynamic node allocation.

CANnode Firmware

ARK CANnode boards ship with recent firmware pre-installed, but if you want to build and flash the latest firmware yourself see PX4 DroneCAN Firmware > Building the Firmware.

Building the Application

make ark_cannode

Building the Bootloader

make ark_cannode_canbootloader

Flashing the Bootloader

To flash the bootloader firmware you need an ST-LINK programmer. See the ST-LINK Flashing Guide for setup instructions.

st-flash write <bootloader_binary_path> 0x08000000

Flashing the Application

To flash the application firmware you can use the SD card method as documented here or you can use the DroneCAN GUI Tool and a USB-to-CAN adaptor to flash the firmware directly.

Configuration

Connect the ARK CANnode to the flight controller's CAN bus using a standard 4-pin JST-GH cable.

DroneCAN configuration in PX4 is explained in more detail in DroneCAN > Enabling DroneCAN.

Flight Controller Parameters

Set the following in QGroundControl and reboot the flight controller.

Required

Parameter
Value
Description

2

Enable DroneCAN with dynamic node allocation. Set to 3 if using DroneCAN ESCs

Optional

Enable a UAVCAN_SUB_* subscriber for each sensor connected to the ARK CANnode. The onboard IMU subscriber is listed below; for other sensors (airspeed, barometer, etc.), see the parameters named UAVCAN_SUB_* in the PX4 parameter reference.

Parameter
Description

Set to 1 to subscribe to DroneCAN RawIMU messages from the onboard IMU. Requires CANNODE_PUB_IMU to also be set on the ARK CANnode

CAN Node Parameters

Set the following on the CANnode and reboot the node. CAN node parameters can be configured using either:

Optional

Parameter
Description

Set to 1 if this is the last node on the CAN bus

Set to 1 to publish RawIMU messages from the onboard ICM-42688-P IMU on the CAN bus. Requires UAVCAN_SUB_IMU to also be set on the flight controller

CANnode as PWM Expander

The ARK CANnode can be used as a PWM Expander over CAN, allowing you to drive additional servos or ESCs from the flight controller.

Common Setup

Regardless of whether you are using servos or ESCs, the following flight controller parameters must be configured:

On the CANnode, set the timer output protocol using PWM_MAIN_TIMx parameters. You can see the timer-to-output mapping here: https://github.com/PX4/PX4-Autopilot/blob/main/boards/ark/cannode/src/timer_config.cpp#L43-L50

Servos

For servo outputs, we recommend using standard 50Hz PWM. Set the timer protocol to 50Hz on the CANnode:

Flight Controller Parameters

CANnode Parameters

Using the DroneCAN GUI Tool or QGroundControl, configure the parameters to map your PWM outputs:

You can also optionally adjust the min, max, and disarmed values:

ESCs

For ESC outputs, we recommend using DShot300. Set the timer protocol on the CANnode:

PWM over CAN update rate is limited to 400Hz, so it is recommended to keep ESCs on the flight controller's outputs if possible.

Flight Controller Parameters

CANnode Parameters

Using the DroneCAN GUI Tool or QGroundControl, configure the parameters to map your PWM outputs:

You can also optionally adjust the min, max, and disarmed values:

Bidirectional DShot on the CANnode is not yet supported.

DShot Telemetry

When using DShot you can also receive ESC telemetry via UART from the Telem pin of the ESC. Connect the Telem pin from the ESC to the USART1_RX pin of the UART1/I2C port of the CANnode. Set the DSHOT_TEL_CFG parameter on the CANnode to 201.

Last updated