

Drone Motherboard
PCB and Code to control a quadcopter drone, uses PID controllers and Kalman filters with sensors to implement angle mode control.
- Size
- 47.5 × 47.5 mm
- Copper layers
- 4
- Thickness
- 1.6 mm
- Parts
- 63
- Nets
- 77
- Pads
- 245
- Tracks, vias
- 444, 124
- Pours
- 6
- Routed
- Yes
- KiCad
- KiCad 8.0 (file 20240108)
- Created
- 26 Aug 2025
- Updated
- 26 Aug 2025
Overview
Drone Motherboard is an open-source printed circuit board by pagabel48, from the pagabel48/Drone_Controller repository on GitHub. It is a 4-layer board of 47.5 × 47.5 mm with 63 parts on 77 nets, routed with 444 tracks and 124 vias.
It is built around the STM32F401RCT6, LM2574M-3.3 and IRF9540NS. Its parts include 19 capacitors, 12 resistors, 9 connectors, 6 diodes and 3 ICs. It belongs with the robots and motor control and power boards and the STM32 boards of this library.
Main components
3STM32F401RCT6
LQFP-64(10x10)-40℃~+85℃ 1.7V~3.6V 12bit 256KB 32 Bit 50 64KB 84MHz ARM Cortex-M4 Built-in FLASH LQFP-64(10x10) Microcontrollers (MCU/MPU/SOC) ROHSSTMicroelectronicsMicrocontrollers (MCU/MPU/SOC)LM2574M-3.3
SOIC-14-300mil-40℃~+125℃@(TJ) 1 4.5V~60V 500mA 52kHz Buck Buck Built-in SOIC-14-300mil DC-DC Converters ROHSTexas InstrumentsDC-DC ConvertersIRF9540NS
TO-263MOSFETsMinos
README
README.mdDrone Controller

The control board is based around an STM32f401 MCU. For power regulation a buck converter is used to generate steady 3.3v from a 4s LiPO Battery or USB 5v line. When powered over battery, the highside power latch allows the board to be toggled on or off.
To allow for closed loop control a BMP280 barometer and an ICM42670P IMU are connected over I2C, and PWM is used to communicate with the motor ESCs and controller receiver. Programming is done over USB, and pins are exposed for UART, I2C, and SWD protocols for extensibility.
Four layers were used to make routing easier and improve signal integrity.
Routing


Schematic

Code

State estimation is achieved with two Kalman filters (attitude and altitude), and PID controllers are used in combination with a mixer to get final motor throttle values.
Custom drivers were written to interface with the sensors, and a matrix math library was written using c++ operator overloading - this allows for readable state space control code. The IMU driver reads when triggered by a pin interupt, and the barometer driver uses polling.
A testing routine was written which can be run instead of the main drone loop - it runs unit tests for the code, then tests operation of the sensors, motors, Kalman filters, and status light.
The firmware automatically turns the drone off when the battery voltage drops below a safe level.
Controller Code is Contained in Firmare/Core/
Code Structure

Frame

