MAVLINKHUD

Overview

The BAL parameter group contains specific tuning parameters for Balance Bots (two-wheeled self-balancing robots) running ArduRover.

Unlike standard Rovers, a Balance Bot uses a pitch controller to stay upright. This controller drives the wheels forward/backward to correct pitch errors.

Key Concepts

1. Pitch Control

The robot must constantly adjust its wheel speed to maintain a target pitch angle (usually 0, or leaned forward for acceleration).

  • BAL_PITCH_MAX: Limits how far the robot is allowed to lean. If it leans past this, it may fall over or be unable to recover.
  • BAL_PIT_FF: Pitch FeedForward. This is critical. It provides the immediate throttle response needed to counter gravity when the robot starts falling.

Parameter Breakdown

  • BAL_PITCH_MAX: Maximum pitch angle (deg).
  • BAL_PITCH_TRIM: Pitch angle offset for "Level" (balance point).
  • BAL_PIT_FF: Feed-forward gain.

Integration Guide

Tuning a Balance Bot

  1. Level: Calibrate the accelerometer with the robot perfectly balanced.
  2. Trim: Use BAL_PITCH_TRIM to find the exact balance point where the motors are quiet.
  3. PID: Tune the ATC_ or PSC_ pitch controllers (depending on firmware version) alongside BAL_PIT_FF.

BAL_CELL1_PIN

Default 1

Battery balance cell 1 pin (BAL_CELL1_PIN)

Description

Specifies the hardware pin used to measure the voltage of the first cell in a multi-cell battery configuration for smart battery management.

BAL_LIM_TC

s
Default 0.5
Range 0.1 2.0

Balance Bot Pitch Limit Time Constant (BAL_LIM_TC)

Description

Smoothing factor for the pitch limiting logic in Rover Balance Bots.

BAL_LIM_THR

Default 0.7
Range 0.1 1.0

Balance Bot Pitch Limit Throttle Threshold (BAL_LIM_THR)

Description

Defines the throttle level at which the balance bot begins to prioritize maintaining its upright balance over following the speed command.

BAL_PITCH_MAX

deg
Default 10
Range 1 45

Balance Bot Maximum Pitch Angle (BAL_PITCH_MAX)

Description

Safety limit for the maximum lean angle of a two-wheeled balance bot.

BAL_PITCH_TRIM

deg
Default 0
Range -5 5

Balance Bot Pitch Trim (BAL_PITCH_TRIM)

Description

Fine-tuning adjustment to the "center of gravity" for a balance bot, used to ensure it stays perfectly stationary when no movement is commanded.

BAL_PIT_FF

Default 0.5
Range 0 1

Balance Bot Pitch to Throttle FeedForward (BAL_PIT_FF)

Description

Feed-forward gain that couples pitch error directly to motor throttle in balance bot configurations, improving stability.

BAL_RATE

deg/s
Default 0
Range 1 360

Balance Bot Controlled Rate (BAL_RATE)

Description

This parameter is not found as BAL_RATE in the main codebase.