Skip to content

CAN PDB Configuration Guide (PX4)


This chapter applies to scenarios where the CAN PDB is used with the PX4 stack (controllers running PX4 firmware).

Enabling Voltage and Current Detection

To enable voltage and current detection, you need to configure the controller parameters. Connect the controller to the QGroundControl (QGC) ground station, set the following parameters in the Full Parameter List, and restart the controller after writing the parameters:

CANPDB

UAVCAN_ENABLE set to "Sensor Automatic Config"
UAVCAN_SUB_BAT set to "Raw data"

Viewing Power Information

CANPDB

Custom Configuration

The CAN PDB provides 7 parameters for users to customize:

BATTERY_ID // Battery ID, invalid
CAN_NODE_ID // CAN Node ID
CELL_SERIES_NUM // Number of battery cells, default is 0 (automatic recognition), used to estimate battery percentage.
CELL_FULL_VOLTAGE // Full voltage of a single cell, used to estimate battery percentage.
CELL_EMPTY_VOLTAGE // Empty voltage of a single cell, used to estimate battery percentage.
CALIBRATION_PARAM // Calibration status identifier; a value of 1 indicates calibrated (read-only, cannot be written).
USE_TMP112 // Temperature sensor, default is 1 (enabled); set to 0 to disable.

NOTE

Under normal circumstances, the default parameters can meet the needs of most users. Do not modify them unless necessary.

Modifying Parameters

Connect the controller to the QGroundControl (QGC) ground station, open the Analyze Tools > MAVLink Console interface, and send the following commands for configuration:

  • uavcan status // Obtain the NODE ID of the CAN PDB (press the "Enter" key to send the command)
  • uavcan param list + [ID] // Read CAN PDB parameter information
  • uavcan param set + [ID] + [Parameter Name] + [Value] // Set (modify) parameter values
  • uavcan param save + [ID] // Save parameter configuration

CANPDB

High-Voltage Battery Setup

Take a 6S battery pack (with a single cell's full voltage of 4.35V and empty voltage of 3.3V) and a CAN PDB node ID of 49 as an example. Send the following commands in the MAVLink Console interface:

uavcan param set 49 CELL_SERIES_NUM=6
uavcan param set 49 CELL_FULL_VOLTAGE=4350
uavcan param set 49 CELL_EMPTY_VOLTAGE=3300
uavcan param save 49

NOTE

If a save failure is prompted, restart the device and re-read the device configuration information to check if the modification was successful.