
M PDB
Def12345678/M-FC-G474-Rev-A
Modular STM32G474 Flight Controller Rev-A. Focus on modularity using JST-SH connectors for all peripherals (ESC, RX, etc.). ICM-42688-P IMU and DPS368 barometer. Requires external 5V 2.5A (no onboard BEC).

Modular STM32G474 Flight Controller Rev-A. Focus on modularity using JST-SH connectors for all peripherals (ESC, RX, etc.). ICM-42688-P IMU and DPS368 barometer. Requires external 5V 2.5A (no onboard BEC). 30.5x30.5mm mouting holes.
M FC is an open-source printed circuit board by Def12345678, from the Def12345678/M-FC-G474-Rev-A repository on GitHub, published under the MIT licence. It is a 4-layer board of 38.5 × 42 mm with 112 parts on 104 nets, routed with 545 tracks and 171 vias.
It is built around the AT7456E, STM32G474RET6 and DPS368XTSA1, with the W25Q128JVSIQ, LP5912-3.3DRVR and ICM-42688-P among its other parts. Its parts include 39 capacitors, 23 resistors, 8 ICs, 7 diodes and 7 connectors. It belongs with the robots and motor control boards and the STM32 boards of this library.
Note: This is REV-1 — a Proof-of-Concept / educational build. REV-2 is in development and will address known hardware ergonomics issues. Not recommended for production use.
M-FC has been flying on a 5" freestyle build for over a year.

