Skip to the content
4 layers38.5 × 42 mmM FC, the printed circuit board in 3D

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.

Size
38.5 × 42 mm
Copper layers
4
Thickness
1.6 mm
Parts
112
Nets
104
Pads
374
Tracks, vias
545, 171
Pours
64
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
13 May 2026
Updated
3 Jun 2026

Overview

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.

Main components

8

README

README.md

M-FC — Modular Flight Controller (REV-1)

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 + M-PDB stack installed in Geprc MK4 5" frame


Overview

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.


Hardware Specifications

ComponentDetails
MCUSTM32G474RET6
IMUICM-42688-P (SPI2)
BarometerDPS368 (I2C4)
MagnetometerNot populated
OSDAT7456E (SPI1)
Blackbox FlashW25Q128JVSIQ — 16 MB (SPI3)
USBUSB-C (with detect on PA10)
Mounting30.5 × 30.5 mm
Input Voltage5V (no onboard BEC — requires 5V from ESC or PDB)

Power Architecture

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:

  • One for the MCU
  • One for sensors (IMU, barometer)

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.

PDB (Stack)

ParameterValue
Max continuous current~120 A total
Per-motor channel~30 A
ConfigurationFC + 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:

  • 5V buck converter — 2.5 A output
  • 9V buck converter — 2.5 A output (configurable to 12V by replacing resistor R5 — refer to the schematic for the correct resistor value via the linked Texas Instruments buck calculator)

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.


Connector Pinout

All peripheral connections use JST-SH connectors.

ConnectorPinsInterfaceNotes
ESC8DSHOT + telemetryMotors 1–4
RX4UARTRC receiver
CAM3Camera controlAnalog camera
VTX4UARTVideo transmitter
GPS6UART + I2CGPS + compass
LED3LED stripAddressable LEDs

Additional Exposed Pads

  • 5V input pads — mandatory external 5V supply
  • PWM 1–3 — additional PWM outputs
  • UART breakout — spare UART pads
  • I2C breakout — spare I2C pads

Photos & Pinout Diagrams

M-FC REV-1 — assembled board Connector pinout — front Connector pinout — back

Additional renders, routing views, and PCB previews are available in the img/ folder.


Betaflight Target

  • Betaflight version: 4.6
  • Target name: M-FC
  • MCU family: STM32G47X

Pre-compiled firmware (.hex) and the target config file are included in this repository. The hex supports all features listed below.

Enabled Features

FeatureDetail
Gyroscope / AccelerometerICM-42688-P via SPI2
BarometerDPS368 via I2C4
BlackboxW25Q128FV via SPI3, default device
OSDMAX7456 (AT7456E) via SPI1
MotorsDSHOT bitbang, pins PA0–PA3
LED stripPC0
BuzzerPC3 (inverted)
Debug LEDsPB6, PB7, PB9
VBAT ADCPC1
Current ADCPC2
Camera controlPB0
GPSEnabled
MagnetometerEnabled (I2C2)
Position holdEnabled
Altitude holdEnabled

UART Map

UARTTXRXSuggested Use
UART1PC4PC5—
UART3PB10PB11—
UART4PC10PC11—
UART5PC12PD2—

I2C Map

BusSCLSDAUsed for
I2C2PA8PA9Magnetometer
I2C3PC8PC9—
I2C4PC6PC7Barometer (DPS368)

Motor Timer Map

IndexPinTimerChannel
Motor 1PA0TIM2CH1
Motor 2PA1TIM2CH2
Motor 3PA2TIM2CH3
Motor 4PA3TIM2CH4
CCPB0TIM3CH3
LED stripPC0—CH1

Flashing Firmware

Pre-compiled hex

  1. Download the .hex file from this repository.
  2. Open Betaflight Configurator 10.10+.
  3. Enter DFU mode — hold the boot button while plugging in USB-C, or send bl via CLI.
  4. In the Firmware Flasher tab, select Load Firmware [Local] and pick the .hex.
  5. Flash. Avoid Full chip erase unless necessary.

Building from source

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

Flight Logs & Blackbox Data

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.

Test build

