Skip to the content
PCBKitNew board
4 layers36 × 36 mmFlightcontroller, the printed circuit board in 3D

Custom power distribution board and STM32F405 flight controller PCBs designed in KiCad for a 5-inch FPV drone. Dual synchronous buck converters, ICM-42688-P gyro, 4-layer layout, Betaflight-compatible.

Size
36 × 36 mm
Copper layers
4
Thickness
1.6 mm
Parts
87
Nets
82
Pads
299
Tracks, vias
2,239, 85
Pours
1
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
10 Sep 2026
Updated
11 Sep 2026

Overview

Flightcontroller is an open-source printed circuit board by nimaakbari2006, from the nimaakbari2006/fpv-drone-flight-controller repository on GitHub, published under the MIT licence. It is a 4-layer board of 36 × 36 mm with 87 parts on 82 nets, routed with 2,239 tracks and 85 vias.

It is built around the W25Q128JVSIQ, ICM-42688-P and SPX3819M5-L-3-3. Its parts include 31 capacitors, 18 resistors, 5 ICs, 5 connectors and 2 switches. It belongs with the robots and motor control and power boards and the STM32 boards of this library.

Main components

3

README

README.md

Custom FPV Drone — Power Distribution Board & Flight Controller

Two custom PCBs designed from scratch in KiCad for a 5-inch FPV drone, plus complete component selection and compatibility validation for the full build. This project covers the full stack: switching power supply design, a Betaflight-compatible flight controller, and systems-level integration of the entire aircraft.


Overview

The goal was to replace the stock electronics of a 5-inch FPV drone with custom-designed hardware, as an electrical engineering portfolio project. Two boards were designed:

  1. Power Distribution Board (PDB) — takes 4S LiPo battery input and generates regulated 5V and 3.3V rails while distributing raw battery power to the ESC.
  2. Flight Controller (FC) — an STM32F405-based, Betaflight-compatible flight controller with a full peripheral set.

Both boards were designed to the standard 30.5 × 30.5 mm FPV stack mounting pattern to integrate with the airframe and ESC.


Power Distribution Board

A dual-output switching power supply feeding the drone's electronics.

Key features:

  • 4S LiPo (up to ~16.8V) input with XT60 connection
  • Two synchronous buck converters (MP2307) generating 5V and 3.3V
  • Input protection: SM6T22A TVS diode against voltage spikes
  • Raw battery pass-through (VBATOUT) to the 4-in-1 ESC via wide copper
  • Feedback dividers, compensation networks, soft-start, and proper input/output decoupling on each channel

Design decisions:

  • Chose the MP2307 synchronous buck over the older LM2596 after finding that the LM2596's through-hole inductors exceeded the frame's stack-height clearance — a real mechanical constraint that drove the part selection toward a smaller SMD synchronous design.
  • Replaced the large through-hole bulk capacitor with an SMD polymer cap to fit the board within the mounting footprint.

(See /PDB/ for schematic, layout, 3D render, and Gerbers.)


Flight Controller

A full-featured, Betaflight-compatible flight controller.

Core:

  • STM32F405RGT6 MCU (LQFP-64)
  • ICM-42688-P gyro/accelerometer over SPI1
  • 8 MHz crystal, full power decoupling, VCAP, reset & boot circuitry
  • USB-C for configuration and firmware flashing (with CC pulldowns and power-OR Schottky)
  • Onboard 3.3V LDO so the board runs from USB alone on the bench

Peripherals:

  • AT7456E OSD for on-screen display over the analog video feed (SPI3)
  • W25Q128 SPI flash for blackbox flight logging
  • 4 motor outputs (DShot-capable timer pins) + ESC telemetry & current sense
  • ELRS receiver UART, VTX (SmartAudio) control, GPS UART
  • Analog camera input and VTX video output through the OSD
  • Battery voltage sensing, buzzer driver, addressable LED output
  • SWD debug header

Design decisions:

  • Followed the official Betaflight F405 pin mapping so the board matches an existing firmware target rather than requiring a custom one (gyro on SPI1, OSD/flash sharing SPI3, careful UART assignment to avoid the DFU/USART conflict).
  • 4-layer stackup with a dedicated internal ground plane beneath the IMU for clean gyro readings, and controlled routing of the USB differential pair.

