esp32.diy

Flix: Build an Open-Source ESP32 Quadcopter from Scratch

Oct 11, 2026 · 5 min read

Advanced 2.2k stars 339 forks C++ No license Updated 2026-09-30

Flix version 1.1 with 3D-printed frame

TL;DR Flix is an open-source ESP32-based quadcopter built from general-purpose components, designed for education and research with under 2,000 lines of Arduino firmware. It communicates via MAVLink over Wi-Fi or ESP-NOW and can be controlled by a USB gamepad, RC transmitter, or smartphone.
What you need
  • ESP32 Mini
  • ESP32-S3
  • ESP32-C3
  • GY-91 (MPU-9265 / MPU-9250 / MPU-6500)
  • ICM20948V2 (ICM-20948)
  • GY-521 (MPU-6050)
  • 8520 3.7V brushed motor
  • UMW 100N03A MOSFET
  • 3.7V Li-Po battery
  • BetaFPV LiteRadio CC2500
  • DF500 RC receiver (optional)
  • 5V boost converter (optional)
BoardESP32 Mini (ESP32-S3 / ESP32-C3 also supported)
FrameworkArduino
LanguageC++
ProtocolMAVLink over Wi-Fi or ESP-NOW
Latest Releasev1.5 (2026-05-17)
Firmware SizeUnder 2,000 lines

What You Will Build

Flix (short for flight + X) is a fully open-source quadcopter built around the ESP32 microcontroller. Every part of the stack is yours to read, modify, and learn from: the frame is 3D-printed, the electronics are off-the-shelf, and the flight controller firmware is a clean Arduino project under 2,000 lines of C++.

The project is designed explicitly for education and research. That focus shows in the decisions made throughout: standard SPI IMU breakout boards instead of custom silicon, MAVLink telemetry so you can use standard ground-control software, and a companion Gazebo simulation that runs the exact same firmware code before you ever power real motors. A Python library lets you script autonomous maneuvers once the quad is flying. If you want to understand how a flight controller actually works — PID loops, motor mixing, sensor fusion — Flix gives you a readable, flying reference implementation.

Flix version 0 prototype quadcopter\2
Flix version 0 prototype quadcopter
Demo flight video of Flix in action\2
Demo flight video of Flix in action
Gazebo simulator running the original Flix Arduino firmware\2
Gazebo simulator running the original Flix Arduino firmware
ESP32 Mini microcontroller board used in Flix\2
ESP32 Mini microcontroller board used in Flix

What You Need

Microcontroller

IMU board (choose one)

Motors and propulsion

Power and switching

Frame (3D-printed)

Control

Other

Tools required

Typical use cases

Flight Control Education

Flix is built for learning. The firmware is under 2,000 lines of readable C++, covering sensor fusion, PID attitude control, and motor mixing — everything a student needs to understand how a real flight controller works.

Autonomous Flight Scripting

The Python library communicates with the drone over Wi-Fi using MAVLink, letting you write scripts that command takeoff, waypoints, and landing without touching the firmware.

RC and Gamepad Flying

Fly with a CC2500 RC transmitter, a USB gamepad connected via Wi-Fi, or a smartphone — the control interface is flexible enough to suit different operator preferences and available hardware.

Simulation-First Development

The Gazebo simulator runs the identical Arduino firmware code, so you can iterate on PID tuning and new features in software before risking hardware on an untested change.

How the Firmware Works

The firmware runs on the Arduino framework. On every control loop iteration it reads the IMU over SPI (VSPI peripheral), runs sensor fusion to estimate attitude, and feeds the result into a PID controller that computes per-motor throttle values. Those values drive four MOSFETs — one per brushed motor — through standard PWM-capable GPIO pins.

Communication is handled with MAVLink, the same protocol used by ArduPilot and PX4. Telemetry travels over Wi-Fi or ESP-NOW, which means you can connect QGroundControl or a custom Python script without any additional hardware. A wireless command-line interface lets you tune parameters and read logs in real time.

The Gazebo simulator compiles and runs the identical Arduino source code in a software-in-the-loop environment. You can tune PIDs and test code changes in simulation before flashing to hardware — a significant safety net when you are still learning.

Wiring and Assembly

Follow the official assembly instructions alongside the simplified connection diagram in the repository. The key connections are summarised below.

IMU to ESP32 Mini (VSPI)

IMU pin ESP32 pin
GND GND
3.3V 3.3V
SCL (SCK) GPIO18
SDA (MOSI) GPIO23
SAO (MISO) GPIO19
NCS GPIO5

Motors via MOSFETs

Motor Position Direction GPIO
Motor 0 Rear left Counter-clockwise GPIO12
Motor 1 Rear right Clockwise GPIO13
Motor 2 Front right Counter-clockwise GPIO14
Motor 3 Front left Clockwise GPIO15

Solder a 10 kΩ pull-down resistor to each MOSFET gate. Clockwise motors have blue and red wires and use type-A propellers; counter-clockwise motors have black and white wires and use type-B propellers.

RC receiver (optional)

Receiver pin ESP32 pin
GND GND
VIN VCC or 3.3V (check receiver spec)
Signal TX GPIO4

Battery voltage monitor (optional) Connect a voltage divider to GPIO32 on ESP32 or GPIO3 on ESP32-S3. The ESP32 ADC measures up to 3.1 V and the ESP32-S3/C3 up to 2.5 V — size your divider resistors accordingly.

Power the ESP32 Mini directly from the Li-Po battery via the VCC (+) and GND (−) pins.

Flashing and First Flight

The project uses the Arduino framework, so you can build and flash it from the Arduino IDE or from the command line. Detailed build, setup and calibration steps are documented in docs/usage.md in the repository — follow that guide for the exact sequence of steps.

Before flying, work through the simulator first. The Gazebo simulation runs the original firmware code and lets you verify PID response and control inputs safely. Instructions are in gazebo/README.md.

Once the firmware is on the board, connect via Wi-Fi and use the wireless CLI to check IMU readings, calibrate sensors, and verify motor spin direction before attempting a real hover. The README explicitly warns that assembly and setup are not trivial — take your time with each step and use the troubleshooting guide when something does not behave as expected.

Ideas to Extend It and Known Limitations

What you can build on

Current limitations

Verdict

Flix is one of the most complete open-source ESP32 drone projects available: it covers hardware design, firmware, simulation, and scripting in a single repository with active maintenance and a real community. The difficulty is genuinely high — you need soldering skills, a 3D printer, and patience during calibration — but the payoff is a flying platform you understand end to end. If you want to learn flight control theory by building something that actually leaves the ground, Flix is the right starting point.

Sources

github.comokalachev/flix — repository & README t.meOfficial website

Facts in this article come from the project's public README and GitHub metadata at the time of writing. Images belong to their respective owners and link back to the original source.