Skip to the content
2 layers40 × 40 mmPDB2, 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
40 × 40 mm
Copper layers
2
Thickness
1.6 mm
Parts
35
Nets
18
Pads
80
Tracks, vias
222, 0
Pours
1
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
10 Sep 2026
Updated
11 Sep 2026

Overview

PDB2 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 2-layer board of 40 × 40 mm with 35 parts on 18 nets, routed with 222 tracks and 0 vias.

It is built around the MP2307DN-LF-Z and SM6T22A. Its parts include 14 capacitors, 8 resistors, 3 connectors, 2 ICs and 2 inductors. It belongs with the robots and motor control and power boards of this library.

Main components

2

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

35
QtyValueFootprintReferences
410KResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR2, R4, R5, R8
410nCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC1, C2, C13, C14
20.1u 25VCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC4, C7
2100KResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR3, R6
210uCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC5, C6
22.2nCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC8, C11
2220u 16VCapacitor_THT:CP_Radial_D8.0mm_P3.50mmC10, C12
222uInductor_SMD:L_TDK_SLF7045L1, L2
2Conn_01x02_PinConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ2, J3
2MP2307DN-LF-ZMP2307DN-LF-Z:SOIC127P600X170-9NU1, U2
10.1uF 50VCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC3
1220uF 25VCapacitor_SMD:CP_Elec_8x10.5C9
125.5kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR7
144.2kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR1
1Conn_01x02_PinConnector_Wire:SolderWire-4sqmm_1x02_P12mm_D3mm_OD6mmVBATOUT1
1Conn_01x02_SocketConnector_Wire:SolderWire-4sqmm_1x02_P12mm_D3mm_OD6mmJ1
1SM6T22ADiode_SMD:D_SMBD3

The 31 most common of 35 parts.

More from nimaakbari2006/fpv-drone-flight-controller

1
  • 4 layers36 × 36 mmFlightcontroller, the printed circuit board in 3D

    Flightcontroller

    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.

    87 partsMIT

Similar boards

  • 2 layers91.4 × 56.1 mmSmart Motor Driver, the printed circuit board in 3D

    Smart Motor Driver

    Mustafa614/Smart-Motor-Driver

    This Driver Works With 12v to 24v able to programming with stlink and pcb provides 2 connectors for uı and collecting the motor data's and controll's motor softness 20A peak

    76 parts
  • 2 layers114.9 × 76 mmProtected power entry, the printed circuit board in 3D

    Protected power entry

    absmach/synth

    Open-source circuit compiler for engineers and AI agents

    84 parts29Apache-2.0
  • 8 layers134.5 × 107.2 mmArctic video, the printed circuit board in 3D

    Arctic video

    aerogull/arctic-video

    a wip pcie fpga card designed with video capture in mind

    265 parts1
  • 2 layers42.8 × 50.5 mmCatFlapV2, the printed circuit board in 3D

    CatFlapV2

    ifreislich/CatFlap

    53 partsBSD-2-Clause
  • 4 layers50 × 88.5 mmARC PFC, the printed circuit board in 3D

    ARC PFC

    RTU-HPR/ARC_PFC

    RTU High Power Rocketry Team's ARC Project Primary flight computer

    141 parts
  • 2 layers19 × 14 mmBuck converter mp2307, the printed circuit board in 3D

    Buck converter mp2307

    xp5-org/Virtex5-XC5VLX30T-test-board

    test pcb for kicad XC5VLX30T

    15 parts2MIT
  • 4 layers85.5 × 112.2 mmTranslateIA, the printed circuit board in 3D

    TranslateIA

    lapalmaelettronica/Progetti

    Una lista dei progetti che ho pubblicato su instagram, potete trovarci pcb, codici, schemo elettrici e stampe 3d!

    77 parts
  • 2 layers97.2 × 59.1 mmArmLEDsPrototype, the printed circuit board in 3D

    ArmLEDsPrototype

    hackclub/OnBoard

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

    35 parts915

Questions

How big is the PDB2 PCB?

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

What parts does the PDB2 use?

35 parts, built around the MP2307DN-LF-Z and SM6T22A. 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 PDB2 KiCad files?

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

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