M-FC is a DIY flight controller designed for FPV drones 30.5x30.5mm mounting holes, built around the STM32G474RET6 microcontroller and running Betaflight 4.6. The "Modular" name reflects the connector philosophy — every peripheral interface is broken out via JST-SH connectors, making wiring clean, repeatable, and swap-friendly.
The board is paired with a dedicated PDB in a standard FC/PDB stack configuration. The FC itself operates at 5V (no onboard BEC), sourcing power from the ESC or PDB. REV-2 will include an onboard BEC.
| Component | Details |
|---|---|
| MCU | STM32G474RET6 |
| IMU | ICM-42688-P (SPI2) |
| Barometer | DPS368 (I2C4) |
| Magnetometer | Not populated |
| OSD | AT7456E (SPI1) |
| Blackbox Flash | W25Q128JVSIQ — 16 MB (SPI3) |
| USB | USB-C (with detect on PA10) |
| Mounting | 30.5 × 30.5 mm |
| Input Voltage | 5V (no onboard BEC — requires 5V from ESC or PDB) |
The FC does not regulate voltage from the battery. 5V must be supplied externally — either from an ESC BEC or from the PDB — via the dedicated 5V pads on the board.
Two separate LDO regulators are present onboard:
A Schottky diode is used to isolate USB power from battery power. When powered via USB only, the FC supplies power exclusively to the MCU, sensors (IMU, barometer), OSD chip, flash, GPS, and RX. All remaining peripherals (motors, VTX, etc.) are only powered when the battery is connected via the PDB.
| Parameter | Value |
|---|---|
| Max continuous current | ~120 A total |
| Per-motor channel | ~30 A |
| Configuration | FC + PDB stack |
The FC connects to the PDB via an 8-pin JST-SH connector plus dedicated 5V_IN and GND solder pads. The 5V_IN pad powers the FC only — it does not back-feed to the PDB rail.
The PDB includes:
Each ESC must be connected through the PDB. The VBAT pin on the 8-pin JST-SH outputs a voltage-divided signal safe for the MCU ADC, used for battery voltage monitoring in Betaflight.
All peripheral connections use JST-SH connectors.
| Connector | Pins | Interface | Notes |
|---|---|---|---|
| ESC | 8 | DSHOT + telemetry | Motors 1–4 |
| RX | 4 | UART | RC receiver |
| CAM | 3 | Camera control | Analog camera |
| VTX | 4 | UART | Video transmitter |
| GPS | 6 | UART + I2C | GPS + compass |
| LED | 3 | LED strip | Addressable LEDs |
Additional renders, routing views, and PCB previews are available in the img/ folder.
M-FCSTM32G47XPre-compiled firmware (.hex) and the target config file are included in this repository. The hex supports all features listed below.
| Feature | Detail |
|---|---|
| Gyroscope / Accelerometer | ICM-42688-P via SPI2 |
| Barometer | DPS368 via I2C4 |
| Blackbox | W25Q128FV via SPI3, default device |
| OSD | MAX7456 (AT7456E) via SPI1 |
| Motors | DSHOT bitbang, pins PA0–PA3 |
| LED strip | PC0 |
| Buzzer | PC3 (inverted) |
| Debug LEDs | PB6, PB7, PB9 |
| VBAT ADC | PC1 |
| Current ADC | PC2 |
| Camera control | PB0 |
| GPS | Enabled |
| Magnetometer | Enabled (I2C2) |
| Position hold | Enabled |
| Altitude hold | Enabled |
| UART | TX | RX | Suggested Use |
|---|---|---|---|
| UART1 | PC4 | PC5 | — |
| UART3 | PB10 | PB11 | — |
| UART4 | PC10 | PC11 | — |
| UART5 | PC12 | PD2 | — |
| Bus | SCL | SDA | Used for |
|---|---|---|---|
| I2C2 | PA8 | PA9 | Magnetometer |
| I2C3 | PC8 | PC9 | — |
| I2C4 | PC6 | PC7 | Barometer (DPS368) |
| Index | Pin | Timer | Channel |
|---|---|---|---|
| Motor 1 | PA0 | TIM2 | CH1 |
| Motor 2 | PA1 | TIM2 | CH2 |
| Motor 3 | PA2 | TIM2 | CH3 |
| Motor 4 | PA3 | TIM2 | CH4 |
| CC | PB0 | TIM3 | CH3 |
| LED strip | PC0 | — | CH1 |
.hex file from this repository.bl via CLI..hex.You can compile your own firmware with custom flags. Copy the target config file into the configs/ folder of the Betaflight source tree, then build normally.
Building was tested using WSL. Refer to the official Betaflight build guide for setup instructions: https://betaflight.com/docs/development/building/Building-in-Ubuntu
Blackbox logs and DVR footage from test flights are available in the logs/ folder and on https://youtu.be/7Q5jRaf4V_Y(#) / https://pixeldrain.com/u/gxZJVt8E(#).
Logs were recorded using the onboard W25Q128JVSIQ flash via Betaflight 4.6 blackbox at 1kHz.
| Component | Details |
|---|---|
| ESC | LittleBee Spring 30A (BlueJay firmware) |
| VTX | SpeedyBee TX800 (Pagoda2) |
| RX | SpeedyBee Nano ELRS |
| Camera | Mista 1672 |
| Motors | Emax RS2205 2350KV |
| Battery | 4S 1550mAh (Ovionic) |
| Frame | Geprc MK4 5" |
Thanks to @awocrf for reviewing the schematic for correctness and readability, and for helping with PCB layout aesthetics.
This project is released under the MIT License. See LICENSE for details.
Firmware is based on Betaflight, licensed under GPLv3.
This is currently a personal/educational project. REV-2 is in active development. Issues and suggestions are welcome via GitHub Issues.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 19 | 100n | Capacitor_SMD:C_0402_1005Metric | C1, C2, C3, C4, C11, C13, C20, C30, C31, C32, C33, C34, C35, C36, C37, C38 +3 |
| 9 | 10k | Resistor_SMD:R_0402_1005Metric | R2, R3, R8, R9, R10, R11, R12, R13, R21 |
| 6 | 1u | Capacitor_SMD:C_0402_1005Metric | C23, C25, C26, C27, C28, C29 |
| 5 | GND | TestPoint:TestPoint_Pad_1.5x1.5mm | PAD6, PAD7, PAD8, PAD9, PAD10 |
| 4 | 10p | Capacitor_SMD:C_0402_1005Metric | C9, C10, C39, C40 |
| 4 | 10u | Capacitor_SMD:C_0402_1005Metric | C19, C22, C24, C44 |
| 4 | 1K | Resistor_SMD:R_0402_1005Metric | R14, R15, R16, R25 |
| 3 | 100K | Resistor_SMD:R_0402_1005Metric | R18, R20, R22 |
| 3 | 10K | Resistor_SMD:R_0402_1005Metric | R5, R17, R19 |
| 3 | 10n | Capacitor_SMD:C_0402_1005Metric | C14, C41, C42 |
| 3 | VCC | TestPoint:TestPoint_Pad_1.5x1.5mm | PAD1, PAD2, PAD4 |
| 2 | 47u | Capacitor_SMD:C_1206_3216Metric | C7, C8 |
| 2 | 5K1 | Resistor_SMD:R_0402_1005Metric | R23, R24 |
| 2 | 75 | Resistor_SMD:R_0402_1005Metric | R1, R4 |
| 2 | LP5912-3.3DRV | LP5912-3.3DRVR:SON65P200X200X80-7N | U6, U7 |
| 2 | SDM2U30CSP-7B | SDM2U40CSP-7B:DIO_SDM2U40CSP-7B | D1, D2 |
| 1 | 27MHz | smd2016:CRYSTAL-SMD_4P-L2.0-W1.6-BL | Y1 |
| 1 | 2p2 | Capacitor_SMD:C_0402_1005Metric | C12 |
| 1 | 300R | Capacitor_SMD:C_0805_2012Metric | FB1 |
| 1 | 3V3_CORE | TestPoint:TestPoint_Pad_D1.0mm | PAD18 |
| 1 | 5V_IN | TestPoint:TestPoint_Pad_1.5x1.5mm | PAD5 |
| 1 | 8MHz | NX3225GD:XTAL_NX3225GD-8MHZ-STD-CRA-3 | Y2 |
| 1 | AT7456E | AT7456E:TSSOP-28_L9.7-W4.4-P0.65-LS6.4-BL-EP-2 | U1 |
| 1 | Amber | LED_SMD:LED_0603_1608Metric | D12 |
| 1 | BOOT0 | B3U-1000P:SW_B3U-1000P | SW1 |
| 1 | Blue | LED_SMD:LED_0603_1608Metric | D10 |
| 1 | CAM | jst:JST_SH_SM03B-SRSS-TB_03x1.00mm_Angled | J1 |
| 1 | DPS368XTSA1 | DPS368XTSA1:XDCR_DPS368XTSA1 | U2 |
| 1 | ESC/PDB CONN | jst:JST_SH_SM08B-SRSS-TB_08x1.00mm_Angled | J3 |
| 1 | ESD | ESDALC6V1-1U2:ESDALC6V1-1U2 | D14 |
| 1 | GND | TestPoint:TestPoint_Pad_1.0x1.0mm | PAD24 |
| 1 | GND | TestPoint:TestPoint_Pad_D1.0mm | PAD22 |
| 1 | GPS | 6-pin-JST-SH:CONN-SMD_6P-P1.00_XUNPU_WAFER-SH1.0-6PWB | J8 |
| 1 | Green | LED_SMD:LED_0603_1608Metric | D11 |
| 1 | I2C3_SCL | TestPoint:TestPoint_Pad_1.5x1.5mm | PAD13 |
| 1 | I2C3_SDA | TestPoint:TestPoint_Pad_1.5x1.5mm | PAD14 |
| 1 | ICM-42688-P | ICM-42688-P:PQFN50P300X250X97-14N | U4 |
| 1 | LED | jst:JST_SH_SM03B-SRSS-TB_03x1.00mm_Angled | J5 |
| 1 | NRST | TestPoint:TestPoint_Pad_D1.0mm | PAD21 |
| 1 | PWM_1 | TestPoint:TestPoint_Pad_1.5x1.5mm | PAD15 |
| 1 | PWM_2 | TestPoint:TestPoint_Pad_1.5x1.5mm | PAD16 |
| 1 | PWM_3 | TestPoint:TestPoint_Pad_1.5x1.5mm | PAD3 |
| 1 | RED | LED_SMD:LED_0603_1608Metric | D18 |
| 1 | RX | jst:JST_SH_SM04B-SRSS-TB_04x1.00mm_Angled | J2 |
| 1 | RX5 | TestPoint:TestPoint_Pad_1.5x1.5mm | PAD11 |
| 1 | STM32G474RET6 | STM32G474RET6:QFP50P1200X1200X160-64N | U8 |
| 1 | SWDCLK | TestPoint:TestPoint_Pad_D1.0mm | PAD20 |
| 1 | SWDIO | TestPoint:TestPoint_Pad_D1.0mm | PAD19 |
| 1 | SolderJumper_2_Open | Capacitor_SMD:C_0402_1005Metric | JP1 |
| 1 | TX5 | TestPoint:TestPoint_Pad_1.5x1.5mm | PAD12 |
| 1 | USB-C-16P | USB-C-16P:KINGHELM_KH-TYPE-C-16P | J13 |
| 1 | USBLC6-2P6 | USBLC6-2P6:SOT50P160X60-6N | U9 |
| 1 | VBAT | TestPoint:TestPoint_Pad_1.0x1.0mm | PAD23 |
| 1 | VTX | jst:JST_SH_SM04B-SRSS-TB_04x1.00mm_Angled | J4 |
| 1 | W25Q128JVSIQ | W25Q128JVSIQ:SOIC127P790X216-8N | U3 |

