GitPedia

Flix

Making an ESP32-based quadcopter from scratch

From okalachev·Updated June 20, 2026·View on GitHub·

Flix (flight + X) — open source ESP32-based quadcopter made from scratch. The project is written primarily in C++, first published in 2020. Key topics include: arduino, autopilot, control-theory, drone, esp32.

Latest release: v1.5
May 17, 2026View Changelog →
<!-- markdownlint-disable MD041 --> <p align="center"> <img src="docs/img/flix.svg" width=180 alt="Flix logo"><br> <b>Flix</b> (<i>flight + X</i>) — open source ESP32-based quadcopter made from scratch. </p> <table> <tr> <td align=center><strong>Version 1.1</strong> (3D-printed frame)</td> <td align=center><strong>Version 0</strong></td> </tr> <tr> <td><img src="docs/img/flix1.1.jpg" width=500 alt="Flix quadcopter"></td> <td><img src="docs/img/flix.jpg" width=500 alt="Flix quadcopter"></td> </tr> </table>

Features

  • Dedicated for education and research.
  • Made from general-purpose components.
  • Simple and clean source code in Arduino (<2k lines firmware).
  • Communication using MAVLink protocol over Wi-Fi or ESP-NOW.
  • Control with USB gamepad, remote control or smartphone.
  • Wireless command line interface and analyzing.
  • Precise simulation with Gazebo.
  • Python library for scripting and automatic flights.
  • Textbook on flight control theory and practice (in development).
  • Position control (planned).

It actually flies

See detailed demo video: https://youtu.be/hT46CZ1CgC4.

<a href="https://youtu.be/hT46CZ1CgC4"><img width=500 src="https://i3.ytimg.com/vi/hT46CZ1CgC4/maxresdefault.jpg"></a>

Version 0 demo video: https://youtu.be/8GzzIQ3C6DQ.

<a href="https://youtu.be/8GzzIQ3C6DQ"><img width=500 src="https://i3.ytimg.com/vi/8GzzIQ3C6DQ/maxresdefault.jpg"></a>

Usage in education (RoboCamp): https://youtu.be/Wd3yaorjTx0.

<a href="https://youtu.be/Wd3yaorjTx0"><img width=500 src="https://i3.ytimg.com/vi/Wd3yaorjTx0/sddefault.jpg"></a>

See the user builds gallery:

<a href="docs/user.md"><img src="docs/img/user/user.jpg" width=500></a>

PCB

The official PCB (Flix2) is in development now. Follow the project's channel to track the progress.

Outdoor flights demo video of the current prototype:

<a href="https://youtu.be/KXlNmvUTi4g"><img width=300 src="https://i3.ytimg.com/vi/KXlNmvUTi4g/maxresdefault.jpg"></a>

Simulation

The simulator is implemented using Gazebo and runs the original Arduino code:

<img src="docs/img/simulator1.png" width=500 alt="Flix simulator">

Documentation articles

  1. Assembly instructions.
  2. Usage: build, setup and flight.
  3. Simulation.
  4. Python library.

Additional articles:

Components

TypePartImageQuantity
Microcontroller boardESP32 Mini.<br>ESP32-S3/ESP32-C3 boards are also supported.<img src="docs/img/esp32.jpg" width=100>1
IMU (and barometer¹) boardGY‑91, MPU-9265 (or other MPU‑9250/MPU‑6500 board)<br>ICM20948V2 (ICM‑20948)<br>GY-521 (MPU-6050)<img src="docs/img/gy-91.jpg" width=90 align=center><br><img src="docs/img/icm-20948.jpg" width=100><br><img src="docs/img/gy-521.jpg" width=100>1
Boost converter (optional, for more stable power supply)5V output<img src="docs/img/buck-boost.jpg" width=100>1
Motor8520 3.7V brushed motor.<br>Motor with exact 3.7V voltage is needed, not ranged working voltage (3.7V — 6V).<br>Make sure the motor shaft diameter and propeller hole diameter match!<img src="docs/img/motor.jpeg" width=100>4
Propeller55 mm or 65 mm<img src="docs/img/prop.jpg" width=100>4
MOSFET (transistor)100N03A or analog<img src="docs/img/100n03a.jpg" width=100>4
Pull-down resistor<br>Voltage measurement resistor10 kΩ<img src="docs/img/resistor10k.jpg" width=100>6
3.7V Li-Po batteryLW 952540 (or any compatible by the size).<br>Make sure the battery has enough discharge rate — 25C or more!<img src="docs/img/battery.jpg" width=100>1
Battery connector cableMX2.0 2P female<img src="docs/img/mx.png" width=100>1
Li-Po Battery chargerAny<img src="docs/img/charger.jpg" width=100>1
Screws for IMU board mountingM3x5<img src="docs/img/screw-m3.jpg" width=100>2
Screws for frame assemblyM1.4x5<img src="docs/img/screw-m1.4.jpg" height=30 align=center>4
Frame main part3D printed²: stl step<br>Recommended settings: layer 0.2 mm, line 0.4 mm, infill 100%.<img src="docs/img/frame1.jpg" width=100>1
Frame top part3D printed: stl step<img src="docs/img/esp32-holder.jpg" width=100>1
Washer for IMU board mounting3D printed: stl step<img src="docs/img/washer-m3.jpg" width=100>2
Controller (recommended)CC2500 transmitter, like BetaFPV LiteRadio CC2500 (RC receiver/Wi-Fi).<br>Two-sticks gamepad (Wi-Fi only) — see recommended gamepads.<br>Other⁵<img src="docs/img/betafpv.jpg" width=100><img src="docs/img/logitech.jpg" width=80>1
RC receiver (optional)DF500 or other³<img src="docs/img/rx.jpg" width=100>1
Wires28 AWG recommended<img src="docs/img/wire-28awg.jpg" width=100>
Tape, double-sided tape