(See /FlightController/ for schematic, layout, 3D render, and Gerbers.)


Circuit Design & Component Selection

The design methodology was datasheet-driven: each IC's manufacturer datasheet specifies a recommended application circuit, and following those recommended values — for decoupling, compensation, loop stability, and support components — is the correct engineering practice rather than guessing or reinventing them. Where the design required application-specific values that the datasheet does not give directly (chiefly the regulator output voltages and the battery-sense scaling), those were calculated from the relevant equations. This section documents both.

Values sourced from datasheets and reference circuits

The majority of passive values came directly from the manufacturers' recommended application circuits:

  • MCU decoupling — the STM32F405 datasheet specifies a 100 nF ceramic at each VDD pin plus a shared bulk capacitor; the 2.2 µF low-ESR capacitors on the VCAP core-regulator pins are a hard datasheet requirement (the internal core regulator will not start without them).
  • Analog supply filtering — the 600 Ω @ 100 MHz ferrite bead plus 1 µF / 100 nF VDDA filter follows ST's recommended arrangement to keep digital switching noise off the ADC reference.
  • Buck converter support — the MP2307's loop-compensation R–C network, 10 nF soft-start capacitor, 10 nF bootstrap capacitor, and input/output capacitor values were taken from the MP2307 datasheet's typical application circuit for the chosen inductor and output-cap combination.
  • IMU — the ICM-42688-P's supply decoupling (2.2 µF + 100 nF) follows TDK's reference circuit, and its reserved pins were terminated exactly as the datasheet pin-description table specifies.
  • OSD — the on-screen-display support components and crystal frequency were taken from the OSD device's datasheet and a known-good reference design.

Using the datasheet's recommended circuit is deliberate: manufacturers characterise these values for stability and noise performance, and deviating from them without reason is how power supplies end up oscillating or ICs end up unstable.

Values calculated for this design

A few values are application-specific and were derived rather than copied:

Buck converter output voltages (feedback dividers). The MP2307 servos its feedback pin to an internal 0.925 V reference; the output is set by a divider:

text
Vout = 0.925 V × (1 + Rtop / Rbot)

With Rbot fixed at 10 kΩ, Rtop was solved for each rail:

  • 5V rail: Rtop ≈ 44.05 kΩ → nearest E96 value 44.2 kΩ (gives 5.01 V)
  • 3.3V rail: Rtop ≈ 25.68 kΩ → nearest E96 value 25.5 kΩ (gives 3.28 V)

1% (E96) resistors were used so output accuracy is set by the reference and divider, not resistor drift.

Battery voltage sensing. A 100 kΩ / 10 kΩ divider scales the raw battery voltage down to the STM32's 3.3 V ADC range: at 4S full charge (16.8 V) the ADC sees ~1.5 V, at 6S (25.2 V) ~2.3 V — both safely under the 3.3 V limit with headroom. This matches Betaflight's default voltage-sensing scale.

Crystal load capacitors. Sized from the crystal's specified load capacitance and estimated board stray capacitance using Cload_cap ≈ 2 × (CL − Cstray), giving ~22 pF per oscillator node.

Values set by standards

  • 5.1 kΩ pull-downs on the USB-C CC pins — the specific value required by the USB-C specification for a device to advertise itself and draw bus power.
  • 75 Ω termination on the analog video lines — matches the standard 75 Ω video signal impedance.

Values from standard digital-design practice

Pull-ups and pull-downs were chosen high enough to draw negligible current but low enough to hold a defined logic level against pin leakage — 10 kΩ for the NRST pull-up, BOOT0/BOOT1 pull-downs, and the SPI flash/OSD chip-select and hold lines; 100 kΩ for the buzzer MOSFET gate pull-down so it stays off while its GPIO is floating during boot.


Full Drone Build & Component Selection

Beyond the PCBs, the project involved specifying and validating an entire FPV drone, ensuring every component is electrically and mechanically compatible.

