Skip to main content

Module 7 — Flight controller hardware & firmware

One 30×30 mm board is an IMU lab, a router for five serial ports, a power supply and a real-time computer. Choosing and understanding it well makes every later module easier.

🟢 Foundations. A flight controller is a microcontroller (usually STM32 F4 / F7 / H7 — roughly: fine / roomy / future-proof) plus a gyro/IMU on SPI, UART serial ports for receiver, GPS, VTX telemetry, motor outputs to the ESC, voltage/current sensing, a BEC (onboard regulator), and flash or SD for blackbox logs. Mounting patterns: 30.5×30.5, 25.5×25.5, 20×20 mm. Firmware families and their souls: Betaflight (acro performance), INAV (navigation for planes + copters), ArduPilot (full autonomy, scripting, every vehicle type), PX4 (research standard).

🟡 Practitioner. Learn the practical rituals: flashing via DFU mode, what a firmware target is (the board-specific pin map), resource remapping, checking gyro orientation after mounting the FC rotated, and reading a board's pinout diagram as a wiring contract. Count UARTs before buying: receiver + GPS + DJI/VTX + spare ≥ 4. For ArduPilot/INAV navigation builds, H7-class boards (e.g., H743) with many UARTs and servo-capable outputs are the safe choice.

🔴 Advanced. Inside the firmware, timing is everything. Betaflight runs a hand-scheduled superloop — gyro read → filters → PID → mixer → DShot out — at up to 8 kHz, where jitter matters as much as speed. ArduPilot/PX4 run on an RTOS (ChibiOS/NuttX) with prioritized threads. Understand interrupts vs polling, why the gyro uses SPI-plus-DMA, and what "scheduler overload" in a log means. Read your board's schematic: which pads share timers (DShot conflicts), which BEC feeds what.

⚫ Master. Board bring-up: take an unsupported STM32 board, write or adapt a target (pin definitions, DMA streams, clock tree), debug over SWD with an ST-Link and live watch, and upstream the target. You can also evaluate exotic hardware (external high-precision IMUs, CAN peripherals, redundant sensors) and argue costs/benefits from datasheets.

Mastery checklist

  • From a bare pinout PDF, produce a full wiring plan for RX + GPS + digital VTX + 2 servos with zero conflicts.
  • Explain the path of one gyro sample from silicon to motor command, naming each buffer.
  • Flash, configure and blackbox-verify a new board without a video tutorial.

🖼️ Image ideas: your own labeled macro photo of an FC (gyro, MCU, BEC, pads); simple block diagram (Mermaid below covers it).

📚 Free resources: Betaflight/ArduPilot/PX4/INAV official docs; STM32 reference manuals (free from ST); board manufacturers' schematics.