MAVLINKHUD

Flight Controller Architecture: The Compute Core

CRITICAL The Flight Controller (FC) is the central nervous system of the vehicle. In the ArduPilot ecosystem, the selection of the processor family dictates the architectural ceiling of the vehicle, influencing everything from loop rates to peripheral expandability. Unlike Betaflight, where an F7 is simply "faster," in ArduPilot, the processor architecture determines which features are physically capable of running.

1. Processor Architecture and the STM32 Hierarchy

The industry standard for flight control logic is the STMicroelectronics STM32 family. While marketing materials often emphasize clock speed (MHz), the critical constraints for ArduPilot integration are Flash Memory, Floating Point Unit (FPU) Precision, and DMA Throughput.

1.1 The H743: The Modern Standard

  • Core: Cortex-M7 @ 480 MHz.
  • Flash: 2MB.
  • The "Double Precision" Advantage:
    The defining feature of the H743 is its hardware support for Double-Precision Floating Point math. ArduPilot's state estimator (EKF3) relies heavily on complex matrix operations to fuse GPS, Gyro, and Accelerometer data. On older processors (F4/F7), these calculations are often done in single-precision to save time, or emulated in software. The H7 can crunch these numbers natively in double-precision.
    • Real World Impact: This reduces "Integration Drift." Over a long autonomous mission (30+ minutes), minute rounding errors in position estimation accumulate. The H7 minimizes this, resulting in more accurate Return-to-Launch (RTL) performance and tighter loiter circles.
  • Memory Architecture:
    The 2MB Flash is mandatory for the modern ArduPilot binary. The firmware size has grown significantly with the addition of Lua Scripting, DDS (ROS2), and support for hundreds of sensors. 2MB ensures you never have to choose between "GPS Drivers" and "Scripting."

1.2 The F765: The Fixed-Wing Workhorse

  • Core: Cortex-M7 @ 216 MHz.
  • Flash: 2MB.
  • Verdict: This chip is the "Sweet Spot" for fixed-wing aircraft. While it runs at half the speed of the H7, planes do not require the 1kHz+ loop rates of racing drones. Crucially, it retains the 2MB Flash. This means a Matek F765-Wing board can run the exact same complex Lua scripts and autonomous missions as a Cube Orange, just at a lower loop rate.

1.3 The F722 Trap: A Structural Dead-End

WARNING: Do not buy STM32F722 boards for ArduPilot.

  • The Marketing Lie: The F722 is often sold as a "High Performance F7" upgrade to the F405.
  • The Fatal Flaw: It has only 512KB of Flash memory.
  • The ArduPilot Reality: The standard ArduPilot Copter binary is now over 1MB. To make it fit on an F722, the developers must use a "Cut Down" build server definition.
    • Lua Scripting: COMPLETELY DISABLED.
    • DDS/ROS2: COMPLETELY DISABLED.
    • Gimbal Drivers: OFTEN REMOVED.
    • Terrain Following: OFTEN REMOVED.
  • The Result: You buy a "high end" board, but you are locked out of the high-end software features. The F722 is excellent for Betaflight (racing), but it is a dead-end for Autonomy.

2. Inertial Measurement Units (IMUs): The Sensing Layer

The IMU provides the raw Angular Velocity (Gyro) and Linear Acceleration (Accel) data to the EKF. The industry is currently in a transition period between legacy sensors and next-gen MEMS.

2.1 MPU6000 (Legacy)

For a decade, this was the king. It had a high noise floor, but it was "deaf" to high-frequency vibrations. It was easy to tune because it simply didn't hear the motor bearings screaming at 200Hz. It is now End-of-Life (EOL).

2.2 ICM-42688-P (The High-Bandwidth Successor)

This is the sensor found on almost all modern H7 boards.

  • The Good: Extremely low noise floor. It is precise.
  • The Bad: Extremely high bandwidth. It hears everything.
  • The Implication: If you bolt an ICM-42688 to a noisy frame without software filtering, your drone will fly to the moon.
  • The Fix: You MUST configure the Harmonic Notch Filter in ArduPilot. This filter uses the RPM data from the ESCs to "notch out" the exact frequency of the motors from the Gyro data before it hits the PID loop. With the Notch Filter, the 42688 is superior. Without it, it is unflyable.

2.3 BMI270 (The Budget Trap)

Found on cheap flight controllers.

  • The Limitation: It has a hardware low-pass filter baked into the silicon that limits the sampling rate to ~3.2kHz.
  • Phase Lag: This internal filter creates a delay between the physical movement and the digital signal.
  • Tuning Impact: Delay (Phase Lag) is the enemy of the D-Term. You cannot tune a BMI270 drone as "tightly" as an ICM drone. It will oscillate if you push the gains too high because the flight controller is reacting to old news.

3. Vibration Isolation: Physics of Mounting

How you mount the Flight Controller is just as important as which one you buy.

3.1 Hard Mounting (The Cube Philosophy)

High-end controllers like the Cube Orange use Internal Isolation.

  • The Design: The IMU sensor is mounted on a heavy brass block, which floats on foam inside the plastic case.
  • The Physics (F=ma): By increasing the mass (m) of the sensor block, the inertia increases. It takes more force (F) to shake it. This acts as a mechanical low-pass filter that blocks high-frequency motor noise while allowing low-frequency movement (turning) to pass through instantly.
  • The Rule: NEVER soft-mount a Cube. If you put a Cube on gummies, you create two spring systems in series (The gummy + The internal foam). This creates complex resonance amplification (Harmonics) that can destroy flight stability. Hard mount it with screws or stiff VHB tape.

3.2 Soft Mounting (AIOs and Light Boards)

Lightweight "All-In-One" boards lack the mass for inertial damping.

  • The Requirement: You MUST use rubber grommets ("gummies").
  • The Tuning: The gummies act as the mechanical filter. If they are too hard, noise gets through. If they are too soft, the entire flight controller "wobbles" on the stack during a snap roll. The Gyro interprets this board-wobble as drone-movement, causing the FC to fight a ghost movement. This manifests as a "low frequency bounce" after a flip.

4. ArduPilot Integration: Key Parameters

How to tell the software about your hardware choices.

SCHED_LOOP_RATE

  • Definition: How many times per second the main control loop runs.
  • H7 Recommendation: 800Hz or 1000Hz. The processor has the power to run the loop fast, minimizing latency for the ICM-42688 sensors.
  • F765/F405 Recommendation: 400Hz. A safe standard. Going higher offers diminishing returns on slower processors and eats CPU cycles needed for logging/telemetry.

INS_GYRO_FILTER

  • Definition: The cutoff frequency for the static Low-Pass Filter on the Gyro.
  • Guidance:
    • 5" Racer (Stiff Frame): 80Hz - 100Hz. (Less filtering, less delay).
    • 10" Cinelifter (Flexy Frame): 40Hz - 60Hz. (More filtering needed to hide resonance).
    • Warning: Setting this too low (< 40Hz) introduces dangerous Phase Lag, causing slow oscillations.

INS_HNTCH_ENABLE

  • Action: Set to 1 immediately on any build with an ICM-42688 sensor.
  • Why: Without the Harmonic Notch, the high-bandwidth sensor will be overwhelmed by motor noise. This parameter enables the dynamic filter that tracks motor RPM.