Skip to the content
PCBKitNew board
2 layersFlight controller, the printed circuit board in 3D

This Repo will follow me while i m impelmenting a flight controller using stm32 blue pill board. I will be using the following components: - STM32F103C8T6 (Blue Pill) - MPU6050 (Gyro and Accelerometer) - IA6S (Receiver)…

Copper layers
2
Thickness
1.6 mm
Parts
17
Nets
67
Pads
119
Tracks, vias
97, 0
Pours
53
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
15 Apr 2026
Updated
3 Jun 2026

Overview

Flight controller is an open-source printed circuit board by ademda, from the ademda/Drone_Flight_Controller repository on GitHub. It is a 2-layer board with 17 parts on 67 nets, routed with 97 tracks and 0 vias.

Its parts include 9 connectors, 2 resistors, 1 capacitor and 1 IC. It belongs with the robots and motor control boards of this library.

README

Readme.md

This Repo will follow me while i m impelmenting a flight controller using stm32 blue pill board. I will be using the following components:

  • STM32F103C8T6 (Blue Pill)
  • MPU6050 (Gyro and Accelerometer)
  • IA6S (Receiver)
  • Flysky FS-iA6B (Transmitter)
  • bmp280 (Barometer)
  • HMC5883L (Magnetometer)
  • ESCS (Electronic Speed Controllers)
  • Brushless Motors
  • Neo6m (GPS)

the first version should be capable of flying a quadcopter and maintain its position in the air:

  • I would try my best to make the code as modular as possible so that it can be easily modified and extended in the future. I will be using OOp based design patterns to ensure the modularity, so the code will contain both C and C++
  • Software architecture will be based on the layered architecture pattern, where each layer will have a specific responsibility and will communicate with other layers through well-defined interfaces. The layers will be as follows:
  • Hardware Abstraction Layer (HAL): This layer will be responsible for abstracting the hardware details and providing a unified interface for the upper layers to interact with the hardware components. It will include drivers for the sensors, ESCs, and other peripherals.
  • Control Layer: This layer will be responsible for implementing the control algorithms for the flight controller. It will include the PID controller, sensor fusion algorithms, and other control logic to maintain the stability of the quadcopter.
  • Application Layer: This layer will be responsible for implementing the high-level logic of the flight controller, such as handling user input from the transmitter, managing flight modes, and implementing safety features.
  • Communication Layer: This layer will be responsible for handling communication between the flight controller and other devices, such as the transmitter and GPS module. It will include protocols for receiving commands from the transmitter and sending telemetry data back to the transmitter or other devices.

Architecture Overview

The flight controller is designed using a layered architecture pattern combined with object-oriented design principles to ensure modularity, maintainability, and extensibility.

Project Structure

text
flight_controller/
├── App/
│   ├── Blogic/                 # High-level application logic
│   │   ├── Inc/: FlightController, Drone, Config
│   │   └── Src/: implementations
│   ├── Communication/          # RC receiver, GPS, telemetry
│   │   ├── Inc/: RCReceiver, GPSReceiver, TelemetryManager
│   │   └── Src/: concrete implementations (IA6B, NEO6M, etc.)
│   └── Control/                # Core flight control system
│       ├── Sensors/            # Sensor abstraction & fusion
│       │   ├── Inc/: Filter, Barometer, IMU, Magnetometer, StateEstimator
│       │   └── Src/: concrete sensor implementations (MPU6050, BMP280, GY273)
│       ├── Controller/         # Control algorithms
│       │   ├── Inc/: PIDController, MotorController, ControlSystem
│       │   └── Src/: control implementations
│       └── Filters/            # Sensor fusion filters
│           ├── Inc/: ComplementaryFilter, KalmanFilter
│           └── Src/: filter implementations
├── Core/                       # STM32 HAL and system files
├── Drivers/                    # STM32 HAL drivers and CMSIS
└── app_drivers/               # Custom low-level drivers

Layered Architecture

1. Hardware Abstraction Layer (HAL):

  • Located in Core/ and Drivers/ - STM32CubeIDE generated HAL drivers
  • Located in app_drivers/ - Custom drivers for MPU6050, BMP280, SBUS receiver

2. Control Layer (App/Control/):

a) Sensors Subsystem (Control/Sensors/):

  • Abstract base classes: Filter, Barometer, IMU, Magnetometer
  • Concrete implementations: Barometer_bmp280, IMU_MPU6050, Magnetometer_GY273
  • StateEstimator: Sensor fusion engine combining all sensors to produce estimated drone state (attitude, altitude, heading)

