flix-esp-quad

0

Описание

Квадрокоптер на базе ESP-32. ( Making an ESP32-based quadcopter from scratch ). форк

Языки

  • C++71,8%
  • Python25,4%
  • CMake1,5%
  • Makefile1,3%
README.md

Flix

Flix (flight + X) — open source ESP32-based quadcopter made from scratch.

Version 1.1 (3D-printed frame)Version 0
Flix quadcopterFlix quadcopter

Features

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

¹ — planned.

It actually flies

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

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

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

See the user builds gallery:

Simulation

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

Flix simulator

Documentation

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

Additional articles:

Components

TypePartImageQuantity
Microcontroller boardESP32 Mini1
IMU (and barometer¹) boardGY‑91, MPU-9265 (or other MPU‑9250/MPU‑6500 board)
ICM20948V2 (ICM‑20948)³
GY-521 (MPU-6050)³⁻¹


1
Boost converter (optional, for more stable power supply)5V output1
Motor8520 3.7V brushed motor.
Motor with exact 3.7V voltage is needed, not ranged working voltage (3.7V — 6V).
Make sure the motor shaft diameter and propeller hole diameter match!
4
Propeller55 mm (alternatively 65 mm)4
MOSFET (transistor)100N03A or analog4
Pull-down resistor10 kΩ4
3.7V Li-Po batteryLW 952540 (or any compatible by the size)1
Battery connector cableMX2.0 2P female1
Li-Po Battery chargerAny1
Screws for IMU board mountingM3x52
Screws for frame assemblyM1.4x54
Frame main part3D printed²:
stl
step

Recommended settings: layer 0.2 mm, line 0.4 mm, infill 100%.
1
Frame top part3D printed:
stl
step
1
Washer for IMU board mounting3D printed:
stl
step
2
Controller (recommended)CC2500 transmitter, like BetaFPV LiteRadio CC2500 (RC receiver/Wi-Fi).
Two-sticks gamepad (Wi-Fi only) — see recommended gamepads.
Other⁵
1
RC receiver (optional)DF500 or other³1
Wires28 AWG recommended
Tape, double-sided tape

¹ — barometer is not used for now.
² — this frame is optimized for GY-91 board, if using other, the board mount holes positions should be modified.
³ — 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

Flix version 1 schematics

(Dashed elements are optional).

Motor connection scheme:

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¹

¹ — UART2 RX pin was changed to GPIO4 in Arduino ESP32 core 3.0.

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!