

Esp32-flight controller
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
1README
README.mdESP32 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
kicad 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
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.mdFeatures
- 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
- Load file
calibration.ino - Program ESP32 with this code
- Put the drone on the ground
- Open the Serial Monitor window
- Read instruction messages and save the output values
Step 2 - Fill IMU Offset Values
Fill the calibration values into the file flightController.ino:
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)
| Channel | Function |
|---|---|
| CH1 | Roll |
| CH2 | Pitch |
| CH3 | Throttle |
| CH4 | Yaw |
| CH5/CH6 | Auxiliary |
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| Qty | Value | Footprint | References |
|---|---|---|---|
| 4 | 2-171825-3 | 2-171825-3 (1):TE_2-171825-3 | J1, J2, J3, J4 |
| 1 | 171825-2 | 171825-2:TE_171825-2 | J5 |
| 1 | 171825-6 | 171825-6:TE_171825-6 | J6 |
| 1 | LED | LED_THT:LED_D1.8mm_W1.8mm_H2.4mm_Horizontal_O1.27mm_Z1.6mm | D1 |
| 1 | MPU-6050 | GY-521:MODULE_GY-521 | U2 |
| 1 | R | Resistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P2.54mm_Vertical | R1 |
| 1 | esp32_38_pins-custom_library | Downloads:Z_ESP32_DevKitC_38pin_socket | U1 |
Similar boards
- 2 layers23 × 120 mm

- 4 layers95 × 50 mm

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 mm

- 2 layers36 × 43 mm

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 mm

- 2 layers98.5 × 17.8 mm

- 2 layers36.2 × 36.2 mm

- 2 layers26 × 21.3 mm

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.