b) Filters Subsystem (Control/Filters/):

  • Filter: Abstract base class for signal filtering
  • ComplementaryFilter: Implemented sensor fusion filter combining gyro and accelerometer data
  • KalmanFilter: Abstract placeholder for advanced Kalman filtering

c) Controller Subsystem (Control/Controller/):

  • PIDController: Proportional-Integral-Derivative controller with integral windup prevention and output saturation
  • MotorController: Motor mixing algorithm for quadcopter X-configuration (4 motors)
  • ControlSystem: Coordinates 4 PID controllers for roll, pitch, yaw, and altitude stabilization

3. Application Layer (App/Blogic/):

  • FlightController: Orchestrates sensor fusion and motor control (main control loop)
  • Drone: High-level flight operations and state management
  • Config: Configuration and flight mode management

4. Communication Layer (App/Communication/):

  • RCReceiver (abstract) with RC_Receiver_IA6_B (concrete): 6-channel RC signal receiver
  • GPSReceiver (abstract) with GPSReceiver_Neo_6M (concrete): GPS positioning
  • TelemetryManager (abstract) with implementations for telemetry logging

Data Flow

text
RC Transmitter (IA6B)
      ↓
RCReceiver (6-channel commands)
      ↓
    Drone (application logic)
      ↓
FlightController (control loop)
      ↓
StateEstimator (sensor fusion)     ← Sensors: MPU6050, BMP280, GY273
      ↓
ControlSystem (PID controllers)
      ↓
MotorController (mixing & PWM)
      ↓
ESCs → Motors
      ↓
TelemetryManager (logging)

Key Design Principles

  • Abstraction: Each layer communicates through abstract interfaces, allowing components to be independently tested and replaced
  • Modularity: Sensor, filter, and control subsystems are physically separated in folder structure for better organization
  • Extensibility: New sensor types (e.g., optical flow) can be added by implementing the abstract interfaces
  • Separation of Concerns:
    • Sensors folder handles all sensor I/O and calibration
    • Filters folder manages data fusion algorithms
    • Controller folder focuses purely on control logic
    • Communication layer decouples from core flight logic

Component Dependencies

  • StateEstimator depends on: Filter, Barometer, IMU, Magnetometer
  • ControlSystem depends on: PIDController, StateEstimator
  • MotorController depends on: PWM hardware interface
  • FlightController depends on: MotorController, ControlSystem, StateEstimator, GPSReceiver
  • Drone depends on: FlightController, RCReceiver, TelemetryManager

PCB Design

The flight controller system consists of two interconnected shield boards designed in KiCad to expand and organize the functionality of the STM32F401RE microcontroller:

1. STM32 Shield

The STM32 Shield is the main control board that interfaces with the STM32F401RE microcontroller. It houses the core power management, signal conditioning, and motor control circuitry.

3D View: STM32 Shield 3D

PCB Routing: STM32 Shield Routing

Key Features:

  • ESC PWM signal outputs for motor control
  • Power distribution and regulation
  • Signal conditioning for RC receiver input
  • UART/communication interfaces

2. Sensors Shield

The Sensors Shield is a dedicated daughter board housing all the sensor modules required for flight control and navigation.

3D View: Sensors Shield 3D

PCB Routing: Sensors Shield Routing

Integrated Sensors:

  • MPU6050: 6-axis IMU (3-axis gyroscope + 3-axis accelerometer)
  • BMP280: Barometer for altitude estimation
  • HMC5883L: 3-axis magnetometer for heading
  • NEO6M: GPS module for position-based flight modes
  • SBUS Receiver Interface: Flysky FS-iA6B receiver integration

Board Integration

The two shields are stacked together using connector headers, providing a modular and organized hardware platform:

  • STM32 Shield acts as the main control and power distribution hub
  • Sensors Shield provides isolated sensor measurement and preprocessing
  • Isolated I2C and SPI buses minimize interference
  • Common power and ground distribution between boards

Architecture Overview (Original)

