Flight Controller & Hardware nRF52840 · EMBASSY ASYNC RUST · 25.5mm × 25.5mm CARRIER

Flight avionics for sub-250g wings.

WingFC pairs high-rate, bare-metal Rust flight software (wingfc-rs) with an ultra-compact 25.5 × 25.5 mm carrier board (wingfc-hardware) hosting the Seeed XIAO nRF52840 Sense. Built for acrobatic fixed wings and autonomous UAVs requiring hard real-time determinism and lightweight integration.

Flight Software (wingfc-rs) Carrier Board Design Pinout Matrix
Autonomous Flight Software

wingfc-rs

v0.4.0

A deterministic, zero-heap #![no_std] flight controller built on the Embassy cooperative async runtime for Nordic nRF52840 (ARM Cortex-M4F @ 64 MHz with single-cycle FPU).

Control Loop Rate 416 Hz / 833 Hz (DRDY Hardware Sync)
Attitude Fusion Madgwick Quaternion AHRS (6-DoF & 9-DoF)
Navigation & Safety Kalman Alt-Hold · GPS RTH · 120m Ceiling
Configuration Single Human-Readable wingfc.yaml File
Telemetry Downlink CRSF / ExpressLRS & FlySky i-BUS Protocol
View on GitHub ↗ Quick Start (UF2)
Custom Carrier Board

wingfc-hardware

KiCad 8/9

A 4-layer PCB carrier board designed to host the Seeed Studio XIAO nRF52840 Sense Plus and break out all power regulation, actuation headers, and serial sockets.

Mounting Pattern 25.5 × 25.5 mm Whoop (M2 Vibration-Isolated)
Actuator Headers 10 Channels (2× ESC DShot/PWM · 8× Servo)
Power Regulation 5V / 2A Synchronous Buck BEC (2S–6S LiPo)
Sensor Suite Onboard DPS310 Barometer (Secondary I2C)
Socket IO JST-SH 1.0mm (Dedicated RC & GPS / Compass)
Hardware Repo ↗ View Pinout
Hardware Architecture

3D Board Gallery & Physical Layout

Engineered for clean airflow, recessed USB-C access, and tight fuselage bays.

WingFC Carrier Board Isometric 3D View
Isometric View
Host Seeed XIAO Sense Plus with 10 actuator outputs and forward USB-C.
WingFC Carrier Board Top View
Top Layer View
JST-SH RC & GPS flank sockets with onboard DPS310 barometer.
WingFC Carrier Board Bottom View
Bottom Power Plane
Synchronous 5V 2A BEC and 2S–6S TVS protection.
Carrier Interface

Pinout & Hardware Allocation Matrix

Mapped directly between the Seeed Studio XIAO nRF52840 Sense Plus and carrier headers.

ESC 1 / Motor 1
PWM0 Ch 0 (P0.29 / D3)
Analog PWM (50–400 Hz) or DShot digital motor protocol
ESC 2 / Motor 2
PWM0 Ch 1 (P1.13 / D8)
Twin motor configurations, differential thrust yaw control
Servos 1 & 2 (Primary Elevons)
PWM1 Ch 0 & 1 (P0.02 / D0 & P0.03 / D1)
High-rate 50–400 Hz servo pulses for left/right elevons or ailerons
Servos 3 & 4 (Rudder / Flaps)
PWM1 Ch 2 & 3 (P0.28 / D2 & P1.14 / D9)
V-tail rudders, outboard flaps, or crow braking actuators
Servos 5 to 8 (Aux / Pan-Tilt)
PWM2 Ch 0–3 (P1.15, P0.15, P0.19, P1.01)
Auxiliary channels: FPV pan/tilt camera gimbals, landing gear, payload drops
RC Receiver (J_RC Socket)
UARTE0 (P1.11 Tx / P1.12 Rx)
Bidirectional CRSF / ExpressLRS @ 420 kBaud or FlySky i-BUS @ 115.2 kBaud
GPS & Compass (J_GPS Socket)
UARTE1 (P0.09 / P0.10) + TWISPI1 (P0.04 / P0.05)
NMEA GPS @ 115.2 kBaud + external I2C magnetic compass (QMC5883L)
Battery Telemetry
SAADC AIN7 (P0.31 / D16)
11:1 precision voltage divider with 100nF filtering for 2S–6S LiPo monitoring
Quick Start

Flashing & Configuration Workflow

Deploy firmware without setting up complex toolchains using the built-in USB UF2 drag-and-drop bootloader.

1. USB Drag-and-Drop (UF2 Bootloader)

1. Double-tap the tiny reset button on the Seeed Studio XIAO nRF52840 Sense Plus.
2. The board enumerates as a USB mass storage drive named XIAO-SENSE.
3. Copy the compiled wingfc-firmware.uf2 file directly onto the drive:

BASH
cp dist/wingfc-firmware.uf2 /media/$USER/XIAO-SENSE/

2. Plain-Text Aircraft Configuration (wingfc.yaml)

Adjust airframe mixers, rates, PIDs, and autonomous safety ceilings in a single human-readable file:

wingfc.yaml (Sample)
board: xiao-sense-plus       # Extra UART for GPS navigation
orientation: default         # IMU mounting orientation
airframe: elevon             # Flying wing elevon differential mixing
loop_rate: high              # 833 Hz hardware DRDY sync (standard: 416 Hz)

receiver:
  protocol: crsf             # TBS Crossfire / ExpressLRS @ 420 kBaud
  failsafe_timeout_ms: 500

safety:
  arm_switch_threshold_us: 1800
  throttle_zero_threshold_us: 1050

servos:
  pwm_frequency_hz: 400      # 50 Hz analog / up to 400 Hz digital

motor:
  protocol: pwm              # Standard PWM (50–400 Hz) or DShot

navigation:
  enabled: true
  barometer: true            # Vertical Kalman filter altitude fusion
  gps: true                  # GPS navigation & Return-to-Home (RTH)
  max_ceiling_agl_m: 120.0   # Statutory 120m (400 ft) AGL ceiling