MAVLINKHUD

Overview

The NUM parameter group (specifically NUM_CELLS or BATT_BAL_NUM_CELLS) configures the cell count for high-precision Battery Balance monitoring.

Key Concepts

1. Cell Count

When using a smart battery or a power module that monitors individual cell voltages (via a balance lead), the autopilot needs to know how many cells are in series.

  • NUM_CELLS: The integer number of cells (e.g., 4 for a 4S LiPo).

Developer Notes

  • Library: libraries/AP_BattMonitor.
  • Context: Only relevant if your power module supports per-cell monitoring.

NUM_CELLS: Number of battery cells

Description

Number of battery cells to monitor.

Values

  • Range: 0 to 64
  • Default: 0

Description

This parameter configures the AP_Periph Battery Balancer feature.

  • Usage: If you have an AP_Periph device wired to monitor individual cell voltages (e.g., via analog inputs), this sets how many cells are in series.
  • Function: The peripheral will read NUM_CELLS sequential analog pins starting from CELL1_PIN, calculate the individual cell voltages (by subtracting the previous cell's total voltage), and broadcast this data over DroneCAN.
  • 0: Disabled.

Source Code

ardupilot/Tools/AP_Periph/batt_balance.cpp