The frame was designed in fusion 360 and was 3d printed using PETG plastic. Care was taken to maximize rigidity whilst minimizing weight.
Parts
63| Qty | Value | Footprint | References |
|---|---|---|---|
| 8 | 0u1 | Capacitor_SMD:C_0402_1005Metric | C5, C8, C12, C13, C15, C16, C17, C19 |
| 6 | 10k | Resistor_SMD:R_0402_1005Metric | R1, R2, R4, R6, R8, R10 |
| 6 | Conn_01x04_Pin | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical | J1, J2, J3, J4, J5, J7 |
| 4 | 11DQ05 | Diode_THT:D_DO-41_SOD81_P7.62mm_Horizontal | D1, D2, D3, D5 |
| 4 | MountingHole | MountingHole:MountingHole_3.2mm_M3_Pad | H1, H2, H3, H4 |
| 3 | 1k5 | Resistor_SMD:R_0402_1005Metric | R3, R5, R7 |
| 2 | 10n | Capacitor_SMD:C_0402_1005Metric | C4, C14 |
| 2 | 10p | Capacitor_SMD:C_0402_1005Metric | C9, C10 |
| 2 | 22uF | Capacitor_THT:C_Radial_D5.0mm_H5.0mm_P2.00mm | C3, C7 |
| 2 | 2u2 | Capacitor_SMD:C_0402_1005Metric | C6, C20 |
| 2 | 4k7 | Resistor_SMD:R_0402_1005Metric | R9, R11 |
| 2 | 4u7 | Capacitor_SMD:C_0402_1005Metric | C11, C18 |
| 2 | SW_Push | Button_Switch_THT:SW_PUSH_6mm | SW1, SW2 |
| 2 | TestPoint | TestPoint:TestPoint_Pad_4.0x4.0mm | TP1, TP2 |
| 1 | 16MHz | Crystal:Crystal_SMD_3225-4Pin_3.2x2.5mm | Y1 |
| 1 | 220uF | Capacitor_THT:C_Radial_D6.3mm_H11.0mm_P2.50mm | C2 |
| 1 | 2N222A_NPN | Package_TO_SOT_THT:TO-92 | Q2 |
| 1 | 2N2907_PNP | Package_TO_SOT_THT:TO-92 | Q1 |
| 1 | 330uH | Inductor_THT:L_Axial_L5.3mm_D2.2mm_P7.62mm_Horizontal_Vishay_IM-1 | L1 |
| 1 | 470 | Resistor_SMD:R_0402_1005Metric | R13 |
| 1 | Conn_01x02_Pin | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J6 |
| 1 | Conn_01x04_Socket | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical | J8 |
| 1 | GREEN | LED_THT:LED_D5.0mm_Clear | D6 |
| 1 | IRF9540N | Package_TO_SOT_THT:TO-220-3_Vertical | Q3 |
| 1 | LM2574M-3.3 | Package_SO:SOIC-14W_7.5x9mm_P1.27mm | U1 |
| 1 | RED | LED_THT:LED_D5.0mm_Clear | D4 |
| 1 | STM32F401RCT6 | Package_QFP:LQFP-64_10x10mm_P0.5mm | U2 |
| 1 | SW_SPDT | footprints:CUS-12TB_NDC | SW3 |
| 1 | USB_OTG | Connector_USB:USB_Micro-B_Amphenol_10118193-0001LF_Horizontal | J9 |
| 1 | ~ | Package_LGA:LGA-14_3x2.5mm_P0.5mm_LayoutBorder3x4y | U3 |
Questions
How big is the Drone Motherboard PCB?
It measures 47.5 × 47.5 mm and has 4 copper layers, 1.6 mm thick.
What parts does the Drone Motherboard use?
63 parts, built around the STM32F401RCT6, LM2574M-3.3 and IRF9540NS. 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 Drone Motherboard KiCad files?
From the pagabel48/Drone_Controller repository on GitHub, at the commit this page was made from: the board is PCB/Drone Motherboard.kicad_pcb and its schematic PCB/Drone Motherboard.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the Drone Motherboard design in my own project?
Its repository states no licence, so its author keeps all rights: ask pagabel48 before reusing the design.
Similar boards
- 2 layers391 × 131.1 mm

- 2 layers63 × 49.2 mm

STM32F4XX
gianlucarenzi/STM32F4XX
A generic development board for the STM32F401 microcontroller.
42 parts2GPL-3.0 - 2 layers344.7 × 123.1 mm

- 4 layers76 × 76.9 mm

- 2 layers86.4 × 97.2 mm

- 2 layers102.4 × 98.6 mm

- 2 layers25.4 × 80.2 mm

RedPill board
simonyiszk/STM32-RedPill
STM32-based development board with integrated ST-LINK/V2 compatible programmer, to be used on SEM advanced courses.
63 parts1CERN-OHL-W-2.0 - 2 layers309.6 × 123.8 mm