Key selection decisions:

  • Motors: iFlight XING 2207 1800KV — the correct kV range for a 4S 5-inch freestyle build (higher-kV variants are 2–4S racing parts).
  • Video system: a fully analog 5.8GHz chain — RunCam Robin 3 → JHEMCU VTX20-600 → FlyFishRC Osprey antenna → goggles — with RHCP polarization matched from drone to goggles.
  • Control link: ELRS 2.4GHz (RadioMaster Pocket + Nano RX), both on FCC firmware for region compatibility.
  • ESC: 55A rating, sized comfortably above the motors' ~35A peak draw.

Interface & connector compatibility (each verified against the actual component pinouts):

  • FC ↔ ESC: 8-pin JST-SH (motor signals, telemetry, current, power)
  • FC ↔ Camera: 6-pin JST-SH, wired to the RunCam Robin 3's pinout (power, GND, video, camera control)
  • FC ↔ VTX: 4-pin (video, GND, battery, SmartAudio)
  • FC ↔ GPS / Receiver: JST-SH UART connectors
  • Video RF: MMCX (VTX to antenna), RHCP polarization matched throughout

(See /BOM/FPV_Drone_BOM.xlsx for the complete bill of materials with compatibility notes.)


Tools & Skills

KiCad · schematic capture · PCB layout · 4-layer stackup design · switching power supply design · SPI/UART bus architecture · USB routing · DRC/ERC verification · library management (symbol/footprint import) · datasheet-driven design · systems integration · component selection & compatibility analysis


Status

Both boards are fully designed and verified in KiCad (ERC and DRC clean). Manufacturing files (Gerbers, BOM, placement) generated for fabrication and assembly. Full drone build specified and components sourced.

Physical assembly and flight testing to follow — this README will be updated with assembly photos and results.

Parts

87
QtyValueFootprintReferences
18100nCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC3, C10, C11, C12, C13, C14, C15, C17, C18, C21, C24, C25, C26, C27, C28, C30 +2
910KResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR4, R7, R8, R9, R14, R15, R16, R17, R18
422pCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC8, C9, C19, C20
31uCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC1, C5, C31
32.2uCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC2, C22, C23
2100KResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR3, R12
21KResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR11, R13
25.1KResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR1, R2
275Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR6, R10
2SW_PushButton_Switch_SMD:SW_SPST_TL3305ASW1, SW2
110nCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC4
127MHzCrystal:Crystal_SMD_3225-4Pin_3.2x2.5mm_HandSolderingY1
12N7002Package_TO_SOT_SMD:SOT-23Q1
13.3VTestPoint:TestPoint_Pad_D1.0mmH16
1330Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR5
14.7nCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC16
14.7uCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC29
15VTestPoint:TestPoint_Pad_D2.5mmH7
15VTestPoint:TestPoint_Pad_D1.5mmH10
1600Ω @ 100MHzInductor_SMD:L_0805_2012Metric_Pad1.05x1.20mm_HandSolderFB1
18MHzCrystal:Crystal_SMD_3225-4Pin_3.2x2.5mm_HandSolderingY2
1AT7456ELAH_C42388749ProLib_1pcs_2026-09-07:LGA-16_L6.8-W4.0-P0.65-TL-2EPU4
1BATTTestPoint:TestPoint_Pad_D2.5mmH18
1BuzzerBuzzer_Beeper:Buzzer_CUI_CPT-9019S-SMTBZ1
1CURRENTTestPoint:TestPoint_Pad_D1.5mmH6
1CameraConnector_JST:JST_SH_SM06B-SRSS-TB_1x06-1MP_P1.00mm_HorizontalJ3
1D_SchottkyDiode_SMD:D_SOD-123D1
1GNDTestPoint:TestPoint_Pad_D1.5mmH11
1GNDTestPoint:TestPoint_Pad_D2.5mmH12
1GPSConnector_JST:JST_SH_SM04B-SRSS-TB_1x04-1MP_P1.00mm_HorizontalJ5
1ICM-42688-PICM-42688-P:PQFN50P300X250X97-14NU1
1LED StripConnector_JST:JST_SH_SM03B-SRSS-TB_1x03-1MP_P1.00mm_HorizontalJ2
1Motor_1TestPoint:TestPoint_Pad_D1.5mmH1
1Motor_2TestPoint:TestPoint_Pad_D1.5mmH2
1Motor_3TestPoint:TestPoint_Pad_D1.5mmH3
1Motor_4TestPoint:TestPoint_Pad_D1.5mmH4
1RECEIVER_RXTestPoint:TestPoint_Pad_D1.5mmH9
1RECEIVER_TXTestPoint:TestPoint_Pad_D1.5mmH8
1SPX3819M5-L-3-3Package_TO_SOT_SMD:SOT-23-5U2
1STM32F405RGTxPackage_QFP:LQFP-64_10x10mm_P0.5mmU5
1SWCLKTestPoint:TestPoint_Pad_D1.0mmH14
1SWDIOTestPoint:TestPoint_Pad_D1.0mmH13
1TELEMETRYTestPoint:TestPoint_Pad_D1.5mmH5
1USB_C_Receptacle_USB2.0_16PConnector_USB:USB_C_Receptacle_HRO_TYPE-C-31-M-12J1
1VTXConnector_JST:JST_SH_SM04B-SRSS-TB_1x04-1MP_P1.00mm_HorizontalJ4
1W25Q128JVSPackage_SO:SOIC-8_5.3x5.3mm_P1.27mmU3

