Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Making an ESP32-based quadcopter from scratch

NotificationsYou must be signed in to change notification settings

okalachev/flix

Repository files navigation

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

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

Features

  • Simple and clean Arduino based source code.
  • Acro and Stabilized flight using remote control.
  • Precise simulation using Gazebo.
  • In-RAM logging.
  • Command line interface through USB port.
  • Wi-Fi support.
  • MAVLink support.
  • Control using mobile phone (with QGroundControl app).
  • Completely 3D-printed frame.
  • Textbook for students on writing a flight controller (in development).
  • Position control and autonomous flights using external camera¹.
  • Building and running instructions.

¹ — planned.

It actually flies

See detailed demo video (for version 0):https://youtu.be/8GzzIQ3C6DQ.

Version 1 test flight:https://t.me/opensourcequadcopter/42.

See theuser builds gallery.

Simulation

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

Flix simulator

Seeinstructions on running the simulation.

Components (version 1)

TypePartImageQuantity
Microcontroller boardESP32 Mini1
IMU (and barometer²) boardGY‑91, MPU-9265 (or other MPU‑9250/MPU‑6500 board), ICM‑20948³1
Motor8520 3.7V brushed motor (shaft 0.8mm).
Motor with exact 3.7V voltage is needed, not ranged working voltage (3.7V — 6V).
4
PropellerHubsan 55 mm4
MOSFET (transistor)100N03A oranalog4
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 bottom part3D printed⁴:
flix-frame-1.1.stlflix-frame-1.1.step
1
Frame top part3D printed:
esp32-holder.stlesp32-holder.step
1
Washer for IMU board mounting3D printed:
washer-m3.stlwasher-m3.step
2
RC transmitter (optional)KINGKONG TINY X8 (warning: lacks USB support) or other⁵1
RC receiver (optional)DF500 or other⁵1
Wires28 AWG recommended
Tape, double-sided tape

² — barometer is not used for now.
³ — changeMPU9250 toICM20948 inimu.ino file if using ICM-20948 board.
⁴ — this frame is optimized for GY-91 board, if using other, the board mount holes positions should be modified.
⁵ — you 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 of Flix! Send your results to theofficial Telegram chat, or directly to the author (E-mail,Telegram).

Schematics (version 1)

Simplified connection diagram

Flix version 1 schematics

Motor connection scheme:

MOSFET connection scheme

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

Seeassembly guide for instructions on assembling 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:

    MotorPositionDirectionWiresGPIO
    Motor 0Rear leftCounter-clockwiseBlack & WhiteGPIO12 (TDI)
    Motor 1Rear rightClockwiseBlue & RedGPIO13 (TCK)
    Motor 2Front rightCounter-clockwiseBlack & WhiteGPIO14 (TMS)
    Motor 3Front leftClockwiseBlue & RedGPIO15 (TD0)

    Counter-clockwise motors have black and white wires and clockwise motors have blue and red wires.

  • 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 waschanged to GPIO4 in Arduino ESP32 core 3.0.

IMU placement

Default IMU orientation in the code isLFD (Left-Forward-Down):

GY-91 axes

In case of using other IMU orientation, modify therotateIMU function in theimu.ino file.

SeeFlixPeriph documentation to learn axis orientation of other IMU boards.

Version 0

See the information on the obsolete version 0 in thecorresponding article.

Materials

Subscribe to the Telegram channel on developing the drone and the flight controller (in Russian):https://t.me/opensourcequadcopter.

Join the official Telegram chat:https://t.me/opensourcequadcopterchat.

Detailed article on Habr.com about the development of the drone (in Russian):https://habr.com/ru/articles/814127/.


[8]ページ先頭

©2009-2025 Movatter.jp