Přeskočit obsah

Flight controller hardware

Summary

The flight controller (FC) is the central computer of the drone. It runs the PID loops, interfaces with all sensors, interprets pilot commands, generates motor speed commands, logs flight data, and manages failsafe behaviour. The Matek H7A3-SLIM's STM32H7A3 processor runs at 280 MHz with a hardware floating-point unit — fast enough to execute an 8 kHz PID loop, RPM filter, GPS parsing, and OSD generation simultaneously, on either Betaflight or ArduPilot. Six hardware UARTs connect external devices with dedicated, non-competing serial channels.


Concept

Why processor class matters

The 8 kHz PID loop runs every 125 µs. Within that window, the FC must: read filtered gyro data, run three PID calculations, update 36 RPM filter notch positions, mix motor commands, transmit DShot packets, and receive BiDi eRPM responses. On older F4-class processors (168 MHz, no hardware FPU for floating-point), this was not achievable simultaneously — pilots had to choose between 8 kHz loop rate and the RPM filter. The H7A3's hardware FPU executes floating-point multiply-accumulate in a single clock cycle, making the PID calculation essentially free in processor terms.

DMA (Direct Memory Access)

The gyroscope communicates over SPI at 10 MHz. Without DMA, the CPU would sit in a busy-wait loop during every sensor read — watching 16 bytes arrive at 10 MHz, doing nothing else for ~13 µs. With DMA, the SPI controller transfers data autonomously into RAM and raises an interrupt when done. The CPU continues executing other code during the transfer.

At 8 kHz loop rate, the gyro read happens 8,000 times per second. Without DMA, ~10% of CPU time would be spent waiting for sensor data. With DMA, that time is spent productively — running the PID loop, parsing GPS, building OSD frames.

UART assignments (typical)

Six hardware UARTs, each dedicated to one external device. Exact assignment is per-build — this is the typical pattern:

UART Device Baud Protocol
1 HDZero VTX — MSP DisplayPort (OSD)
2 GPS module 57,600 UBX
3 ELRS receiver 420,000 CRSF
6 Companion / spare 921,600 MAVLink2 (ArduPilot) / MSP (Betaflight)

Each UART has hardware inversion on the H7A3-SLIM — no external inverter needed for CRSF or other protocols that require inverted logic.

Gyro PCB isolation (moat)

On the H7A3-SLIM, the IMU chip sits inside a slot cut into the PCB substrate — a "moat" that isolates the gyro mounting island from the rest of the board. Frame vibration transmitted through the FC mounting screws reaches the PCB edge but cannot cross the moat to the gyro island. This is mechanical decoupling at the PCB level — a second isolation stage complementing the floating motor mounts.


Reference

Matek H7A3-SLIM specification

Parameter Value
Processor STM32H7A3, ARM Cortex-M7, 280 MHz
FPU Hardware, single-precision
IMU ICM-42688-P (gyro + accelerometer), SPI
Barometer SPL06-001
OSD AT7456E
UARTs 6 hardware
Motor outputs 4 × DShot (bidirectional capable)
BEC output 5V / 1A continuous, 2A peak
ADC 16-bit, battery voltage + current inputs
Stack pattern 20 × 20 mm or 30.5 × 30.5 mm
Mass 12 g
Firmware Betaflight (target: MATEKH743SLIM)

Critical first-time configuration

  1. Flash correct Betaflight target: MATEKH743SLIM
  2. Set motor count: 4
  3. Set motor protocol: DShot600, bidirectional DShot enabled
  4. Set motor poles: 14 (BrotherHobby 2507)
  5. Assign UARTs per table above
  6. Enable RPM filter, 3 harmonics
  7. Enable GPS, configure M10Q: UBX, 57,600 baud, Galileo + GPS + BeiDou

Procedure

FC mounting

  1. Mount FC on 30.5 mm stack pattern with M3 nylon standoffs (7 mm height). Nylon standoffs isolate the FC from the ESC PCB — breaking the direct vibration conduction path through metal.
  2. Verify FC orientation matches Betaflight configuration. The arrow on the H7A3-SLIM must point forward, or FC orientation must be set in Betaflight to match the actual mounting direction.
  3. Do not overtighten mounting screws — finger tight plus 1/4 turn. Overtorquing deforms the FC PCB and defeats the PCB moat isolation.

Rationale

Why Betaflight on Agile, ArduPilot on Cinematic

Both run on the same H7A3-SLIM hardware — the firmware choice is a reflash, not a hardware decision. Agile (3", practice/play platform) runs Betaflight for its 8 kHz PID loop, RPM filter, and aggressive manual tuning community. Cinematic (6", ArduPilot) is flown manually day to day too, the same as Betaflight — but ArduPilot adds GPS-guided planning and full telemetry as an option, which is the actual reason for the choice, not autonomous-mission requirements. See ardupilot-copter for the fuller argument.


Connections

requires: [] related: - imu-gyroscope - rpm-filter - dshot-protocol - closed-loop-control - pid-loop-rate leads_to: - imu-gyroscope - gnss-gps - pid-loop-rate