¹ — barometer is not used for now.<br>
² — this frame is optimized for GY-91 board, if using other, the board mount holes positions should be modified.<br>
³ — you also may use any transmitter-receiver pair with SBUS interface.

Tools required for assembly:

  • 3D printer.
  • Soldering iron.
  • Solder wire (with flux).
  • Screwdrivers.
  • Multimeter.

Feel free to modify the design and or code, and create your own improved versions. Send your results to the official Telegram chat, or directly to the author (E-mail, Telegram).

Schematics

Simplified connection diagram

<img src="docs/img/schematics1.svg" width=700 alt="Flix version 1 schematics">

(Dashed elements are optional).

Motor connection scheme:

<img src="docs/img/mosfet-connection.png" height=400 alt="MOSFET connection scheme">

You can see a user-contributed variant of complete circuit diagram of the drone.

Notes

  • Power ESP32 Mini with Li-Po battery using VCC (+) and GND (-) pins.

  • Connect the IMU board to the ESP32 Mini using VSPI, power it using 3.3V and GND pins:

    IMU pinESP32 pin
    GNDGND
    3.3V3.3V
    SCL (SCK)SVP (GPIO18)
    SDA (MOSI)GPIO23
    SAO (MISO)GPIO19
    NCSGPIO5
  • Solder pull-down resistors to the MOSFETs.

  • Connect the motors to the ESP32 Mini using MOSFETs, by following scheme:

    MotorPositionDirectionProp typeMotor wiresGPIO
    Motor 0Rear leftCounter-clockwiseBBlack & WhiteGPIO12 (TDI)
    Motor 1Rear rightClockwiseABlue & RedGPIO13 (TCK)
    Motor 2Front rightCounter-clockwiseBBlack & WhiteGPIO14 (TMS)
    Motor 3Front leftClockwiseABlue & RedGPIO15 (TD0)

    Clockwise motors have blue & red wires and correspond to propeller type A (marked on the propeller).
    Counter-clockwise motors have black & white wires correspond to propeller type B.

  • Optionally connect the RC receiver to the ESP32's UART2:

    Receiver pinESP32 pin
    GNDGND
    VINVCC (or 3.3V depending on the receiver)
    Signal (TX)GPIO4
  • Optionally connect the battery voltage divider for voltage monitoring to any ADC1 pin (e. g. GPIO32 on ESP32, GPIO3 on ESP32-S3).

    ESP32 and ESP32-S3 can measure up to 3.1 V and ESP32-S3/ESP32-C3 can measure up to 2.5 V, so choose the voltage divider resistors accordingly.

Resources

Disclaimer

This is a DIY project, and I hope you find it interesting and useful. However, it's not easy to assemble and set up, and it's provided "as is" without any warranties. There's no guarantee that it will work perfectly, or even work at all.

⚠️ The author is not responsible for any damage, injury, or loss resulting from the use of this project. Use at your own risk!

Contributors

Showing top 4 contributors by commit count.

View all contributors on GitHub →

This article is auto-generated from okalachev/flix via the GitHub API.Last fetched: 6/21/2026