ComponentDetails
ESCLittleBee Spring 30A (BlueJay firmware)
VTXSpeedyBee TX800 (Pagoda2)
RXSpeedyBee Nano ELRS
CameraMista 1672
MotorsEmax RS2205 2350KV
Battery4S 1550mAh (Ovionic)
FrameGeprc MK4 5"

Known Issues (REV-1)

  • Connector placement ergonomics — JST-SH connectors are not optimally positioned for clean cable routing in a standard stack build. This is the primary driver for REV-2.
  • Betaflight 4.5 blackbox bug — Blackbox was unreliable on Betaflight 4.5. Betaflight 4.6 resolves this; use 4.6 or later.
  • No onboard 5V BEC — Requires external 5V source from ESC or PDB.

Planned Changes (REV-2)

  • Revised connector layout for improved cable management
  • Onboard 5V BEC
  • Additional ergonomic improvements based on REV-1 testing

Acknowledgements

Thanks to @awocrf for reviewing the schematic for correctness and readability, and for helping with PCB layout aesthetics.


License

This project is released under the MIT License. See LICENSE for details.

Firmware is based on Betaflight, licensed under GPLv3.


Contributing

This is currently a personal/educational project. REV-2 is in active development. Issues and suggestions are welcome via GitHub Issues.

Parts

112
QtyValueFootprintReferences
19100nCapacitor_SMD:C_0402_1005MetricC1, C2, C3, C4, C11, C13, C20, C30, C31, C32, C33, C34, C35, C36, C37, C38 +3
910kResistor_SMD:R_0402_1005MetricR2, R3, R8, R9, R10, R11, R12, R13, R21
61uCapacitor_SMD:C_0402_1005MetricC23, C25, C26, C27, C28, C29
5GNDTestPoint:TestPoint_Pad_1.5x1.5mmPAD6, PAD7, PAD8, PAD9, PAD10
410pCapacitor_SMD:C_0402_1005MetricC9, C10, C39, C40
410uCapacitor_SMD:C_0402_1005MetricC19, C22, C24, C44
41KResistor_SMD:R_0402_1005MetricR14, R15, R16, R25
3100KResistor_SMD:R_0402_1005MetricR18, R20, R22
310KResistor_SMD:R_0402_1005MetricR5, R17, R19
310nCapacitor_SMD:C_0402_1005MetricC14, C41, C42
3VCCTestPoint:TestPoint_Pad_1.5x1.5mmPAD1, PAD2, PAD4
247uCapacitor_SMD:C_1206_3216MetricC7, C8
25K1Resistor_SMD:R_0402_1005MetricR23, R24
275Resistor_SMD:R_0402_1005MetricR1, R4
2LP5912-3.3DRVLP5912-3.3DRVR:SON65P200X200X80-7NU6, U7
2SDM2U30CSP-7BSDM2U40CSP-7B:DIO_SDM2U40CSP-7BD1, D2
127MHzsmd2016:CRYSTAL-SMD_4P-L2.0-W1.6-BLY1
12p2Capacitor_SMD:C_0402_1005MetricC12
1300RCapacitor_SMD:C_0805_2012MetricFB1
13V3_CORETestPoint:TestPoint_Pad_D1.0mmPAD18
15V_INTestPoint:TestPoint_Pad_1.5x1.5mmPAD5
18MHzNX3225GD:XTAL_NX3225GD-8MHZ-STD-CRA-3Y2
1AT7456EAT7456E:TSSOP-28_L9.7-W4.4-P0.65-LS6.4-BL-EP-2U1
1AmberLED_SMD:LED_0603_1608MetricD12
1BOOT0B3U-1000P:SW_B3U-1000PSW1
1BlueLED_SMD:LED_0603_1608MetricD10
1CAMjst:JST_SH_SM03B-SRSS-TB_03x1.00mm_AngledJ1
1DPS368XTSA1DPS368XTSA1:XDCR_DPS368XTSA1U2
1ESC/PDB CONNjst:JST_SH_SM08B-SRSS-TB_08x1.00mm_AngledJ3
1ESDESDALC6V1-1U2:ESDALC6V1-1U2D14
1GNDTestPoint:TestPoint_Pad_1.0x1.0mmPAD24
1GNDTestPoint:TestPoint_Pad_D1.0mmPAD22
1GPS6-pin-JST-SH:CONN-SMD_6P-P1.00_XUNPU_WAFER-SH1.0-6PWBJ8
1GreenLED_SMD:LED_0603_1608MetricD11
1I2C3_SCLTestPoint:TestPoint_Pad_1.5x1.5mmPAD13
1I2C3_SDATestPoint:TestPoint_Pad_1.5x1.5mmPAD14
1ICM-42688-PICM-42688-P:PQFN50P300X250X97-14NU4
1LEDjst:JST_SH_SM03B-SRSS-TB_03x1.00mm_AngledJ5
1NRSTTestPoint:TestPoint_Pad_D1.0mmPAD21
1PWM_1TestPoint:TestPoint_Pad_1.5x1.5mmPAD15
1PWM_2TestPoint:TestPoint_Pad_1.5x1.5mmPAD16
1PWM_3TestPoint:TestPoint_Pad_1.5x1.5mmPAD3
1REDLED_SMD:LED_0603_1608MetricD18
1RXjst:JST_SH_SM04B-SRSS-TB_04x1.00mm_AngledJ2
1RX5TestPoint:TestPoint_Pad_1.5x1.5mmPAD11
1STM32G474RET6STM32G474RET6:QFP50P1200X1200X160-64NU8
1SWDCLKTestPoint:TestPoint_Pad_D1.0mmPAD20
1SWDIOTestPoint:TestPoint_Pad_D1.0mmPAD19
1SolderJumper_2_OpenCapacitor_SMD:C_0402_1005MetricJP1
1TX5TestPoint:TestPoint_Pad_1.5x1.5mmPAD12
1USB-C-16PUSB-C-16P:KINGHELM_KH-TYPE-C-16PJ13
1USBLC6-2P6USBLC6-2P6:SOT50P160X60-6NU9
1VBATTestPoint:TestPoint_Pad_1.0x1.0mmPAD23
1VTXjst:JST_SH_SM04B-SRSS-TB_04x1.00mm_AngledJ4
1W25Q128JVSIQW25Q128JVSIQ:SOIC127P790X216-8NU3