The flight controller at the top level uses the Drone class as the central aggregator that coordinates three primary functional domains: command input through the RCReceiver hierarchy, flight control through the FlightController class, and telemetry logging through the TelemetryLogger hierarchy. The RCReceiver operates as an abstract interface with concrete implementations like the IA6B class, enabling seamless integration of different receiver protocols and providing normalized command channels for throttle, roll, pitch, yaw, and flight mode selection. The TelemetryLogger uses the strategy pattern with abstract and concrete implementations (OnboardLogger for SWD/STLink-based logging and SimulationLogger for PC-based testing), allowing flexible data logging across different environments without coupling the core flight logic to any specific logging mechanism. The FlightController represents the brain of the system, aggregating four critical subsystems: the ControlSystem hierarchy (with PIDController as the concrete implementation) that processes sensor data and RC commands to generate stabilization outputs; the StateEstimator (sensor fusion engine) that aggregates the IMU (MPU6050), Barometer (BMP280), Magnetometer (GY273), and Filters (Kalman-based) to compute accurate drone attitude, altitude, and heading; the MotorController that converts control outputs into PWM signals for the ESCs; and the optional GPSReceiver (NEO6M) for position-based flight modes. This architecture establishes a clean data flow: RC inputs and sensor measurements feed into the state estimator, which produces a current state estimate; the control system consumes this state estimate and RC command inputs to compute desired motor outputs via PID control; the motor controller translates these outputs to ESC commands; and telemetry components log this entire process. The extensive use of abstract classes ensures that each component can be independently tested, replaced, or extended (e.g., swapping the Kalman filter for a complementary filter), while the layered separation maintains hardware abstraction at the bottom, control algorithms in the middle, and high-level application logic at the top—all communicating through well-defined interfaces.

Parts

17
QtyValueFootprintReferences
4Conn_01x03Connector_JST:JST_XH_B3B-XH-A_1x03_P2.50mm_VerticalJ4, J5, J6, J7
2Conn_01x04Connector_JST:JST_XH_B4B-XH-A_1x04_P2.50mm_VerticalJ15, J16
2RResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P5.08mm_HorizontalR6, R9
1C_PolarizedCapacitor_THT:CP_Radial_D5.0mm_P2.50mmC1
1Conn_01x04Connector_JST:JST_XH_B3B-XH-A_1x03_P2.50mm_VerticalJ3
1Conn_01x05Connector_JST:JST_XH_B5B-XH-A_1x05_P2.50mm_VerticalJ8
1NUCLEO-F401RENUCLEO-F401RE:ST_NUCLEO-F401REU1
1Screw_Terminal_01x02TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-2-5.08_1x02_P5.08mm_HorizontalJ1

The 13 most common of 17 parts.

Questions

What parts does the Flight controller use?

17 parts. 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 Flight controller KiCad files?

From the ademda/Drone_Flight_Controller repository on GitHub, at the commit this page was made from: the board is PCB_Design/flight_controller/flight_controller.kicad_pcb and its schematic PCB_Design/flight_controller/flight_controller.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Flight controller design in my own project?

Its repository states no licence, so its author keeps all rights: ask ademda before reusing the design.

More from ademda/Drone_Flight_Controller

1
  • 2 layersSensors, the printed circuit board in 3D

    Sensors

    ademda/Drone_Flight_Controller

    This Repo will follow me while i m impelmenting a flight controller using stm32 blue pill board. I will be using the following components: - STM32F103C8T6 (Blue Pill) - MPU6050 (Gyro and Accelerometer) - IA6S (Receiver)…

    11 parts

Similar boards

  • 2 layers50 × 35 mmServo power, the printed circuit board in 3D

    Servo power

    earthtojake/text-to-cad

    Design physical products with AI

    17 parts26kMIT
  • 2 layers139.7 × 62.2 mmBreakout 60pin EEC IV, the printed circuit board in 3D

    Breakout 60pin EEC IV

    rusefi/rusefi

    rusefi - GPL internal combustion engine control unit

    17 parts1.2k
  • 2 layers29.2 × 55.9 mmDeniseadapter, the printed circuit board in 3D

    Deniseadapter

    hoglet67/RGBtoHDMI

    Bare-metal Raspberry Pi project that provides pixel-perfect sampling of Retro Computer RGB/YUV video and conversion to HDMI

    17 parts1kGPL-3.0
  • 2 layers24.5 × 36.5 mmCluster, the printed circuit board in 3D

    Cluster

    JesusFreke/lalboard

    A 3D-printed keyboard inspired by the DataHand

    17 parts993
  • 2 layers56.3 × 55.7 mmStarNecklace, the printed circuit board in 3D

    StarNecklace

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    17 parts915
  • 2 layers25 × 25 mmSmallEncoder, the printed circuit board in 3D

    SmallEncoder

    DDeGonge/OS-ARM

    This arm is not industrial and it will not be fast, but that is not my goal. But it will hopefully be a very nice looking arm fully capable of 6dof motion, cheap enough to keep it accessable but capable enough to…

    17 parts498MIT
  • 2 layers38.9 × 16.1 mmAmoeba spc, the printed circuit board in 3D

    Amoeba spc

    mtl/keyboard-pcbs

    Keyboard PCBs

    17 parts485
  • 2 layers36 × 51 mmABSIS ALE, the printed circuit board in 3D

    ABSIS ALE

    jrsteensen/OpenHornet

    OpenHornet 1:1 F/A-18C Simulator Repository

    17 parts431