PX4 Instructions

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

ARK CANnode runs the PX4 DroneCAN Firmwarearrow-up-right. As such, it supports firmware update over the CAN bus and dynamic node allocationarrow-up-right.

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 Firmwarearrow-up-right.

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 herearrow-up-right or you can use the DroneCAN GUI Tool and a USB-to-CAN adaptor to flash the firmware directly.

Flight Controller Parameters

In order to use the ARK CANnode board, connect it to the Pixhawk CAN bus and enable the DroneCAN driver by setting parameter UAVCAN_ENABLEarrow-up-right to 2 for dynamic node allocation (or 3 if using DroneCAN ESCsarrow-up-right).

The steps are:

Once enabled, the module will be detected on boot.

DroneCAN configuration in PX4 is explained in more detail in DroneCAN > Enabling DroneCANarrow-up-right.

Enable Sensors

You will need to enable the subscriber appropriate for each of the sensors that are connected to the ARK CANnode.

This is done using the the parameters named like UAVCAN_SUB_* in the parameter reference (such as UAVCAN_SUB_ASPDarrow-up-right, UAVCAN_SUB_BAROarrow-up-right etc.).

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-L50arrow-up-right

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:

circle-info

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:

circle-info

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 portarrow-up-right of the CANnode. Set the DSHOT_TEL_CFG parameter on the CANnode to 201.

Last updated