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

ArduPilot Instructions

Guide for setting up an ARK CANnode as a PWM servo expander with ArduPilot AP_Periph firmware, including gripper/dropper configuration.

The ARK CANnode can run ArduPilot AP_Periph firmware, enabling it to act as a DroneCAN peripheral node for expanding servo outputs, ESC control, and sensor connectivity over CAN.

Flight Controller Setup

Flash your ARK flight controller with ArduPilot firmware using QGroundControl over USB.

Set the following parameters on the flight controller and reboot:

Parameter
Value
Description

CAN_P1_DRIVER

1

Enable first CAN driver

CAN_D1_PROTOCOL

1

Set protocol to DroneCAN

Connect the CANnode to the flight controller's CAN bus and flash it with AP_Periph firmware as described in ArduPilot Firmware.

Gripper/Dropper Setup

This example configures the first CANnode PWM output as a servo gripper for a dropping mechanism.

Flight Controller Parameters

Parameter
Value
Description

CAN_D1_UC_SRV_BM

1

Enable Servo Channel 1 over CAN (bitmask bit 0)

SERVO1_FUNCTION

28

Gripper

GRIP_ENABLE

1

Enable gripper

GRIP_TYPE

0

Servo

GRIP_GRAB

1000

PWM value for grab/close (adjust to your servo)

GRIP_RELEASE

1200

PWM value for release/open (adjust to your servo)

BRD_SAFETY_MASK

1

Allow Servo Channel 1 to output with safety on

CAN_D1_UC_SRV_BM defaults to 0, meaning no servo commands are sent over CAN. This is the most commonly missed parameter.

CANnode Parameters

The defaults should work without changes. The CANnode output functions map to flight controller servo channels by default (OUT1 maps to FC Servo 1, OUT2 to Servo 2, etc.).

The OUT* parameters are accessed through the DroneCAN parameter interface. In the DroneCAN GUI Tool, double-click the CANnode and click Fetch All to view them.

Triggering the Gripper

Via RC

Assign a switch on your transmitter to control the gripper:

Parameter
Value
Description

RCx_OPTION

19

Gripper Release

Replace x with the RC channel number mapped to your desired switch.

The gripper can also be controlled programmatically using MAV_CMD_DO_GRIPPER. The following Python script sends gripper open/close commands over USB:

Usage:

The script auto-detects ARK flight controllers connected via USB. Use --port to specify a device manually:

Using Multiple Servos

To use the first 3 CANnode outputs, set CAN_D1_UC_SRV_BM = 7 (bits 0, 1, 2) and configure SERVO1_FUNCTION, SERVO2_FUNCTION, and SERVO3_FUNCTION on the flight controller. Update BRD_SAFETY_MASK accordingly (e.g., 7 for channels 1-3).

Last updated