More from Def12345678/M-FC-G474-Rev-A

1
  • 4 layers38.5 × 42 mmM PDB, the printed circuit board in 3D

    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).

    55 partsMIT

Similar boards

  • 6 layers60.4 × 98.3 mmDronePCB, the printed circuit board in 3D

    DronePCB

    WiktorKociuba/drone

    207 parts
  • 2 layers41 × 42 mmMini Air FC, the printed circuit board in 3D

    Mini Air FC

    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

    101 parts2CERN-OHL-W-2.0
  • 4 layers40 × 40 mmAtmos fc, the printed circuit board in 3D

    Atmos fc

    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.

    112 parts1MIT
  • 6 layers37 × 37 mmFc f405 2026-10-16 1025, the printed circuit board in 3D

    Fc f405 2026-10-16 1025

    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!

    122 partsCERN-OHL-P-2.0
  • 6 layers40.6 × 40.5 mmFlight Controller, the printed circuit board in 3D

    Flight Controller

    desanv01/Flight-Controller-V2

    STM32H743 controller: regulated power, signal-only ESC, neutral ArduPilot firmware, manufacturing data and engineering history.

    169 partsCERN-OHL-S-2.0
  • 4 layers42 × 42 mmVayuF7, the printed circuit board in 3D

    VayuF7

    ishantmahatopro/Vayu-F722

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

    146 partsMIT
  • 8 layers38 × 38 mmKolibri v0.5, the printed circuit board in 3D

    Kolibri v0.5

    bastian2001/Kolibri-FC-Hardware

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

    221 parts8GPL-3.0
  • 4 layers27 × 27 mmO32controller, the printed circuit board in 3D

    O32controller

    qwertpas/O32controller

    Miniature closed-loop controller for brushless DC motors

    126 parts37MIT

Questions

How big is the M FC PCB?

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

What parts does the M FC use?

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.

Where can I download the M FC KiCad files?

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.

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