Skip to the content
PCBKitNew board
2 layers53.4 × 68.4 mmDrone Flight Controller, the printed circuit board in 3D

Open-source ESP32-based flight controller for quadcopters, featuring sensor fusion, nested PID control, motor mixing, real-time Wi-Fi PID tuning, and a custom KiCad PCB with support for GPS and FPV modules.

Size
53.4 × 68.4 mm
Copper layers
2
Thickness
1.6 mm
Parts
21
Nets
41
Pads
94
Tracks, vias
126, 8
Pours
2
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
10 Jul 2026
Updated
4 Oct 2026

Overview

Drone Flight Controller is an open-source printed circuit board by BrijModi, from the BrijModi/ESP32-Quadcopter-FlightController repository on GitHub, published under the MIT licence. It is a 2-layer board of 53.4 × 68.4 mm with 21 parts on 41 nets, routed with 126 tracks and 8 vias.

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

Main components

1

README

README.md

ESP32-Quadcopter-FlightController

Open-source ESP32-based flight controller for quadcopters, featuring sensor fusion, nested PID control, motor mixing, real-time Wi-Fi PID tuning, and a custom KiCad PCB with support for GPS and FPV modules.


📘 Introduction

This project is a fully custom ESP32-based quadcopter flight controller, built from scratch to provide complete hardware and firmware flexibility.
Unlike commercial closed-source flight controllers, this system allows direct modification of IMU handling, PID algorithms, motor mixing, and communication layers—making it ideal for learning, research, and UAV experimentation.

The controller runs an 83 Hz control loop, uses a complementary filter for real-time roll/pitch estimation, and stabilizes the quadcopter using nested PID loops (Angle + Rate).
A built-in Wi-Fi interface enables on-the-fly PID tuning and telemetry, eliminating the need to reflash firmware between adjustments.

This repository includes the complete firmware, custom KiCad PCB design, calibration and testing utilities, project media, and a comprehensive technical report documenting the system design and implementation.


⭐ Highlights

  • Custom ESP32-based flight controller firmware
  • Complementary filter for attitude estimation
  • Dual-loop PID control for roll, pitch, and yaw
  • Motor mixing for X-configuration quadcopters
  • Real-time Wi-Fi tuning dashboard
  • Custom two-layer PCB with expansion support
  • Stable and tested flight performance (90–95%)
  • Open-source and fully modifiable

🖼 Drone Image

Custom ESP32 Quadcopter


🔧 Features

  • Real-time IMU data acquisition using MPU6050
  • Complementary filter–based angle estimation
  • Nested PID loops for angle and rate stabilization
  • PWM signal generation for ESCs
  • i-BUS / PWM receiver input handling
  • Wi-Fi HTTP server for dashboard + tuning
  • Support for barometer (alt-hold), GPS, and FPV modules
  • Modular code structure for easy experimentation

🛠 Hardware Used

  • ESP32 DevKit V1
  • MPU6050 IMU
  • RS-2212 920KV motors + 30A ESCs
  • FlySky FS-i4X receiver
  • 3S Li-Po battery
  • F450 frame
  • Custom-designed flight controller PCB

📂 Repository Contents

  • Firmware/

    • Main_Firmware/ – Main ESP32-based quadcopter flight controller firmware
    • Testing_Calibration/ – Calibration, testing, and Wi-Fi PID tuning utilities
  • Hardware/

    • Drone Flight Controller/ – Complete KiCad project (schematic, PCB layout, and project files)
    • FC Gerber.zip – PCB manufacturing (Gerber) files
    • PCB View.pdf – PCB layout overview
    • Schematic.pdf – Flight controller circuit schematic
  • Media/

    • Drone/ – Drone assembly, flight controller, and hardware images
    • Test Flight and Calibration/ – Flight test videos, calibration recordings, and PID response graph
  • Technical Report.pdf – Comprehensive technical documentation covering hardware design, firmware architecture, implementation, and testing


