tbrown@portfolio:~/projects/primary/fixed-wing-drone$ ← ./back
airframe.jpg
The fixed-wing plane sitting on pavement outdoors
flight_test.jpg
The plane flying overhead against a blue sky
hardware: ESP32-S3, custom carrier PCB (flown) and custom v3 PCB (ordered), ICM-20948 IMU, GPS, MS4525DO pitot airspeed sensor
software: C on FreeRTOS (ESP-IDF v5.5), MCPWM RC capture/output, Madgwick AHRS library, hand-written NMEA GPS parser, cascaded PID control, host-side SITL simulators
// what the flight controller does

firmware/

// how the hardware got here

hardware/revisions/

breadboard

bench prototype
retired

ESP32-S3 devkit and standalone sensor modules on a breadboard. Proved out the sensor drivers, RC pulse capture, PWM outputs, and the first control loop before moving to a real board.

First breadboard test of the flight controller

v1 carrier board

first PCB
retired

My first PCB: a carrier board for the ESP32-S3 devkit with nearly the same layout v2 ended up with, moving the breadboard wiring onto real connectors for the servos, ESCs, receiver, and sensors.

Bringing it up turned up a few mistakes. Some connectors had TX and RX swapped, so I bridged them with jumper wires. The airspeed sensor had the wrong connector and only got 3.3V instead of the 5V it needs. Some RC inputs landed on pins that aren't usable on my devkit, and a few silkscreen labels were misprinted. v2 fixed all of it.

v1 carrier PCB on the bench

v2 carrier board

the board that has flown
flown

Carrier board for the ESP32-S3 devkit. Routes the receiver, 6 servo and 2 ESC outputs, and the off-board IMU, GPS, and pitot airspeed sensor to proper connectors.

Splits power into isolated servo and logic rails, so a stalling servo can't brown out the flight controller.

v2 carrier board on the bench with receiver, servos, GPS, and pitot tube

v3 custom board

ordered, not yet flown
ordered

Fully custom board. Primary and backup IMUs onboard over SPI from different manufacturers (ICM-42688-P and BMI088), a DPS368 barometer for altitude, and microSD logging.

Heading moves to an external compass mounted away from the motor and power wiring, and the RC input becomes a serial line for a digital receiver.

3D render of the v3 flight controller PCB in KiCad
// what happened in the air

flight.log

$ cat flight.log
2026-10-10 manual Flew, but with frequent control dropouts. Our receiver drops out briefly at range, and the 200 ms link-loss threshold was treating those gaps as a lost link. Raised it to 1 s.
2026-10-24 manual Clean flight with no false failsafes. The 1 s threshold fixed the dropouts.
2026-10-24 auto: level hold Held level flight for a few hundred feet on its own, using the roll and pitch gains SITL found, with no retuning.
2026-10-24 auto: heading hold Couldn't hold a heading. The magnetometer built into the v2 IMU isn't reliable enough, so heading hold is off until v3's external compass is in.
// what's next

todo.md

  • Extend SITL to the full firmware, with sensor models, mode logic, failsafes, and sensor-fault cases.
  • Bring up and bench test the v3 board.
  • Switch to a digital receiver on v3's serial RC input.
  • Sensor health checks that keep a mode from engaging on bad data.
  • Heading hold and waypoint missions in the air with v3's external compass.
  • Altitude hold with the barometer, then autonomous takeoff and landing.
  • Longer term, coordinated formation flight with a second plane.
electronics_bay.jpg
The plane with its nose removed, showing the v2 flight controller in the electronics bay