{"id":21566600,"url":"https://github.com/okalachev/flix","last_synced_at":"2025-05-15T23:07:42.378Z","repository":{"id":213263426,"uuid":"293365149","full_name":"okalachev/flix","owner":"okalachev","description":"Making an ESP32-based quadcopter from scratch","archived":false,"fork":false,"pushed_at":"2025-05-15T06:22:21.000Z","size":18152,"stargazers_count":467,"open_issues_count":1,"forks_count":75,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-05-15T07:26:48.608Z","etag":null,"topics":["arduino","autopilot","control-theory","drone","esp32","flight-control","flight-controller","mavlink","quadcopter","quadcopter-firmware","uav"],"latest_commit_sha":null,"homepage":"https://t.me/opensourcequadcopter","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/okalachev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-09-06T21:33:57.000Z","updated_at":"2025-05-15T06:22:25.000Z","dependencies_parsed_at":"2024-03-23T07:29:15.844Z","dependency_job_id":"0c7a8986-3340-4889-bb65-7b8f7c2376b5","html_url":"https://github.com/okalachev/flix","commit_stats":null,"previous_names":["okalachev/flix"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okalachev%2Fflix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okalachev%2Fflix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okalachev%2Fflix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okalachev%2Fflix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/okalachev","download_url":"https://codeload.github.com/okalachev/flix/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254436949,"owners_count":22070947,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino","autopilot","control-theory","drone","esp32","flight-control","flight-controller","mavlink","quadcopter","quadcopter-firmware","uav"],"created_at":"2024-11-24T10:25:39.441Z","updated_at":"2025-05-15T23:07:36.842Z","avatar_url":"https://github.com/okalachev.png","language":"C++","funding_links":[],"categories":["Projects"],"sub_categories":["Drones \u0026 UAV"],"readme":"# Flix\n\n**Flix** (*flight + X*) — making an open source ESP32-based quadcopter from scratch.\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=center\u003e\u003cstrong\u003eVersion 1.1\u003c/strong\u003e (3D-printed frame)\u003c/td\u003e\n    \u003ctd align=center\u003e\u003cstrong\u003eVersion 0\u003c/strong\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cimg src=\"docs/img/flix1.1.jpg\" width=500 alt=\"Flix quadcopter\"\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg src=\"docs/img/flix.jpg\" width=500 alt=\"Flix quadcopter\"\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n## Features\n\n* Simple and clean Arduino based source code.\n* Acro and Stabilized flight using remote control.\n* Precise simulation using Gazebo.\n* [In-RAM logging](docs/log.md).\n* Command line interface through USB port.\n* Wi-Fi support.\n* MAVLink support.\n* Control using mobile phone (with QGroundControl app).\n* Completely 3D-printed frame.\n* Textbook for students on writing a flight controller ([in development](https://quadcopter.dev)).\n* *Position control and autonomous flights using external camera¹*.\n* [Building and running instructions](docs/build.md).\n\n*¹ — planned.*\n\n## It actually flies\n\nSee detailed demo video (for version 0): https://youtu.be/8GzzIQ3C6DQ.\n\n\u003ca href=\"https://youtu.be/8GzzIQ3C6DQ\"\u003e\u003cimg width=500 src=\"https://i3.ytimg.com/vi/8GzzIQ3C6DQ/maxresdefault.jpg\"\u003e\u003c/a\u003e\n\nVersion 1 test flight: https://t.me/opensourcequadcopter/42.\n\n\u003ca href=\"https://t.me/opensourcequadcopter/42\"\u003e\u003cimg width=500 src=\"docs/img/flight-video.jpg\"\u003e\u003c/a\u003e\n\nSee the [user builds gallery](docs/user.md).\n\n\u003ca href=\"docs/user.md\"\u003e\u003cimg src=\"docs/img/user/user.jpg\" width=400\u003e\u003c/a\u003e\n\n## Simulation\n\nThe simulator is implemented using Gazebo and runs the original Arduino code:\n\n\u003cimg src=\"docs/img/simulator.png\" width=500 alt=\"Flix simulator\"\u003e\n\nSee [instructions on running the simulation](docs/build.md).\n\n## Components (version 1)\n\n|Type|Part|Image|Quantity|\n|-|-|:-:|:-:|\n|Microcontroller board|ESP32 Mini|\u003cimg src=\"docs/img/esp32.jpg\" width=100\u003e|1|\n|IMU (and barometer²) board|GY‑91, MPU-9265 (or other MPU‑9250/MPU‑6500 board), ICM‑20948³|\u003cimg src=\"docs/img/gy-91.jpg\" width=90 align=center\u003e\u003cimg src=\"docs/img/icm-20948.jpg\" width=100\u003e|1|\n|Motor|8520 3.7V brushed motor (shaft 0.8mm).\u003cbr\u003eMotor with exact 3.7V voltage is needed, not ranged working voltage (3.7V — 6V).|\u003cimg src=\"docs/img/motor.jpeg\" width=100\u003e|4|\n|Propeller|Hubsan 55 mm|\u003cimg src=\"docs/img/prop.jpg\" width=100\u003e|4|\n|MOSFET (transistor)|100N03A or [analog](https://t.me/opensourcequadcopter/33)|\u003cimg src=\"docs/img/100n03a.jpg\" width=100\u003e|4|\n|Pull-down resistor|10 kΩ|\u003cimg src=\"docs/img/resistor10k.jpg\" width=100\u003e|4|\n|3.7V Li-Po battery|LW 952540 (or any compatible by the size)|\u003cimg src=\"docs/img/battery.jpg\" width=100\u003e|1|\n|Battery connector cable|MX2.0 2P female|\u003cimg src=\"docs/img/mx.png\" width=100\u003e|1|\n|Li-Po Battery charger|Any|\u003cimg src=\"docs/img/charger.jpg\" width=100\u003e|1|\n|Screws for IMU board mounting|M3x5|\u003cimg src=\"docs/img/screw-m3.jpg\" width=100\u003e|2|\n|Screws for frame assembly|M1.4x5|\u003cimg src=\"docs/img/screw-m1.4.jpg\" height=30 align=center\u003e|4|\n|Frame bottom part|3D printed⁴:\u003cbr\u003e[`flix-frame-1.1.stl`](docs/assets/flix-frame-1.1.stl) [`flix-frame-1.1.step`](docs/assets/flix-frame-1.1.step)|\u003cimg src=\"docs/img/frame1.jpg\" width=100\u003e|1|\n|Frame top part|3D printed:\u003cbr\u003e[`esp32-holder.stl`](docs/assets/esp32-holder.stl) [`esp32-holder.step`](docs/assets/esp32-holder.step)|\u003cimg src=\"docs/img/esp32-holder.jpg\" width=100\u003e|1|\n|Washer for IMU board mounting|3D printed:\u003cbr\u003e[`washer-m3.stl`](docs/assets/washer-m3.stl) [`washer-m3.step`](docs/assets/washer-m3.step)|\u003cimg src=\"docs/img/washer-m3.jpg\" width=100\u003e|2|\n|*RC transmitter (optional)*|*KINGKONG TINY X8 (warning: lacks USB support) or other⁵*|\u003cimg src=\"docs/img/tx.jpg\" width=100\u003e|1|\n|*RC receiver (optional)*|*DF500 or other⁵*|\u003cimg src=\"docs/img/rx.jpg\" width=100\u003e|1|\n|Wires|28 AWG recommended|\u003cimg src=\"docs/img/wire-28awg.jpg\" width=100\u003e||\n|Tape, double-sided tape||||\n\n*² — barometer is not used for now.*\u003cbr\u003e\n*³ — change `MPU9250` to `ICM20948` in `imu.ino` file if using ICM-20948 board.*\u003cbr\u003e\n*⁴ — this frame is optimized for GY-91 board, if using other, the board mount holes positions should be modified.*\u003cbr\u003e\n*⁵ — you may use any transmitter-receiver pair with SBUS interface.*\n\nTools required for assembly:\n\n* 3D printer.\n* Soldering iron.\n* Solder wire (with flux).\n* Screwdrivers.\n* Multimeter.\n\nFeel free to modify the design and or code, and create your own improved versions of Flix! Send your results to the [official Telegram chat](https://t.me/opensourcequadcopterchat), or directly to the author ([E-mail](mailto:okalachev@gmail.com), [Telegram](https://t.me/okalachev)).\n\n## Schematics (version 1)\n\n### Simplified connection diagram\n\n\u003cimg src=\"docs/img/schematics1.svg\" width=800 alt=\"Flix version 1 schematics\"\u003e\n\nMotor connection scheme:\n\n\u003cimg src=\"docs/img/mosfet-connection.png\" height=400 alt=\"MOSFET connection scheme\"\u003e\n\nYou can see a user-contributed [variant of complete circuit diagram](https://miro.com/app/board/uXjVN-dTjoo=/?moveToWidget=3458764612338222067\u0026cot=14) of the drone.\n\nSee [assembly guide](docs/assembly.md) for instructions on assembling the drone.\n\n### Notes\n\n* Power ESP32 Mini with Li-Po battery using VCC (+) and GND (-) pins.\n* Connect the IMU board to the ESP32 Mini using VSPI, power it using 3.3V and GND pins:\n\n  |IMU pin|ESP32 pin|\n  |-|-|\n  |GND|GND|\n  |3.3V|3.3V|\n  |SCL *(SCK)*|SVP (GPIO18)|\n  |SDA *(MOSI)*|GPIO23|\n  |SAO *(MISO)*|GPIO19|\n  |NCS|GPIO5|\n\n* Solder pull-down resistors to the MOSFETs.\n* Connect the motors to the ESP32 Mini using MOSFETs, by following scheme:\n\n  |Motor|Position|Direction|Wires|GPIO|\n  |-|-|-|-|-|\n  |Motor 0|Rear left|Counter-clockwise|Black \u0026 White|GPIO12 (*TDI*)|\n  |Motor 1|Rear right|Clockwise|Blue \u0026 Red|GPIO13 (*TCK*)|\n  |Motor 2|Front right|Counter-clockwise|Black \u0026 White|GPIO14 (*TMS*)|\n  |Motor 3|Front left|Clockwise|Blue \u0026 Red|GPIO15 (*TD0*)|\n\n  Counter-clockwise motors have black and white wires and clockwise motors have blue and red wires.\n\n* Optionally connect the RC receiver to the ESP32's UART2:\n\n  |Receiver pin|ESP32 pin|\n  |-|-|\n  |GND|GND|\n  |VIN|VCC (or 3.3V depending on the receiver)|\n  |Signal (TX)|GPIO4⁶|\n\n*⁶ — UART2 RX pin was [changed](https://docs.espressif.com/projects/arduino-esp32/en/latest/migration_guides/2.x_to_3.0.html#id14) to GPIO4 in Arduino ESP32 core 3.0.*\n\n### IMU placement\n\nDefault IMU orientation in the code is **LFD** (Left-Forward-Down):\n\n\u003cimg src=\"docs/img/gy91-lfd.svg\" width=400 alt=\"GY-91 axes\"\u003e\n\nIn case of using other IMU orientation, modify the `rotateIMU` function in the `imu.ino` file.\n\nSee [FlixPeriph documentation](https://github.com/okalachev/flixperiph?tab=readme-ov-file#imu-axes-orientation) to learn axis orientation of other IMU boards.\n\n## Version 0\n\nSee the information on the obsolete version 0 in the [corresponding article](docs/version0.md).\n\n## Materials\n\nSubscribe to the Telegram channel on developing the drone and the flight controller (in Russian): https://t.me/opensourcequadcopter.\n\nJoin the official Telegram chat: https://t.me/opensourcequadcopterchat.\n\nDetailed article on Habr.com about the development of the drone (in Russian): https://habr.com/ru/articles/814127/.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fokalachev%2Fflix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fokalachev%2Fflix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fokalachev%2Fflix/lists"}