Skip to the content
2 layers60.5 × 63.5 mmEsp32-flight controller, the printed circuit board in 3D

This project presents a basic custom flight controller that is based on the ESP32 and MPU6050 IMU chip. The project reads data from the sensors, uses PID control to stabilize the drone, and drives four motors through…

Size
60.5 × 63.5 mm
Copper layers
2
Thickness
1.6 mm
Parts
10
Nets
39
Pads
72
Tracks, vias
149, 11
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
16 Apr 2026
Updated
10 Jun 2026

Overview

Esp32-flight controller is an open-source printed circuit board by AYUSH-pro-grammer, from the AYUSH-pro-grammer/esp32-flight-controller repository on GitHub. It is a 2-layer board of 60.5 × 63.5 mm with 10 parts on 39 nets, routed with 149 tracks and 11 vias.

It is built around the MPU-6050. Its parts include 6 connectors, 2 ICs, 1 resistor and 1 diode. It belongs with the robots and motor control boards and the ESP32 boards of this library.

Main components

1

README

README.md

ESP32 Flight Controller (Custom PCB)

Description

This project presents a basic custom flight controller that is based on the ESP32 and MPU6050 IMU chip. The project reads data from the sensors, uses PID control to stabilize the drone, and drives four motors through electronic speed controllers (ESC).

How PCB will look

PCB Image image

kicad schematic

Schematic

The repository contains:

  • Code for the flight controller
  • Code for IMU calibration
  • Files with PCB design (KiCad)
  • Gerber files for board manufacture

Project Directory Structure

text
flight-controller-code/
├── flightController.ino   # Flight controller code
├── calibration.ino        # IMU calibration code
├── kicad/                 # PCB design files
├── image/                 # Board images
├── main_grb.zip           # Gerber files for fabrication
└── README.md

Features

  • Integration of MPU6050 accelerometer and gyroscope
  • Complementary filter algorithm for angle calculations
  • Double-loop PID control (angle and angle rate)
  • PWM signals to control 4 ESC motors
  • Input from the RC receiver (6 channels)
  • IMU calibration for accurate sensor offset values

Hardware Requirements

  • ESP32 microcontroller
  • MPU6050 IMU
  • 4 electronic speed controllers with brushless motors
  • RC receiver (PWM protocol)
  • LiPo battery
  • Custom PCB (designed in KiCad, files in kicad/ folder)

Setup Procedure

Step 1 - Upload Calibration Code

  1. Load file calibration.ino
  2. Program ESP32 with this code
  3. Put the drone on the ground
  4. Open the Serial Monitor window
  5. Read instruction messages and save the output values

Step 2 - Fill IMU Offset Values

Fill the calibration values into the file flightController.ino:

text
float rateRollOffset = ...;
float ratePitchOffset = ...;
float rateYawOffset = ...;

float accXOffset = ...;
float accYOffset = ...;
float accZOffset = ...;

Step 3 - Upload the Main Code

  • Load flightController.ino
  • Program ESP30 with this code

Controls (RC Mapping)

ChannelFunction
CH1Roll
CH2Pitch
CH3Throttle
CH4Yaw
CH5/CH6Auxiliary

Important Tips

  • Make sure your motors are installed correctly
  • Do not run any tests with propellers mounted
  • Fine-tune PID coefficients for better stability
  • Calibrate your sensors carefully for optimal results

Safety

  • Do not power the motors with mounted propellers
  • Ensure reliable power supply
  • Have your hand near the throttle button

Possible Upgrades

  • Build-in fail-safe system
  • Implement altitude hold function
  • Enable GPS functionality
  • Improve filtering algorithm (Kalman filter)

Reference Code

Key code fragments are found in the following file:


License

This project is open-source and can be freely modified.

Parts

10
QtyValueFootprintReferences
42-171825-32-171825-3 (1):TE_2-171825-3J1, J2, J3, J4
1171825-2171825-2:TE_171825-2J5
1171825-6171825-6:TE_171825-6J6
1LEDLED_THT:LED_D1.8mm_W1.8mm_H2.4mm_Horizontal_O1.27mm_Z1.6mmD1
1MPU-6050GY-521:MODULE_GY-521U2
1RResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P2.54mm_VerticalR1
1esp32_38_pins-custom_libraryDownloads:Z_ESP32_DevKitC_38pin_socketU1

Similar boards

  • 2 layers23 × 120 mmFeather multi oled, the printed circuit board in 3D

    Feather multi oled

    idlehandsdev/volumetric_display

    TENEX OLED Displays

    72 parts312CC-BY-SA-4.0
  • 4 layers95 × 50 mmControl board, the printed circuit board in 3D

    Control board

    ZhuYanzhen1/MM32_CLion

    本项目是全国大学生智能车竞赛GDUT 2022年极速越野组的项目文件。采用了LQR控制器和多速率卡尔曼融合算法,并在单片机上实现。This project is the project document for the GDUT 2022 Extreme Off-Road Category of the National Student Intelligent Vehicle Competition.

    129 parts58AGPL-3.0
  • 2 layers50 × 66 mmBluePhil, the printed circuit board in 3D

    BluePhil

    pms67/BluePhil

    STM32-based development board with various sensors.

    106 parts53MIT
  • 2 layers36 × 43 mmAsac fc rev a, the printed circuit board in 3D

    Asac fc rev a

    victorhook/asac-fc

    asac fc is an rp2040 based flight controller made for FPV drone flying

    119 parts52GPL-3.0
  • 4 layers305 × 208.3 mmControlBoard, the printed circuit board in 3D

    ControlBoard

    paradise-fi/RoFI

    Distributed Metamorphic Robots

    224 parts42
  • 2 layers98.5 × 17.8 mmWeeSpindel, the printed circuit board in 3D

    WeeSpindel

    c-/weeSpindel

    Smaller, simpler version of the iSpindel. NOTE: Work-in-progress

    22 parts17
  • 2 layers36.2 × 36.2 mmDrone PCB, the printed circuit board in 3D

    Drone PCB

    PlumPot55/PCB_Designs

    Source Files of our PCB we did as a community

    50 parts15
  • 2 layers26 × 21.3 mmPModBoard, the printed circuit board in 3D

    PModBoard

    pms67/PModlet

    PMOD PCB with USB-to-UART converter and IMU (MPU-6050, I2C) for FPGAs.

    19 parts15MIT

Questions

How big is the Esp32-flight controller PCB?

It measures 60.5 × 63.5 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Esp32-flight controller use?

10 parts, built around the MPU-6050. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Esp32-flight controller KiCad files?

From the AYUSH-pro-grammer/esp32-flight-controller repository on GitHub, at the commit this page was made from: the board is kicad/Untitled.kicad_pcb and its schematic kicad/Untitled.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Esp32-flight controller design in my own project?

Its repository states no licence, so its author keeps all rights: ask AYUSH-pro-grammer before reusing the design.