MAVLINKHUD

Overview

The PWM parameter group (specifically PWM_FREQ or MOT_PWM_FREQ) configures the physical output frequency of the Pulse Width Modulation signals.

Key Concepts

1. Output Rate

  • PWM_FREQ: Defines how many times per second (Hz) the motor or servo position is updated.
    • 50Hz: Standard for legacy analog servos.
    • 490Hz: High-speed standard for most digital ESCs.
    • 16,000Hz+: Ultra-high frequency used for brushed motors to prevent the audible "whine."

Integration Guide

  • Warning: Do not set a high frequency (e.g., 400Hz) if you are using old analog servos; they will overheat and burn out. Digital servos can usually handle 333Hz or more.

Developer Notes

  • Library: libraries/AP_HAL/RCOutput.
  • Scope: This is often a global setting, but many boards allow setting different frequencies for different "Groups" of pins.

PWM_FREQ

kHz
Default 16
Range 1 20

PWM_FREQ: Motor Output PWM freq for brushed motors

Description

Motor Output PWM freq for brushed motors.

Values

  • Range: 1 to 20
  • Units: kHz
  • Increment: 1
  • Default: 16

Description

This parameter sets the Pulse Width Modulation (PWM) frequency used to drive brushed motors on a Rover or Boat.

  • Usage: Only applies when MOT_PWM_TYPE (or PWM_TYPE on Rover) is set to a "Brushed" mode (e.g., 3 for BrushedWithRelay or 4 for BrushedBiPolar).
  • Default (16kHz): A high enough frequency to be outside the audible range of human hearing (silent operation).
  • Lower Values: May be required for some high-current motor drivers or to reduce switching losses (heat), but the motors may "whine" audibly.