EMBEDDED SOFTWARE • FIRMWARE • SYSTEMS

Building an STM32 Flight Controller From Scratch

I'm developing a quadcopter flight controller around the STM32F407, writing low-level peripheral drivers in C and documenting the process from GPIO interrupts to sensor acquisition, control systems and eventually autonomous flight.

Currently working on: I2C + MPU6050 integration
STM32F407 development board connected to a breadboard
STM32F407 Flight Controller Development

CURRENT PROJECT

STM32F407 Quadcopter

The goal is to build the flight controller software from the peripheral level upward instead of relying on a prebuilt flight-control stack.

Building the Stack From the Bottom Up

I'm writing drivers for the STM32F407 peripherals that the flight controller will depend on, then building the sensor, estimation and control layers on top of them.

The project will eventually combine IMU measurements, attitude estimation, PID control, motor output and receiver input into a complete self-leveling flight controller.

C STM32F407 GPIO IRQ / EXTI I2C SPI UART MPU6050 PID

Development Progress

Flight Controller
  • ✓
    GPIO Driver Digital input and output
  • ✓
    External Interrupts EXTI and NVIC interrupt handling
  • ✓
    SPI Driver Transmission validated with logic analyzer
  • →
    I2C Driver Current development
  • MPU6050 Driver Accelerometer and gyroscope
  • Attitude Estimation Sensor fusion and orientation
  • ESC / Motor Control PWM output
  • PID Flight Control Self-level stabilization
  • First Hover Integrated flight test

LATEST DEVELOPMENT LOG

Validating SPI With a Logic Analyzer

STM32F407 connected to a logic analyzer for SPI testing

Sending "Hello World" Over SPI and Verifying It on the Wire

I've moved from GPIO and interrupts into serial communication on my STM32F407 flight controller.

In the latest development log, I configure SPI2 as a master, transmit "Hello World" using my own SPI driver and connect a logic analyzer directly to the STM32 to verify the resulting clock and data signals.

The analyzer lets me validate both the decoded message and the individual clock edges produced by the hardware.

Read Development Log → Source

OTHER WORK

Systems & Embedded Projects

Projects focused on low-level software, operating systems, embedded development and hardware communication.

Operating System

A 32-bit operating system written in C and x86 assembly with memory management, scheduling, terminal support and filesystem functionality.

C x86 ASM QEMU

STM32 LoRa Telemetry

Embedded telemetry system using STM32 peripheral interfaces, an MPU6050 IMU, LoRa radio communication and a Python ground station.

STM32 C LoRa Python

Linux System Monitor

Linux systems project that reads kernel interfaces such as /proc to inspect CPU, memory, processes and filesystem information.

Linux C /proc
Robert Smith

ABOUT

Software Engineer Focused on Embedded & Systems Software

I'm a software engineer with a B.S. in Computer Science and professional experience building production software and data systems.

My current work focuses heavily on lower-level software: embedded C, microcontrollers, operating systems, Linux and hardware communication.