Skip to content

A fully custom STM32F405 Flight Controller designed from scratch (Hardware + Firmware) to master the physics of flight.

License

Notifications You must be signed in to change notification settings

Visaging/Pulse-Flight-Controller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PULSE Flight Controller

Why "Pulse"?

The name is inspired by two things I love:

  1. Pulse Width Modulation (PWM): The heartbeat signal that powers every motor in this drone.
  2. Beatbox: A personal touch (look at the silkscreen artwork on the top layer).

Overview

Pulse is a completely custom flight controller that was created from the ground up. I designed the whole stack myself to truly understand how a drone works, from the low-level motor mixing logic to the physics of the gyroscope, even though it would have been simpler to simply rely on off-the-shelf hardware and Betaflight. The custom PCB designs and the particular STM32 firmware I wrote to make the silicon work are both included in this repository, which acts as documentation for that process.

Hardware Stack

  • MCU: STM32F405RGT6 - Chosen because it's a beast at math and has enough pins for everything.
  • IMU: ICM-42688-P - Newer and cleaner noise performance than the old MPU6000.
  • Barometer: BMP280 - for altitude hold.
  • Gimbal Drivers: 2x DRV8313 - integrated directly on the FC.
    • Instead of a heavy separate gimbal controller board, I built the drivers right onto the FC to save weight and space.
  • Power System: - Redesigned buck converter using LMR14030SDDAR.
    • I initially designed it for 6S (25.2V), but realized I wanted headroom. The new design handles up to 40V input.

The Firmware

Key Features:

  • 1kHz Control Loop: A strict real-time scheduler runs the physics engine every 1ms.
  • Quad-X Mixing: Takes PID output and mathematically mixes it for the 4 motors using TIM8 (Timer).
  • Interrupt driven I/O: The Receiver (UART3) and Telemetry (UART4/5) run in the background via Interrupts, so the main flight loop never "freezes" waiting for data.
  • Smart Telemetry: Streams live voltage, angles, and state to a Raspberry Pi companion computer.

How to Flash It

I added a USB-C port and the "Holy Trinity" of buttons (BOOT + RESET) to the PCB so I don't need external dongles.

  1. Plug in USB-C.
  2. Hold BOOT.
  3. Click RESET.
  4. Release BOOT.
  5. Flash the .bin file using STM32CubeProgrammer (USB DFU Mode).

PCB Schematics

image

PCB Layout and Render

Layout

Overall:

image

Top Layer:

image

Layer 2:

image

Layer 3:

image

Bottom Layer:

image

Front Silkscreen:

image

Back Silkscreen:

image

Render

Front:

image

Back:

image

Bill of Material

Item Description Quantity Unit Price ($) Total Price ($) URL Running Total ($)
PCBA PCB 5 PCB, 2 PCBA $194.74 $194.74 https://jlcpcb.com/ $194.74
Tactile Switches Boot and Reset Buttons 2 $0.0363 $0.0726 https://robu.in/product/ts6610tp-160gf-bxg-022-shou-han-50ma-100m%cf%89-100000-times-12v-160gf-round-button-standing-paste-spst-smd-tactile-switches-rohs/ $195.35
JLCPCB Order image image image
Cart image

Lessons Learned

  • Power is hard: My first schematic had a buck converter that would have fried on a 6S battery. Catching that mistake saved the project.
  • Routing matters: Moving to 4 layers was scary at first, but it solved all my noise and heat issues.
  • Code vs. Reality: Writing the firmware forced me to verify every single pin connection. I found out that "polling" a receiver is too slow, so I had to learn how Interrupts work.

License: MIT

About

A fully custom STM32F405 Flight Controller designed from scratch (Hardware + Firmware) to master the physics of flight.

Resources

License

Stars

Watchers

Forks