The 83 most common of 87 parts.

Questions

How big is the Flightcontroller PCB?

It measures 36 × 36 mm and has 4 copper layers, 1.6 mm thick.

What parts does the Flightcontroller use?

87 parts, built around the W25Q128JVSIQ, ICM-42688-P and SPX3819M5-L-3-3. 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 Flightcontroller KiCad files?

From the nimaakbari2006/fpv-drone-flight-controller repository on GitHub, at the commit this page was made from: the board is FlightController/Flightcontroller.kicad_pcb and its schematic FlightController/Flightcontroller.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Flightcontroller 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).

More from nimaakbari2006/fpv-drone-flight-controller

1
  • 2 layers40 × 40 mmPDB2, the printed circuit board in 3D

    PDB2

    nimaakbari2006/fpv-drone-flight-controller

    Custom power distribution board and STM32F405 flight controller PCBs designed in KiCad for a 5-inch FPV drone. Dual synchronous buck converters, ICM-42688-P gyro, 4-layer layout, Betaflight-compatible.

    35 partsMIT

Similar boards

  • 2 layers47 × 60 mmFc nickel v1.0, the printed circuit board in 3D

    Fc nickel v1.0

    nikipoatgit/FlightController_H743

    repo contains flight controller target files, PCB Gerber files, and the schematic.

    99 parts5GPL-3.0
  • 4 layers108 × 74 mmSTM32 Drone, the printed circuit board in 3D

    STM32 Drone

    bassammorsy/stm32-flight-controller

    Custom 4-layer STM32F405RGTx quadcopter flight controller PCB designed in KiCad. Betaflight compatible, 4S–6S LiPo input, SMT assembled by JLCPCB.

    104 parts3MIT
  • 4 layers49.4 × 21.9 mmSTM32G4, the printed circuit board in 3D

    STM32G4

    segfaultzz/stm32g4_board

    41 parts
  • 2 layers19 × 39 mmBadPico, the printed circuit board in 3D

    BadPico

    justsem/badPico

    An RP2040 mini-sized BadUSB clone

    48 parts2CC-BY-SA-4.0
  • 4 layers86.4 × 61.9 mmInverter, the printed circuit board in 3D

    Inverter

    Kirg5/2040Inverter

    RP2040 Based BLDC Inverter for sensored motors, capable of putting out 50a 100v

    106 parts1
  • 2 layers105 × 105 mmGW A, the printed circuit board in 3D

    GW A

    ayaxan7/SolarAlert

    SolarAlert is a compact embedded hardware project designed to monitor the health and performance of solar panels.

    97 parts
  • 2 layers57 × 22.9 mmPCB F401CCU6 Dev, the printed circuit board in 3D

    PCB F401CCU6 Dev

    wangbo13/OSHW

    Lexsion 的开源硬件项目,尽管拿去使用!Open-source hardware projects by Lexsion, that everyone can use!

    51 parts
  • 4 layers66.4 × 66.4 mmRera, the printed circuit board in 3D

    Rera

    fdiwth/tvc-drone

    This repository contains the documentation, hardware designs, and source code for a Thrust Vector Control (TVC) drone.

    140 parts34GPL-3.0