💻 Software Requirements

  • Arduino IDE 2.x
  • ESP32 Arduino Core
  • KiCad 9.x (for PCB design)

📚 Libraries Used

  • Wire – I²C communication
  • ESP32Servo – ESC PWM control
  • WiFi – Wireless communication
  • AsyncTCP – Asynchronous TCP networking
  • ESPAsyncWebServer – Web-based PID tuning dashboard
  • SPIFFS – Web dashboard file storage

🚀 Getting Started

Follow the steps below to configure and fly the quadcopter for the first time.

1. Hardware Setup

  • Assemble the quadcopter and connect all hardware components.
  • Wire the ESP32, MPU6050, ESCs, receiver, and motors according to the provided schematic.

2. Verify Receiver and ESCs

  • Upload the firmware from Firmware/Testing_Calibration/Receiver_PWM_Testing/ to verify proper receiver operation.
  • Upload the firmware from Firmware/Testing_Calibration/ESC_Calibration/ and calibrate all ESCs.

3. Calibrate the IMU

  • Upload the firmware from Firmware/Testing_Calibration/IMU_Calibration/.
  • Place the quadcopter on a level surface and perform the IMU calibration.
  • Copy the generated accelerometer and gyroscope offset values into both the main flight controller firmware and the PID tuning firmware.

4. Tune the PID Controller

  • Upload the firmware from Firmware/Testing_Calibration/PID_Tuning_Webserver/.
  • Connect to the ESP32 Wi-Fi access point and open the PID tuning dashboard.
  • Tune the roll, pitch, and yaw PID gains until stable flight performance is achieved.
  • Copy the optimized PID values into the main flight controller firmware.

5. Upload the Main Flight Controller Firmware

  • Open Firmware/Main_Firmware/Flight_Controller_v2/Flight_Controller_v2.ino.
  • Update the firmware with the calibrated IMU offsets and tuned PID gains.
  • Upload the firmware to the ESP32.

6. Perform Flight Testing

  • Verify the motor rotation direction and propeller orientation.
  • Perform an initial low-throttle hover test in a safe, open area.
  • Fine-tune the PID gains as required to achieve stable and responsive flight.

Parts

21
QtyValueFootprintReferences
4MountingHoleMountingHole:MountingHole_3.2mm_M3H1, H2, H3, H4
2470uf, 25vCapacitor_SMD:CP_Elec_6.3x7.7C1, C2
1220 / 330Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR1
1BattConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ9
1CameraConnector_JST:JST_XH_S3B-XH-A_1x03_P2.50mm_HorizontalJ7
1ESC1Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ2
1ESC2Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ3
1ESC3Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ4
1ESC4Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ5
1ESP32 DEV BoardESP32 Devkit v1:MODULE_ESP32_DEVKIT_V1U1
1GPS / CompassConnector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_VerticalJ11
1LEDLED_THT:LED_D5.0mmD1
1MPU-6050Connector_PinHeader_2.54mm:PinHeader_1x08_P2.54mm_VerticalU2
1Pressure SensorConnector_PinHeader_2.54mm:PinHeader_1x07_P2.54mm_VerticalJ10
1Receiver ChannelsConnector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_VerticalJ6
1Receiver PowerConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ1
1VTXConnector_JST:JST_GH_SM06B-GHS-TB_1x06-1MP_P1.25mm_HorizontalJ8

Questions

How big is the Drone Flight Controller PCB?

It measures 53.4 × 68.4 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Drone Flight Controller use?

21 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 Drone Flight Controller KiCad files?

From the BrijModi/ESP32-Quadcopter-FlightController repository on GitHub, at the commit this page was made from: the board is Hardware/Drone Flight Controller/Drone Flight Controller.kicad_pcb and its schematic Hardware/Drone Flight Controller/Drone Flight Controller.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Drone Flight Controller design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

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