Def12345678/M-FC-G474-Rev-A
Modular STM32G474 Flight Controller Rev-A. Focus on modularity using JST-SH connectors for all peripherals (ESC, RX, etc.). ICM-42688-P IMU and DPS368 barometer. Requires external 5V 2.5A (no onboard BEC).


darshg321/Mini-Air
Mini-Air is a DIY FPV drone! it features: - a custom flight controller supporting Betaflight - an ESC supporting Bluejay firmware - ELRS protocol - an analog camera - GPS

cypamigon/atmos_fc
Drone flight controller based on STM32G4 with IMU (ICM-468-P), barometer (DPS-386), OSD (MAX7456) and 32MB flash memory for blackbox logging — running Betaflight.

ara-mkr/f405-flight-controller
This is a flight controller I designed as a side project. It was fun and pretty challenging, and I'm planning to build a drone with it at some point!

desanv01/Flight-Controller-V2
STM32H743 controller: regulated power, signal-only ESC, neutral ArduPilot firmware, manufacturing data and engineering history.

ishantmahatopro/Vayu-F722
Custom 42x42mm 4-layer STM32F722 FPV flight controller for 5in and 7in cinematic and telemetry quads.

bastian2001/Kolibri-FC-Hardware
Hardware for the Kolibri Flight Controller. 30mm/20mm FC with RP2350 + ELRS onboard

qwertpas/O32controller
Miniature closed-loop controller for brushless DC motors
It measures 38.5 × 42 mm and has 4 copper layers, 1.6 mm thick.
112 parts, built around the AT7456E, STM32G474RET6, DPS368XTSA1 and W25Q128JVSIQ. 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.
From the Def12345678/M-FC-G474-Rev-A repository on GitHub, at the commit this page was made from: the board is M-FC-Kicad/M-FC.kicad_pcb and its schematic M-FC-Kicad/M-FC.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
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).